/* ============================================================
   Relay360 v2 — "Kinetic Editorial"
   Same brand (Geist · JetBrains Mono · Obsidian/Paper/Signal),
   Huge-style UX: oversized type, scroll storytelling, magnetic
   cursor, horizontal scroll, full-bleed moments, section reveals.
   Layers on top of styles.css (tokens only).
   ============================================================ */

:root {
  --motion: 0.7;          /* 0..1, set by Tweaks; scales shift + parallax */
  --reveal-shift: 56px;
  --cursor: 1;            /* 1 = custom cursor on */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.v2-cursor-on { cursor: none; }
body.v2-cursor-on a, body.v2-cursor-on button { cursor: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Shared type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute);
}
.eyebrow .bar { width: 34px; height: 1px; background: var(--accent); }
.eyebrow.on-dark { color: var(--on-dark-mute); }
.accent { color: var(--accent); }
/* Accent words inside display headlines carry extra weight for emphasis */
.mega .accent, .giant .accent, .big .accent, .ptitle .accent,
.ft-title .accent, .ftitle .accent, .stmt w.accent-w, .pullq blockquote .accent,
.ctaband .accent, .hero--a .cycle > span { font-weight: 900; }

/* ---------- Staggered block reveal (uplift) ----------
   Children fade in one-by-one when a below-the-fold block animates in.
   Fade-only (no transform) so hairline grids stay seamless. */
.reveal.will-reveal.stagger { opacity: 1; transform: none; }
.will-reveal.stagger > * { opacity: 0; transition: opacity 0.6s var(--ease); }
.will-reveal.stagger.is-in > * { opacity: 1; }
.will-reveal.stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.will-reveal.stagger.is-in > *:nth-child(2) { transition-delay: 0.14s; }
.will-reveal.stagger.is-in > *:nth-child(3) { transition-delay: 0.23s; }
.will-reveal.stagger.is-in > *:nth-child(4) { transition-delay: 0.32s; }
.will-reveal.stagger.is-in > *:nth-child(5) { transition-delay: 0.41s; }
.will-reveal.stagger.is-in > *:nth-child(6) { transition-delay: 0.50s; }

/* Inline word-rise, e.g. "built, piloted, endorsed." */
.no-rise.will-reveal { transform: none; }
.kw > span { display: inline-block; }
.reveal.will-reveal .kw > span { opacity: 0; transform: translateY(0.6em); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }
.reveal.will-reveal.is-in .kw > span { opacity: 1; transform: none; }
.reveal.will-reveal.is-in .kw > span:nth-child(1) { transition-delay: 0.14s; }
.reveal.will-reveal.is-in .kw > span:nth-child(2) { transition-delay: 0.30s; }
.reveal.will-reveal.is-in .kw > span:nth-child(3) { transition-delay: 0.46s; }
@media (prefers-reduced-motion: reduce) {
  .will-reveal.stagger > *, .reveal.will-reveal .kw > span { opacity: 1 !important; transform: none !important; }
}

.mega {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(54px, 11.5vw, 220px);
  line-height: 0.86; letter-spacing: -0.05em;
  margin: 0; text-wrap: balance;
}
.giant {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(40px, 7vw, 118px);
  line-height: 0.92; letter-spacing: -0.04em; margin: 0;
}
.big {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(30px, 4.4vw, 68px);
  line-height: 1.0; letter-spacing: -0.03em; margin: 0;
}
.lede {
  font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5;
  letter-spacing: -0.01em; color: var(--mute); max-width: 46ch;
}
.lede.on-dark { color: var(--on-dark-mute); }

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  border-radius: 50%; mix-blend-mode: difference;
  opacity: 0; transition: opacity 0.3s;
}
.cursor-dot { width: 7px; height: 7px; background: #fff; margin: -3.5px 0 0 -3.5px; }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid rgba(255,255,255,0.8);
  transition: opacity 0.3s, width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease), background 0.25s;
}
body.v2-cursor-on .cursor-dot, body.v2-cursor-on .cursor-ring { opacity: 1; }
.cursor-ring.is-hover {
  width: 78px; height: 78px; margin: -39px 0 0 -39px;
  background: rgba(255,255,255,0.08); border-color: transparent;
}
.cursor-ring.is-label::after {
  content: attr(data-label); position: absolute; inset: 0;
  display: grid; place-items: center; mix-blend-mode: normal;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff;
}
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Reveals ----------
   Robust model: content is VISIBLE BY DEFAULT. JS hides only the
   below-the-fold elements (.will-reveal) and animates them in (.is-in)
   on scroll. Above-the-fold content is never hidden — the hero, and any
   reveal a non-JS / slow-JS path leaves untouched, stays visible. */
