/* ============================================================
   RNG Tournament Agency — design tokens
   Snapped from reference: mugenstudio.framer.website
   ============================================================ */

:root {
  /* Type */
  --font: "Inter", "Inter Placeholder", -apple-system, BlinkMacSystemFont, sans-serif;

  --fs-display: 96px;
  --fs-h1: 64px;
  --fs-h2: 48px;
  --fs-h3: 40px;
  --fs-h4: 30px;
  --fs-h5: 25px;
  --fs-lg: 20px;
  --fs-md: 17.5px;
  --fs-sm: 14.5px;
  --fs-xs: 12px;

  /* Reference tracking: display -4%, body -2% */
  --tr-display: -0.04em;
  --tr-body: -0.02em;

  /* Surfaces */
  --bg: #000000;
  --bg-section: #050505;
  --bg-card: #0d0d0d;
  --bg-raised: #1c1c1c;

  /* Ink */
  --ink: #ffffff;
  --ink-2: #b8b8b8;
  --ink-3: #545454;

  /* Lines */
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);

  /* Accent — from the RNG deck (infrastructure spec text) */
  --accent: #f5a524;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 24px;
  --r-pill: 100px;

  /* Layout */
  --maxw: 1440px;
  --gutter: 24px;
  --rail: 52px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1100px) {
  :root {
    --fs-display: 56px;
    --fs-h1: 40px;
    --fs-h2: 32px;
    --fs-h3: 27px;
    --fs-h4: 23px;
    --fs-h5: 20px;
    --fs-lg: 18px;
    --fs-md: 16px;
    --rail: 20px;
  }
}

@media (max-width: 640px) {
  :root {
    --fs-display: 40px;
    --fs-h1: 32px;
    --fs-h2: 27px;
    --gutter: 16px;
    --rail: 16px;
  }
}

/* ============================================================
   Base
   ============================================================ */

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

/* No overflow-x guard here on purpose. Measured on the deployed page:
   scrollWidth - clientWidth = 0, because the only wide things are the marquee
   tracks and .marquee already clips them. A guard on <body> would turn body
   into its own scroll container (breaks scroll APIs and position:sticky);
   a guard on <html> is an odd mixed clip/visible state. Neither is worth it —
   if something ever overflows, clip that element, not the whole document. */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  font-variation-settings: "opsz" 32;
  font-size: var(--fs-md);
  line-height: 1.5;
  letter-spacing: var(--tr-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: var(--tr-display);
  line-height: 1.1;
}

p { margin: 0; }

::selection { background: var(--ink); color: var(--bg); }

/* Placeholder marker — data we do not have yet.
   Strip the .ph class once real numbers land. */
.ph {
  border-bottom: 1px dashed var(--accent);
  cursor: help;
}

/* ============================================================
   Preloader — element 0.1 from BLOCKS.md

   Reference mechanics, measured off its DOM rather than guessed:
     container  perspective: 1200px, scale ~1.8
     each glyph opacity 0.001 -> 1
                rotateX(40deg) -> 0
                translateX(200px) -> 0
                staggered per letter, tagline last
   Our lock-up has 3 letters + a descriptor instead of 5 letters + a tagline,
   so the same stagger maps onto R / N / G / "tournament agency".
   ============================================================ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: grid;
  place-items: center;
  /* the exit: fade + settle, driven by .is-done */
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader__logo {
  position: relative;
  width: clamp(210px, 33vw, 430px);
  aspect-ratio: 271 / 49;
  perspective: 1200px;
}

.loader .ll {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(200px) rotateX(40deg);
  animation: glyph-in 0.9s var(--ease) forwards;
  animation-delay: var(--d);
}

/* Stagger. Reference runs letter-by-letter, descriptor resolves last. */
.loader .ll--r { --d: 100ms; }
.loader .ll--n { --d: 220ms; }
.loader .ll--g { --d: 340ms; }
.loader .ll--w { --d: 560ms; }

@keyframes glyph-in {
  from { opacity: 0; transform: translateX(200px) rotateX(40deg); }
  to   { opacity: 1; transform: none; }
}

/* Page underneath stays locked while the loader is up */
body.is-loading { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  body.is-loading { overflow: auto; }
}

/* ============================================================
   Grain overlay — same technique as the reference
   (fixed, full-bleed, 5% opacity, mix-blend-mode: lighten).
   The noise itself is generated with SVG turbulence rather than lifted,
   so there is no third-party texture file to license.
   ============================================================ */

