/* ============================================================
   Arc — Amethyst Research Coalition
   ============================================================ */

:root {
  --bg: 247, 247, 250;
  --fg: 14, 13, 20;
  --muted: 106, 104, 122;
  --line: rgba(20, 14, 40, 0.08);
  --accent: 124, 92, 246;         /* amethyst */
  --accent-soft: 167, 139, 250;
  --rose: 226, 120, 170;
  --radius-card: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-reveal: cubic-bezier(0.22, 0.68, 0.35, 1);
  --sans: "Google Sans", -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 20px;
  color-scheme: light;
}
@media (min-width: 640px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: rgb(var(--bg));
  color: rgb(var(--fg));
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: rgba(var(--accent), 0.22); }

.focus-ring:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid rgb(var(--accent));
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 12px 16px; border-radius: 6px; font-weight: 600;
  background: rgb(var(--bg)); transition: top .2s;
}
.skip-link:focus { top: 12px; }

.muted { color: rgb(var(--muted)); }
.mono { font-family: var(--mono); }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Background: dithered particle wave + paper grain ---------- */
.dither-wrap { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.dither-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.paper-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply; opacity: .06;
}
main, footer { position: relative; z-index: 2; }

/* ---------- Glass + buttons ---------- */
.glass {
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  background: linear-gradient(rgba(255,255,255,.76), rgba(255,255,255,.58));
  border: 1px solid rgba(20, 14, 40, .08);
  box-shadow: rgba(255,255,255,.95) 0 1px 0 inset, rgba(24, 14, 52, .28) 0 24px 60px -28px, rgba(20, 14, 40, .04) 0 2px 4px;
}
.glass-strong {
  backdrop-filter: blur(32px) saturate(1.7);
  -webkit-backdrop-filter: blur(32px) saturate(1.7);
  background: linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.78));
  border: 1px solid rgba(20, 14, 40, .1);
  box-shadow: #fff 0 1px 0 inset, rgba(40, 26, 90, .4) 0 32px 80px -32px, rgba(20, 14, 40, .06) 0 2px 6px;
}
.glass-control {
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(20, 14, 40, .09);
  box-shadow: rgba(255,255,255,.9) 0 1px 0 inset, rgba(20, 14, 40, .05) 0 1px 2px;
  transition: background-color .2s, border-color .2s;
}
.glass-control:hover { background: rgba(255,255,255,.9); border-color: rgba(20,14,40,.14); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap;
  transition: opacity .2s, background-color .2s, transform .2s;
}
.btn-lg { height: 48px; padding: 0 28px; }
.btn-ink {
  background: rgb(var(--fg)); color: rgb(var(--bg));
  box-shadow: rgba(255,255,255,.16) 0 1px 0 inset, rgba(24, 14, 52, .5) 0 8px 20px -10px;
}
.btn-ink:hover { opacity: .86; }
.btn-white {
  background: #fff; color: rgb(var(--fg));
  border: 1px solid rgba(20,14,40,.08);
  box-shadow: rgba(20,14,40,.04) 0 1px 2px;
}
.btn-white:hover { background: rgba(255,255,255,.7); }
.btn .arrow { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-reveal), transform .7s var(--ease-reveal); }
.reveal.revealed { opacity: 1; transform: none; }
@keyframes hero-rise { from { opacity: 0; transform: translate3d(0, 20px, 0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.hero-rise { animation: hero-rise 1.1s var(--ease-out) both; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; }
.nav-backdrop {
  position: absolute; inset: 0 0 auto 0; height: 7rem; pointer-events: none;
  backdrop-filter: blur(20px) saturate(1.08); -webkit-backdrop-filter: blur(20px) saturate(1.08);
  -webkit-mask-image: linear-gradient(#000 0, rgba(0,0,0,.92) 38%, transparent);
  mask-image: linear-gradient(#000 0, rgba(0,0,0,.92) 38%, transparent);
}
.nav-row { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 80px; padding: 0 var(--gutter); }
.logo-pill { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 20px; border-radius: 999px; }
.wordmark-sm { font-size: 23px; font-weight: 500; letter-spacing: -0.05em; line-height: 1; transform: translateY(-1px); }
.menu-wrap { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); z-index: 50; }
.menu-shell { position: relative; width: 128px; padding: 8px; border-radius: 28px; transition: width .5s var(--ease-out); }
.menu-shell .menu-bg { position: absolute; inset: 0; border-radius: 28px; opacity: 0; transition: opacity .35s; pointer-events: none; }
.menu-toggle { display: flex; width: 100%; height: 52px; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.menu-icon { position: relative; width: 12px; height: 8px; }
.menu-icon i { position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease-out), top .35s var(--ease-out); }
.menu-icon i:first-child { top: 1px; } .menu-icon i:last-child { top: 6px; }
.menu-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.menu-panel > div { overflow: hidden; }
.menu-links { padding: 10px 4px 4px; display: grid; gap: 2px; opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .4s var(--ease-out); }
.menu-links a { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 14px; border-radius: 14px; font-size: 15px; transition: background-color .2s; }
.menu-links a span { font-size: 12px; color: rgb(var(--muted)); font-family: var(--mono); }
.menu-links a:hover { background: rgba(20,14,40,.05); }
.menu-shell.open { width: 300px; }
.menu-shell.open .menu-bg { opacity: 1; }
.menu-shell.open .menu-panel { grid-template-rows: 1fr; }
.menu-shell.open .menu-links { opacity: 1; transform: none; transition-delay: .08s; }
.menu-shell.open .menu-icon i:first-child { top: 3.5px; transform: rotate(45deg); }
.menu-shell.open .menu-icon i:last-child { top: 3.5px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; align-items: center; justify-content: center; min-height: 640px; height: 100svh; text-align: center; padding: 0 var(--gutter); }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 12px; color: rgb(var(--muted)); margin-bottom: 28px; }
.badge b { font-weight: 500; color: rgb(var(--fg)); }
.pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--accent)); }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid rgb(var(--accent)); opacity: 0; animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.display {
  font-size: clamp(42px, 10vw, 48px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 400;
}
@media (min-width: 640px) { .display { font-size: clamp(48px, 5.6vw, 76px); } }
.display .l1 { display: block; font-weight: 500; }
.display .l2 { display: block; color: rgb(var(--muted)); }
.lede { margin-top: 28px; max-width: 31rem; font-size: 16px; line-height: 1.625; color: rgb(var(--muted)); text-wrap: pretty; }
@media (min-width: 640px) { .lede { font-size: 17px; } }
.hero-cta { margin-top: 36px; }
.fine { margin-top: 22px; font-size: 12px; letter-spacing: .025em; color: rgba(var(--fg), .8); text-shadow: 0 0 3px rgb(var(--bg)); }

/* ---------- Section titles ---------- */
.section { position: relative; padding: 64px 0; scroll-margin-top: 96px; }
@media (min-width: 640px) { .section { padding: 96px 0; } }
.h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 400; text-wrap: balance; }
.h2 .l1 { display: block; font-weight: 500; }
.h2 .l2 { display: block; color: rgb(var(--muted)); }
.h2-solid { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 500; text-wrap: balance; }
.sub { margin-top: 20px; max-width: 31rem; font-size: 16px; line-height: 1.625; color: rgb(var(--muted)); text-wrap: pretty; }
@media (min-width: 640px) { .sub { font-size: 17px; } }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