.reveal { opacity: 1; transform: none; }
.reveal.will-reveal { opacity: 0; transform: translateY(var(--reveal-shift)); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.will-reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
/* line-clip reveal for big headings */
.clip-lines span { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.clip-lines span > i { display: block; font-style: normal; transform: none; }
.clip-lines.will-reveal span > i { transform: translateY(110%); transition: transform 1s var(--ease); }
.clip-lines.will-reveal.is-in span > i { transform: none; }
.clip-lines.will-reveal.is-in span:nth-child(2) > i { transition-delay: 0.09s; }
.clip-lines.will-reveal.is-in span:nth-child(3) > i { transition-delay: 0.18s; }
.clip-lines.will-reveal.is-in span:nth-child(4) > i { transition-delay: 0.27s; }
@media (prefers-reduced-motion: reduce) {
  .reveal.will-reveal, .clip-lines.will-reveal span > i { opacity: 1 !important; transform: none !important; }
}

/* ---------- Header ---------- */
.v2-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), color 0.4s;
  color: var(--ink);
}
.v2-header.is-dark { color: var(--on-dark); }
.v2-header.is-solid { background: color-mix(in oklab, var(--paper) 82%, transparent); backdrop-filter: blur(14px); padding: 14px var(--gutter); border-bottom: 1px solid var(--hairline-dim); }
.v2-header.is-solid.is-dark { background: color-mix(in oklab, var(--obsidian) 78%, transparent); border-bottom-color: var(--on-dark-hairline); }
.v2-header .logo { display: inline-flex; align-items: baseline; gap: 0; font-family: var(--sans); font-weight: 500; font-size: 20px; letter-spacing: -0.02em; }
.v2-header .lm-rule { width: 1px; height: 15px; background: currentColor; opacity: 0.4; margin: 0 9px; display: inline-block; align-self: center; }
.v2-header .lm-360 { font-family: var(--mono); font-weight: 500; font-size: 16px; letter-spacing: 0.02em; }
.v2-header .lm-deg { color: var(--accent); }
.v2-nav { display: flex; align-items: center; gap: 34px; }
.v2-nav a.lk { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.78; transition: opacity 0.2s; }
.v2-nav a.lk:hover { opacity: 1; }
.v2-cta {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid currentColor; padding: 11px 18px;
  transition: background 0.25s, color 0.25s;
}
.v2-cta .dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.v2-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.v2-cta:hover .dot { background: #fff; }
@media (max-width: 900px) { .v2-nav .lk { display: none; } }

/* ---------- HERO shared ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero[hidden] { display: none; }
.hero-foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 30px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue .ln { width: 1px; height: 34px; background: currentColor; opacity: 0.5; position: relative; overflow: hidden; }
.scroll-cue .ln::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform: translateY(-100%); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0%{transform:translateY(-100%);} 50%{transform:translateY(0);} 100%{transform:translateY(100%);} }

/* magnetic button */
.magnet {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 18px 28px; background: var(--accent); color: #fff;
  will-change: transform;
}
.magnet .arr { transition: transform 0.3s var(--ease); }
.magnet:hover .arr { transform: translateX(6px); }
.magnet.ghost { background: transparent; border: 1px solid currentColor; color: inherit; }

/* HERO A — Kinetic (obsidian) */
.hero--a { background: var(--obsidian); color: var(--on-dark); padding-bottom: 90px; }
.hero--a .inner { padding-top: 16vh; width: 100%; }
.hero--a .mega { color: var(--on-dark); }
.hero--a .cycle { display: inline-grid; }
.hero--a .cycle > span { grid-area: 1/1; color: var(--accent); opacity: 0; transform: translateY(0.3em); transition: opacity 0.5s, transform 0.5s; }
.hero--a .cycle > span.on { opacity: 1; transform: none; }
.hero--a .hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: 52px; flex-wrap: wrap; }
.hero--a .lede { max-width: 40ch; }

/* HERO B — Split editorial (paper) */
.hero--b { background: var(--paper); }
.hero--b .grid { display: grid; grid-template-columns: 1.05fr 0.95fr; width: 100%; min-height: 100svh; }
.hero--b .col-l { display: flex; flex-direction: column; justify-content: center; padding: 14vh var(--gutter) 8vh; }
.hero--b .col-r { position: relative; background: var(--ink); overflow: hidden; }
.hero--b .ph-fill { position: absolute; inset: 0; }
.hero--b .meta { display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap; }
.hero--b .meta .it .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.hero--b .meta .it .v { font-family: var(--sans); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; margin-top: 6px; }
@media (max-width: 900px) { .hero--b .grid { grid-template-columns: 1fr; } .hero--b .col-r { min-height: 50svh; } }

