/* Oliver Studio — editorial redesign
   Magazine grid, oversized display serif, interactive distortion bg */

:root {
  color-scheme: dark;
  --scroll: 0;
  --header-h: 64px;

  /* Carbon palette */
  --bg: #0a0b0d;
  --bg-2: #111317;
  --bg-3: #181b21;
  --line: rgba(220, 224, 232, 0.10);
  --line-strong: rgba(220, 224, 232, 0.22);
  --ink: #f4f3ee;
  --ink-soft: rgba(244, 243, 238, 0.66);
  --ink-mute: rgba(244, 243, 238, 0.42);

  /* Accents — fixed chroma */
  --cyan: oklch(82% 0.13 210);
  --cyan-deep: oklch(58% 0.13 210);
  --cream: oklch(92% 0.04 80);
  --plum: oklch(48% 0.10 330);
  --amber: oklch(78% 0.13 65);
  --moss: oklch(60% 0.09 150);

  --accent: var(--cyan);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);

  --gutter: clamp(1rem, 3vw, 2rem);
  --col: minmax(0, 1fr);
  --max: 1440px;

  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  scroll-behavior: auto;
  scroll-padding-top: var(--header-h);
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

/* ── Background ─────────────────────────────────────────── */

.bg-stack {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.85;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 30%, transparent, rgba(10,11,13,0.55) 70%, rgba(10,11,13,0.92) 100%),
    linear-gradient(to bottom, rgba(10,11,13,0.0) 0%, rgba(10,11,13,0.4) 60%, rgba(10,11,13,0.85) 100%);
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2' seed='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ── Layout primitives ──────────────────────────────────── */

main {
  position: relative;
  z-index: 1;
}

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  gap: var(--gutter);
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(10,11,13,0.85), rgba(10,11,13,0.55));
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.site-header__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.brand__mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0;
  background: var(--bg-2);
}

.brand__name {
  font-weight: 500;
}

.brand__sep {
  opacity: 0.4;
  margin: 0 0.1rem;
}

.brand__tag { color: var(--ink-mute); }

