/* ============================================================
   Motif Motion — Frontier Applied AI Lab
   Shared stylesheet
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --bg-alt: #F4F5F8;
  --bg-ink: #08080C;
  --ink: #0D0D12;
  --ink-mute: #565A68;
  --ink-faint: #9BA0AE;
  --accent: #3D5AFE;
  --accent-deep: #2A3EE0;
  --accent-soft: #EDF0FF;
  --paper: #FFFFFF;
  --line: rgba(13, 13, 18, 0.09);
  --line-strong: rgba(13, 13, 18, 0.15);
  --serif: 'Playfair Display', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'DM Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 400;
  line-height: 1.6;
  /* clip (not hidden) so position:sticky still works inside body */
  overflow-x: hidden; overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(61,90,254,0.18); }
a { color: inherit; }

/* ---------- NAV ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 1.4rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  padding: 1rem 3rem;
}
.brand { display: flex; align-items: baseline; gap: 0.8rem; text-decoration: none; }
.brand-mark {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  letter-spacing: 0.005em; color: #fff; transition: color 0.4s ease;
}
nav.scrolled .brand-mark { color: var(--ink); }
.brand-suffix {
  font-family: var(--mono); font-size: 0.66rem;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent);
}
.nav-links { display: flex; gap: 2.5rem; font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em; }
.nav-links a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.25s ease; }
nav.scrolled .nav-links a { color: var(--ink-mute); }
.nav-links a:hover, nav.scrolled .nav-links a:hover { color: var(--accent); }
.nav-cta {
  font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em;
  padding: 0.6rem 1.2rem; background: var(--accent); color: #fff;
  text-decoration: none; transition: all 0.25s ease; border: 1px solid var(--accent);
}
.nav-cta:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* ---------- HERO (home) ---------- */
.hero {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; padding: 0 3rem; overflow: hidden;
  background: var(--bg-ink);
}

/* Scroll-world act: JS adds .act-ready on <html> (desktop, motion allowed).
   The hero pins while the wrapper provides 1.6 extra viewports of scroll
   that scrub the camera flight. Without JS, height stays auto — no pin. */
.hero-act { position: relative; }
html.act-ready .hero-act { height: 260vh; }
html.act-ready .hero-act .hero { position: sticky; top: 0; min-height: 0; height: 100vh; height: 100svh; }
html.act-ready .hero-act .hero-canvas { will-change: transform; transform-origin: 50% 42%; }
html.act-ready .hero-act .hero-content { will-change: transform, opacity; }
html.act-ready .hero-act .hero-meta { will-change: opacity; }
@media (prefers-reduced-motion: reduce) {
  html.act-ready .hero-act { height: auto; }
  html.act-ready .hero-act .hero { position: relative; height: auto; min-height: 100vh; }
}

/* ---------- JOURNEY RAIL (scroll progress dots, desktop) ---------- */
.journey-rail {
  position: fixed; right: 1.4rem; top: 50%; transform: translateY(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.journey-dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(120, 126, 150, 0.6); background: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.journey-dot:hover { border-color: var(--accent); }
.journey-dot.active { background: var(--accent); border-color: var(--accent); transform: scale(1.3); }
@media (max-width: 980px) { .journey-rail { display: none; } }
.hero-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 30% 50%, rgba(8,8,12,0.58) 0%, rgba(8,8,12,0.16) 55%, transparent 100%),
    linear-gradient(180deg, rgba(8,8,12,0.42) 0%, transparent 25%, transparent 70%, rgba(8,8,12,0.5) 100%);
}
.hero-glow {
  position: absolute; z-index: 1; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(61,90,254,0.36) 0%, transparent 65%);
  top: 30%; right: 5%; filter: blur(30px); pointer-events: none;
}
.hero-content { position: relative; z-index: 3; max-width: 1220px; margin-top: 3rem; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.28em;
  color: #9DB0FF; margin-bottom: 2.25rem; display: flex; align-items: center; gap: 1rem;
  opacity: 0; animation: fadeIn 1s ease forwards 0.15s;
}
.hero-eyebrow::before { content: ''; width: 42px; height: 1px; background: #9DB0FF; }
h1.hero-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 5.5rem); line-height: 1.04; letter-spacing: -0.025em;
  margin-bottom: 2.25rem; max-width: 1140px; color: #fff;
  opacity: 0; animation: fadeIn 1.1s ease forwards 0.35s;
}
.hero-title .italic { font-style: italic; color: #8CA0FF; font-weight: 500; }
.hero-lede {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1.55vw, 1.4rem);
  color: rgba(255,255,255,0.82); max-width: 720px; line-height: 1.55; margin-bottom: 3.25rem;
  opacity: 0; animation: fadeIn 1.1s ease forwards 0.6s;
}
.hero-actions { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; opacity: 0; animation: fadeIn 1.1s ease forwards 0.8s; }
.hero-meta {
  position: absolute; bottom: 2.5rem; left: 3rem; right: 3rem;
  display: flex; justify-content: space-between; align-items: flex-end; z-index: 3;
  font-family: var(--mono); font-size: 0.7rem; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 0.18em; opacity: 0; animation: fadeIn 1.1s ease forwards 1s;
}
.hero-meta-item { display: flex; flex-direction: column; gap: 0.35rem; }
.hero-meta-value { color: rgba(255,255,255,0.72); font-size: 0.76rem; }