/* HERO C — Centered air (paper, Apple) */
.hero--c { background: var(--paper-2); align-items: center; text-align: center; }
.hero--c .inner { width: 100%; padding: 18vh 0 12vh; display: flex; flex-direction: column; align-items: center; gap: 34px; }
.hero--c .lede { margin: 0 auto; }
.hero--c .mega { max-width: 16ch; }

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: var(--on-dark); padding: 26px 0; overflow: hidden; white-space: nowrap; border-top: 1px solid var(--on-dark-hairline); border-bottom: 1px solid var(--on-dark-hairline); }
.marquee .track { display: inline-flex; gap: 0; will-change: transform; }
.marquee .item { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-family: var(--sans); font-weight: 500; font-size: clamp(26px, 3.4vw, 52px); letter-spacing: -0.02em; }
.marquee .item .star { color: var(--accent); font-family: var(--mono); font-size: 0.5em; }

/* ---------- Manifesto (pinned word reveal) ---------- */
.manifesto { background: var(--paper); }
.manifesto .pin { position: sticky; top: 0; min-height: 100svh; display: flex; align-items: center; }
.manifesto .stmt { font-family: var(--sans); font-weight: 500; font-size: clamp(34px, 6vw, 104px); line-height: 1.02; letter-spacing: -0.035em; max-width: 20ch; }
.manifesto .stmt w { display: inline-block; opacity: 0.12; transition: opacity 0.35s var(--ease); }
.manifesto .stmt w.lit { opacity: 1; }
.manifesto .stmt w.accent-w { color: var(--accent); }
.manifesto .spacer { height: 120vh; }

/* ---------- Horizontal scroll: the 360 Method ---------- */
.method { background: var(--obsidian); color: var(--on-dark); position: relative; height: 360vh; }
.method .pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
.method .head { display: flex; justify-content: space-between; align-items: center; padding: 28px var(--gutter); border-bottom: 1px solid var(--on-dark-hairline); }
.method .track { display: flex; height: 100%; align-items: stretch; will-change: transform; }
.method .panel { flex: 0 0 78vw; max-width: 1100px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; padding: 7vh var(--gutter); border-right: 1px solid var(--on-dark-hairline); align-content: center; }
.method .panel .pnum { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--accent); }
.method .panel .ptitle { font-family: var(--sans); font-weight: 500; font-size: clamp(40px, 6vw, 92px); line-height: 0.92; letter-spacing: -0.04em; margin: 16px 0 0; color: var(--on-dark); }
.method .panel .pbody { color: var(--on-dark-mute); font-size: 18px; line-height: 1.55; max-width: 42ch; align-self: center; }
.method .panel .pbody ul { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 12px; }
.method .panel .pbody li { padding-left: 26px; position: relative; color: var(--on-dark); }
.method .panel .pbody li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.method .progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 26px; height: 1px; background: var(--on-dark-hairline); }
.method .progress i { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--accent); }
/* Phones + touch tablets: kill the horizontal scroll-jack — stack method panels
   vertically (normal scroll). pointer:coarse catches iPads (768-1200px) where
   the scroll-driven jack is janky on touch; hover-capable laptops keep it. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 1200px) {
  .method { height: auto; }
  .method .pin { position: static; height: auto; overflow: visible; }
  .method .track { flex-direction: column; height: auto; transform: none !important; }
  .method .panel { flex: 0 0 auto; width: 100%; max-width: none; grid-template-columns: 1fr; gap: 18px;
    border-right: 0; border-bottom: 1px solid var(--on-dark-hairline); padding: 7vh var(--gutter); }
  .method .progress { display: none; }
}

/* ---------- Solutions: editorial rows ---------- */
.solutions { background: var(--paper); padding: clamp(80px,12vh,160px) 0; }
.sol-row {
  position: relative; display: grid; grid-template-columns: 90px 1fr auto;
  gap: 40px; align-items: center; padding: clamp(28px,4vw,52px) 0;
  border-top: 1px solid var(--hairline); transition: padding-left 0.5s var(--ease);
}
.sol-row:last-child { border-bottom: 1px solid var(--hairline); }
/* Mobile: the 'auto' meta column's mono caps can't shrink below ~430px of
   min-content — it expanded the phone layout viewport. Stack meta under title. */