.nav {
  display: flex;
  justify-self: center;
  gap: 1.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav a {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

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

.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav a:hover::after { transform: scaleX(1); }

.header__meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}

.header__meta .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

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

/* ── Marquee / ticker ───────────────────────────────────── */

.ticker {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  height: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ticker__track {
  display: inline-flex;
  gap: 3rem;
  padding-left: 3rem;
  animation: marquee 50s linear infinite;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.ticker__item::before {
  content: "◆";
  color: var(--accent);
  font-size: 0.55rem;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ── Section system ─────────────────────────────────────── */

.section {
  padding: clamp(4rem, 10vh, 7rem) 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section__label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 2rem;
}

.section__label .num {
  color: var(--accent);
  font-weight: 500;
}

.section__label .line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding-top: calc(var(--header-h) + 32px + clamp(3rem, 8vh, 6rem));
  padding-bottom: clamp(4rem, 8vh, 6rem);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero__topline {
  display: grid;
  grid-template-columns: 12fr;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.hero__topline .row {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  gap: var(--gutter);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.hero__topline .col-3 { grid-column: span 3; }
.hero__topline .col-4 { grid-column: span 4; }

.hero__topline .label { color: var(--ink-mute); display: block; }
.hero__topline .val { color: var(--ink); margin-top: 0.2rem; display: block; }

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 14vw, 14rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: clamp(2.5rem, 6vh, 4.5rem) 0 0;
  color: var(--ink);
  font-feature-settings: "ss01";
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.18em;
}

@media (max-width: 1100px) {
  .hero__title { font-size: clamp(3.5rem, 13vw, 9rem); }
}

.hero__title .it {
  font-style: italic;
  color: var(--accent);
}

.hero__title .small {
  font-size: 0.42em;
  vertical-align: super;
  color: var(--ink-mute);
  letter-spacing: 0;
  margin-left: 0.2em;
  font-style: italic;
}

.hero__bottom {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  gap: var(--gutter);
  align-items: end;
  margin-top: clamp(2rem, 5vh, 3.5rem);
}

.hero__lede {
  grid-column: 1 / span 6;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  margin: 0;
  max-width: 32ch;
}

.hero__lede em {
  font-style: italic;
  color: var(--ink);
}

.hero__meta {
  grid-column: 8 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__meta dt { color: var(--ink-mute); margin-bottom: 0.4rem; }
.hero__meta dd { margin: 0; color: var(--ink); }

@media (max-width: 760px) {
  .hero__lede, .hero__meta { grid-column: 1 / -1; }
  .hero__bottom { gap: 2rem; }
}

/* Hero word — plain inline, no rise animation (kept simple to avoid clipping) */
.reveal-word {
  display: inline-block;
}
.reveal-word > span {
  display: inline-block;
}

.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.7s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ── Manifesto ──────────────────────────────────────────── */

.manifesto .grid-12 {
  align-items: end;
}

.manifesto__quote {
  grid-column: 1 / span 9;
  font-family: var(--serif);
  font-size: clamp(2rem, 6.5vw, 5.25rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}

.manifesto__quote em {
  font-style: italic;
  color: var(--accent);
}

.manifesto__quote .dim {
  color: var(--ink-mute);
}

.manifesto__sig {
  grid-column: 11 / -1;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: right;
}

.manifesto__sig .name { color: var(--ink); display: block; margin-top: 0.4rem; }

@media (max-width: 760px) {
  .manifesto__quote { grid-column: 1 / -1; }
  .manifesto__sig { grid-column: 1 / -1; text-align: left; }
}

/* ── Index / projects ───────────────────────────────────── */

.index__head {
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.index__head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
  hyphens: manual;

  /* progress-driven motion: --p comes from scrollfx.js [data-progress].
     We hold the "settled" state in the middle of the viewport and let
     the heading drift in/out with parallax + a soft horizontal sweep. */
  --pp: var(--p, 0.5);
  --signed:   calc(var(--pp) - 0.5);                        /* -0.5..0.5 */
  /* approximate abs(): max(x, -x) — supported widely */
  --centered: clamp(0, calc(1 - max(var(--signed), calc(0px - var(--signed))) * 2), 1);
  transform:
    translate3d(calc(var(--signed) * -3vw), calc(var(--signed) * -120px), 0)
    scale(calc(0.94 + var(--centered) * 0.06));
  transition: transform 0.05s linear;
  will-change: transform;
}

/* Per-character scroll choreography on the index heading.
   Each char rides the parent's --p with a staggered offset so
   the line "writes" itself across the screen as you scroll. */
.index__head h2 .sx-char {
  --ci: var(--i, 0);
  --total: 32;
  --start: calc(var(--ci) / var(--total));
  --local: clamp(0, (var(--pp) - var(--start) * 0.35) * 2.4, 1);
  /* layered transform: vertical drift + slight rotate + tiny horizontal float */
  transform:
    translate3d(
      calc((1 - var(--local)) * 0.2em),
      calc((1 - var(--local)) * 0.6em),
      0
    )
    rotate(calc((1 - var(--local)) * 6deg));
  /* tighten transition so it feels physical to scroll */
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--ci) * 14ms),
    opacity   0.5s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--ci) * 14ms);
}

/* Italic "one" gets a louder treatment — pulls in from the side,
   rotates a touch more, and gains a subtle shimmer as it settles. */
.index__head h2 em {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
  transform-origin: 0% 80%;
  transform:
    translate3d(calc((1 - var(--centered)) * -0.4em), 0, 0)
    rotate(calc((0.5 - var(--pp)) * 6deg))
    scale(calc(0.94 + var(--centered) * 0.08));
  transition: transform 0.15s linear;
}
.index__head h2 em::after {
  /* underline that draws in with scroll */
  content: "";
  position: absolute;
  /* offset so it doesn't shift the inline flow */
}
.index__head h2 em {
  position: relative;
}
.index__head h2 em::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.05em;
  height: 0.06em;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--centered));
  transition: transform 0.2s linear;
  opacity: 0.55;
}

body.motion-off .index__head h2,
body.motion-off .index__head h2 em,
body.motion-off .index__head h2 .sx-char,
body.motion-reduced .index__head h2,
body.motion-reduced .index__head h2 em,
body.motion-reduced .index__head h2 .sx-char {
  transform: none !important;
}