/* ---------- PAGE HERO (sub-pages) ---------- */
.page-hero {
  min-height: 56vh; position: relative; display: flex; align-items: flex-end;
  padding: 8rem 3rem 4rem; overflow: hidden; background: var(--bg-ink);
}
.page-hero-glow {
  position: absolute; z-index: 1; width: 720px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(61,90,254,0.24) 0%, transparent 65%);
  top: 10%; right: 2%; filter: blur(38px); pointer-events: none;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,8,12,0.6) 0%, transparent 30%, transparent 100%);
}
.page-hero-inner { position: relative; z-index: 3; max-width: 1400px; margin: 0 auto; width: 100%; }
.page-hero-eyebrow {
  font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.28em;
  color: #9DB0FF; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem;
}
.page-hero-eyebrow::before { content: ''; width: 38px; height: 1px; background: #9DB0FF; }
.page-hero h1 {
  font-family: var(--serif); font-weight: 500; color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.25rem); line-height: 1.05; letter-spacing: -0.025em;
  max-width: 1000px; margin-bottom: 1.5rem;
}
.page-hero h1 .italic { font-style: italic; color: #8CA0FF; }
.page-hero-lede {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  color: rgba(255,255,255,0.82); max-width: 680px; line-height: 1.55;
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em;
  padding: 1.05rem 2.1rem; background: var(--accent); color: #fff; text-decoration: none;
  transition: all 0.25s ease; border: 1px solid var(--accent); display: inline-block;
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost {
  font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: rgba(255,255,255,0.85); text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; transition: color 0.25s ease;
}
.btn-ghost:hover { color: #fff; }
.btn-ghost::after { content: '→'; transition: transform 0.25s ease; }
.btn-ghost:hover::after { transform: translateX(4px); }
.btn-ghost-inv {
  font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: #8CA0FF; text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; transition: color 0.25s ease;
}
.btn-ghost-inv:hover { color: #fff; }
.btn-ghost-inv::after { content: '→'; }
.btn-link {
  font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; transition: color 0.25s ease;
}
.btn-link:hover { color: var(--accent); }
.btn-link::after { content: '→'; transition: transform 0.25s ease; }
.btn-link:hover::after { transform: translateX(3px); }
.text-link {
  font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent-deep); text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--accent); transition: gap 0.25s ease;
}
.text-link:hover { gap: 1.1rem; }

/* ---------- STATEMENT ---------- */
.statement {
  background: linear-gradient(115deg, var(--accent-deep), var(--accent), #5A78FF, var(--accent));
  background-size: 280% 280%; animation: gradientDrift 18s ease infinite;
  color: #fff; padding: 6.5rem 3rem; text-align: center; position: relative; overflow: hidden;
}
@keyframes gradientDrift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .statement { animation: none; } }
.statement-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; will-change: transform; }
.statement h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 5vw, 4.25rem); line-height: 1.03; letter-spacing: -0.035em; color: #fff; }
.statement h2 .accent { font-style: italic; color: #fff; opacity: 0.72; }
.statement-sub { font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.24em; color: rgba(255,255,255,0.7); margin-top: 2rem; }

/* ---------- STAT BAND ---------- */
.statband { padding: 3.5rem 3rem; background: var(--bg); border-bottom: 1px solid var(--line); }
.statband-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
.statband .stat { border-left: 1px solid var(--line-strong); padding-left: 1.75rem; }
.stat-num { font-family: var(--serif); font-size: clamp(2.4rem, 3.6vw, 3.4rem); font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-mute); margin-top: 0.7rem; }

