/* Pixelado Dev — pixelado.dev. Plain CSS, no build step. */

/* Pixelify Sans (SIL OFL 1.1, see fonts/OFL.txt), served from this site. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("fonts/pixelify-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("fonts/pixelify-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --night-950: #070B17;
  --night-900: #0B1124;
  --night-850: #101833;
  --night-800: #16214A;
  --night-700: #1F2D61;
  --night-600: #2B3C7A;
  --night-400: #5E73B8;
  --ink: #EAF0FF;
  --ink-muted: #9AA8D6;
  --on-accent: #070B17;
  --accent: #3D7DFF;
  --accent-light: #9CBEFF;
  --accent-dark: #1A3C99;
  --glow: #45D4FF;

  /* Corner cut in 2 px pixel steps. */
  --step: polygon(
    4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px,
    calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px),
    calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%,
    4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px),
    0 4px, 2px 4px, 2px 2px, 4px 2px
  );
  --px: 3px; /* one logical pixel of the characters on small screens */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--night-900);
  /* 4x4 dot tile, two faint dots per tile. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='1' height='1' fill='%23101833'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23101833'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: "Pixelify Sans", ui-monospace, monospace;
  font-size: 18px;
  line-height: 1.5;
}

img { image-rendering: pixelated; display: block; }

main, footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0; }

h2 {
  font-size: 26px;
  margin: 56px 0 20px;
  text-align: center;
  color: var(--glow);
}

p { margin: 0 0 12px; }
.muted { color: var(--ink-muted); }
.center { text-align: center; max-width: 34em; margin-left: auto; margin-right: auto; }

a { color: var(--accent-light); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

/* Hero */
.hero {
  text-align: center;
  padding: 48px 0 8px;
}
.hero-pixo {
  width: 132px; /* 6x of 22x24 */
  height: 144px;
  margin: 0 auto 16px;
}
.hero h1 {
  font-size: 44px;
  text-shadow: 3px 3px 0 var(--night-950);
}
.tagline {
  font-size: 22px;
  margin: 12px auto 8px;
  max-width: 20em;
}

/* Cards: frame (hard shadow) > plate (2 px border) > card (fill). */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.frame { filter: drop-shadow(3px 3px 0 var(--night-950)); }
.plate {
  height: 100%;
  padding: 2px;
  background: var(--night-400);
  clip-path: var(--step);
}
.card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(var(--night-700) 0 6px, var(--night-800) 6px);
  clip-path: var(--step);
}
.card .logo { width: 160px; height: 144px; margin-bottom: 16px; }
.card h3 { font-size: 24px; margin-bottom: 8px; }
.card p { color: var(--ink-muted); flex: 1; }

/* Button: drop shadow on the link, plate on the inner span. */
.btn {
  display: inline-block;
  margin-top: 8px;
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 600;
  filter: drop-shadow(3px 3px 0 var(--night-950));
}
.btn span {
  display: block;
  padding: 10px 18px;
  background: var(--accent);
  box-shadow: inset 0 2px 0 var(--accent-light), inset 0 -2px 0 var(--accent-dark);
  clip-path: var(--step);
}
.btn:hover span { background: #5590FF; }
.btn:active { filter: none; transform: translate(2px, 2px); }

/* Characters */
.crew {
  list-style: none;
  margin: 0 auto 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: center;
  gap: 16px 20px;
}
.crew li { text-align: center; color: var(--ink-muted); font-size: 16px; }
.crew img {
  width: calc(22 * var(--px));
  height: calc(24 * var(--px));
  margin: 0 auto 4px;
  animation: idle 1.6s steps(1) infinite;
}
.crew li:nth-child(2) img { animation-delay: -0.2s; }
.crew li:nth-child(3) img { animation-delay: -0.4s; }
.crew li:nth-child(4) img { animation-delay: -0.6s; }
.crew li:nth-child(5) img { animation-delay: -0.8s; }
.crew li:nth-child(6) img { animation-delay: -1.0s; }
.crew li:nth-child(7) img { animation-delay: -1.2s; }
.crew li:nth-child(8) img { animation-delay: -1.4s; }

@keyframes idle {
  0% { transform: translateY(0); }
  50% { transform: translateY(calc(-1 * var(--px))); }
}

/* Footer */
footer {
  margin-top: 64px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 2px solid var(--night-600);
  text-align: center;
}
footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 12px;
  font-size: 20px;
}
footer p { font-size: 15px; }

@media (min-width: 640px) {
  :root { --px: 4px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 72px; }
  .hero-pixo { width: 176px; height: 192px; } /* 8x */
  .hero h1 { font-size: 60px; }
}

@media (min-width: 860px) {
  .crew { grid-template-columns: repeat(8, max-content); }
}

@media (prefers-reduced-motion: reduce) {
  .crew img { animation: none; }
}