.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: lighten;
  background-repeat: repeat;
  background-size: 180px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) { .grain { display: none; } }

/* ============================================================
   Burger + full-screen menu — element 0.5
   ============================================================ */

.header__right { justify-self: end; display: flex; align-items: center; gap: 26px; }

/* Two bars, top one shorter — as drawn in the reference. */
.burger {
  width: 36px;
  height: 12px;
  padding: 0;
  position: relative;
  flex: none;
}
.burger span {
  position: absolute;
  right: 0;
  height: 2px;
  background: var(--ink);
  transition: width 0.35s var(--ease), transform 0.35s var(--ease), opacity 0.2s linear;
}
.burger span:nth-child(1) { top: 1px; width: 24px; }
.burger span:nth-child(2) { bottom: 1px; width: 36px; }
.burger:hover span:nth-child(1) { width: 36px; }

/* open state: the two bars cross */
.burger[aria-expanded="true"] span:nth-child(1) { width: 36px; transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { width: 36px; transform: translateY(-4px) rotate(-45deg); }

/* Drawer, not a curtain. Timings taken from the recording:
   panel travels ~0.55s, the blur behind comes up with it, and the lock-up
   glyphs land on the loader's stagger. */

.menu { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.menu.is-open { visibility: visible; }

.menu__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}
.menu.is-open .menu__scrim { opacity: 1; }

/* lock-up sitting in the space the drawer leaves free */
.menu__brand {
  position: absolute;
  top: 50%;
  left: 0;
  width: calc(100% - var(--panel-w));
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-inline: var(--rail);
  pointer-events: none;
}
.menu__mark {
  position: relative;
  width: clamp(180px, 22vw, 300px);
  aspect-ratio: 271 / 49;
  perspective: 1200px;
}
.menu__brand p {
  font-size: var(--fs-sm);
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 0.5s var(--ease) 0.5s;
}
.menu.is-open .menu__brand p { opacity: 1; }

.menu .mll { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.menu.is-open .mll { animation: glyph-in 0.9s var(--ease) forwards; animation-delay: var(--d); }
.menu .mll--r { --d: 60ms; }
.menu .mll--n { --d: 160ms; }
.menu .mll--g { --d: 260ms; }
.menu .mll--w { --d: 420ms; }

@media (max-width: 900px) { .menu__brand { display: none; } }

/* the drawer itself */
:root { --panel-w: clamp(300px, 40vw, 560px); }

.menu__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: var(--panel-w);
  background: #060606;
  border-left: 1px solid var(--line);
  padding: 96px clamp(24px, 2.6vw, 40px) 28px;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 40px);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.55s var(--ease);
}
.menu.is-open .menu__panel { transform: none; }

.menu__label {
  font-size: var(--fs-xs);
  color: var(--ink-3);
  display: block;
  margin-bottom: 12px;
}

.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  font-size: clamp(19px, 2vw, 25px);
  letter-spacing: var(--tr-display);
  padding-block: clamp(5px, 0.9vh, 10px);
  color: var(--ink-2);
  display: flex;
  align-items: baseline;
  gap: 9px;
  transition: color 0.25s var(--ease), transform 0.35s var(--ease);
  opacity: 0;
  transform: translateX(18px);
}
.menu.is-open .menu__nav a {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease) calc(180ms + var(--i) * 55ms),
              transform 0.5s var(--ease) calc(180ms + var(--i) * 55ms),
              color 0.25s var(--ease);
}
.menu__nav a:hover { color: var(--ink); }
.menu__nav em { font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); }

.menu__block { border-top: 1px solid var(--line-soft); padding-top: clamp(16px, 2.4vh, 26px); }
.menu__mail {
  display: block;
  font-size: var(--fs-md);
  letter-spacing: var(--tr-body);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  width: fit-content;
  transition: border-color 0.25s var(--ease);
}
.menu__mail:hover { border-color: var(--ink); }
.menu__note { display: block; margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-3); }

.menu__socials { display: flex; flex-wrap: wrap; gap: 8px; }
.menu__socials a {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 7px 15px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
  transition: all 0.28s var(--ease);
}
.menu__socials a:hover { color: var(--ink); border-color: rgba(255,255,255,0.32); }