/* ---------- SECTIONS ---------- */
section { padding: 8rem 3rem; position: relative; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-eyebrow { font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.28em; color: var(--accent-deep); margin-bottom: 1.4rem; display: flex; align-items: center; gap: 1rem; }
.section-eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--accent); }
.section-title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.1rem, 4.2vw, 3.75rem); line-height: 1.1; letter-spacing: -0.02em; max-width: 950px; margin-bottom: 2.25rem; }
.section-title .italic { font-style: italic; color: var(--accent-deep); }

/* ---------- APPROACH / METHOD ---------- */
.method-inner { max-width: 1400px; margin: 0 auto; }
.method-header { display: grid; grid-template-columns: 1fr 1.3fr; gap: 5rem; margin-bottom: 5rem; align-items: end; }
.method-intro { color: var(--ink); font-family: var(--serif); font-size: clamp(1.15rem, 1.55vw, 1.4rem); line-height: 1.6; max-width: 660px; font-weight: 400; }
.method-intro em { font-style: italic; color: var(--accent-deep); }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
.method-cell { padding: 3rem 2.5rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); position: relative; }
.method-cell::before { content: ''; position: absolute; top: -2px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.5s ease; }
.method-cell:hover::before { width: 100%; }
.method-cell:first-child { padding-left: 0; }
.method-cell:last-child { border-right: none; padding-right: 0; }
.method-num { font-family: var(--mono); font-size: 0.76rem; color: var(--accent-deep); letter-spacing: 0.18em; margin-bottom: 1.6rem; }
.method-h { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; line-height: 1.2; margin-bottom: 1.15rem; letter-spacing: -0.015em; }
.method-h .italic { font-style: italic; color: var(--accent-deep); }
.method-body { color: var(--ink-mute); font-size: 0.95rem; line-height: 1.7; }

