:root {
  --paper: #f6f5f1;
  --paper-2: #eeece6;
  --card: #ffffff;
  --ink: #141416;
  --ink-2: #3a3a3e;
  --muted: #6d6c67;
  --line: rgba(20, 20, 22, 0.09);
  --line-2: rgba(20, 20, 22, 0.16);
  --amber: #e8a33d;
  --amber-ink: #a8650f;
  --graphite: #17171a;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 20, 22, 0.05), 0 12px 32px -12px rgba(20, 20, 22, 0.16);
  --shadow-lg: 0 2px 4px rgba(20, 20, 22, 0.04), 0 40px 80px -30px rgba(20, 20, 22, 0.28);
  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--amber-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

/* ───────── Loader ───────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  background: var(--paper);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader-mark {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 56px;
}
.loader-mark span {
  width: 9px;
  height: 100%;
  border-radius: 9px;
  background: var(--ink);
  transform-origin: bottom;
  animation: bar 1s var(--ease) infinite alternate;
}
.loader-mark span:nth-child(1) { animation-delay: -0.2s; height: 40%; }
.loader-mark span:nth-child(2) { animation-delay: -0.5s; height: 100%; }
.loader-mark span:nth-child(3) { animation-delay: -0.1s; height: 55%; }
.loader-mark span:nth-child(4) { animation-delay: -0.7s; height: 86%; }
.loader-mark span:nth-child(5) { animation-delay: -0.35s; height: 35%; }
.loader-mark .peak {
  background: var(--amber);
}
.loader-count {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.2em;
  color: var(--muted);
}
@keyframes bar {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}
.is-ready .loader,
.skip-intro .loader,
html:not(.js) .loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ───────── Nav ───────── */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 50;
  width: min(calc(100% - 24px), 1180px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 8px 30px -18px rgba(20, 20, 22, 0.25);
  transition: transform 0.5s var(--ease), background 0.3s;
}
.nav.is-hidden {
  transform: translate(-50%, -120%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 17px/1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img {
  border-radius: 8px;
}
.nav nav {
  display: flex;
  gap: 4px;
}
.nav nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav nav a:hover {
  background: rgba(20, 20, 22, 0.06);
  color: var(--ink);
}
.star {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s var(--ease);
}
.star:hover {
  transform: translateY(-1px);
}
.star svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.star-count {
  padding-left: 8px;
  border-left: 1px solid rgba(246, 245, 241, 0.25);
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ───────── Buttons ───────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 16px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.2s;
}
.button.dark {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 24px -12px rgba(20, 20, 22, 0.6);
}
.button.dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -14px rgba(20, 20, 22, 0.55);
}
.button.ghost {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.6);
}
.button.ghost:hover {
  background: #fff;
}
.button.big {
  min-height: 60px;
  padding: 0 32px;
  font-size: 17px;
}
.os-icon {
  display: inline-flex;
}
.os-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* ───────── Hero ───────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 140px var(--gutter) 64px;
  text-align: center;
  overflow: hidden;
}
.hero-meter {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 14px);
  padding: 0 var(--gutter);
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 40%);
  mask-image: linear-gradient(to top, transparent 0%, #000 40%);
}
.hero-meter span {
  flex: 0 1 clamp(8px, 1.6vw, 22px);
  height: var(--h);
  border-radius: 999px 999px 0 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  transform-origin: bottom;
}
.hero-meter span.is-one {
  background: #e4e1d8;
}
.hero-meter span.is-peak {
  background: rgba(232, 163, 61, 0.35);
  border-color: rgba(232, 163, 61, 0.5);
}
.hero-inner {
  position: relative;
  max-width: 980px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font: 500 14px/1 var(--body);
  color: var(--ink-2);
  text-decoration: none;
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.2);
}
.hero h1 {
  margin: 28px 0 0;
  font: 800 clamp(44px, 8.4vw, 116px) / 0.94 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero h1 .word:nth-last-child(-n + 2) {
  color: var(--amber-ink);
}
.hero-lede {
  max-width: 620px;
  margin: 28px auto 0;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: center;
  gap: clamp(20px, 5vw, 64px);
  margin: 56px 0 0;
}
.stats div {
  text-align: center;
}
.stats dt {
  font: 500 14px/1 var(--body);
  color: var(--muted);
}
.stats dd {
  margin: 10px 0 0;
  font: 700 28px/1 var(--display);
  letter-spacing: -0.03em;
}

/* Split words */
.word {
  display: inline-block;
  overflow: clip;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.word > span {
  display: inline-block;
  will-change: transform;
}

/* ───────── Stage ───────── */
.stage {
  position: relative;
  max-width: var(--max);
  margin: -20px auto 0;
  padding: 0 var(--gutter);
  perspective: 1400px;
}
.stage-frame {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  background: var(--graphite);
  box-shadow: var(--shadow-lg);
  transform-origin: 50% 0;
  will-change: transform;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  background: #1f1f23;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3a40;
}
.window-bar em {
  margin-left: 10px;
  font: normal 500 12px/1 var(--mono);
  color: #8b8a85;
}
.stage-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font: 500 13px/1 var(--mono);
  white-space: nowrap;
}
.stage-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3aa66b;
}
.chip-a {
  left: 0;
  top: 22%;
}
.chip-b {
  right: 0;
  bottom: 18%;
}