.index__head .sub {
  margin-top: 1rem;
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

/* Asymmetric tile grid */
.tiles {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  grid-auto-rows: 8.5vw;
  gap: var(--gutter);
}

.tile {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  transition: border-color 0.4s var(--ease), transform 0.5s var(--ease);
  isolation: isolate;
}

.tile:hover {
  border-color: var(--line-strong);
}

/* tile sizes — big featured + asymmetric */
.tile--01 { grid-column: span 7; grid-row: span 6; }
.tile--02 { grid-column: span 5; grid-row: span 4; }
.tile--03 { grid-column: span 5; grid-row: span 4; }
.tile--04 { grid-column: span 4; grid-row: span 5; }
.tile--05 { grid-column: span 4; grid-row: span 5; }
.tile--06 { grid-column: span 4; grid-row: span 5; }

@media (max-width: 1100px) {
  .tiles { grid-auto-rows: 12vw; }
  .tile--01 { grid-column: span 12; grid-row: span 5; }
  .tile--02 { grid-column: span 6; grid-row: span 4; }
  .tile--03 { grid-column: span 6; grid-row: span 4; }
  .tile--04 { grid-column: span 12; grid-row: span 4; }
  .tile--05 { grid-column: span 6; grid-row: span 4; }
  .tile--06 { grid-column: span 6; grid-row: span 4; }
}

@media (max-width: 640px) {
  .tiles { grid-auto-rows: 60vw; }
  .tile { grid-column: span 12 !important; grid-row: span 1 !important; min-height: 60vw; }
}

/* tile color variants — subtle base, the visual is in the SVG art */
.tile[data-tone="cyan"]  { --tile-accent: var(--cyan); --tile-bg: oklch(20% 0.03 210); }
.tile[data-tone="cream"] { --tile-accent: var(--cream); --tile-bg: oklch(22% 0.02 80); }
.tile[data-tone="plum"]  { --tile-accent: oklch(75% 0.10 330); --tile-bg: oklch(20% 0.04 330); }
.tile[data-tone="amber"] { --tile-accent: var(--amber); --tile-bg: oklch(22% 0.04 65); }
.tile[data-tone="moss"]  { --tile-accent: var(--moss); --tile-bg: oklch(20% 0.03 150); }
.tile[data-tone="ink"]   { --tile-accent: var(--cyan); --tile-bg: var(--bg-3); }

.tile {
  background: var(--tile-bg, var(--bg-2));
}

.tile__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.95;
}

.tile__art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tile__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(10,11,13,0.78) 0%, rgba(10,11,13,0.15) 50%, rgba(10,11,13,0) 100%);
  pointer-events: none;
}

.tile__head, .tile__foot { position: relative; z-index: 2; }

.tile__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tile__num {
  color: var(--tile-accent);
  font-weight: 500;
}

.tile__cat { color: var(--ink-mute); }

.tile__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.75rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.tile--01 .tile__name { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }

.tile__name em { font-style: italic; color: var(--tile-accent); }

.tile__blurb {
  margin: 0.5rem 0 0;
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tile__cta {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tile-accent);
}

.tile__cta .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.tile:hover .tile__cta .arrow { transform: translateX(4px); }

.tile__hover-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle 280px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.tile:hover .tile__hover-glow { opacity: 1; }

/* ── Now strip ──────────────────────────────────────────── */

.now {
  background: var(--bg);
}

.now__grid {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  gap: var(--gutter);
}

.now__title {
  grid-column: 1 / span 4;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
}

.now__title em { font-style: italic; color: var(--accent); }

.now__list {
  grid-column: 6 / -1;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.now__item {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease), border-color 0.3s;
}

.now__item:hover {
  padding-left: 0.6rem;
  border-bottom-color: var(--line-strong);
}

.now__item:first-child { border-top: 1px solid var(--line); }

.now__date {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.now__what {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.35;
  color: var(--ink);
  font-style: italic;
  font-weight: 400;
}

.now__tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  padding: 0.25rem 0.5rem;
  border-radius: 99px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .now__title, .now__list { grid-column: 1 / -1; }
  .now__item { grid-template-columns: 3rem 1fr; }
  .now__tag { display: none; }
}

/* ── Systems / capabilities ─────────────────────────────── */

.systems__grid {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  gap: var(--gutter);
}

