/* Beyond website. Colours come from the logo (night blue, blue, violet, lavender). */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f4f0;
  --paper-2: #ecebe5;
  --card: #fffefb;
  --ink: #0b0e2a;
  --ink-soft: #4b5068;
  --ink-faint: #7c8099;
  --line: rgba(11, 14, 42, 0.13);
  --line-strong: rgba(11, 14, 42, 0.32);
  --night: #070a26;
  --night-2: #10155a;
  --blue: #3d4cf5;
  --violet: #8b5cf6;
  --lavender: #c9c3ff;
  --link: #3d4cf5;
  --grad: linear-gradient(120deg, #3d4cf5 0%, #8b5cf6 100%);
  --shadow: 0 30px 80px -30px rgba(16, 21, 90, 0.35);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 56px);
  --header: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #070a26;
    --paper-2: #0d1137;
    --card: #11163f;
    --ink: #eef0ff;
    --ink-soft: #b3b7d6;
    --ink-faint: #8287ad;
    --line: rgba(238, 240, 255, 0.12);
    --line-strong: rgba(238, 240, 255, 0.3);
    --link: #a5a0ff;
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 16px);
  background: var(--paper);
}

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

main { overflow-x: clip; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { color: #fff; background: var(--blue); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--night);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* ---------- Wordmark: the logo is the "B" ---------- */

.wordmark {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
}
.wordmark-b {
  width: 0.98em;
  height: 0.98em;
  margin-right: 0.04em;
  border-radius: 0.24em;
  align-self: center;
  transform: translateY(-0.03em);
}
.wordmark-small { font-size: 21px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--header);
  padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled { border-color: var(--line); }

.site-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); font-size: 14.5px; font-weight: 550; }
.site-nav a { text-decoration: none; color: var(--ink-soft); transition: color 150ms ease; }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  color: #fff; background: var(--ink); font-weight: 650;
}
.site-nav .nav-cta:hover { color: #fff; background: var(--blue); }
@media (prefers-color-scheme: dark) {
  .site-nav .nav-cta { color: var(--night); background: #fff; }
  .site-nav .nav-cta:hover { color: #fff; }
}

.menu-button {
  display: none; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; cursor: pointer;
}
.menu-button i { display: block; width: 18px; height: 1.5px; margin: 5px auto; background: var(--ink); transition: transform 180ms ease; }

/* ---------- Shared ---------- */

.section { width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto; padding: clamp(88px, 11vw, 160px) 0; }

.display {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
}
.display em, .hero h1 em, .final h2 em {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}
@media (prefers-color-scheme: dark) {
  .display em, .hero h1 em { background: linear-gradient(120deg, #8e97ff, #c9b5ff); -webkit-background-clip: text; background-clip: text; }
}

.section-lead { max-width: 560px; margin: 26px 0 0; color: var(--ink-soft); font-size: clamp(17px, 1.4vw, 19px); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 54px; padding: 12px 26px; border-radius: 999px;
  font-size: 15.5px; font-weight: 650; text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--grad); box-shadow: 0 14px 34px -14px rgba(61, 76, 245, 0.8); }
.button-light { color: var(--night); background: #fff; box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.6); }

.text-link { display: inline-flex; gap: 10px; font-size: 15px; font-weight: 650; text-decoration: none; color: var(--ink); }
.text-link:hover { text-decoration: underline; }

/* Orbit rings, the motif from the logo */
.orbit { position: absolute; pointer-events: none; display: grid; place-items: center; }
.orbit i { position: absolute; border: 1px solid var(--line-strong); border-radius: 50%; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  width: min(100% - 2 * var(--gutter), var(--max));
  min-height: min(calc(100svh - var(--header)), 900px);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) 0 clamp(72px, 8vw, 112px);
}


.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(56px, 7.4vw, 108px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.94;
}
.hero-lead { max-width: 560px; margin: 28px 0 0; color: var(--ink-soft); font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: 36px; }
.hero-promises { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 40px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 14px; }
.hero-promises li { display: inline-flex; align-items: center; gap: 8px; }
.hero-promises li::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: var(--grad) ;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 4px var(--paper);
}

.hero-stage { position: relative; display: grid; place-items: center; min-height: 640px; }
.orbit-hero { inset: -4% -12%; }
.orbit-hero i:nth-child(1) { width: 112%; height: 46%; transform: rotate(-18deg); border-color: rgba(139, 92, 246, 0.45); }
.orbit-hero i:nth-child(2) { width: 86%; height: 30%; transform: rotate(-18deg); border-style: dashed; }

/* Phone mock-up with an app screen built in HTML (sample content) */
.phone {
  position: relative; z-index: 2;
  width: min(340px, 82vw);
  aspect-ratio: 9 / 19.2;
  padding: 11px;
  border-radius: 54px;
  background: #0b0d18;
  box-shadow: var(--shadow), inset 0 0 0 1.5px #2b2f45, 0 0 0 1px rgba(0, 0, 0, 0.5);
  transform: rotate(2deg);
}
.phone-screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 44px;
  background: #fff; color: #11131a;
  font-size: 12px; line-height: 1.4;
  display: flex; flex-direction: column;
}
.phone-screen::before { /* dynamic island */
  content: ""; position: absolute; top: 10px; left: 50%; z-index: 3;
  width: 31%; height: 26px; border-radius: 20px; background: #0b0d18; transform: translateX(-50%);
}
.app-bar { display: flex; justify-content: space-between; align-items: center; padding: 50px 16px 8px; }
.app-wordmark { display: inline-flex; align-items: center; font-weight: 750; font-size: 19px; letter-spacing: -0.045em; }
.app-wordmark img { width: 19px; height: 19px; border-radius: 5px; margin-right: 1px; }
.app-icons { display: flex; gap: 14px; }
.app-icons svg, .app-actions svg { width: 21px; height: 21px; fill: none; stroke: #11131a; stroke-width: 1.7; stroke-linejoin: round; }
.app-chips { display: flex; gap: 6px; padding: 4px 16px 10px; overflow: hidden; white-space: nowrap; }
.chip { padding: 5px 11px; border-radius: 999px; background: #f0f1f6; font-weight: 600; font-size: 11px; }
.chip.is-on { color: #fff; background: linear-gradient(120deg, #5c66fa, #9e61fa); }

.app-post { flex: 1; }
.app-post-head { display: flex; align-items: center; gap: 9px; padding: 6px 14px 9px; }
.avatar {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; background: var(--a, var(--blue)); font-size: 10px; font-weight: 750;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--a, var(--blue));
}
.who { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.who strong { font-size: 12.5px; }
.who small { color: #6b7080; font-size: 10.5px; }
.dots { color: #6b7080; font-weight: 800; }

.text-card {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(145deg, var(--t1), var(--t2));
}
.text-card .kind { position: absolute; top: 18px; left: 20px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; opacity: 0.85; }
.text-card strong { position: relative; z-index: 1; font-size: 22px; line-height: 1.12; letter-spacing: -0.02em; }
.text-card small { position: relative; z-index: 1; font-size: 12px; opacity: 0.9; }
.text-card-orbit { position: absolute; top: 14%; right: -6%; width: 62%; aspect-ratio: 1; }
.text-card-orbit i { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.55), rgba(255,255,255,.12) 70%); }
.text-card-orbit b { position: absolute; inset: 30% -4%; border: 1.5px solid rgba(255, 255, 255, 0.75); border-radius: 50%; transform: rotate(-20deg); }
.text-card-orbit b::after { content: ""; position: absolute; top: 6%; right: 18%; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff; animation: blink 3s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.4; } }

.app-actions { display: flex; gap: 14px; padding: 10px 14px 4px; }
.app-actions .liked { fill: #ff3b5c; stroke: #ff3b5c; }
.app-actions .save { margin-left: auto; }
.app-caption { margin: 2px 14px 0; font-size: 11.5px; }
.app-caption .tag { color: #3e55d6; font-weight: 600; }
.app-source { margin: 4px 14px 0; color: #6b7080; font-size: 10.5px; }
.app-tabbar { display: flex; justify-content: space-around; padding: 12px 18px 26px; border-top: 1px solid #eceef3; }
.app-tabbar i { width: 20px; height: 20px; border-radius: 6px; border: 1.7px solid #b4b8c5; }
.app-tabbar i.on { border-color: #11131a; background: #11131a; }

.float-note {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13.5px; font-weight: 600;
}
.float-note svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; fill: none; stroke: #fff; stroke-width: 3; background: var(--grad); }
.note-source { top: 37%; left: -6%; transform: rotate(-4deg); }
.note-caught { bottom: 3%; right: -4%; transform: rotate(3deg); }

/* ---------- Ribbon ---------- */

.ribbon {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--night); color: #eef0ff;
}
.ribbon p {
  margin: 0; padding: clamp(28px, 3.4vw, 46px) clamp(20px, 4vw, 56px);
  font-family: var(--serif); font-size: clamp(21px, 2vw, 28px); line-height: 1.18;
}
.ribbon p + p { border-left: 1px solid rgba(238, 240, 255, 0.16); }
@media (prefers-color-scheme: dark) { .ribbon { background: var(--paper-2); border-block: 1px solid var(--line); } }

/* ---------- Kinds of posts ---------- */

.section-head { max-width: 760px; }
.kinds-grid {
  display: grid; grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 88px); margin-top: clamp(48px, 6vw, 80px); align-items: start;
}
.kind-tabs { border-top: 1px solid var(--line-strong); }
.kind-tab {
  display: grid; grid-template-columns: 40px 1fr; width: 100%;
  padding: 22px 8px; border: 0; border-bottom: 1px solid var(--line-strong);
  background: none; text-align: left; cursor: pointer; color: var(--ink-faint);
  transition: color 160ms ease, padding 160ms ease;
}
.kind-tab span { grid-row: span 2; padding-top: 8px; font-family: var(--mono); font-size: 11px; }
.kind-tab strong { font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.1; }
.kind-tab small { font-size: 13px; }
.kind-tab:hover { color: var(--ink); }
.kind-tab.is-active { color: var(--ink); padding-left: 16px; box-shadow: inset 3px 0 0 var(--k); }
.kind-tab.is-active span { color: var(--k); }

.kind-panel {
  padding: clamp(24px, 4vw, 52px);
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.kind-panel:focus-visible { outline-offset: 6px; }
.panel-meta { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--ink-faint); font-size: 13px; }
.pill { padding: 4px 11px; border-radius: 999px; color: #fff; background: var(--k); font-size: 11px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.kind-panel h3 { margin: 22px 0 26px; font-family: var(--serif); font-size: clamp(30px, 3.4vw, 46px); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; }
.kind-panel > p:not(.panel-meta):not(.panel-foot) { margin: 24px 0; color: var(--ink-soft); font-size: 16px; }
.panel-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--link); font-size: 13.5px; font-weight: 600; }
.panel-foot span:last-child { color: var(--ink-faint); font-weight: 500; }

.panel-visual { position: relative; min-height: 200px; border-radius: 18px; overflow: hidden; }
.visual-dots { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 28px; background: rgba(61, 76, 245, 0.08); }
.visual-dots div { display: flex; gap: 8px; }
.visual-dots i { width: 18px; height: 18px; border-radius: 50%; background: var(--grad); }
.visual-dots span { position: absolute; right: 28px; bottom: 22px; font-family: var(--serif); font-size: clamp(26px, 3vw, 40px); }
.visual-circuit { display: grid; place-items: center; padding: 10px; background: rgba(20, 184, 166, 0.09); }
.visual-circuit svg { width: 100%; height: 190px; fill: none; stroke: var(--ink); stroke-width: 2; }
.visual-circuit rect { fill: var(--card); }
.visual-circuit text { fill: var(--ink); stroke: none; font: 600 15px var(--mono); }
.visual-circuit .red { fill: #ef4444; stroke: none; opacity: 0.25; }
.visual-circuit .amber { fill: #f59e0b; stroke: none; opacity: 0.25; }
.visual-circuit .green { fill: #22c55e; stroke: none; }
.visual-code { display: flex; align-items: center; padding: 28px; background: rgba(245, 158, 11, 0.1); }
.visual-code code { font: 15px/1.9 var(--mono); color: var(--ink-soft); }
.visual-code b { color: #c2410c; }
@media (prefers-color-scheme: dark) { .visual-code b { color: #fdba74; } }
.visual-code small { display: block; margin-top: 8px; color: var(--link); font-size: 13px; }
.visual-space { background: radial-gradient(ellipse at 60% 40%, #2a1f6b, #070a26 70%); }
.visual-space i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; }
.visual-space i:nth-child(1) { top: 18%; left: 12%; }
.visual-space i:nth-child(2) { top: 70%; left: 24%; width: 2px; height: 2px; }
.visual-space i:nth-child(3) { top: 26%; right: 16%; width: 5px; height: 5px; box-shadow: 0 0 10px #fff; }
.visual-space i:nth-child(4) { bottom: 14%; right: 38%; }
.visual-space i:nth-child(5) { top: 12%; left: 55%; width: 2px; height: 2px; }
.visual-space b {
  position: absolute; top: 30%; left: 34%; width: 150px; height: 80px; border-radius: 50%;
  background: radial-gradient(ellipse at 45% 50%, #fff3c4 0 5%, #f472b6 16%, #8b5cf6 40%, rgba(61, 76, 245, 0) 72%);
  filter: blur(1px); transform: rotate(-22deg);
}

/* ---------- Shorts ---------- */

.shorts { position: relative; overflow: hidden; color: #eef0ff; background: radial-gradient(120% 90% at 85% 10%, #1b2393 0%, var(--night) 60%); }
.orbit-shorts { inset: 0; }
.orbit-shorts i { border-color: rgba(201, 195, 255, 0.18); }
.orbit-shorts i:nth-child(1) { width: 130%; height: 70%; transform: rotate(-14deg); }
.orbit-shorts i:nth-child(2) { width: 90%; height: 46%; transform: rotate(-14deg); border-style: dashed; }
.shorts-inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 7vw, 110px); align-items: center;
  width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto; padding: clamp(88px, 11vw, 150px) 0;
}
.shorts .display em { background: linear-gradient(120deg, #8e97ff, #d4b8ff); -webkit-background-clip: text; background-clip: text; }
.shorts .section-lead { color: rgba(238, 240, 255, 0.72); }
.shorts-list { margin: 40px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(238, 240, 255, 0.16); }
.shorts-list li { padding: 20px 0; border-bottom: 1px solid rgba(238, 240, 255, 0.16); color: rgba(238, 240, 255, 0.66); font-size: 15px; }
.shorts-list strong { display: block; margin-bottom: 2px; color: #fff; font-size: 17px; font-weight: 650; }

.short-mock { display: grid; place-items: center; }
.short-frame {
  position: relative; overflow: hidden;
  width: min(300px, 74vw); aspect-ratio: 9 / 16;
  border-radius: 28px;
  background: linear-gradient(180deg, #1d2b6b, #0c1240);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotate(-3deg);
}
.short-scene { position: absolute; inset: 0; display: grid; place-items: center; }
.flask {
  position: relative; width: 38%; aspect-ratio: 0.75;
  margin-top: 18%;
  border: 3px solid rgba(255, 255, 255, 0.8); border-top: 0;
  border-radius: 0 0 36% 36% / 0 0 30% 30%;
  background: linear-gradient(180deg, transparent 38%, rgba(132, 204, 22, 0.75) 38%);
}
.bubble { position: absolute; left: 50%; border-radius: 50%; background: rgba(217, 249, 157, 0.9); animation: rise 3.2s ease-in infinite; }
.b1 { width: 70px; height: 70px; margin-left: -35px; top: 30%; }
.b2 { width: 46px; height: 46px; margin-left: -6px; top: 22%; animation-delay: 0.6s; }
.b3 { width: 34px; height: 34px; margin-left: -40px; top: 16%; animation-delay: 1.2s; }
@keyframes rise { 0% { transform: translateY(40px) scale(0.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-70px) scale(1.1); opacity: 0; } }
.short-progress { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); }
.short-progress i { display: block; width: 70%; height: 100%; border-radius: 3px; background: #fff; animation: progress 8s linear infinite; }
@keyframes progress { from { width: 0; } to { width: 100%; } }
.short-info { position: absolute; left: 16px; right: 64px; bottom: 28px; font-size: 13px; }
.short-info .who { flex-direction: row; align-items: center; gap: 8px; }
.short-info .avatar { width: 26px; height: 26px; font-size: 9px; box-shadow: 0 0 0 2px #fff; }
.short-info p { margin: 8px 0 0; line-height: 1.35; }
.short-info b { font-weight: 700; }
.short-sound {
  position: absolute; right: 14px; bottom: 26px;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(120deg, #5c66fa, #9e61fa);
}
.short-sound svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; }
.short-sound rect { fill: #fff; stroke: none; }
.short-time { position: absolute; top: 16px; right: 16px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.4); font: 600 11px var(--mono); }

/* ---------- Topics ---------- */

.topics { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(48px, 9vw, 140px); align-items: start; }
.topics-intro { position: sticky; top: calc(var(--header) + 40px); }
.topic-index { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.topic-index li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  min-height: 78px; padding: 12px 8px; border-bottom: 1px solid var(--line-strong);
  transition: padding 180ms ease, background 180ms ease;
}
.topic-index li:hover { padding-left: 18px; background: color-mix(in srgb, var(--c) 9%, transparent); }
.topic-index span { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.topic-index strong { display: flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); font-weight: 400; line-height: 1.1; }
.topic-index strong::before { content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent); }
.topic-index small { color: var(--ink-faint); font-size: 13px; text-align: right; }

/* ---------- Charter ---------- */

.charter {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(48px, 9vw, 140px);
  padding: clamp(88px, 11vw, 160px) max(var(--gutter), calc((100% - var(--max)) / 2));
  background: var(--paper-2);
}
.charter-head { position: sticky; top: calc(var(--header) + 40px); align-self: start; }
.charter-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.charter-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 30px 0; border-bottom: 1px solid var(--line-strong); }
.charter-list li > span { padding-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--violet); }
.charter-list h3 { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(26px, 2.5vw, 34px); font-weight: 400; line-height: 1.1; }
.charter-list p { margin: 0; max-width: 560px; color: var(--ink-soft); font-size: 15.5px; }

/* ---------- API ---------- */

.api-card {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(36px, 7vw, 100px); align-items: center;
  padding: clamp(28px, 6vw, 76px);
  border-radius: 32px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.api-card .display { font-size: clamp(40px, 4.6vw, 64px); }
.api-card p { margin: 24px 0; color: var(--ink-soft); }
.api-card pre {
  margin: 0; padding: clamp(22px, 3.4vw, 40px); overflow-x: auto;
  border-radius: 20px; background: var(--night); color: #dfe2ff;
  font: clamp(12px, 1.2vw, 15px)/1.8 var(--mono);
}
@media (prefers-color-scheme: dark) { .api-card pre { background: #04061a; border: 1px solid var(--line); } }
.api-card .k { color: #a5a0ff; font-weight: 700; }
.api-card .s { color: #9ff0c9; }

/* ---------- Final ---------- */

.final {
  position: relative; overflow: hidden;
  display: grid; place-items: center; min-height: 680px;
  padding: 100px var(--gutter);
  color: #fff; text-align: center;
  background: radial-gradient(90% 80% at 50% 0%, #2b37d8 0%, #161c7a 38%, var(--night) 78%);
}
.orbit-final { inset: 0; }
.orbit-final i { width: min(120vw, 1300px); height: min(46vw, 500px); border-color: rgba(201, 195, 255, 0.22); }
.orbit-final i:nth-child(2) { transform: rotate(28deg); }
.orbit-final i:nth-child(3) { transform: rotate(-28deg); border-style: dashed; }
.final-inner { position: relative; z-index: 1; max-width: 760px; }
.final-logo { width: 96px; height: 96px; margin: 0 auto 34px; border-radius: 24px; box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.7); }
.final h2 { margin: 0; font-family: var(--serif); font-size: clamp(54px, 8vw, 110px); font-weight: 400; line-height: 0.95; letter-spacing: -0.03em; }
.final h2 em { background: linear-gradient(120deg, #a3abff, #e0ccff); -webkit-background-clip: text; background-clip: text; }
.final p { max-width: 520px; margin: 28px auto 36px; color: rgba(238, 240, 255, 0.78); font-size: 18px; }

/* ---------- Footer ---------- */

.site-footer {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px;
  padding: 34px var(--gutter); font-size: 13px; color: var(--ink-soft);
}
.site-footer p { margin: 0; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
.site-footer a:not(.wordmark) { color: var(--ink-soft); text-decoration: none; }
.site-footer a:not(.wordmark):hover { color: var(--ink); text-decoration: underline; }

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.75, 0.25, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .note-source { left: 0; }
  .note-caught { right: 0; }
}

@media (max-width: 900px) {
  :root { --header: 64px; }
  .menu-button { display: block; }
  .menu-button[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(3.3px) rotate(45deg); }
  .menu-button[aria-expanded="true"] i:nth-of-type(2) { transform: translateY(-3.3px) rotate(-45deg); }
  .site-nav {
    position: fixed; top: var(--header); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: var(--paper); border-bottom: 1px solid var(--line);
    font-size: 17px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { justify-content: space-between; margin-top: 18px; padding: 14px 20px; border-bottom: 0; }

  .hero, .shorts-inner, .kinds-grid, .topics, .charter, .api-card { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding-top: 40px; }
  .hero-stage { min-height: 0; padding: 30px 0 10px; }
  .topics-intro, .charter-head { position: static; }
  .ribbon { grid-template-columns: 1fr; }
  .ribbon p + p { border-left: 0; border-top: 1px solid rgba(238, 240, 255, 0.16); }
  .short-mock { order: -1; }
  .site-footer { grid-template-columns: 1fr; justify-items: start; }
  .site-footer p { text-align: left; }
  .site-footer nav { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: clamp(48px, 14vw, 64px); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .text-link { justify-content: center; }
  .hero-promises { display: grid; grid-template-columns: 1fr 1fr; }
  .phone { width: min(300px, 78vw); border-radius: 46px; padding: 9px; }
  .phone-screen { border-radius: 38px; }
  .float-note { font-size: 12px; padding: 10px 12px; }
  .note-source { display: none; }
  .note-caught { bottom: 2%; right: 0; }
  .kind-tabs { display: grid; grid-template-columns: 1fr 1fr; border-top: 0; gap: 8px; }
  .kind-tab { grid-template-columns: 1fr; padding: 14px; border: 1px solid var(--line-strong); border-radius: 16px; }
  .kind-tab span { display: none; }
  .kind-tab strong { font-size: 24px; }
  .kind-tab.is-active { padding-left: 14px; box-shadow: inset 0 0 0 2px var(--k); }
  .kind-panel { border-radius: 22px; }
  .topic-index li { grid-template-columns: 30px 1fr; }
  .topic-index small { display: none; }
  .charter-list li { grid-template-columns: 30px 1fr; }
  .api-card { border-radius: 24px; }
  .final { min-height: 600px; }
}

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