/* ───────── Marquee ───────── */
.marquee {
  margin-top: clamp(64px, 10vw, 120px);
  padding: 22px 0;
  border-block: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  font: 600 clamp(22px, 3vw, 34px) / 1 var(--display);
  letter-spacing: -0.02em;
  color: #b9b7b0;
  will-change: transform;
}

/* ───────── Story (sticky) ───────── */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  max-width: 1360px;
  margin: clamp(80px, 12vw, 160px) auto 0;
  padding: 0 var(--gutter);
}
.story-media {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: start;
}
.story-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--graphite);
  box-shadow: var(--shadow-lg);
}
.story-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease), transform 1.1s var(--ease);
}
.story-frame img.is-active {
  opacity: 1;
  transform: none;
}
.story-progress {
  height: 3px;
  margin-top: 18px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.story-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}
.story-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-steps li {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.28;
  transition: opacity 0.5s var(--ease);
}
.story-steps li.is-active {
  opacity: 1;
}
.step-index {
  font: 500 13px/1 var(--mono);
  color: var(--amber-ink);
}
.story-steps h2 {
  margin: 0;
  font: 700 clamp(28px, 2.8vw, 42px) / 1.06 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.story-steps p {
  margin: 18px 0 0;
  max-width: 440px;
  color: var(--ink-2);
}

/* ───────── Sections ───────── */
.section {
  max-width: var(--max);
  margin: clamp(96px, 14vw, 180px) auto 0;
  padding: 0 var(--gutter);
}
.eyebrow {
  margin: 0 0 16px;
  font: 500 12.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-ink);
}
.section-title {
  margin: 0;
  max-width: 16ch;
  font: 800 clamp(36px, 5.6vw, 76px) / 0.98 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}

/* Tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}
.tile {
  padding: 14px 14px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(20, 20, 22, 0.04);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.tile h3 {
  margin: 22px 10px 0;
  font: 700 21px/1.15 var(--display);
  letter-spacing: -0.02em;
}
.tile > p {
  margin: 6px 10px 0;
  font-size: 15.5px;
  color: var(--muted);
}
.mock {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 210px;
  padding: 20px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px;
}
.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.mock-row small {
  display: block;
  font: 400 12px/1.3 var(--mono);
  color: var(--muted);
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 600 12px/1 var(--mono);
}
.mock-text {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}
.mock-button {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
}
.mock-line {
  margin: 0;
  color: var(--ink-2);
}
.mock-line.dim {
  color: var(--muted);
}
.mock-line b,
.mock-line time,
.mock-line code {
  margin-right: 6px;
  font: 500 12px/1 var(--mono);
  color: var(--amber-ink);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips span {
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font: 500 11.5px/1 var(--mono);
  color: var(--muted);
}
.chips .on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.wave {
  height: 44px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 8px) center / 100% 60% no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 50%, #000 40%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 100% at 50% 50%, #000 40%, transparent 72%);
}
.mock-shot {
  padding: 0;
}
.mock-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* ───────── Pro ───────── */
.pro {
  margin-top: clamp(96px, 14vw, 180px);
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--graphite);
  color: #f2efe8;
  border-radius: clamp(24px, 4vw, 48px);
  margin-inline: clamp(8px, 1.5vw, 20px);
  overflow: hidden;
}
.pro-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.pro .eyebrow {
  color: var(--amber);
}
.pro-lede {
  margin: 22px 0 0;
  color: #b9b6ae;
  max-width: 460px;
}
.pro dl {
  margin: 40px 0 0;
}
.pro dl div {
  padding: 20px 0;
  border-top: 1px solid rgba(242, 239, 232, 0.12);
}
.pro dt {
  font: 700 19px/1.2 var(--display);
  letter-spacing: -0.015em;
}
.pro dd {
  margin: 6px 0 0;
  font-size: 15.5px;
  color: #a9a69e;
}
.pro-shots {
  position: relative;
  aspect-ratio: 1 / 0.92;
}
.pro-shots img {
  position: absolute;
  width: 86%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  will-change: transform;
}
.pro-shots img:first-child {
  top: 0;
  right: 0;
}
.pro-shots img:last-child {
  bottom: 0;
  left: 0;
}

