/* The Grid — website
   Palette and type follow the game's own direction: near-black circuit board,
   copper traces, cyan as the single accent. Neon is used as emphasis, never as
   wallpaper. */

@font-face {
  font-family: 'Orbitron';
  src: url('/assets/fonts/Orbitron.ttf') format('truetype');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #0a0a12;
  --bg-raised: #101120;
  --bg-sunken: #07070f;
  --line: #232840;
  --line-soft: #191d30;

  --text: #e9efff;
  --text-dim: #a3b0cd;
  --text-faint: #7c8aae;

  --cyan: #00d4ff;
  --copper: #cc8833;
  --blue: #00d4ff;
  --orange: #ff6b00;
  --green: #00ff88;
  --purple: #cc00ff;
  --white: #ffffff;

  --display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;

  --wrap: 1140px;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--cyan);
  color: #001018;
  padding: 0.6rem 1rem;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

/* ── buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--primary:hover {
  background: rgba(0, 212, 255, 0.22);
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text-dim);
}

.btn--ghost:hover {
  border-color: var(--text-faint);
  color: var(--text);
}

.btn--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
}

.btn--lg {
  padding: 1.05rem 2.4rem;
  font-size: 1.05rem;
}

/* ── header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(7, 7, 15, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__mark img {
  width: 132px;
  height: auto;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

@media (max-width: 800px) {
  .site-nav {
    display: none;
  }

  .site-header .btn {
    margin-left: auto;
  }
}

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  padding: clamp(3.5rem, 11vh, 7rem) clamp(1rem, 5vw, 2rem) clamp(3.5rem, 9vh, 6rem);
}

.hero__board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero::after {
  /* keeps the board legible behind the copy without dimming it flat */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 60% at 50% 45%,
    rgba(10, 10, 18, 0.92) 0%,
    rgba(10, 10, 18, 0.72) 55%,
    rgba(10, 10, 18, 0.35) 100%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero__logo {
  width: min(520px, 82vw);
  margin: 0 auto 1.5rem;
}

.hero__tagline {
  margin: 0 0 1.6rem;
  font-family: var(--mono);
  font-size: clamp(0.8rem, 2.4vw, 1rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hero__lede {
  margin: 0 auto 2.2rem;
  max-width: 62ch;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--text-dim);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.4rem;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hero__meta li {
  position: relative;
}

.hero__meta li + li::before {
  content: '';
  position: absolute;
  left: -0.8rem;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--copper);
  transform: translateY(-50%);
}

/* ── sections ─────────────────────────────────────────────────────────── */

.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) clamp(1rem, 5vw, 2rem);
  border-bottom: 1px solid var(--line-soft);
}

.section--tight {
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section__title {
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  margin-bottom: 0.9rem;
}

.section__lede {
  max-width: 58ch;
  margin: 0 0 2.8rem;
  color: var(--text-dim);
}

/* ── translation strip ────────────────────────────────────────────────── */

.translation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.translation li {
  background: var(--bg-raised);
  padding: 1.6rem 1.4rem;
}

.translation__to {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.translation__to[data-tint='copper'] { color: #e0a54d; }
.translation__to[data-tint='blue']   { color: var(--blue); }
.translation__to[data-tint='green']  { color: var(--green); }
.translation__to[data-tint='orange'] { color: #ff8a33; }

.translation p {
  margin: 0.7rem 0 0;
  font-size: 0.94rem;
  color: var(--text-dim);
}

/* ── gallery ──────────────────────────────────────────────────────────── */

.gallery__viewport {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-bottom: 1rem;
}

.gallery__viewport::-webkit-scrollbar {
  height: 8px;
}

.gallery__viewport::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.shot {
  flex: 0 0 min(880px, 88vw);
  scroll-snap-align: center;
  margin: 0;
}

.shot img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-sunken);
}

.shot figcaption {
  padding: 1.2rem 0.2rem 0;
  max-width: 60ch;
}

.shot h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.shot p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.6rem;
}

.gallery__arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.gallery__arrow svg {
  width: 20px;
  height: 20px;
}

.gallery__arrow:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
}

.gallery__arrow:disabled {
  opacity: 0.32;
  cursor: default;
}

.gallery__dots {
  display: flex;
  gap: 0.55rem;
}

.gallery__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.gallery__dot[aria-selected='true'] {
  background: var(--cyan);
  transform: scale(1.25);
}

/* ── steps ────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
  margin: 0 0 3.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 1.6rem 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-bottom: 0.7rem;
}

.steps h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.steps p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-dim);
}

/* ── closer ───────────────────────────────────────────────────────────── */

.closer {
  max-width: 700px;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) clamp(1rem, 5vw, 2rem);
  text-align: center;
}

/* ── footer ───────────────────────────────────────────────────────────── */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 5vw, 2rem) 3rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  width: 100%;
}

.site-footer p {
  margin: 0;
}

.site-footer__egg {
  height: 140px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}

.site-footer__egg:hover {
  opacity: 1;
  transform: rotate(-6deg) scale(1.08);
}

/* ── motion ───────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .gallery__viewport {
    scroll-behavior: auto;
  }
}