/* ---------- Pinned: first principles ---------- */
.pin-section { position: relative; height: 340vh; }
.pin-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; padding: 84px var(--gutter) clamp(16px, 3svh, 32px); }
.pin-stack { will-change: transform; display: flex; flex-direction: column; align-items: center; }
.pin-head { text-align: center; padding-top: clamp(24px, 9svh, 110px); will-change: opacity; }
.pin-stage { position: relative; margin-top: clamp(48px, 9svh, 96px); width: min(100%, 1060px); }

@keyframes blink { 50% { opacity: 0; } }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes flow-back { to { stroke-dashoffset: 24; } }

.pipe { display: grid; grid-template-columns: 290px minmax(0, 1fr); border-radius: 28px; overflow: hidden; height: clamp(470px, 64svh, 580px); }
.pipe-steps { padding: 22px 0 22px 22px; display: flex; flex-direction: column; gap: 6px; }
.pipe-steps li { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 16px 16px 20px; border-radius: 18px; color: rgb(var(--muted)); transition: background-color .4s, color .4s, box-shadow .4s; }
.pipe-steps .n { font-family: var(--mono); font-size: 12px; padding-top: 4px; }
.pipe-steps b { display: block; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.pipe-steps small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: rgb(var(--muted)); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease-out), opacity .4s; }
.pipe-steps li.done { color: rgb(var(--fg)); }
.pipe-steps li.active { color: rgb(var(--fg)); background: rgba(255,255,255,.8); box-shadow: 0 1px 2px rgba(20,14,40,.06), 0 0 0 1px rgba(20,14,40,.05); }
.pipe-steps li.active small { max-height: 60px; opacity: 1; }
.rail { position: absolute; left: 16px; right: 16px; bottom: 9px; height: 2px; border-radius: 2px; background: rgba(20,14,40,.07); opacity: 0; transition: opacity .3s; }
.rail i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: rgb(var(--accent)); border-radius: 2px; }
.pipe-steps li.active .rail { opacity: 1; }