/* ---------- FEATURED ---------- */
.feature { background: var(--bg-ink); color: #fff; padding: 0; overflow: hidden; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; }
.feature-visual { position: relative; overflow: hidden; background: #06060A; }
.feature-canvas { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; transform-origin: 50% 50%; }
.feature-visual-label { position: absolute; bottom: 2rem; left: 2rem; z-index: 3; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.5); }
.feature-content { padding: 5rem 4rem; display: flex; flex-direction: column; justify-content: center; }
.feature-eyebrow { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.24em; color: #8CA0FF; margin-bottom: 1.5rem; }
.feature-title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.25rem, 3.2vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; color: #fff; margin-bottom: 1rem; }
.feature-tagline { font-family: var(--serif); font-style: italic; color: #8CA0FF; font-size: 1.15rem; margin-bottom: 1.75rem; }
.feature-desc { color: rgba(255,255,255,0.72); font-size: 1rem; line-height: 1.7; margin-bottom: 2rem; max-width: 520px; }
.feature-stats { display: flex; gap: 2.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.feature-stat-num { font-family: var(--serif); font-size: 2.1rem; font-weight: 500; color: #fff; line-height: 1; }
.feature-stat-label { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.5); margin-top: 0.5rem; }

/* ---------- WORK ---------- */
.work-inner { max-width: 1400px; margin: 0 auto; }
.work-header { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 4rem; align-items: end; }
.work-subhead { color: var(--ink-mute); font-size: 1.05rem; line-height: 1.7; max-width: 520px; }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.work-card {
  --pc: var(--accent); --pc-soft: var(--accent-soft);
  background: var(--paper); border: 1px solid var(--line); padding: 2.5rem 2.25rem 2rem;
  display: flex; flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.work-card:hover { transform: translateY(-4px); border-color: var(--pc); box-shadow: 0 20px 44px -20px rgba(13, 13, 18, 0.22); }
.work-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.6rem; }
.work-mono {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.45rem; font-weight: 600;
  color: var(--pc); background: var(--pc-soft);
  transition: background 0.3s ease, color 0.3s ease;
}
.work-card:hover .work-mono { background: var(--pc); color: #fff; }
.work-status { font-family: var(--mono); color: var(--ink-faint); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em; }
.work-status.live::before { content: '● '; color: #16A34A; }
.work-status.beta::before { content: '● '; color: var(--accent); }
.work-status.soon::before { content: '● '; color: #C9820A; }
.work-title { font-family: var(--serif); font-size: 1.65rem; font-weight: 500; line-height: 1.15; margin-bottom: 0.4rem; letter-spacing: -0.015em; }
.work-tagline { font-family: var(--serif); font-style: italic; color: var(--pc, var(--accent-deep)); font-size: 1rem; margin-bottom: 1rem; }
.work-desc { color: var(--ink-mute); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.75rem; }
.work-card-foot { margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.work-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.work-tag { font-family: var(--mono); font-size: 0.68rem; color: var(--accent-deep); padding: 0.35rem 0.7rem; background: var(--accent-soft); text-transform: uppercase; letter-spacing: 0.12em; }

/* ---------- RESEARCH GRID ---------- */
.research-inner { max-width: 1400px; margin: 0 auto; }
.research-header { max-width: 820px; margin-bottom: 4.5rem; }
.research-statement { font-family: var(--serif); font-size: clamp(1.2rem, 1.7vw, 1.55rem); line-height: 1.55; color: var(--ink); max-width: 820px; margin-bottom: 1.5rem; font-weight: 400; }
.research-statement em { font-style: italic; color: var(--accent-deep); }
.research-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--ink); }
.research-cell { padding: 2.75rem 2.5rem 2.75rem 0; border-bottom: 1px solid var(--line); position: relative; }
.research-cell::before { content: ''; position: absolute; top: -1px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.5s ease; }
.research-cell:hover::before { width: 100%; }
.research-cell:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 2.5rem; }
.research-cell:nth-child(even) { padding-left: 2.5rem; }
.research-track { font-family: var(--mono); font-size: 0.7rem; color: var(--accent-deep); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.research-track-status { color: var(--ink-faint); font-size: 0.64rem; padding: 0.15rem 0.5rem; border: 1px solid var(--line-strong); }
.research-h { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; line-height: 1.2; margin-bottom: 1rem; letter-spacing: -0.015em; }
.research-h .italic { font-style: italic; color: var(--accent-deep); }
.research-body { color: var(--ink-mute); font-size: 0.95rem; line-height: 1.7; max-width: 540px; }

/* ---------- MANIFESTO ---------- */
.manifesto-inner { max-width: 1400px; margin: 0 auto; }
.manifesto-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6rem; align-items: start; }
.manifesto-text { font-family: var(--serif); font-size: clamp(1.1rem, 1.45vw, 1.3rem); line-height: 1.7; color: var(--ink); font-weight: 400; }
.manifesto-text p { margin-bottom: 1.5rem; }
.manifesto-text .pullquote { font-style: italic; color: var(--accent-deep); font-size: clamp(1.4rem, 2vw, 1.85rem); line-height: 1.4; padding: 0.25rem 0 0.25rem 1.75rem; border-left: 2px solid var(--accent); margin: 2rem 0; font-weight: 500; }

/* ---------- PROSE / CONTENT PAGES ---------- */
.content-wrap { max-width: 1400px; margin: 0 auto; }
.content-grid { display: grid; grid-template-columns: 260px 1fr; gap: 5rem; align-items: start; }
.content-aside { position: sticky; top: 7rem; }
.content-aside .section-eyebrow { margin-bottom: 1rem; }
.content-aside-note { color: var(--ink-mute); font-size: 0.9rem; line-height: 1.65; }
.prose { max-width: 760px; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.2; letter-spacing: -0.015em; margin: 3rem 0 1.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose h2 .italic { font-style: italic; color: var(--accent-deep); }
.prose h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.3; margin: 2.25rem 0 0.85rem; }
.prose p { color: var(--ink-mute); font-size: 1.02rem; line-height: 1.75; margin-bottom: 1.25rem; }
.prose p strong { color: var(--ink); font-weight: 600; }
.prose ul { list-style: none; margin: 0 0 1.5rem; }
.prose ul li { color: var(--ink-mute); font-size: 1.02rem; line-height: 1.7; padding: 0.5rem 0 0.5rem 1.5rem; position: relative; }
.prose ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.prose .lead { font-family: var(--serif); font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.55; color: var(--ink); margin-bottom: 2rem; font-weight: 400; }
.prose .lead em { font-style: italic; color: var(--accent-deep); }
.prose .callout { background: var(--accent-soft); border-left: 2px solid var(--accent); padding: 1.5rem 1.75rem; margin: 2rem 0; font-family: var(--serif); font-style: italic; color: var(--accent-deep); font-size: 1.15rem; line-height: 1.5; }
.prose .divider { height: 1px; background: var(--line); margin: 3.5rem 0; border: none; }

/* research detail track blocks */
.track-block { border-top: 1px solid var(--line-strong); padding: 3rem 0; }
.track-block:last-child { border-bottom: 1px solid var(--line-strong); }
.track-block .research-track { margin-bottom: 1.25rem; }
.track-block h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 1.25rem; }
.track-block h3 .italic { font-style: italic; color: var(--accent-deep); }
.track-block .track-q { font-family: var(--serif); font-style: italic; color: var(--accent-deep); font-size: 1.1rem; margin-bottom: 1rem; }
.track-block p { color: var(--ink-mute); font-size: 1rem; line-height: 1.75; margin-bottom: 1rem; max-width: 820px; }
.track-block .track-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }

/* ---------- FACTS / INFO GRID (press/about) ---------- */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--ink); max-width: 820px; }
.fact { padding: 1.75rem 2rem 1.75rem 0; border-bottom: 1px solid var(--line); }
.fact:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 2rem; }
.fact:nth-child(even) { padding-left: 2rem; }
.fact-label { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent-deep); margin-bottom: 0.6rem; }
.fact-value { font-size: 1rem; color: var(--ink); line-height: 1.5; }