.systems__intro {
  grid-column: 1 / span 5;
}

.systems__intro h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
}

.systems__intro h2 em { font-style: italic; color: var(--accent); }

.systems__intro p {
  color: var(--ink-soft);
  max-width: 36ch;
  line-height: 1.55;
}

.systems__layers {
  grid-column: 7 / -1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.layer {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.layer:first-child { border-top: 1px solid var(--line); }

.layer__num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  padding-top: 0.3rem;
}

.layer__num span { color: var(--accent); }

.layer__name {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: -0.015em;
}

.layer__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.layer__items li {
  list-style: none;
  position: relative;
}

.layer__items li + li::before {
  content: "·";
  position: absolute;
  left: -0.75rem;
  color: var(--ink-mute);
}

@media (max-width: 760px) {
  .systems__intro, .systems__layers { grid-column: 1 / -1; }
  .layer { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ── Stats / numbers strip ──────────────────────────────── */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(2rem, 5vh, 3.5rem) 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat__num {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.stat__num em { font-style: italic; color: var(--accent); }

.stat__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

@media (max-width: 760px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

/* ── Signal / closing ───────────────────────────────────── */

.signal {
  padding: clamp(5rem, 12vh, 9rem) 0;
}

.signal__inner {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  gap: var(--gutter);
  align-items: end;
}

.signal__title {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 16vw, 16rem);
  line-height: 0.85;
  letter-spacing: -0.045em;
  margin: 0 0 2rem;
  color: var(--ink);
}

.signal__title em { font-style: italic; color: var(--accent); }

.signal__copy {
  grid-column: 1 / span 5;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.35;
  color: var(--ink-soft);
  max-width: 36ch;
}

.signal__channels {
  grid-column: 8 / -1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.channel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: padding 0.3s var(--ease);
}

.channel:first-child { border-top: 1px solid var(--line); }
.channel:hover { padding-left: 0.5rem; }

.channel__label { color: var(--ink-mute); min-width: 5rem; }
.channel__val { color: var(--ink); }
.channel__val em { font-style: normal; color: var(--accent); }
.channel__arrow { color: var(--accent); transition: transform 0.3s var(--ease); }
.channel:hover .channel__arrow { transform: translateX(4px); }

@media (max-width: 760px) {
  .signal__copy, .signal__channels { grid-column: 1 / -1; }
}

/* ── Footer ─────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.foot__inner {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  gap: var(--gutter);
  align-items: end;
}

.foot__lockup {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.foot__big {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: none;
}

.foot__cols {
  grid-column: 7 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

.foot__col h4 { color: var(--ink); margin: 0 0 0.6rem; font-weight: 500; }
.foot__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.foot__col a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .foot__lockup, .foot__cols { grid-column: 1 / -1; }
  .foot__cols { grid-template-columns: repeat(2, 1fr); }
}

/* ── Side numerator (right-edge running counter) ────────── */

.side-rail {
  position: fixed;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  pointer-events: auto;
}

.side-rail a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0;
  transition: color 0.2s;
}

.side-rail a .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-mute);
  transition: background 0.2s, transform 0.2s;
}

.side-rail a:hover { color: var(--ink); }
.side-rail a:hover .dot { background: var(--accent); transform: scale(1.4); }

.side-rail a.is-active { color: var(--ink); }
.side-rail a.is-active .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }

@media (max-width: 1100px) {
  .side-rail { display: none; }
}

/* ── Scroll progress ────────────────────────────────────── */

.scroll-bar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  height: 1px;
  width: calc(var(--scroll) * 100%);
  background: var(--accent);
  z-index: 100;
  pointer-events: none;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body.motion-off *, body.motion-off *::before, body.motion-off *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
body.motion-reduced *, body.motion-reduced *::before, body.motion-reduced *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 100ms !important;
}

body.art-off .tile__art { display: none; }

/* ── Scroll-driven reveals (data-reveal) ───────────────────── */
.reveal-init {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.96);
  transition:
    opacity 0.9s var(--ease) var(--reveal-d, 0s),
    transform 1.1s var(--ease) var(--reveal-d, 0s),
    filter 0.9s var(--ease) var(--reveal-d, 0s);
  filter: blur(4px);
  will-change: transform, opacity, filter;
}

