/*
 * MiuWave landing page.
 * Tokens mirror docs/site/assets/site.css and docs/brand-spec.md:
 * dark teal-charcoal surfaces, mint for primary action and focus,
 * coral only for audio cues, blue only as a small AI cue.
 * Dark is the default look; light follows prefers-color-scheme.
 */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #121c1e;
  --bg-tint: #152224;
  --surface: #1b282a;
  --surface-2: #223133;
  --border: rgba(212, 239, 229, 0.12);
  --border-strong: rgba(212, 239, 229, 0.24);
  --text: #edf6f1;
  --text-2: #bdcec6;
  --text-3: #9caaa3;
  --accent: #71d4bd;
  --accent-hover: #8be2cd;
  --accent-soft: rgba(113, 212, 189, 0.14);
  --on-accent: #102722;
  --coral: #ff9b84;
  --coral-soft: rgba(255, 155, 132, 0.13);
  --blue: #aab8ff;
  --blue-soft: rgba(170, 184, 255, 0.13);
  --icon-teal: #469f92;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  --shot-bg: #1b2628;

  /* Latin + Vietnamese from Be Vietnam Pro; CJK glyphs fall through to system fonts.
     Each CJK language lists its own fonts first (see "Language switching") so Han
     characters get the right regional forms. */
  --font-latin: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI";
  --font-cjk: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
              "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR";
  --font: var(--font-latin), var(--font-cjk), "Noto Sans", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Type scale, ratio ~1.25, fluid on the display steps */
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.625rem, 1.25rem + 1.6vw, 2.375rem);
  --step-4: clamp(2.125rem, 1.5rem + 2.6vw, 3.25rem);

  /* Space scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section-y: clamp(var(--s-8), 4rem + 4vw, var(--s-10));

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --header-h: 64px;
  --shell: 1200px;
  --gutter: clamp(16px, 4vw, 32px);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f6f3;
    --bg-tint: #eaf1ed;
    --surface: #fcfdfc;
    --surface-2: #eef3f0;
    --border: rgba(42, 68, 56, 0.13);
    --border-strong: rgba(42, 68, 56, 0.24);
    --text: #24342d;
    --text-2: #4c5d54;
    --text-3: #5f6e66;
    --accent: #287b62;
    --accent-hover: #20664f;
    --accent-soft: rgba(40, 123, 98, 0.1);
    --on-accent: #ffffff;
    --coral: #9f3f2b;
    --coral-soft: rgba(159, 63, 43, 0.08);
    --blue: #344b93;
    --blue-soft: rgba(52, 75, 147, 0.08);
    --shadow: 0 14px 36px rgba(36, 52, 45, 0.12);
    --shot-bg: #1b2628;
  }
}

/* ---------- Language switching ----------
   The HTML is Vietnamese; landing.js swaps in another language from assets/i18n/.
   While that dictionary loads (first paint of a non-Vietnamese visit), the body
   stays hidden so Vietnamese never flashes; landing.js gives up after 3 s. */
[hidden] { display: none !important; }
html.i18n-pending body { visibility: hidden; }

html:lang(ja) {
  --font: var(--font-latin), "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
}
html:lang(ko) {
  --font: var(--font-latin), "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
}
html:lang(zh) {
  --font: var(--font-latin), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
}
/* CJK: no negative tracking, roomier display leading, strict line breaking
   (no small kana or closing punctuation at a line start). Korean wraps between
   words like Latin text (keep-all); Japanese headings break at phrase boundaries
   where the browser supports it. */
html:lang(ja), html:lang(ko), html:lang(zh) { line-break: strict; }
html:lang(ja) :is(h1, h2, h3, .tagline, .kicker),
html:lang(ko) :is(h1, h2, h3, .tagline, .kicker),
html:lang(zh) :is(h1, h2, h3, .tagline, .kicker) { letter-spacing: 0; }
html:lang(ja) .hero h1, html:lang(ko) .hero h1, html:lang(zh) .hero h1 { line-height: 1.25; }
html:lang(ja) :is(h2, h3), html:lang(ko) :is(h2, h3), html:lang(zh) :is(h2, h3) { line-height: 1.35; }
html:lang(ja) .caption-src:lang(ja), html:lang(zh) .caption-src:lang(zh) { font-style: normal; }
html:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }
html:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; }
html:lang(ja) body, html:lang(zh) body { line-height: 1.7; }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

code, kbd { font-family: var(--mono); font-size: 0.875em; }
code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus { outline: none; }

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -60px;
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-3); color: var(--on-accent); }

.nowrap { white-space: nowrap; }

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

.shell {
  width: 100%;
  max-width: calc(var(--shell) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 18px; height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-5);
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 24px var(--accent-soft);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }
/* "Coming soon": stands in for every download button until the release (see
   RELEASED in landing.js). A disabled <button>: mint outline on a mint wash with a
   dashed edge, so it reads as the primary slot without inviting a click. */