@media (max-width: 760px) {
  .sol-row { grid-template-columns: max-content 1fr; column-gap: 14px; row-gap: 10px; }
  /* meta spans the FULL row (wraps later on small screens) but keeps the
     desktop right-alignment — the editorial counterpoint to the bold title.
     (NB: text-align must be stated here; the base rule wins source order.) */
  .sol-row .smeta { grid-column: 1 / -1; text-align: right; white-space: normal; }
}
.sol-row .sidx { font-family: var(--mono); font-size: 13px; color: var(--accent); transition: transform 0.5s var(--ease); }
.sol-row .stitle { font-family: var(--sans); font-weight: 500; font-size: clamp(34px, 5.5vw, 92px); line-height: 0.96; letter-spacing: -0.035em; transition: transform 0.5s var(--ease), color 0.4s; }
.sol-row .smeta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); text-align: right; }
/* Smooth lean-in on hover: transform the text (row padding-left can't transition —
   the stagger-reveal rule overrides .sol-row's transition + carries a delay). */
.sol-row:hover .sidx, .sol-row:hover .stitle { transform: translateX(28px); }
.sol-row:hover .stitle { color: var(--accent); }

/* ---------- Featured work: full-bleed moment ---------- */
.featured { position: relative; height: 130svh; background: var(--ink); }
.featured .sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: flex-end; }
.featured .bg { position: absolute; inset: -12% 0; will-change: transform; }
.featured .bg .ph { width: 100%; height: 100%; }
.featured .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,8,0.15) 0%, rgba(8,8,8,0.78) 100%); }
.featured .content { position: relative; z-index: 2; width: 100%; padding: 0 var(--gutter) 8vh; color: var(--on-dark); }
.featured .content .ftitle { font-family: var(--sans); font-weight: 500; font-size: clamp(40px, 8vw, 150px); line-height: 0.9; letter-spacing: -0.045em; max-width: 16ch; color: var(--on-dark); }
.featured .frow { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: 38px; flex-wrap: wrap; }
.featured .fstats { display: flex; gap: 56px; flex-wrap: wrap; }
.featured .fstats .fig { font-family: var(--sans); font-weight: 500; font-size: clamp(30px,3.4vw,52px); letter-spacing: -0.03em; }
.featured .fstats .fig .u { color: var(--accent); }
.featured .fstats .lab { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-mute); margin-top: 8px; }

/* ---------- Proof: big numbers ---------- */
.proof { background: var(--paper); padding: clamp(80px,12vh,160px) 0; }
.proof .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin-top: 56px; }
.proof .cell { background: var(--paper); padding: 48px 36px; }
.proof .cell .fig { font-family: var(--sans); font-weight: 500; font-size: clamp(56px, 7vw, 128px); line-height: 0.9; letter-spacing: -0.04em; }
.proof .cell .fig .u { color: var(--accent); }
.proof .cell .lab { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); margin-top: 18px; max-width: 24ch; }
@media (max-width: 860px) { .proof .grid { grid-template-columns: 1fr; } }

/* ---------- Closing CTA ---------- */
.closing { background: var(--obsidian); color: var(--on-dark); padding: clamp(90px,16vh,200px) 0; text-align: center; }
.closing .inner { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.closing .mega { color: var(--on-dark); max-width: 14ch; }

/* ---------- Footer ---------- */
.v2-footer { background: var(--obsidian); color: var(--on-dark); padding: 80px 0 40px; border-top: 1px solid var(--on-dark-hairline); }
.v2-footer .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.v2-footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-mute); margin: 0 0 18px; font-weight: 500; }
.v2-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.v2-footer ul a, .v2-footer ul span { font-size: 15px; color: var(--on-dark); opacity: 0.82; }
.v2-footer ul a:hover { color: var(--accent); opacity: 1; }
.v2-footer .muted { color: var(--on-dark-mute); }
.v2-footer .base { display: flex; justify-content: space-between; gap: 20px; margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--on-dark-hairline); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-dark-mute); flex-wrap: wrap; }
@media (max-width: 860px) { .v2-footer .grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Image placeholder (hatched, on-system) ---------- */
.ph { position: relative; background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 11px), var(--ink); overflow: hidden; }
.ph.light { background: repeating-linear-gradient(45deg, rgba(14,14,14,0.05) 0 1px, transparent 1px 11px), var(--paper-2); }
.ph[data-ph]::after { content: attr(data-ph); position: absolute; left: 14px; bottom: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-mute); }
.ph.light[data-ph]::after { color: var(--mute); }

/* section eyebrow head */
.shead { display: flex; align-items: baseline; gap: 18px; }
.shead .snum { font-family: var(--mono); font-size: 13px; color: var(--accent); }