.menu__legal {
  margin-top: auto;
  display: grid;
  gap: 5px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

body.menu-open { overflow: hidden; }
/* while the drawer is out the header keeps only the mark and the close control */
body.menu-open .header__nav,
body.menu-open .header__status { opacity: 0; pointer-events: none; }
.header__nav, .header__status { transition: opacity 0.3s linear; }

@media (max-width: 860px) { .header__nav { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .menu__panel, .menu__scrim, .menu__nav a, .menu__brand p { transition: none; }
  .menu.is-open .mll { animation: none; opacity: 1; }
}

/* ============================================================
   Layout shell — vertical rails, like the reference
   ============================================================ */

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}

.wrap {
  padding-inline: var(--rail);
}

.section {
  padding-block: clamp(64px, 9vw, 140px);
  border-top: 1px solid var(--line-soft);
  position: relative;
}

.section--flush { padding-block: 0; border-top: 0; }

/* Section eyebrow: [01] Label */
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-body);
  color: var(--ink-3);
  margin-bottom: clamp(28px, 4vw, 56px);
}
.eyebrow b { color: var(--ink-2); font-weight: 600; }

.lede {
  font-size: var(--fs-md);
  color: var(--ink-2);
  max-width: 62ch;
  letter-spacing: var(--tr-body);
}

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

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0));
  transition: background 0.3s var(--ease);
}

.header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--rail);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.mark { display: block; line-height: 0; }
.mark img { width: auto; height: 22px; }
@media (max-width: 640px) { .mark img { height: 18px; } }

.header__status {
  font-size: var(--fs-xs);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
  white-space: nowrap;
}

.header__nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.header__nav a:hover { color: var(--ink); }
.header__nav .count { color: var(--ink-3); }

@media (max-width: 860px) {
  .header__status { display: none; }
  .header__inner { grid-template-columns: 1fr auto; }
}

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

.hero {
  position: relative;
  padding-top: 108px;
  padding-bottom: clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
}
.hero__bg img,
.hero__bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(0,0,0,0.2), rgba(0,0,0,0.92) 70%),
    linear-gradient(to bottom, rgba(0,0,0,0.4), var(--bg));
}

.hero__inner { position: relative; z-index: 1; }

/* Lock-up mirrors the real RNG mark: big "RNG", small descriptor beneath.
   The reference gets away with two equal lines because "MUGEN STUDIO" is short —
   "TOURNAMENT AGENCY" is not, and at equal size it overflows the rail. */
.hero__wordmark {
  font-size: clamp(60px, 22.5vw, 320px);
  line-height: 0.84;
  letter-spacing: var(--tr-display);
  margin: 0;
}
.hero__wordmark .l2 {
  display: block;
  color: var(--ink-3);
  font-size: clamp(19px, 5.4vw, 75px);
  line-height: 1.05;
  padding-left: 0.06em;
}

.hero__meta {
  margin-top: 18px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.hero__grid {
  margin-top: clamp(28px, 4.2vw, 68px);
  display: grid;
  /* left column deliberately empty: in the reference the background plate
     carries that third of the screen on its own */
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.58fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: end;
}

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; align-items: stretch; }
}

/* Showreel — 1.7 */
.reel { display: flex; flex-direction: column; gap: 10px; }

/* `display: block` below outranks the UA rule for [hidden], so without this the
   poster stayed on screen and the injected player appeared as a second box. */
.reel__stage[hidden] { display: none; }

.reel__stage {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
}
.reel__poster {
  width: 100%; height: 100%;
  object-fit: cover;
  /* the frame is a colour-heavy Unreal render — keep it muted until hover so it
     does not fight the wordmark, then let the colour come through */
  filter: grayscale(0.55) brightness(0.78);
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.reel__stage:hover .reel__poster { transform: scale(1.04); filter: grayscale(0) brightness(0.95); }

.reel__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: block;
}

.reel__parts { display: flex; gap: 6px; }
.reel__parts button {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 15px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  transition: all 0.3s var(--ease);
}
.reel__parts button:hover { color: var(--ink-2); border-color: rgba(255,255,255,0.25); }
.reel__parts button.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.reel__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.reel__play span {
  width: 66px; height: 66px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease);
}
.reel__stage:hover .reel__play span { transform: scale(1.1); background: rgba(255,255,255,0.14); }
.reel__play svg { width: 18px; height: 18px; margin-left: 3px; fill: #fff; }

.reel__label {
  position: absolute;
  left: 14px; bottom: 12px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
  background: rgba(0,0,0,0.55);
  padding: 5px 10px;
  border-radius: var(--r-xs);
  backdrop-filter: blur(6px);
}

/* Booking card */
.bookcard {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-card);
  overflow: hidden;
}
.bookcard__top {
  position: relative;
  aspect-ratio: 16 / 11;
  background: var(--bg-raised);
  display: grid; place-items: center;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  text-align: center;
  padding: 12px;
}