/* Don't blur big serif text — keeps it readable on entry */
.manifesto__quote.reveal-init,
.hero__title.reveal-init,
.signal__title.reveal-init {
  filter: none;
}

.reveal-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* "Rise from below" variant — clipped overflow on parent */
[data-reveal="rise"] {
  display: inline-block;
  overflow: hidden;
}

/* Big-scale entry for tiles / hero / signal */
[data-reveal="zoom"] {
  transform: translate3d(0, 60px, 0) scale(0.82);
}
[data-reveal="zoom"].reveal-in {
  transform: translate3d(0, 0, 0) scale(1);
}

[data-reveal="zoom-down"] {
  transform: translate3d(0, -40px, 0) scale(1.08);
}
[data-reveal="zoom-down"].reveal-in {
  transform: translate3d(0, 0, 0) scale(1);
}

/* Counter-scroll target reset (parallax driven by JS via inline transform) */
[data-scroll] {
  will-change: transform;
}

/* Disable scroll-fx & reveals when motion off/reduced */
body.motion-off [data-scroll],
body.motion-off [data-reveal],
body.motion-reduced [data-scroll],
body.motion-reduced [data-reveal] {
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
  transition: none !important;
}

/* ════════════════════════════════════════════════════════════
   EXTENDED SCROLL FX (scrollfx.js)
   ════════════════════════════════════════════════════════════ */

/* ── Char / word splits ───────────────────────────────────── */
.sx-chars, .sx-words { display: inline; }
.sx-char {
  display: inline-block;
  transform: translate3d(0, 1.1em, 0) rotate(8deg);
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 18ms),
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 18ms);
  will-change: transform, opacity;
}
.reveal-in .sx-char,
[data-split].reveal-in .sx-char {
  transform: translate3d(0, 0, 0) rotate(0deg);
  opacity: 1;
}

.sx-word {
  display: inline-block;
  transform: translate3d(0, 0.6em, 0);
  opacity: 0;
  filter: blur(6px);
  transition:
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 24ms),
    opacity 0.6s ease calc(var(--i, 0) * 24ms),
    filter 0.6s ease calc(var(--i, 0) * 24ms);
}
.reveal-in .sx-word {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  filter: blur(0);
}

/* ── Manifesto II — marginalia / typewriter ──────────────── */
.manifesto-2 {
  padding: clamp(5rem, 12vh, 8rem) 0;
  position: relative;
}

.manifesto-2__grid {
  display: grid;
  grid-template-columns: repeat(12, var(--col));
  gap: var(--gutter);
  align-items: start;
  margin-top: 2rem;
}

.manifesto-2__paper {
  grid-column: 2 / span 8;
  font-family: var(--mono);
  border-left: 1px solid var(--line);
  padding: 0.5rem 0 0.5rem 2rem;
  position: relative;
}

.manifesto-2__paper::before {
  content: "";
  position: absolute;
  left: -1px;
  top: calc(var(--p, 0) * 100%);
  bottom: 0;
  width: 1px;
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(calc(1 - var(--p, 0)));
  opacity: 0.9;
}

.manifesto-2__date {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 1.5rem;
}

.manifesto-2__line {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  line-height: 1.25;
  margin: 0 0 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  align-items: baseline;
  color: var(--ink);
  letter-spacing: -0.015em;
  /* per-line scrub window inside parent's --p (5 lines) — finishes by 0.7 of progress */
  --li: 0;
  --lt: 5;
  --lp: clamp(0, (var(--p, 0) / 0.7 - var(--li) / var(--lt)) * var(--lt) * 1.6, 1);
}

.manifesto-2__line:nth-child(2) { --li: 1; }
.manifesto-2__line:nth-child(3) { --li: 2; }
.manifesto-2__line:nth-child(4) { --li: 3; }
.manifesto-2__line:nth-child(5) { --li: 4; }
.manifesto-2__line:nth-child(6) { --li: 5; }

.m2-strike {
  position: relative;
  color: var(--ink-mute);
  font-style: italic;
  white-space: nowrap;
}

.m2-strike::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  top: 52%;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(clamp(0, var(--lp) * 1.6, 1));
  transition: transform 0.2s linear;
}