/* ───────── Compare ───────── */
.table-wrap {
  margin-top: 48px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
th,
td {
  padding: 18px 22px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child > * {
  border-bottom: 0;
}
thead th {
  font: 700 17px/1.2 var(--display);
  letter-spacing: -0.01em;
  color: var(--muted);
}
thead th:nth-child(2) {
  color: var(--ink);
}
tbody th {
  font-weight: 500;
  color: var(--muted);
  width: 26%;
}
tbody td:nth-child(2) {
  font-weight: 600;
  background: rgba(232, 163, 61, 0.07);
}
thead th:nth-child(2) {
  background: rgba(232, 163, 61, 0.07);
}
tbody td:nth-child(3) {
  color: var(--muted);
}
.table-note {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* ───────── Download ───────── */
.download {
  max-width: var(--max);
  margin: clamp(96px, 14vw, 180px) auto 0;
  padding: 0 var(--gutter);
}
.download-inner {
  padding: clamp(36px, 6vw, 80px);
  border: 1px solid var(--line);
  border-radius: clamp(24px, 3vw, 36px);
  background: var(--card);
  box-shadow: var(--shadow);
}
.download-lede {
  max-width: 600px;
  margin: 22px 0 0;
  color: var(--ink-2);
}
.download-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-top: 40px;
}
.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 28px;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--paper);
  text-decoration: none;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.3s;
}
.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.dl-card.is-main {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.dl-os {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 12.5px/1 var(--mono);
  opacity: 0.7;
}
.dl-os svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.dl-card strong {
  font: 700 clamp(22px, 2.4vw, 28px) / 1.1 var(--display);
  letter-spacing: -0.025em;
}
.dl-meta {
  font-size: 14px;
  opacity: 0.65;
}
.dl-arrow {
  position: absolute;
  right: 24px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 20px;
  opacity: 0.8;
  transition: transform 0.45s var(--ease);
}
.dl-card:hover .dl-arrow {
  transform: translateY(3px);
}
.dl-card.is-main .dl-arrow {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
  opacity: 1;
}
.tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 40px;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper-2);
}
.tabs button {
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: 500 14px/1 var(--body);
  color: var(--muted);
  cursor: pointer;
}
.tabs button[aria-selected='true'] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 20, 22, 0.12);
}
.terminal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 14px 14px 20px;
  border-radius: 14px;
  background: var(--graphite);
  color: #f2efe8;
  font: 400 14px/1.5 var(--mono);
}
.terminal[hidden] {
  display: none;
}
.terminal .prompt {
  color: var(--amber);
}
.terminal code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.copy {
  flex: none;
  padding: 8px 14px;
  border: 1px solid rgba(242, 239, 232, 0.2);
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: 500 13px/1 var(--body);
  cursor: pointer;
}
.copy:hover {
  background: rgba(242, 239, 232, 0.08);
}
.install-note {
  margin: 18px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* ───────── FAQ ───────── */
.faq {
  max-width: 860px;
}
.faq .section-title {
  margin-bottom: 36px;
}
details {
  border-top: 1px solid var(--line-2);
}
details:last-of-type {
  border-bottom: 1px solid var(--line-2);
}
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  font: 600 19px/1.3 var(--display);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  flex: none;
  font: 400 26px/1 var(--body);
  color: var(--muted);
  transition: transform 0.35s var(--ease);
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  margin: -6px 0 24px;
  max-width: 680px;
  color: var(--ink-2);
}

/* ───────── CTA & footer ───────── */
.cta {
  max-width: 1000px;
  margin: clamp(110px, 16vw, 200px) auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}
.cta-title {
  margin: 0 0 40px;
  font: 800 clamp(38px, 6.4vw, 88px) / 0.98 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.footer {
  max-width: var(--max);
  margin: clamp(96px, 12vw, 150px) auto 0;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--muted);
}
.footer p {
  margin: 0;
}
.footer a {
  color: var(--ink);
}

/* ───────── Reveal base (only when JS runs motion) ───────── */
.motion [data-rise],
.motion [data-reveal],
.motion [data-tiles] > *,
.motion [data-pro-list] > div,
.motion [data-rows] > tr {
  opacity: 0;
}