/* Client decision: no faces on the site, brand only. */
.bookcard__top--brand { background: var(--bg); display: grid; place-items: center; padding: 26px; }
.bookcard__mark { width: 74%; height: auto; opacity: 0.9; }

.price--word { font-size: var(--fs-h3); letter-spacing: var(--tr-display); line-height: 1; }

.bookcard__id { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.bookcard__id b { display: block; font-size: var(--fs-md); }
.bookcard__id span { font-size: var(--fs-xs); color: var(--ink-3); }

.bookrow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: var(--fs-sm);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.25s var(--ease);
}
.bookrow:last-child { border-bottom: 0; }
a.bookrow:hover { background: var(--bg-raised); }
.bookrow em { font-style: normal; color: var(--ink-3); font-size: var(--fs-xs); }
.bookrow svg { width: 14px; height: 14px; stroke: var(--ink-2); fill: none; stroke-width: 1.5; flex: none; }

.hero__pitch {
  font-size: var(--fs-md);
  letter-spacing: var(--tr-body);
  line-height: 1.45;
  color: var(--ink-3);
  max-width: 40ch;
}
.hero__pitch b { color: var(--ink); font-weight: 600; }

/* Capability chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(28px, 4vw, 48px);
}
.chip {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 18px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.chip:hover { color: var(--ink); border-color: rgba(255,255,255,0.35); background: var(--bg-raised); }

/* ============================================================
   Marquee
   ============================================================ */

.marquee {
  overflow: hidden;
  padding-block: 30px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: clamp(40px, 5vw, 76px);
  width: max-content;
  animation: slide 46s linear infinite;
  align-items: center;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee--rev .marquee__track { animation-direction: reverse; animation-duration: 58s; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Source logos have wildly different aspect ratios and built-in padding.
   Constrain BOTH axes so a wide wordmark and a square crest read at the same weight. */
.marquee img {
  height: 30px;
  width: auto;
  max-width: 128px;
  object-fit: contain;
  flex: none;
  opacity: 0.55;
  filter: grayscale(1);
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease);
}
.marquee img:hover { opacity: 1; filter: grayscale(0); }

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

/* ============================================================
   Stats
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--bg-card);
  padding: clamp(20px, 3vw, 34px);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  transition: background 0.35s var(--ease);
}
.stat:hover { background: var(--bg-raised); }
.stat b {
  align-self: start;   /* keeps the .ph dashed rule hugging the number, not the column */
  font-size: var(--fs-h3);
  letter-spacing: var(--tr-display);
  line-height: 1;
  font-weight: 600;
}
.stat span { font-size: var(--fs-sm); color: var(--ink-2); }

/* ============================================================
   Approach — scroll-lit copy
   ============================================================ */

.approach__copy {
  font-size: clamp(26px, 3.6vw, 56px);
  line-height: 1.22;
  letter-spacing: var(--tr-display);
  max-width: 20ch;
}
.approach__copy .w { color: var(--ink-3); transition: color 0.25s linear; }
.approach__copy .w.lit { color: var(--ink); }

.approach__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .approach__grid { grid-template-columns: 1fr; } }

.pillars { display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.pillar { background: var(--bg-card); padding: clamp(20px, 2.6vw, 30px); transition: background 0.35s var(--ease); }
.pillar:hover { background: var(--bg-raised); }
.pillar h3 { font-size: var(--fs-lg); margin-bottom: 10px; }
.pillar p { font-size: var(--fs-sm); color: var(--ink-2); }

/* ============================================================
   Services — sticky rail + tracks
   ============================================================ */

.svc {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
}
@media (max-width: 900px) { .svc { grid-template-columns: 1fr; } }

.svc__rail { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 900px) { .svc__rail { position: static; flex-direction: row; flex-wrap: wrap; } }

.svc__link {
  font-size: var(--fs-h4);
  letter-spacing: var(--tr-display);
  color: var(--ink-3);
  line-height: 1.25;
  transition: color 0.3s var(--ease);
}
.svc__link:hover, .svc__link.is-active { color: var(--ink); }
@media (max-width: 900px) { .svc__link { font-size: var(--fs-lg); } }

.track {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: clamp(16px, 2vw, 28px);
  scroll-margin-top: 96px;
}
.track__media { position: relative; aspect-ratio: 16 / 8; overflow: hidden; }
.track__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.track:hover .track__media img { transform: scale(1.045); }
.track__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,1), rgba(13,13,13,0) 55%);
}