.m2-write {
  display: inline-block;
  position: relative;
  color: var(--ink);
  font-style: normal;
  font-weight: 500;
  /* clipped reveal as the line's local progress passes 0.4 */
  --reveal: clamp(0, (var(--lp) - 0.35) * 1.8, 1);
  clip-path: inset(0 calc((1 - var(--reveal)) * 100%) 0 0);
  transition: clip-path 0.2s linear;
}

.m2-write::before {
  content: "→";
  margin-right: 0.4em;
  color: var(--accent);
  font-style: normal;
}

/* blinking caret on the currently-active line's write side */
.m2-write::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  margin-left: 0.1em;
  background: var(--accent);
  vertical-align: -0.1em;
  opacity: calc(var(--reveal) * (1 - var(--reveal)) * 4);
  animation: m2-caret 0.8s steps(2) infinite;
}

@keyframes m2-caret {
  50% { opacity: 0; }
}

.manifesto-2__margin {
  grid-column: 11 / -1;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-top: 1px solid var(--accent);
  padding-top: 0.6rem;
  position: sticky;
  top: calc(var(--header-h) + 4rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.margin__head { color: var(--accent); }
.margin__note {
  color: var(--ink-soft);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.4;
}

@media (max-width: 880px) {
  .manifesto-2__paper { grid-column: 1 / -1; padding-left: 1.25rem; }
  .manifesto-2__margin { grid-column: 1 / -1; position: static; margin-top: 1.5rem; }
  .manifesto-2__line { font-size: clamp(1.15rem, 5vw, 1.6rem); }
}

body.motion-off .m2-strike::after,
body.motion-reduced .m2-strike::after { transform: scaleX(1) !important; }
body.motion-off .m2-write,
body.motion-reduced .m2-write { clip-path: none !important; }
body.motion-off .m2-write::after,
body.motion-reduced .m2-write::after { display: none; }
[data-words-reveal] .wr-word {
  display: inline;
  --w-start: calc(var(--wi) / var(--wt));
  /* base readable, brightens as parent's progress passes the word */
  opacity: clamp(0.78, (var(--p, 0) - var(--w-start)) * 6 + 0.78, 1);
  transition: opacity 0.2s linear;
}

/* Ticker keeps its steady baseline pace regardless of scroll velocity */

/* ── Velocity-reactive tile skew ─────────────────────────── */
.tile {
  transform: skewY(calc(var(--vel, 0) * 0.04deg));
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Progress-driven hero distortion ─────────────────────── */
.hero[data-progress] .hero__title {
  transform:
    translate3d(0, calc(var(--p, 0) * -120px), 0)
    scale(calc(1 + var(--p, 0) * 0.05));
  letter-spacing: calc(-0.04em + var(--p, 0) * -0.01em);
}

.hero[data-progress] .hero__lede {
  transform: translate3d(0, calc(var(--p, 0) * 60px), 0);
  opacity: calc(1 - var(--p, 0) * 1.4);
}

.hero[data-progress] .hero__topline {
  opacity: calc(1 - var(--p, 0) * 1.5);
  transform: translate3d(0, calc(var(--p, 0) * -80px), 0);
}

.hero[data-progress] .hero__meta {
  opacity: calc(1 - var(--p, 0) * 1.2);
  transform: translate3d(0, calc(var(--p, 0) * 40px), 0);
}

/* ── Manifesto sticky pin ────────────────────────────────── */
.manifesto[data-pin] {
  min-height: 95vh;
  position: relative;
}

.manifesto[data-pin] > .section__label {
  position: sticky;
  top: calc(var(--header-h) + 56px);
  z-index: 2;
}

.manifesto[data-pin] .grid-12 {
  position: sticky;
  top: 0;
  height: 100vh;
  align-content: center;
  padding-top: var(--header-h);
}

.manifesto[data-pin] .manifesto__quote {
  /* Flicker between cyan accent on the running word as pin progresses */
  --pin: var(--pin, 0);
}

.manifesto[data-pin] .manifesto__sig {
  opacity: calc(0.3 + var(--pin, 0) * 0.7);
  transform: translate3d(0, calc((1 - var(--pin, 0)) * 24px), 0);
}

/* Quote stays sharp; word-level reveal handles the scrub */
.manifesto[data-pin] .manifesto__quote {
  filter: none;
}

/* The trailing dot at end of pin */
.manifesto[data-pin]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5vh;
  width: calc(var(--pin, 0) * 60vw);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  transform: translateX(-50%);
  opacity: calc(var(--pin, 0) * 0.8);
  pointer-events: none;
}

/* ── Tile scroll choreography ────────────────────────────── */
.tile[data-progress] {
  --pp: var(--p, 0.5);
  /* lift, then settle */
  transform:
    translate3d(0, calc((0.5 - var(--pp)) * 60px), 0)
    rotate(calc((0.5 - var(--pp)) * 1.2deg))
    skewY(calc(var(--vel, 0) * 0.04deg));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.tile[data-progress] .tile__art {
  transform: scale(calc(1 + (0.5 - var(--pp)) * -0.06));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Section label scroll drift ──────────────────────────── */
.section__label[data-progress] .num {
  display: inline-block;
  transform: translate3d(calc((var(--p, 0) - 0.5) * -40px), 0, 0);
  transition: transform 0.1s linear;
}
.section__label[data-progress] .line {
  transform-origin: left;
  transform: scaleX(clamp(0, var(--p, 0) * 1.6, 1));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Stats counter glyphs ────────────────────────────────── */
.stat__num[data-count] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── "Now" list rows shift in as their parent progresses ─── */
.now__list[data-progress] .now__item {
  transform: translate3d(calc((1 - clamp(0, (var(--p, 0) - 0.05) * 6 - var(--row, 0) * 0.5, 1)) * 40px), 0, 0);
  opacity: clamp(0.15, (var(--p, 0) - 0.05) * 6 - var(--row, 0) * 0.5, 1);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

/* ── Layer rows ──────────────────────────────────────────── */
.systems__layers[data-progress] .layer {
  --row: 0;
  transform: translate3d(0, calc((1 - clamp(0, (var(--p, 0) - 0.05) * 5 - var(--row, 0) * 0.4, 1)) * 24px), 0);
  opacity: clamp(0.1, (var(--p, 0) - 0.05) * 5 - var(--row, 0) * 0.4, 1);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

/* ── Channel rows ────────────────────────────────────────── */
.signal__channels[data-progress] .channel {
  transform: translate3d(calc((1 - clamp(0, (var(--p, 0) - 0.05) * 6 - var(--row, 0) * 0.4, 1)) * -40px), 0, 0);
  opacity: clamp(0.15, (var(--p, 0) - 0.05) * 6 - var(--row, 0) * 0.4, 1);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

/* ── Signal title — letterspacing on scroll ─────────────── */
.signal[data-progress] .signal__title {
  letter-spacing: calc(-0.045em + var(--p, 0) * 0.04em);
  transition: letter-spacing 0.1s linear;
}

/* ── Side-rail pulse on velocity ─────────────────────────── */
.side-rail a.is-active .dot {
  transform: scale(calc(1 + min(var(--vel-abs, 0) / 60, 0.8)));
}

/* ── Scroll bar gets thicker with velocity ────────────────── */
.scroll-bar {
  height: calc(1px + min(var(--vel-abs, 0) / 30, 2px));
  box-shadow: 0 0 calc(min(var(--vel-abs, 0) / 8, 12px)) var(--accent);
}

/* ── Footer big tagline word reveal ──────────────────────── */
.foot__big[data-words-reveal] {
  display: block;
}

/* ── Reduced-motion guards ───────────────────────────────── */
body.motion-off .sx-char,
body.motion-off .sx-word,
body.motion-reduced .sx-char,
body.motion-reduced .sx-word,
body.motion-off .wr-word,
body.motion-reduced .wr-word {
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
  color: inherit !important;
  transition: none !important;
}

body.motion-off [data-progress],
body.motion-reduced [data-progress],
body.motion-off [data-pin],
body.motion-reduced [data-pin] {
  --p: 1 !important;
  --pin: 1 !important;
}

body.motion-off .manifesto[data-pin],
body.motion-reduced .manifesto[data-pin] {
  min-height: 0;
}
body.motion-off .manifesto[data-pin] .grid-12,
body.motion-reduced .manifesto[data-pin] .grid-12 {
  position: static;
  height: auto;
  padding-top: 0;
}
