/* ==========================================================================
   Benched Games — design tokens
   Palette: black / white / greys, one bold accent (yellow, matching the
   studio's own mockup CTA colour) used sparingly for actions only.
   ========================================================================== */

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --grey-100: #f4f4f4;
  --grey-200: #e6e6e6;
  --grey-400: #b3b3b3;
  --grey-600: #777777;
  --grey-800: #2b2b2b;
  --accent: #ffd400;

  --font-display: "Anton", "Archivo Black", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 2px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background-color: var(--white);
  background-image: url("../assets/paper-noise.svg");
  background-repeat: repeat;
  background-size: 220px 220px;
  color: var(--black);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}


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

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
  color: var(--grey-800);
}

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--grey-600);
  margin: 0 0 0.75em;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  padding: 0.9em 1.6em;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--black);
  color: var(--black);
}

.btn--ghost {
  background: transparent;
  color: var(--black);
}

.btn--ghost:hover {
  background: var(--black);
  color: var(--white);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--black);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--black);
}

.brand__mark {
  width: 34px;
  height: auto;
  flex-shrink: 0;
}

.brand__word {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1rem;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  text-decoration: none;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  border-color: var(--black);
}

.nav-toggle {
  display: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: clamp(48px, 10vw, 120px) 0 clamp(40px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}

.hero__lede {
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero__cta {
  display: flex;
  gap: 16px;
  margin-top: 1.5em;
  flex-wrap: wrap;
}

.hero__mark-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__mark-stage svg {
  width: 100%;
  height: 100%;
  max-width: 420px;
}

/* Logo mark + wink --------------------------------------------------------
   Real brand artwork (assets/logo/) — the mark just renders, full opacity,
   no load-time reveal animation (an earlier fade/scale-in version fought
   with the wink states via animation fill-mode and was confusing besides).

   The header/footer mark winks on hover, via CSS transition (instant,
   naturally reversible — a real :hover state, not a one-shot trigger).

   The HERO mark's wink is driven entirely by js/main.js as a CONTINUOUS
   function of scroll distance, not a triggered animation: it sets the eye
   opacity/scale directly via inline style every scroll frame, so it scrubs
   forward on scroll-down and back on scroll-up, at whatever rate you
   scroll — there is deliberately no CSS transition/animation on the hero's
   own eye elements, since a duration would fight against being scrubbed. */

.logo-mark .mark-shape {
  fill: var(--black);
}

.logo-mark--light .mark-shape {
  fill: var(--white);
}

.logo-mark__eye-o,
.logo-mark__eye-o-wink {
  transform-origin: center;
}

.logo-mark__eye-o-wink {
  opacity: 0;
}

/* Header/footer only: hover-wink via a real CSS transition, both ways
   (transition lives on the base rule so mouse-leave eases back too, not
   just the hover-in direction). */
.brand__mark .logo-mark__eye-o,
.brand__mark .logo-mark__eye-o-wink {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.brand:hover .brand__mark .logo-mark__eye-o {
  opacity: 0;
  transform: scaleY(0.1);
}

.brand:hover .brand__mark .logo-mark__eye-o-wink {
  opacity: 1;
}

/* Decorative sketchy tactics doodles ------------------------------------
   Hand-drawn-feel O/X/arrow diagrams scattered as background texture.
   Position + scale drift with scroll (see js/main.js); rough pencil edge
   comes from the shared #sketchy SVG filter defined inline on each page. */

.doodle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.doodle {
  position: absolute;
  width: 180px;
  height: auto;
  opacity: 0.7;
  will-change: transform;
}

.doodle .sketch-stroke {
  fill: none;
  stroke: var(--grey-400);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.block--dark .doodle .sketch-stroke {
  stroke: var(--grey-600);
}

.doodle .sketch-fill {
  fill: var(--grey-400);
  stroke: none;
}

.block--dark .doodle .sketch-fill {
  fill: var(--grey-600);
}

.doodle--a { width: 220px; top: -30px; right: -20px; }
.doodle--b { width: 140px; bottom: 6%; left: -30px; }
.doodle--c { width: 100px; top: 42%; left: 8%; opacity: 0.5; }
.doodle--d { width: 120px; bottom: -20px; right: 14%; opacity: 0.5; }
.doodle--e { width: 90px; top: 8%; right: 6%; opacity: 0.45; }
.doodle--f { width: 130px; bottom: -10px; left: 10%; opacity: 0.5; }

.hero > .wrap {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Section blocks — the studio's "block" layout language
   ========================================================================== */

.block {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 10vw, 120px) 0;
  border-top: 2px solid var(--black);
}

.block > .wrap {
  position: relative;
  z-index: 1;
}

.block--dark {
  background-color: var(--black);
  background-image: url("../assets/paper-noise.svg");
  background-repeat: repeat;
  background-size: 220px 220px;
  background-blend-mode: screen;
  color: var(--white);
}

.block--dark p {
  color: var(--grey-400);
}

.block--grey {
  background: var(--grey-100);
}

.block__head {
  max-width: 60ch;
  margin-bottom: clamp(32px, 6vw, 56px);
}

.block__head h2 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
}

/* Reveal-on-scroll ------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* Mission / stats grid --------------------------------------------------- */

.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--black);
  border: 2px solid var(--black);
}

.mission-card {
  background: var(--white);
  padding: clamp(24px, 4vw, 36px);
}

.block--grey .mission-card {
  background: var(--grey-100);
}

.mission-card__num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  display: block;
  margin-bottom: 0.2em;
}

/* ==========================================================================
   Game cards
   ========================================================================== */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2px;
  background: var(--black);
  border: 2px solid var(--black);
}

.game-card {
  background: var(--white);
  text-decoration: none;
  color: var(--black);
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease;
}