.track__body { padding: clamp(20px, 3vw, 34px); display: grid; grid-template-columns: minmax(0,1fr) minmax(0,0.9fr); gap: clamp(18px, 3vw, 40px); }
@media (max-width: 760px) { .track__body { grid-template-columns: 1fr; } }

.track__title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.track__title i { font-style: normal; color: var(--ink-3); font-size: var(--fs-sm); }
.track__title h3 { font-size: var(--fs-h5); }
.track__body p { font-size: var(--fs-sm); color: var(--ink-2); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 6px 11px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.tags-h { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 10px; }

/* ============================================================
   Cases
   ============================================================ */

.filters { display: flex; gap: 6px; margin-bottom: 26px; flex-wrap: wrap; }
.filters button {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 18px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  transition: all 0.3s var(--ease);
}
.filters button:hover { color: var(--ink-2); }
.filters button.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1000px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cases { grid-template-columns: 1fr; } }

.case {
  position: relative;          /* anchor for the stretched proof link */
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s var(--ease), transform 0.5s var(--ease);
}
.case:hover { border-color: rgba(255,255,255,0.28); transform: translateY(-3px); }
.case[hidden] { display: none; }

.case__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.case:hover .case__media img { transform: scale(1.06); }
.case__num {
  position: absolute; top: 12px; left: 14px;
  font-size: var(--fs-xs); color: rgba(255,255,255,0.75);
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}
.case__plus {
  position: absolute; right: 12px; bottom: 12px;
  width: 26px; height: 26px; border-radius: var(--r-xs);
  display: grid; place-items: center;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  font-size: 15px; color: #fff;
  opacity: 0; transform: translateY(6px);
  transition: all 0.35s var(--ease);
}
.case:hover .case__plus { opacity: 1; transform: none; }

.case__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.case__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.case__head h3 { font-size: var(--fs-lg); }
.case__head time { font-size: var(--fs-sm); color: var(--ink-3); flex: none; }
.case__roles { font-size: var(--fs-sm); color: var(--ink-2); }

/* Proof row — element 4.5. The differentiator: the claim and the receipt
   sit on the same card. */
.case__proof {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
}
/* stretches the link across the card so the whole tile is clickable
   without nesting anchors */
.case__proof::after { content: ""; position: absolute; inset: 0; }

.case__src {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 4px 9px;
  color: var(--ink-2);
  transition: border-color 0.28s var(--ease), color 0.28s var(--ease);
}
.case__note { color: var(--ink-3); }
.case__verify {
  margin-left: auto;
  color: var(--ink-3);
  transition: color 0.28s var(--ease);
}
.case:hover .case__src { color: var(--ink); border-color: rgba(255,255,255,0.34); }
.case:hover .case__verify { color: var(--ink-2); }

/* ============================================================
   Infrastructure
   ============================================================ */

.infra { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (max-width: 820px) { .infra { grid-template-columns: 1fr; } }

.spec {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-card);
  padding: clamp(20px, 3vw, 32px);
}
.spec h3 { font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 14px; font-weight: 600; }
.spec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.spec li {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 7px 12px;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.spec li.hi { color: var(--accent); border-color: rgba(245,165,36,0.4); }

.techstrip { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 4vw, 58px); margin-top: 34px; justify-content: center; }
.techstrip img { height: 26px; width: auto; opacity: 0.6; filter: grayscale(1); transition: all 0.3s var(--ease); }
.techstrip img:hover { opacity: 1; filter: none; }

/* ============================================================
   Process
   ============================================================ */

.proc { display: grid; grid-template-columns: minmax(200px, 0.34fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .proc { grid-template-columns: 1fr; } }

.proc__metric { margin-bottom: 34px; }
.proc__metric b { display: block; font-size: var(--fs-h4); letter-spacing: var(--tr-display); }
.proc__metric span { font-size: var(--fs-sm); color: var(--ink-2); }

.proc__strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.proc__strip::-webkit-scrollbar { height: 5px; }
.proc__strip::-webkit-scrollbar-thumb { background: var(--bg-raised); border-radius: var(--r-pill); }

.step {
  flex: 0 0 clamp(230px, 27vw, 310px);
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-card);
  padding: clamp(18px, 2.4vw, 28px);
  min-height: 330px;
  display: flex; flex-direction: column;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.step:hover { background: var(--bg-raised); border-color: rgba(255,255,255,0.24); }
.step__n {
  font-size: var(--fs-h3);
  color: var(--ink-3);
  writing-mode: vertical-rl;
  letter-spacing: var(--tr-display);
  margin-bottom: auto;
}
.step h3 { font-size: var(--fs-lg); margin-bottom: 10px; }
.step p { font-size: var(--fs-sm); color: var(--ink-2); }

/* ============================================================
   Pricing
   ============================================================ */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 920px) { .plans { grid-template-columns: 1fr; } }