/* ───────── Responsive ───────── */
@media (max-width: 960px) {
  .nav nav {
    display: none;
  }
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story {
    grid-template-columns: 1fr;
  }
  .story-media {
    top: 76px;
    z-index: 2;
    padding: 12px 0;
    background: linear-gradient(var(--paper) 85%, transparent);
  }
  .story-steps li {
    min-height: 62vh;
  }
  .pro-inner {
    grid-template-columns: 1fr;
  }
  .stage-chip {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .hero {
    padding-top: 116px;
    min-height: auto;
  }
  .hero-actions .button {
    width: 100%;
  }
  .stats {
    grid-template-columns: repeat(2, auto);
    row-gap: 28px;
  }
  .tiles {
    grid-template-columns: 1fr;
  }
  .mock {
    height: 180px;
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
  .story-steps li {
    min-height: 54vh;
  }
  .star > span:not(.star-count) {
    display: none;
  }
  .footer {
    flex-direction: column;
  }
}

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

@media (max-width: 960px) {
  .pro-shots {
    aspect-ratio: auto;
    display: grid;
    gap: 14px;
  }
  .pro-shots img {
    position: static;
    width: 100%;
    transform: none !important;
  }
}

/* Compare table on phones: one card per row, no sideways scrolling */
@media (max-width: 640px) {
  #compare .table-wrap { border: 0; background: none; overflow: visible; }
  #compare table, #compare tbody, #compare tr { display: block; }
  #compare thead { display: none; }
  #compare tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    overflow: hidden;
  }
  #compare tbody th {
    grid-column: 1 / -1;
    width: auto;
    padding: 14px 16px 4px;
    border: 0;
    font-size: 13.5px;
  }
  #compare tbody td {
    padding: 4px 16px 14px;
    border: 0;
    font-size: 15px;
    line-height: 1.4;
    background: none !important;
  }
  #compare tbody td::before {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
  }
  #compare tbody td:nth-child(2)::before { content: 'ElevenVoice'; color: var(--amber-ink); }
  #compare tbody td:nth-child(3)::before { content: 'ElevenLabs'; }
  #compare tbody tr:last-child > * { border: 0; }
  .story-media { height: auto; top: 64px; }
  .story-steps li { min-height: 60vh; }
}
@media (min-width: 641px) and (max-width: 960px) {
  .story-media { height: auto; top: 72px; }
  .story-steps li { min-height: 70vh; }
}

/* Mobile navigation */
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .nav {
    top: 8px;
    width: calc(100% - 16px);
    padding: 6px 6px 6px 12px;
    gap: 8px;
    flex-wrap: wrap;
    border-radius: 22px;
  }
  .brand { font-size: 16px; gap: 8px; margin-right: auto; }
  .brand img { width: 26px; height: 26px; }
  .star { padding: 8px 12px; }
  .menu-toggle {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
  }
  .menu-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.35s var(--ease);
  }
  .nav.is-open .menu-toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav.is-open .menu-toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .nav nav {
    display: grid;
    order: 3;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.45s var(--ease), opacity 0.3s, padding 0.45s var(--ease), visibility 0.45s;
  }
  .nav.is-open nav {
    max-height: 360px;
    opacity: 1;
    visibility: visible;
    padding: 6px 0 4px;
  }
  .nav nav a {
    padding: 13px 8px;
    border-radius: 0;
    font: 600 20px/1.1 var(--display);
    letter-spacing: -0.02em;
    color: var(--ink);
  }
  .nav nav a + a { border-top: 1px solid var(--line); }
  .nav.is-open { background: rgba(255, 255, 255, 0.95); }
}
@media (max-width: 380px) {
  .star-count { display: none; }
}