.game-card:hover {
  background: var(--grey-100);
}

.game-card__art {
  aspect-ratio: 4 / 3;
  background: var(--grey-800);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.9rem;
  text-align: center;
  padding: 1em;
  position: relative;
  overflow: hidden;
}

.game-card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0px,
    rgba(255, 255, 255, 0.06) 2px,
    transparent 2px,
    transparent 10px
  );
}

.game-card__body {
  padding: 20px 24px 24px;
  border-top: 2px solid var(--black);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-card__tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-600);
  margin-bottom: 0.4em;
}

.game-card__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.3rem;
  margin: 0 0 0.4em;
}

.game-card__desc {
  font-size: 0.92rem;
  color: var(--grey-600);
  flex: 1;
}

.game-card__link {
  margin-top: 1em;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.game-card--soon {
  cursor: default;
}

.game-card--soon .game-card__art {
  background: var(--grey-200);
  color: var(--grey-600);
}

.game-card--soon:hover {
  background: var(--white);
}

/* ==========================================================================
   Newsletter block
   ========================================================================== */

.newsletter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}

.newsletter form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.newsletter input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.9em 1.1em;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
}

.block--dark .newsletter input[type="email"] {
  background: var(--black);
  border-color: var(--white);
  color: var(--white);
}

.newsletter__note {
  font-size: 0.8rem;
  color: var(--grey-600);
  margin-top: 0.6em;
}

.block--dark .newsletter__note {
  color: var(--grey-400);
}

.form-status {
  font-size: 0.85rem;
  margin-top: 0.8em;
}

/* ==========================================================================
   Footer — sticky mark that blends into the bottom edge
   ========================================================================== */

.site-footer {
  background: var(--black);
  color: var(--white);
  padding: clamp(48px, 8vw, 80px) 0 0;
  position: relative;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding-bottom: clamp(32px, 6vw, 56px);
  border-bottom: 1px solid var(--grey-800);
}

.site-footer__nav {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-footer__nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--grey-400);
}

.site-footer__nav a:hover {
  color: var(--white);
}

.site-footer__wordmark {
  padding: clamp(24px, 6vw, 48px) 0 0;
  overflow: hidden;
  line-height: 0.78;
}

.site-footer__wordmark span {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(3.2rem, 14vw, 11rem);
  color: var(--white);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transform: translateY(18%);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--grey-600);
  padding: 18px var(--gutter) 22px;
  border-top: 1px solid var(--grey-800);
  margin-top: 8px;
}

/* ==========================================================================
   Utility
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Game detail page
   ========================================================================== */

.game-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 8vw, 80px) 0 clamp(32px, 6vw, 56px);
  border-bottom: 2px solid var(--black);
}

.game-hero > .wrap {
  position: relative;
  z-index: 1;
}

.game-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--grey-600);
  margin-bottom: 1.5em;
}

.game-hero__back:hover {
  color: var(--black);
}

.game-hero__title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  max-width: 16ch;
}

.game-hero__platforms {
  display: flex;
  gap: 10px;
  margin-top: 1em;
  flex-wrap: wrap;
}

.pill {
  border: 2px solid var(--black);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-display);
}

.feature-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.feature-row:nth-child(even) {
  grid-template-columns: 1.1fr 0.9fr;
}

.feature-row:nth-child(even) .feature-row__graph {
  order: -1;
}

.feature-row + .feature-row {
  margin-top: clamp(56px, 9vw, 100px);
}

.feature-row__eyebrow {
  color: var(--grey-600);
}

/* Scroll-driven bar graph ------------------------------------------------ */

.stat-graph {
  border: 2px solid currentColor;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-bar {
  display: grid;
  grid-template-columns: 8ch 1fr 4ch;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.stat-bar__track {
  height: 14px;
  background: var(--grey-200);
  border: 1px solid var(--black);
  position: relative;
  overflow: hidden;
}

.block--dark .stat-bar__track {
  background: var(--grey-800);
  border-color: var(--white);
}

.stat-bar__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--accent);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-bar__value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stat-graph.is-visible .stat-bar__fill {
  width: var(--val, 0%);
}

/* Scroll-driven line graph ------------------------------------------------ */

.line-graph {
  border: 2px solid currentColor;
  padding: 24px;
}

.line-graph svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.line-graph .line-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.line-graph .grid-line {
  stroke: var(--grey-400);
  stroke-width: 1;
}

.block--dark .line-graph .grid-line {
  stroke: var(--grey-800);
}

.line-graph.is-visible .line-path {
  stroke-dashoffset: 0;
}

/* Scale-in-on-scroll (Crency-style) -------------------------------------- */

.scale-in {
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease;
}

.scale-in.is-visible {
  transform: scale(1);
  opacity: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 820px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__mark-stage {
    order: -1;
    max-width: 240px;
    margin: 0 auto;
  }

  /* The two large doodle shapes are tuned for wide layouts (the hero's
     two-column grid, big dark blocks) — at this width they're liable to
     sit over text (e.g. on top of the reflowed hero mark), so only the
     smaller accent shapes stay visible on narrow screens. */
  .doodle--a,
  .doodle--b {
    display: none;
  }

  .mission-grid,
  .games-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    position: fixed;
    inset: 66px 0 0 0;
    background: var(--white);
    flex-direction: column;
    padding: 32px var(--gutter);
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav a {
    font-size: 1.2rem;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    height: 2px;
    background: var(--black);
  }

  .newsletter {
    grid-template-columns: 1fr;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
  }

  .feature-row,
  .feature-row:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .feature-row:nth-child(even) .feature-row__graph {
    order: 0;
  }

  .stat-bar {
    grid-template-columns: 7ch 1fr 3.5ch;
    font-size: 0.78rem;
  }
}