.btn-soon,
.btn-soon:hover {
  background: var(--accent-soft);
  border: 1px dashed color-mix(in srgb, var(--accent) 65%, transparent);
  color: var(--accent);
  box-shadow: none;
  cursor: default;
  transform: none;
}
.btn-soon .icon { opacity: 0.9; }
.btn-sm { min-height: 40px; padding: 0 var(--s-4); font-size: var(--step--1); }
.btn-lg { min-height: 52px; padding: 0 var(--s-6); font-size: var(--step-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: var(--s-3); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  min-width: 44px;
  color: var(--text);
  font-weight: 700;
  font-size: var(--step-1);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand img { border-radius: 9px; }
.site-nav { display: none; gap: var(--s-1); margin-left: var(--s-5); }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--s-3);
  border-radius: 999px;
  color: var(--text-2);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.header-spacer { flex: 1; }

/* Language switcher: a compact pill (globe + code) that opens a list of
   languages, each written in its own script. */
.lang-switch { position: relative; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 var(--s-3);
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-current:hover, .lang-current[aria-expanded="true"] { color: var(--text); border-color: var(--accent); }
.lang-current .icon { width: 16px; height: 16px; }
.lang-current .chev { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.lang-current[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s-2));
  z-index: 60;
  min-width: 11rem;
  margin: 0;
  padding: var(--s-1);
  list-style: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 44px;
  padding: 0 var(--s-3);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
}
.lang-menu a:hover { color: var(--text); background: var(--surface-2); }
.lang-menu a:focus-visible { outline-offset: -2px; }
.lang-menu a[aria-current="true"] { color: var(--accent); font-weight: 700; background: var(--accent-soft); }
.lang-menu a[aria-current="true"]::after {
  content: "";
  width: 6px; height: 11px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
}
/* Narrow phones: the logo alone identifies the brand (the link keeps aria-label). */
@media (max-width: 400px) {
  .brand span { display: none; }
  .header-inner { gap: var(--s-2); }
}

/* ---------- Shared section bits ---------- */
.section { padding-block: var(--section-y); }
.section-head { max-width: 46rem; margin-bottom: var(--s-7); }
.section-head h2, .promise h2, .privacy h2 { font-size: var(--step-3); font-weight: 700; }
.kicker {
  margin-bottom: var(--s-3);
  color: var(--accent);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-lede { margin-top: var(--s-4); color: var(--text-2); font-size: var(--step-1); max-width: 40rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: var(--s-7) var(--section-y);
  isolation: isolate;
}
/* Soft brand glow: mint top right, coral bottom left (the "audio" warmth). */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 45% at 85% 10%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 45% 40% at 0% 90%, var(--coral-soft), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; gap: var(--s-7); align-items: center; }
.hero-copy { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
  padding: var(--s-1) var(--s-3);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--step--1);
  font-weight: 500;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 var(--coral-soft);
}
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 2.4s var(--ease) infinite; }
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 155, 132, 0.45); }
    70%, 100% { box-shadow: 0 0 0 10px rgba(255, 155, 132, 0); }
  }
}

/* Subtitle pair: dim source line, then the bright translation (h1). */
.caption-src {
  margin-bottom: var(--s-2);
  color: var(--text-3);
  font-size: var(--step-1);
  font-weight: 400;
  font-style: italic;
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.tagline {
  margin-top: var(--s-4);
  color: var(--accent);
  font-size: var(--step-1);
  font-weight: 600;
}
.lede { margin-top: var(--s-4); color: var(--text-2); font-size: var(--step-1); max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.cta-row.center { justify-content: center; }
.platforms {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-5);
  color: var(--text-3);
  font-size: var(--step--1);
}

/* Hero media: fixed 16:9 box so nothing shifts when the video or poster arrives. */
.hero-media {
  position: relative;
  margin: 0;
  min-width: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background:
    radial-gradient(ellipse 70% 60% at 75% 30%, rgba(113, 212, 189, 0.28), transparent 70%),
    radial-gradient(ellipse 60% 50% at 10% 95%, rgba(255, 155, 132, 0.22), transparent 70%),
    linear-gradient(160deg, #173a38 0%, #121c1e 70%);
}
.media-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.media-fallback img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}
.hero-media.is-missing .hero-video,
.hero-media.is-missing .video-toggle,
.hero-media.is-missing .video-play-big { display: none; }

.video-toggle, .video-play-big {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(237, 246, 241, 0.3);
  border-radius: 999px;
  background: rgba(10, 18, 19, 0.72);
  color: #edf6f1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.video-toggle[hidden], .video-play-big[hidden] { display: none; }
.video-toggle:hover, .video-play-big:hover { background: rgba(10, 18, 19, 0.9); }
.video-toggle { right: var(--s-3); bottom: var(--s-3); width: 44px; height: 44px; }
.video-play-big { left: 50%; top: 50%; width: 72px; height: 72px; transform: translate(-50%, -50%); }
.video-play-big:active { transform: translate(-50%, -50%) scale(0.96); }
.video-toggle svg, .video-play-big svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.video-play-big svg { width: 30px; height: 30px; fill: currentColor; stroke-width: 1.5; margin-left: 4px; }
.video-toggle .i-play { fill: currentColor; stroke-width: 1.5; }
.video-toggle .i-play, .hero-media.is-paused .video-toggle .i-pause { display: none; }
.hero-media.is-paused .video-toggle .i-play { display: block; }

@media (min-width: 1040px) {
  .hero { padding-top: var(--s-8); }
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-8); }
}