/* ---------- TEAM ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2rem; }
.team-card { border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.team-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--accent-deep); margin-bottom: 1.25rem; }
.team-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin-bottom: 0.3rem; }
.team-role { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent-deep); margin-bottom: 1rem; }
.team-bio { color: var(--ink-mute); font-size: 0.92rem; line-height: 1.65; }

/* ---------- ROLES (careers) ---------- */
.role-list { display: flex; flex-direction: column; border-top: 2px solid var(--ink); max-width: 900px; }
.role { padding: 2.25rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.role-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; margin-bottom: 0.4rem; }
.role-meta { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }
.role-tag { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-deep); background: var(--accent-soft); padding: 0.4rem 0.85rem; white-space: nowrap; }

/* ---------- CLOSING ---------- */
.closing { text-align: center; padding: 8rem 3rem; background: var(--bg-ink); color: #fff; position: relative; overflow: hidden; }
.closing-glow { position: absolute; z-index: 1; width: 800px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(61,90,254,0.22) 0%, transparent 65%); top: 20%; left: 50%; transform: translateX(-50%); filter: blur(40px); }
.closing-content { position: relative; z-index: 2; }
.closing .section-eyebrow { justify-content: center; color: #8CA0FF; }
.closing .section-eyebrow::before { background: #8CA0FF; }
.closing-quote { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.15; color: #fff; max-width: 880px; margin: 0 auto 2.5rem; letter-spacing: -0.03em; }
.closing-quote .accent { color: #8CA0FF; font-style: italic; }
.closing-sub { color: rgba(255,255,255,0.6); font-size: 1rem; max-width: 560px; margin: 0 auto 2.75rem; line-height: 1.7; }
.closing-actions { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }

/* ---------- FOOTER ---------- */
footer { padding: 4rem 3rem 2rem; background: var(--bg); border-top: 1px solid var(--line); }
.footer-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.footer-tagline { color: var(--ink-mute); font-size: 0.9rem; max-width: 360px; line-height: 1.6; font-style: italic; font-family: var(--serif); }
.footer-col h4 { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent-deep); margin-bottom: 1.2rem; font-weight: 500; }
.footer-col a {
  display: block; width: fit-content; color: var(--ink-mute); text-decoration: none; font-size: 0.9rem; margin-bottom: 0.6rem;
  background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: color 0.25s ease, background-size 0.3s ease;
}
.footer-col a:hover { color: var(--accent); background-size: 100% 1px; }
.footer-bottom { max-width: 1400px; margin: 0 auto; padding-top: 2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.16em; }

/* ---------- ANIM ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.85s ease, transform 0.85s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
/* Failsafe: if JS is disabled or blocked, never hide content */
@media (scripting: none) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ---------- OVERFLOW SAFETY ---------- */
html { overflow-x: hidden; overflow-x: clip; }
h1, h2, h3, p, .hero-title, .section-title, .feature-title, .work-title { overflow-wrap: break-word; word-break: break-word; }
img, canvas, svg { max-width: 100%; }

/* ---------- MOBILE NAV TOGGLE (hidden on desktop) ---------- */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 30px; height: 24px; padding: 0; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; transition: transform 0.3s ease, opacity 0.3s ease, background 0.4s ease; }
nav.scrolled .nav-toggle span { background: var(--ink); }
nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- RESPONSIVE ---------- */
@media (min-width: 981px) {
  .nav-links a {
    background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat;
    padding-bottom: 2px; transition: color 0.25s ease, background-size 0.3s ease;
  }
  .nav-links a:hover { background-size: 100% 1px; }
}

@media (max-width: 980px) {
  nav, nav.scrolled { padding: 1rem 1.5rem; }
  .nav-toggle { display: flex; }
  .nav-cta { margin-left: auto; margin-right: 0.9rem; padding: 0.55rem 1rem; font-size: 0.7rem; }
  /* nav links become a dropdown panel */
  .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.3s ease;
  }
  nav.menu-open .nav-links { max-height: 340px; opacity: 1; pointer-events: auto; }
  .nav-links a, nav.scrolled .nav-links a { color: var(--ink); padding: 1.05rem 1.5rem; border-top: 1px solid var(--line); font-size: 0.8rem; }

  /* min-width:0 lets grid children shrink instead of overflowing */
  .method-header > *, .work-header > *, .manifesto-grid > *, .content-grid > *, .feature-grid > *, .work-card > * { min-width: 0; }

  .hero { padding: 6rem 1.5rem; min-height: 100vh; min-height: 100svh; flex-direction: column; align-items: flex-start; justify-content: center; }
  section { padding: 5rem 1.5rem; }
  .page-hero { padding: 7rem 1.5rem 3rem; min-height: 42vh; min-height: 42svh; }
  .statement { padding: 4.5rem 1.5rem; }
  .hero-content { margin-top: 4rem; width: 100%; }
  .hero-actions { gap: 0.9rem; }
  .hero-meta { position: static; width: 100%; margin-top: 3rem; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
  /* glows sized/repositioned so the signature blue bloom stays visible on phones */
  .hero-glow { width: 460px; height: 460px; right: -120px; top: 18%; filter: blur(28px); }
  .page-hero-glow { width: 420px; height: 380px; right: -110px; top: 8%; filter: blur(30px); }
  .closing-glow { width: 460px; height: 340px; }
  .method-header, .work-header, .manifesto-grid, .footer-grid, .content-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .content-aside { position: static; }
  .method-grid, .research-grid, .facts { grid-template-columns: 1fr; }
  .method-cell { border-right: none; padding: 2.5rem 0; }
  .research-cell, .research-cell:nth-child(odd), .research-cell:nth-child(even) { border-right: none; padding: 2.5rem 0; }
  .fact, .fact:nth-child(odd), .fact:nth-child(even) { border-right: none; padding: 1.5rem 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-visual { min-height: 300px; }
  .feature-content { padding: 3rem 1.5rem; }
  .feature-stats { gap: 1.75rem; }
  .work-grid { grid-template-columns: 1fr; }
  .statband { padding: 2.5rem 1.5rem; }
  .statband-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
  .statband .stat { padding-left: 1.25rem; }
  .role { grid-template-columns: 1fr; gap: 1rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

/* ---------- SMALL PHONES ---------- */
@media (max-width: 560px) {
  nav, nav.scrolled { padding: 0.9rem 1.15rem; }
  .brand-suffix { display: none; }
  .hero, section { padding: 4.5rem 1.15rem; }
  .statement { padding: 3.75rem 1.15rem; }
  .statband { padding: 2rem 1.15rem; }
  .work-card { padding: 1.75rem 1.5rem 1.5rem; }
  .feature-content { padding: 2.5rem 1.15rem; }
  .feature-stats { gap: 1.25rem; }
  .feature-stat-num { font-size: 1.7rem; }
  .hero-eyebrow { margin-bottom: 1.5rem; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { width: 100%; text-align: center; justify-content: center; }
  .closing-actions { flex-direction: column; align-items: stretch; }
  .closing-actions .btn-primary, .closing-actions .btn-ghost-inv { width: 100%; text-align: center; justify-content: center; }
  .prose { max-width: 100%; }
}