.plan {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-card);
  display: flex; flex-direction: column;
  transition: border-color 0.35s var(--ease);
}
.plan:hover { border-color: rgba(255,255,255,0.28); }
.plan--pick { border-color: rgba(255,255,255,0.34); }

.plan__head { padding: clamp(20px, 3vw, 30px); border-bottom: 1px solid var(--line-soft); }
.plan__name { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.plan__name h3 { font-size: var(--fs-h4); }
.badge {
  font-size: var(--fs-xs); color: var(--ink-2);
  background: var(--bg-raised); border-radius: var(--r-xs);
  padding: 4px 9px;
}
.plan__desc { font-size: var(--fs-sm); color: var(--ink-2); min-height: 42px; }

.price { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.price sup { font-size: var(--fs-lg); top: -0.6em; position: relative; }
.price b { font-size: var(--fs-h2); letter-spacing: var(--tr-display); line-height: 1; font-weight: 600; }
.price em { font-style: normal; font-size: var(--fs-sm); color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 18px;
  font-size: var(--fs-sm);
  margin-top: 22px;
  transition: all 0.3s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover { background: transparent; color: var(--ink); border-color: var(--line); }

.plan__list { padding: clamp(20px, 3vw, 30px); }
.plan__list h4 { font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 16px; font-weight: 600; }
.plan__list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.plan__list li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); }
.plan__list li svg { width: 13px; height: 13px; flex: none; margin-top: 5px; stroke-width: 2; fill: none; stroke: var(--ink-2); }
.plan__list li.off { color: var(--ink-3); text-decoration: line-through; }
.plan__list li.off svg { stroke: var(--ink-3); }

.pricenote { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 22px; text-align: center; }

/* ============================================================
   FAQ
   ============================================================ */

.faq { display: grid; grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } }

.qa {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-card);
}
.qa details { border-bottom: 1px solid var(--line-soft); }
.qa details:last-child { border-bottom: 0; }
.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 20px clamp(18px, 2.4vw, 26px);
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  font-size: var(--fs-md);
  transition: background 0.25s var(--ease);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { background: var(--bg-raised); }
.qa summary::after { content: "+"; color: var(--ink-2); font-size: var(--fs-lg); transition: transform 0.3s var(--ease); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa p {
  padding: 0 clamp(18px, 2.4vw, 26px) 22px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  max-width: 70ch;
}

/* ============================================================
   Contact
   ============================================================ */

.cta__head {
  font-size: clamp(38px, 7.5vw, 116px);
  letter-spacing: var(--tr-display);
  line-height: 1;
  margin-bottom: clamp(34px, 5vw, 70px);
}

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: var(--fs-xs); color: var(--ink-3); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  transition: border-color 0.25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.4);
}
.field textarea { resize: vertical; min-height: 104px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }

.reach { display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.reach a, .reach div { background: var(--bg-card); padding: 18px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: center; transition: background 0.3s var(--ease); }
.reach a:hover { background: var(--bg-raised); }
.reach span { font-size: var(--fs-xs); color: var(--ink-3); }
.reach b { font-size: var(--fs-md); font-weight: 600; }

/* ============================================================
   Footer
   ============================================================ */

.footer { border-top: 1px solid var(--line-soft); padding-top: clamp(40px, 5vw, 70px); }
.footer__top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: clamp(30px, 4vw, 54px); }
.footer__nav { display: flex; gap: 22px; font-size: var(--fs-sm); color: var(--ink-2); flex-wrap: wrap; }
.footer__nav a:hover { color: var(--ink); }

.footer__mark {
  font-size: clamp(46px, 13vw, 196px);
  line-height: 0.86;
  letter-spacing: var(--tr-display);
  padding-bottom: 18px;
}
.footer__mark span { color: var(--ink-3); }

.footer__legal {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  padding-block: 20px 30px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

/* ============================================================
   Reveal on scroll
   ============================================================ */

/* Gated on .js so a failed or blocked script can never leave whole sections
   permanently invisible — without JS the content is simply already there. */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