/* ---------- Promise ---------- */
.promise { border-top: 1px solid var(--border); }
.promise-grid { display: grid; gap: var(--s-7); }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.promise-list li {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
  padding: var(--s-5);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.promise-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: -0.01em;
}
.promise-num.ai { background: var(--blue-soft); color: var(--blue); }
.promise-list h3 { font-size: var(--step-1); margin-bottom: var(--s-1); }
.promise-list p { color: var(--text-2); }
@media (min-width: 900px) {
  .promise-grid { grid-template-columns: 1fr 1fr; gap: var(--s-9); align-items: center; }
}

/* ---------- How it works ---------- */
.how { background: var(--bg-tint); border-block: 1px solid var(--border); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); counter-reset: none; }
.step {
  position: relative;
  padding: var(--s-6) var(--s-5) var(--s-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.step-index {
  position: absolute;
  top: var(--s-4);
  right: var(--s-5);
  color: var(--text-3);
  opacity: 0.85;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}
.step-icon {
  width: 40px; height: 40px;
  padding: 9px;
  margin-bottom: var(--s-4);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  stroke: var(--accent);
  fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.step-icon.audio { background: var(--coral-soft); stroke: var(--coral); }
.step h3 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.step p { color: var(--text-2); }
.step b { color: var(--text); font-weight: 600; }

/* A tiny caption pair, styled like the app's light-backdrop Live Caption lines. */
.mini-caption {
  display: grid;
  gap: 2px;
  margin-top: var(--s-4);
  padding: var(--s-3);
  border-radius: var(--radius-sm);
  background: #0b0f10;
  text-align: center;
}
.mc-src { color: #bdcec6; font-size: 0.75rem; }
.mc-tr { color: #fff; font-weight: 700; font-size: var(--step--1); }

@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Features bento ---------- */
.bento { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); }
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.card:hover { border-color: var(--border-strong); }
.card-text { padding: var(--s-5) var(--s-5) var(--s-4); }
.card h3 { font-size: var(--step-2); font-weight: 700; margin: var(--s-3) 0 var(--s-2); }
.card p { color: var(--text-2); }
.card b { color: var(--text); font-weight: 600; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 var(--s-3);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
}
.tag-ai { background: var(--blue-soft); color: var(--blue); }
.tag-audio { background: var(--coral-soft); color: var(--coral); }

/* Screenshot frame: the app UI is always dark, so the frame stays dark too. */
.shot {
  margin: auto var(--s-5) 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  background: var(--shot-bg);
  overflow: hidden;
}
.shot img { width: 100%; }
.shot-strip { border-radius: var(--radius-md); border-bottom: 1px solid var(--border-strong); margin-bottom: var(--s-5); }
.shot-crop { max-height: 260px; }
.shot-crop img { object-fit: cover; object-position: top; }

.spec-list { margin: auto var(--s-5) var(--s-5); display: grid; gap: var(--s-2); }
.spec-list div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-1) var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.spec-list dt { font-weight: 600; }
.spec-list dd { margin: 0; color: var(--text-2); font-size: var(--step--1); }

@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-live, .f-ai, .f-interview { grid-column: span 2; }
}
@media (min-width: 1040px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .f-live { grid-column: span 4; grid-row: span 2; }
  .f-caption, .f-quick { grid-column: span 2; }
  .f-ai, .f-interview { grid-column: span 3; }
  .f-offline, .f-library, .f-tts { grid-column: span 2; }
  .f-live .card-text { padding: var(--s-6) var(--s-6) var(--s-4); max-width: 40rem; }
  .f-live .shot { margin-inline: var(--s-6); }
}

/* ---------- Engines table ---------- */
.table-wrap {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.engine-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.engine-table th, .engine-table td {
  padding: var(--s-4) var(--s-5);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.engine-table thead th {
  color: var(--text-3);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-2);
}
.engine-table tbody tr:last-child > * { border-bottom: 0; }
.engine-table tbody th { font-weight: 400; }
.engine-table td { color: var(--text-2); }
.eng-name { display: block; color: var(--text); font-weight: 700; font-size: var(--step-0); }
.pill {
  display: inline-block;
  margin-top: var(--s-1);
  padding: 1px var(--s-2);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}
.pill-audio { background: var(--coral-soft); color: var(--coral); }
.pill-offline { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-strong); }
.table-note { margin-top: var(--s-4); color: var(--text-3); font-size: var(--step--1); }

/* Small screens: each engine becomes a card; td labels come from data-label. */
@media (max-width: 759px) {
  .engine-table thead { display: none; }
  .engine-table, .engine-table tbody, .engine-table tr, .engine-table th, .engine-table td { display: block; }
  .engine-table tr { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
  .engine-table tbody tr:last-child { border-bottom: 0; }
  .engine-table th, .engine-table td { padding: 0; border: 0; }
  .engine-table tbody th { margin-bottom: var(--s-3); }
  .engine-table td { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s-3); padding-block: var(--s-1); }
  .engine-table td::before { content: attr(data-label); }
  .engine-table td::before { color: var(--text-3); font-weight: 600; }
}

/* ---------- Privacy ---------- */
.privacy-grid { display: grid; gap: var(--s-7); align-items: center; }
.check-list { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.check-list li { position: relative; padding-left: var(--s-6); color: var(--text-2); }
.check-list li b { color: var(--text); font-weight: 600; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-soft) center / 12px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371d4bd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  .check-list li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23287b62' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  }
}

.flow {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-6) var(--s-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.flow-node {
  display: grid;
  justify-items: center;
  gap: var(--s-1);
  padding: var(--s-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  text-align: center;
}
.flow-node .icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: var(--s-1); }
.flow-node small { color: var(--text-3); font-weight: 400; font-size: 0.8125rem; }
/* The connecting line runs straight through a struck-out "middleman" label. */
.flow-line {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 64px;
}
.flow-line::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: var(--accent);
  opacity: 0.6;
}
.flow-ghost {
  position: relative;
  padding: 2px var(--s-3);
  border-radius: 999px;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  color: var(--text-3);
  font-size: 0.8125rem;
  text-decoration: line-through;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
}
@media (min-width: 900px) {
  .privacy-grid { grid-template-columns: 6fr 5fr; gap: var(--s-9); }
}
@media (min-width: 560px) {
  .flow { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .flow-line { min-height: 0; min-width: 120px; height: 100%; }
  .flow-line::before { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 2px; transform: translateY(-50%); }
}

/* ---------- FAQ ---------- */
.faq { background: var(--bg-tint); border-block: 1px solid var(--border); }
.faq-grid { display: grid; gap: var(--s-5); }
.faq-list { display: grid; gap: var(--s-3); min-width: 0; }
.faq details {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--dur) var(--ease);
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 56px;
  padding: var(--s-3) var(--s-5);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq summary:hover { color: var(--accent); }
.faq-body { padding: 0 var(--s-5) var(--s-5); color: var(--text-2); display: grid; gap: var(--s-3); }
.faq-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-1); }
.faq-body b { color: var(--text); font-weight: 600; }
@media (min-width: 900px) {
  .faq-grid { grid-template-columns: 4fr 7fr; gap: var(--s-9); align-items: start; }
  .faq .section-head { position: sticky; top: calc(var(--header-h) + var(--s-6)); }
}

/* ---------- Final CTA ---------- */
.final-card {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  padding: var(--s-8) var(--s-5);
  border-radius: calc(var(--radius-lg) + 8px);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 40% 50% at 100% 100%, var(--coral-soft), transparent 70%),
    var(--surface);
  overflow: hidden;
}
.final-mascot {
  width: 96px; height: 96px;
  margin-bottom: var(--s-5);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(70, 159, 146, 0.35);
}
.final-card h2 { font-size: var(--step-3); font-weight: 700; max-width: 32rem; }
.final-card .section-lede { margin-inline: auto; }
.dl-files {
  list-style: none;
  margin: var(--s-6) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
}
.dl-files li {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: var(--step--1);
}

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--s-6); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--step--1); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6); }
.footer-brand { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text); font-weight: 700; }
.footer-brand img { border-radius: 7px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-2); color: var(--text-2); }
.site-footer nav a:hover { color: var(--accent); }
.copyright { margin-left: auto; }

/* ---------- Scroll reveals (CSS only) ----------
   Content is visible by default; the fade only runs where scroll-driven
   animations are supported and the user has not asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
    @keyframes reveal {
      from { opacity: 0; transform: translateY(24px); }
      to { opacity: 1; transform: none; }
    }
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media print {
  .site-header, .hero-media, .lang-switch { display: none; }
}