/* Direct download button in the nav */
.nav-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s var(--ease), background 0.2s;
}
.nav-download:hover { transform: translateY(-1px); background: #f0b04f; }
.nav-download svg { width: 15px; height: 15px; }
.nav nav { margin-left: auto; }
@media (max-width: 960px) {
  .nav-download { padding: 9px 12px; }
  .brand { margin-right: 0; }
  .nav-download { margin-left: auto; }
}
@media (max-width: 400px) {
  .nav-download span { display: none; }
  .nav-download { width: 40px; height: 40px; padding: 0; justify-content: center; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  width: min(calc(100% - 24px), 460px);
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--graphite);
  color: #f2efe8;
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  animation: toast-in 0.5s var(--ease);
  font-size: 14.5px;
  line-height: 1.45;
}
.toast[hidden] { display: none; }
.toast strong { font: 700 16px/1.2 var(--display); }
.toast span { grid-column: 1; color: #b9b6ae; }
.toast b { color: #f2efe8; font-weight: 600; }
.toast button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(242, 239, 232, 0.1);
  color: inherit;
  font-size: 18px;
  cursor: pointer;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
}

/* Language picker */
.lang { position: relative; }
.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 13px/1 var(--body);
  cursor: pointer;
}
.lang-button svg { width: 15px; height: 15px; }
.lang-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  z-index: 70;
}
.lang-panel[hidden] { display: none; }
.lang-panel input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--paper);
  font: 400 14px var(--body);
  color: var(--ink);
}
.lang-panel ul {
  max-height: 300px;
  margin: 6px 0 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.lang-panel li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 14.5px;
  cursor: pointer;
}
.lang-panel li:hover { background: var(--paper); }
.lang-panel li[aria-selected='true'] { background: var(--ink); color: var(--paper); }
.lang-panel li small { font: 500 11px/1 var(--mono); opacity: 0.55; }
.lang-panel li[hidden] { display: none; }
@media (max-width: 960px) {
  .lang { margin-left: auto; }
  .nav-download { margin-left: 0; }
  .lang-button { height: 40px; padding: 0 11px; }
  .lang-panel { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; }
}
@media (max-width: 400px) {
  .lang-button span { display: none; }
  .lang-button { width: 40px; padding: 0; justify-content: center; }
  .star { display: none; }
}

/* Hide Google's own translate bar and hover balloons; keep only our picker */
iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; position: static !important; }
font.VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q, .goog-text-highlight { background: none !important; box-shadow: none !important; }

/* Legal pages and error pages */
.legal-links a { color: var(--muted); }
.legal-links a:hover { color: var(--ink); }
.doc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px var(--gutter);
}
.doc-back { font-size: 14.5px; font-weight: 500; color: var(--muted); text-decoration: none; }
.doc-back:hover { color: var(--ink); }
.doc-body {
  max-width: 820px;
  margin: clamp(24px, 6vw, 72px) auto 0;
  padding: 0 var(--gutter);
}
.doc-date { margin: 0; font-size: 14px; color: var(--muted); }
.doc-body h1 {
  margin: 12px 0 0;
  font: 800 clamp(40px, 7vw, 72px) / 1 var(--display);
  letter-spacing: -0.045em;
}
.doc-lede { margin: 24px 0 0; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); }
.doc-body h2 {
  margin: 56px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font: 700 clamp(22px, 2.6vw, 28px) / 1.15 var(--display);
  letter-spacing: -0.02em;
}
.doc-body p, .doc-body li { color: var(--ink-2); }
.doc-body p { margin: 14px 0 0; }
.doc-body ul { margin: 12px 0 0; padding-left: 22px; }
.doc-body li { margin: 8px 0; }
.doc-body li b { color: var(--ink); }
.doc-body a { color: var(--amber-ink); }
.doc-body code { font: 500 0.88em var(--mono); color: var(--ink); }
.doc-table {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow-x: auto;
}
.doc-table table { min-width: 560px; font-size: 14.5px; }
.doc-table th, .doc-table td { padding: 14px 16px; vertical-align: top; }
.doc-table thead th { font: 600 13px/1.2 var(--body); color: var(--muted); background: none; }
.doc-table tbody td { font-weight: 400; background: none; color: var(--ink-2); }
.doc-table tbody td:first-child { white-space: nowrap; }
.doc .footer { margin-top: clamp(80px, 10vw, 120px); }

.err {
  max-width: 720px;
  min-height: 62vh;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) var(--gutter) 0;
  text-align: center;
}
.err-meter {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 90px;
}
.err-meter span {
  width: 10px;
  height: var(--h);
  border-radius: 10px;
  background: #dcd9d0;
  transform-origin: bottom;
  animation: err-bar 1.6s var(--ease) infinite alternate;
}
.err-meter span:nth-child(6) { background: var(--ink); }
.err-meter span:nth-child(7) { background: var(--amber); }
.err-meter span:nth-child(odd) { animation-delay: -0.6s; }
.err-meter span:nth-child(3n) { animation-delay: -1.1s; }
@keyframes err-bar { from { transform: scaleY(0.15); } to { transform: scaleY(1); } }
.err-code { margin: 32px 0 0; font: 500 14px/1 var(--mono); letter-spacing: 0.1em; color: var(--amber-ink); }
.err h1 {
  margin: 16px 0 0;
  font: 800 clamp(40px, 7vw, 76px) / 1 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.err-text { max-width: 480px; margin: 20px auto 0; color: var(--ink-2); font-size: 18px; }
.err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
@media (max-width: 640px) {
  .err-actions .button { width: 100%; }
  .doc-back { font-size: 13.5px; }
}

/* Translated nav labels stay on one line */
.nav nav a { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1180px) {
  .nav nav a[href="#story"] { display: none; }
}