.pipe-view { position: relative; min-width: 0; }
.pv { position: absolute; inset: 0; padding: 28px 32px 26px 28px; display: flex; flex-direction: column; opacity: 0; transform: translateY(14px); transition: opacity .45s, transform .6s var(--ease-out); pointer-events: none; }
.pv.active { opacity: 1; transform: none; }
.pv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 13px; }
.pv-title { font-weight: 500; }
.pv-stat { color: rgb(var(--muted)); white-space: nowrap; }
.chart { position: relative; flex: 1; min-height: 0; margin-top: 12px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.readouts { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.readouts div { padding: 11px 14px; border-radius: 14px; background: rgba(20,14,40,.04); min-width: 0; }
.readouts span { display: block; font-size: 12px; color: rgb(var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readouts b { display: block; margin-top: 2px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readouts b.rose { color: rgb(var(--rose)); }

.svg-label { font-family: var(--sans); font-size: 12px; fill: rgb(var(--muted)); }
.svg-label.mono { font-family: var(--mono); font-size: 11px; }

/* 01 · Students join */
.person { transition: none; }
.person.hs { fill: rgb(var(--accent)); }
.person.ug { fill: rgb(var(--rose)); }
.team-ring { opacity: 0; }
.team-ring circle { fill: rgba(var(--accent), .05); stroke: rgba(var(--accent), .35); stroke-width: 1.2; stroke-dasharray: 4 4; }
.team-ring text { font-family: var(--sans); font-size: 13px; font-weight: 500; fill: rgb(var(--fg)); text-anchor: middle; }
.side-lbl { font-family: var(--sans); font-size: 13px; font-weight: 500; text-anchor: middle; }
.side-lbl.hs { fill: rgb(var(--accent)); }
.side-lbl.ug { fill: rgb(var(--rose)); }

/* 02 · Research projects */
.projects { flex: 1; min-height: 0; margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: center; }
.proj { display: flex; flex-direction: column; padding: 18px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(20,14,40,.06), 0 12px 30px -18px rgba(36,22,80,.3); transition: box-shadow .4s; }
.proj.done { box-shadow: 0 0 0 1.5px rgba(var(--accent), .5), 0 16px 34px -18px rgba(36,22,80,.4); }
.proj-top { display: flex; justify-content: space-between; align-items: center; }
.proj-dots { display: flex; }
.proj-dots i { width: 18px; height: 18px; border-radius: 50%; background: rgb(var(--accent)); border: 2px solid #fff; margin-right: -5px; }
.proj-dots i.r { background: rgb(var(--rose)); }
.proj-chip { font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: rgb(var(--accent)); color: #fff; opacity: 0; transform: scale(.8); transition: opacity .3s, transform .4s var(--ease-out); }
.proj.done .proj-chip { opacity: 1; transform: none; }
.proj b { margin-top: 16px; font-size: 16px; font-weight: 500; }
.proj p { margin-top: 6px; font-size: 13px; line-height: 1.5; color: rgb(var(--muted)); flex: 1; }
.proj-bar { margin-top: 16px; height: 5px; border-radius: 3px; background: rgba(20,14,40,.07); overflow: hidden; }
.proj-bar i { display: block; height: 100%; background: rgb(var(--accent)); transform-origin: left; transform: scaleX(0); border-radius: 3px; }
.proj-stage { margin-top: 8px; font-size: 12px; color: rgb(var(--muted)); }

/* 03 · Scaling */
.scale-path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.scale-lbl { font-family: var(--sans); font-size: 12px; font-weight: 500; opacity: 0; transition: opacity .4s; }
.dg-axis { stroke: rgba(20,14,40,.25); stroke-width: 1; fill: none; }

@media (max-width: 860px) {
  .pin-section { height: 360vh; }
  .pin-head { padding-top: 8px; }
  .pin-stage { margin-top: 32px; }
  .pipe { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: clamp(480px, 64svh, 560px); }
  .pipe-steps { flex-direction: row; gap: 4px; padding: 10px 10px 0; }
  .pipe-steps li { flex: 1; min-width: 0; grid-template-columns: 1fr; gap: 0; padding: 10px 4px 14px; text-align: center; border-radius: 14px; }
  .pipe-steps .n { padding: 0; font-size: 10px; }
  .pipe-steps b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
  .pipe-steps small { display: none; }
  .rail { left: 10px; right: 10px; bottom: 6px; }
  .pv { padding: 18px 16px 16px; }
  .pv-head { flex-direction: column; gap: 2px; }
  .readouts div { padding: 9px 10px; }
  .readouts span { font-size: 10.5px; }
  .readouts b { font-size: 15px; }
  .projects { grid-template-columns: 1fr; gap: 8px; align-content: start; }
  .proj { padding: 12px 14px; }
  .proj p { display: none; }
  .proj b { margin-top: 8px; font-size: 14px; }
  .proj-bar { margin-top: 10px; }
}

/* ---------- Overview list ---------- */
.ov-head { display: grid; gap: 20px; }
@media (min-width: 1024px) { .ov-head { grid-template-columns: minmax(0,1fr) minmax(0,21rem); align-items: end; column-gap: 40px; } .ov-head .sub { margin-top: 0; } }
.ov-list { margin-top: 56px; }
.ov-row {
  display: grid; grid-template-columns: 2rem minmax(0,1fr); column-gap: 16px; padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.ov-row:first-child { border-top: 1px solid var(--line); }
.ov-row .n { font-family: var(--mono); font-size: 12px; color: rgb(var(--muted)); padding-top: 8px; }
.ov-row h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.025em; transition: transform .5s ease-out; }
.ov-row p { grid-column-start: 2; margin-top: 12px; max-width: 28rem; font-size: 14px; line-height: 1.625; color: rgb(var(--muted)); transition: color .5s ease-out; }
@media (min-width: 640px) {
  .ov-row { grid-template-columns: 2.75rem minmax(0,1fr); padding: 36px 0; }
  .ov-row h3 { font-size: 34px; line-height: 1.25; }
  .ov-row .n { padding-top: 12px; }
  .ov-row p { font-size: 15px; }
}
@media (min-width: 1024px) {
  .ov-row { grid-template-columns: 2.75rem minmax(0,1fr) minmax(0,21rem); align-items: center; column-gap: 40px; }
  .ov-row .n { padding-top: 0; }
  .ov-row p { grid-column-start: 3; margin-top: 0; }
  .ov-row:hover h3 { transform: translateX(8px); }
  .ov-row:hover p { color: rgb(var(--fg)); }
}
.link-cards { margin-top: 40px; display: grid; gap: 16px; }
@media (min-width: 768px) { .link-cards { grid-template-columns: 1fr 1fr; } }
.link-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; border-radius: var(--radius-card); }
.link-card small { display: block; font-size: 13px; color: rgb(var(--muted)); }
.link-card strong { display: block; margin-top: 2px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.round-arrow { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid rgba(20,14,40,.08); box-shadow: 0 1px 2px rgba(20,14,40,.06); transition: transform .4s var(--ease-out), background-color .2s, color .2s; }
.round-arrow svg { width: 15px; height: 15px; }
.link-card:hover .round-arrow { transform: translateX(3px); background: rgb(var(--fg)); color: #fff; }

/* ---------- Research areas ---------- */
.areas { margin-top: 56px; display: grid; gap: 16px; }
@media (min-width: 700px) { .areas { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .areas { grid-template-columns: repeat(3, 1fr); } }
.area { display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; }
.area-visual { position: relative; height: 270px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(240,238,246,.85), rgba(250,250,252,.45)); }
.area-visual.dark { background: radial-gradient(120% 90% at 50% 0%, #2a1f52 0%, #141022 72%); border-bottom-color: rgba(0,0,0,.25); }
.area-visual svg { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
.area-copy { padding: 24px 28px 28px; }
.area-copy small { font-size: 13px; color: rgb(var(--muted)); }
.area-copy h3 { margin-top: 6px; font-size: 21px; line-height: 1.25; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }

.dg-t { font-family: var(--sans); font-size: 10.5px; fill: #6a687a; }
.dark .dg-t { fill: #a9a2c4; }
.dg-mono { font-family: var(--mono); font-size: 9.5px; }
.dg-c { text-anchor: middle; dominant-baseline: central; }
.dg-box { fill: rgba(167,139,250,.12); stroke: rgba(167,139,250,.55); stroke-width: 1; }
.dg-box-t { font-family: var(--sans); font-size: 11px; fill: #e7e2f7; text-anchor: middle; dominant-baseline: central; }
.dg-line { fill: none; stroke: rgba(167,139,250,.45); stroke-width: 1.4; }
.dg-stream { fill: none; stroke: rgba(196,178,255,.85); stroke-width: 2.5; }
.dg-dot { fill: #d6c9ff; }
.dg-dot.rose { fill: #f0a6c7; }
.dg-axis { stroke: rgba(20,14,40,.25); stroke-width: 1; fill: none; }

/* Labels that fade in with a diagram */
.emb-lbl { font-family: var(--sans); font-size: 10.5px; fill: rgb(var(--fg)); opacity: 0; transition: opacity .8s 1s; }
.in .emb-lbl { opacity: 1; }

/* Double descent */
.dd-curve { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s var(--ease-out); }
.in .dd-curve { stroke-dashoffset: 0; }

/* Where we're headed */
.path { margin-top: 56px; display: grid; gap: 16px; }
@media (min-width: 760px) { .path { grid-template-columns: 1fr 1fr; } }
.path .area-visual { height: 300px; }
.when { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: rgba(20,14,40,.05); color: #4a4757; }
.when.now { background: rgb(var(--accent)); color: #fff; }
.when.now::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.area-copy h3 { margin-top: 12px; }
.area-copy p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: rgb(var(--muted)); max-width: 30rem; }

/* Join */
.join-card { position: relative; overflow: hidden; display: grid; gap: 8px 40px; padding: 36px 24px 8px; border-radius: 32px; }
@media (min-width: 960px) { .join-card { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; padding: 64px 64px 8px; } }
.join-card::before { content: ""; position: absolute; right: -10%; top: -20%; width: 70%; height: 90%; background: radial-gradient(closest-side, rgba(var(--accent), .14), transparent); pointer-events: none; }
.join-copy { position: relative; }
.join-tag { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 500; color: rgb(var(--fg)); background: rgba(255,255,255,.8); border: 1px solid rgba(20,14,40,.08); margin-bottom: 24px; }
.join-copy .sub { max-width: 30rem; }
.join-actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.join-actions span { font-size: 13px; color: rgb(var(--muted)); }
.join-visual { position: relative; width: 100%; max-width: 460px; justify-self: center; padding: 8px 0; }
/* Application skeleton animation */
.apply-sim { position: relative; width: 100%; max-width: 440px; margin: 0 auto; padding: 26px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgba(20,14,40,.06), 0 30px 60px -28px rgba(36,22,80,.45); overflow: hidden; }
.sk { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #eeedf3 0%, #f8f7fb 40%, #eeedf3 80%); background-size: 200% 100%; animation: sk-shimmer 1.8s linear infinite; }
.sk.thin { height: 7px; margin-top: 7px; }
.sk.dark { background: #2b2738; animation: none; height: 12px; }
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.w20 { width: 20%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }

.as-form { transition: opacity .45s, transform .6s var(--ease-out), filter .45s; }
.apply-sim.sent .as-form { opacity: 0; transform: scale(.96); filter: blur(4px); }
.as-head { display: flex; align-items: center; gap: 12px; }
.as-av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #c9b8ff, #8b6cf7); }
.as-head-t { flex: 1; }
.as-tag { font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: rgba(var(--accent), .1); color: rgb(var(--accent)); }
.as-progress { margin: 18px 0 20px; height: 4px; border-radius: 2px; background: #f0eff5; overflow: hidden; }
.as-progress i { display: block; height: 100%; background: rgb(var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }

.as-field + .as-field { margin-top: 14px; }
.sk.lbl { height: 7px; margin-bottom: 8px; }
.as-input { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid #e6e4ee; transition: border-color .25s, box-shadow .25s; }
.as-input.tall { height: 74px; justify-content: flex-start; padding-top: 12px; }
.as-field.focus .as-input { border-color: rgba(var(--accent), .7); box-shadow: 0 0 0 4px rgba(var(--accent), .12); }
.as-input .fill { display: block; height: 8px; border-radius: 4px; background: #2b2738; transform: scaleX(0); transform-origin: left; transition: transform .9s steps(9, end); }
.as-field.filled .fill { transform: scaleX(1); }
.as-input.tall .fill:nth-child(2) { transition-delay: .7s; }
.as-input.tall .fill:nth-child(3) { transition-delay: 1.4s; }
.as-caret { position: absolute; right: 12px; top: 50%; width: 1.5px; height: 14px; margin-top: -7px; background: rgb(var(--accent)); opacity: 0; }
.as-field.focus .as-caret { opacity: 1; animation: blink 1s steps(1) infinite; }

.as-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.as-chips span { width: 64px; height: 26px; border-radius: 999px; background: #f2f1f6; border: 1px solid #e6e4ee; transition: background-color .3s, border-color .3s, transform .3s var(--ease-out); }
.as-chips span.w { width: 86px; }
.as-chips span.on { background: rgba(var(--accent), .16); border-color: rgba(var(--accent), .55); transform: scale(1.04); }
.as-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.as-btn { display: grid; place-items: center; width: 116px; height: 38px; border-radius: 999px; background: rgb(var(--fg)); transition: transform .15s, background-color .3s; }
.as-btn i { width: 50px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.55); }
.as-btn.press { transform: scale(.94); background: rgb(var(--accent)); }

.as-done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; opacity: 0; transform: translateY(10px); transition: opacity .5s .15s, transform .7s .15s var(--ease-out); pointer-events: none; }
.as-done .sk { margin: 0 auto; }
.as-done .sk.dark { width: 46%; }
.as-done .sk.w70 { width: 62%; }
.apply-sim.sent .as-done { opacity: 1; transform: none; }
.as-done svg { width: 60px; height: 60px; margin-bottom: 8px; }
.as-done circle { fill: rgba(var(--accent), .12); stroke: rgb(var(--accent)); stroke-width: 2; }
.as-done path { fill: none; stroke: rgb(var(--accent)); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .6s .5s var(--ease-out); }
.apply-sim.sent .as-done path { stroke-dashoffset: 0; }
.as-next { display: flex; align-items: center; justify-content: center; width: 130px; height: 30px; margin-top: 10px; border-radius: 999px; border: 1px dashed rgba(var(--accent), .5); }
.as-next .sk { width: 60%; height: 7px; }

.as-cursor { position: absolute; left: 0; top: 0; width: 20px; height: 20px; z-index: 5; transition: transform .6s var(--ease-out); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.as-cursor path { fill: rgb(var(--fg)); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }

/* Cohort process */
.join-process { grid-column: 1 / -1; margin-top: 28px; padding: 30px 0 36px; border-top: 1px solid var(--line); }
.jp-label { font-size: 12px; font-weight: 500; color: rgb(var(--accent)); }
.jp-steps { margin-top: 22px; display: grid; gap: 22px; position: relative; }
@media (min-width: 760px) {
  .jp-steps { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .jp-steps::before { content: ""; position: absolute; left: 16px; right: 12%; top: 16px; height: 1px; background: linear-gradient(90deg, rgba(var(--accent), .45), rgba(var(--accent), .1)); }
}
.jp-steps li { position: relative; }
.jp-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid rgba(var(--accent), .35); color: rgb(var(--accent)); font-family: var(--mono); font-size: 13px; position: relative; }
.jp-steps li:first-child .jp-n { background: rgb(var(--accent)); color: #fff; border-color: rgb(var(--accent)); }
.jp-steps b { display: block; margin-top: 14px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.jp-steps p { margin-top: 6px; font-size: 14px; line-height: 1.55; color: rgb(var(--muted)); max-width: 17rem; }

/* ---------- Open card ---------- */
.open-card { margin-top: 80px; padding: 40px 28px; border-radius: 28px; display: grid; gap: 28px; }
@media (min-width: 768px) { .open-card { padding: 48px 48px; grid-template-columns: 1fr auto; align-items: end; } }
.open-card h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.open-card p { margin-top: 14px; max-width: 32rem; color: rgb(var(--muted)); line-height: 1.6; }
.pills { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(20,14,40,.1); background: rgba(255,255,255,.6); color: #4a4757; }

/* ---------- Join (pricing) ---------- */
.plans { margin: 36px auto 0; max-width: 1140px; display: grid; gap: 16px; }
@media (min-width: 960px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { display: flex; flex-direction: column; padding: 32px 30px 30px; border-radius: 28px; }
.plan h3 { font-size: 18px; font-weight: 500; }
.plan .desc { margin-top: 6px; font-size: 14px; line-height: 1.55; color: rgb(var(--muted)); min-height: 44px; }
.price { margin-top: 24px; display: flex; align-items: baseline; gap: 6px; }
.price .num { font-size: 52px; line-height: 1; letter-spacing: -0.04em; font-weight: 400; display: inline-block; transition: opacity .25s, transform .35s var(--ease-out); }
.price .num.flip { opacity: 0; transform: translateY(-8px); }
.price .unit { font-size: 14px; color: rgb(var(--muted)); }
.price-note { margin-top: 10px; font-size: 12px; color: rgb(var(--muted)); min-height: 18px; }
.plan hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.feats { display: grid; gap: 12px; align-content: start; font-size: 14px; color: #3f3c4c; flex: 1; }
.feats li { display: flex; gap: 10px; line-height: 1.45; }
.feats li svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: #6e6b7c; }
.feats li.no { color: #a9a6b4; }
.feats li.no svg { color: #bdbac6; }
.plan .btn { margin-top: 32px; width: 100%; height: 44px; }
.process { flex: 1; display: grid; gap: 16px; align-content: start; }
.process li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.process span { padding-top: 2px; font-family: var(--mono); font-size: 12px; color: rgb(var(--accent)); }
.process b { display: block; font-size: 15px; font-weight: 500; }
.process small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: rgb(var(--muted)); }
.plans-foot { margin-top: 28px; text-align: center; font-size: 12px; color: rgb(var(--muted)); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 40px; }
@media (min-width: 960px) { .faq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 80px; } .faq-head { position: sticky; top: 120px; align-self: start; } }
.faq-head p { margin-top: 18px; color: rgb(var(--muted)); }
.faq-head p a { color: rgb(var(--fg)); border-bottom: 1px solid currentColor; }
.qa { border-bottom: 1px solid var(--line); }
.qa:first-child { border-top: 1px solid var(--line); }
.qa button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; text-align: left; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.qa .pm { flex: none; position: relative; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid rgba(20,14,40,.08); box-shadow: 0 1px 2px rgba(20,14,40,.05); transition: transform .4s var(--ease-out); }
.qa .pm::before, .qa .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -.75px 0 0 -5px; background: rgb(var(--fg)); border-radius: 1px; transition: transform .4s var(--ease-out); }
.qa .pm::after { transform: rotate(90deg); }
.qa.open .pm { transform: rotate(45deg); }
.qa .ans { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.qa .ans > div { overflow: hidden; }
.qa .ans p { padding: 0 56px 24px 0; color: rgb(var(--muted)); line-height: 1.65; font-size: 15px; }
.qa.open .ans { grid-template-rows: 1fr; }

/* ---------- Final CTA ---------- */
.ico-folder { width: 58px; height: 46px; position: relative; }
.ico-folder::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 10px; border-radius: 4px 6px 0 0; background: #9f86f7; }
.ico-folder::after { content: ""; position: absolute; inset: 5px 0 0 0; border-radius: 4px 5px 5px 5px; background: linear-gradient(#c3b2ff, #9d82f6); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 1px rgba(60,30,140,.15); }
.ico-doc { width: 42px; height: 54px; position: relative; border-radius: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(20,14,40,.1), 0 1px 2px rgba(20,14,40,.08); overflow: hidden; }
.ico-doc::before { content: ""; position: absolute; right: 0; top: 0; width: 12px; height: 12px; background: linear-gradient(225deg, rgb(var(--bg)) 50%, #e4e2ea 50%); }
.ico-doc .lines { position: absolute; left: 7px; right: 9px; top: 15px; display: grid; gap: 3px; }
.ico-doc .lines i { height: 1.5px; background: #dad8e0; border-radius: 1px; }
.ico-doc .lines i:nth-child(3n) { width: 70%; }
.ico-doc .tag { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 7px; font-weight: 700; letter-spacing: .06em; color: rgb(var(--accent)); }
.final { position: relative; min-height: 86svh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 96px var(--gutter) 128px; scroll-margin-top: 96px; }
.fan { position: relative; height: 170px; width: 100%; max-width: 620px; margin: 0 auto 32px; }
.fan-card {
  position: absolute; left: 50%; top: 10px; width: 118px; height: 142px; margin-left: -59px; border-radius: 16px; padding: 8px; text-align: left;
  background: linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.75));
  box-shadow: 0 0 0 1px rgba(20,14,40,.07), 0 20px 40px -18px rgba(36,22,80,.4);
  transform: translate(0, 30px) rotate(0); opacity: 0;
  transition: transform 1.1s var(--ease-out), opacity .8s;
}
.fan-card .art { height: 88px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #f1eff6; }
.fan-card .art.dark { background: linear-gradient(150deg, #2a1d57, #0f0b1f); }
.fan-card .art svg { width: 100%; height: 100%; }
.fan-card .nm { margin-top: 8px; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fan-card .sz { font-size: 9.5px; color: #9a98a5; }
.fan.in .fan-card { opacity: 1; }
.fan.in .fan-card:nth-child(1) { transform: translate(-236px, 16px) rotate(-14deg); }
.fan.in .fan-card:nth-child(2) { transform: translate(-120px, 0) rotate(-7deg); transition-delay: .05s; }
.fan.in .fan-card:nth-child(3) { transform: translate(0, -6px) rotate(0); transition-delay: .1s; }
.fan.in .fan-card:nth-child(4) { transform: translate(120px, 0) rotate(7deg); transition-delay: .15s; }
.fan.in .fan-card:nth-child(5) { transform: translate(236px, 16px) rotate(14deg); transition-delay: .2s; }
.fan-card:hover { z-index: 5; }
@media (max-width: 640px) {
  .fan { transform: scale(.62); margin-bottom: 0; }
}
.final .display { font-size: clamp(40px, 5.4vw, 72px); }
.final-word { display: inline-block; opacity: 0; transform: translateY(18px); filter: blur(8px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out); }
.final.in .final-word { opacity: 1; transform: none; filter: none; }

/* ---------- Footer ---------- */
.site-footer { padding: 0 var(--gutter); }
.foot-inner { max-width: 1280px; margin: 0 auto; border-top: 1px solid var(--line); padding: 56px 0 40px; display: grid; gap: 48px; }
@media (min-width: 960px) { .foot-inner { grid-template-columns: 1fr auto; padding: 64px 24px 48px; } }
.foot-logo { font-size: 44px; font-weight: 500; letter-spacing: -0.055em; line-height: 1; }
.foot-brand p { margin-top: 20px; color: rgb(var(--muted)); font-size: 14px; }
.foot-brand .btn { margin-top: 24px; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 36px 40px; }
@media (min-width: 640px) { .foot-cols { grid-template-columns: repeat(4, minmax(110px, auto)); gap: 56px; } }
.foot-cols h4 { font-size: 14px; font-weight: 500; }
.foot-cols ul { margin-top: 16px; display: grid; gap: 10px; }
.foot-cols a { font-size: 14px; color: rgb(var(--muted)); transition: color .2s; }
.foot-cols a:hover { color: rgb(var(--fg)); }
.foot-base { max-width: 1280px; margin: 0 auto; padding: 0 0 40px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 12px; color: rgb(var(--muted)); }
@media (min-width: 960px) { .foot-base { padding: 0 24px 40px; } }
.wordmark { max-width: 1280px; margin: 0 auto; padding: 0 0 8px; font-size: clamp(72px, 19vw, 280px); line-height: .8; letter-spacing: -0.06em; font-weight: 500; text-align: center; user-select: none;
  background: linear-gradient(180deg, rgba(var(--fg), .16), rgba(var(--fg), .02) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
