/* Hushbar site. One stylesheet, no build step.
   Tokens mirror the extension (DESIGN.md): neutrals at hue 250, one accent at hue 230. */

:root {
  color-scheme: light dark;

  --bg: oklch(0.975 0.004 250);
  --bg-sunk: oklch(0.948 0.007 250);
  --text: oklch(0.22 0.015 250);
  --muted: oklch(0.45 0.012 250);
  --line: oklch(0.22 0.015 250 / 0.12);
  --line-strong: oklch(0.22 0.015 250 / 0.2);
  --accent: oklch(0.55 0.10 230);
  --accent-ink: oklch(0.99 0.003 250);
  --accent-soft: oklch(0.55 0.10 230 / 0.12);
  --key-bg: oklch(0.995 0.002 250);

  --radius-pill: 999px;
  --radius-panel: 14px;
  --radius-key: 6px;

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.17 0.01 250);
    --bg-sunk: oklch(0.2 0.011 250);
    --text: oklch(0.96 0.005 250);
    --muted: oklch(0.72 0.01 250);
    --line: oklch(1 0 0 / 0.1);
    --line-strong: oklch(1 0 0 / 0.18);
    --accent: oklch(0.82 0.07 230);
    --accent-ink: oklch(0.18 0.02 250);
    --accent-soft: oklch(0.82 0.07 230 / 0.12);
    --key-bg: oklch(0.24 0.012 250);
  }
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }

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

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

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--text); color: var(--bg);
  padding: 8px 12px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }

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

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

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

.site-header { padding-block: 20px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; }

.site-nav ul { display: flex; gap: 24px; list-style: none; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.site-nav a:hover { color: var(--text); }
@media (max-width: 719px) { .site-nav { display: none; } }

/* ---------- Type scale (1.25, set tight for display) ---------- */

h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}
h3 { font-size: 1.0625rem; line-height: 1.35; letter-spacing: -0.01em; font-weight: 600; }

.lede { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); color: var(--muted); max-width: 36em; text-wrap: pretty; }
.muted { color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 8vw, 112px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { margin-top: 12px; color: var(--muted); text-wrap: pretty; }

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

.hero { padding-block: clamp(32px, 6vw, 80px) clamp(64px, 8vw, 112px); }
.hero .wrap { display: grid; gap: clamp(40px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.hero-copy .lede { margin-top: 20px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.18), 0 1px 2px oklch(0 0 0 / 0.12), 0 8px 24px -12px var(--accent);
  transition: transform 160ms var(--ease), filter 160ms var(--ease);
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; flex: none; }

.text-link { color: var(--text); font-weight: 500; }

.fine { margin-top: 16px; font-size: 0.875rem; color: var(--muted); }

/* ---------- Hero scene: a call with the widget on top ---------- */

.scene { position: relative; }

.stage {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-panel);
  background: oklch(0.2 0.006 250);
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 3%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 3%;
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.06) inset, 0 30px 60px -30px oklch(0.2 0.03 250 / 0.45);
}

.tiles { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2.4%; min-height: 0; }

.tile {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  display: grid; place-items: center;
  background: oklch(0.27 0.02 var(--h));
}
.tile::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 30% 20%, oklch(0.42 0.06 var(--h) / 0.7), transparent 60%);
}
.tile:nth-child(1) { --h: 250; }
.tile:nth-child(2) { --h: 200; }
.tile:nth-child(3) { --h: 300; }
.tile:nth-child(4) { --h: 160; }

.avatar {
  position: relative;
  width: clamp(36px, 22%, 72px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: oklch(0.62 0.09 var(--h));
  color: oklch(0.18 0.02 var(--h));
  font-weight: 600; font-size: clamp(0.8rem, 2.4vw, 1.35rem);
}
.tile-name {
  position: absolute; left: 8px; bottom: 6px;
  font-size: clamp(0.625rem, 1.4vw, 0.75rem); color: oklch(0.95 0.005 250 / 0.85);
}

/* speaking ring on "You" */
.tile.you::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 2px oklch(0.82 0.07 230);
  opacity: 0;
}

.call-bar { display: flex; justify-content: center; gap: 10px; }
.call-btn {
  position: relative;
  width: clamp(30px, 7vw, 40px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: oklch(0.32 0.008 250);
  color: oklch(0.95 0.005 250);
}
.call-btn svg { width: 50%; height: 50%; }
.call-btn.end { background: oklch(0.58 0.17 25); width: clamp(44px, 10vw, 56px); border-radius: 999px; aspect-ratio: auto; height: clamp(30px, 7vw, 40px); }
.mic { background: oklch(0.58 0.17 25); }
.mic .on { position: absolute; opacity: 0; }
.mic .off { position: absolute; }

/* The widget: the compact island, docked above the call controls
   (same layout as the real extension: icon tile, title, round play). */
.pill {
  position: absolute;
  left: 50%;
  bottom: calc(3% + clamp(30px, 7vw, 40px) + 3.5%);
  transform: translateX(-50%);
  width: min(264px, 64%);
  height: 44px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: oklch(0.18 0.012 260 / 0.62);
  color: oklch(0.98 0.004 250);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  backdrop-filter: blur(18px) saturate(1.8);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.30),
    inset 0 0 0 1px oklch(1 0 0 / 0.10),
    0 18px 40px -18px oklch(0 0 0 / 0.65),
    0 3px 10px -3px oklch(0 0 0 / 0.35);
}
.pill-art {
  flex: none;
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: oklch(1 0 0 / 0.10);
}
.favicon {
  width: 18px; height: 13px; border-radius: 4px;
  background: oklch(0.6 0.21 27);
  display: grid; place-items: center;
}
.favicon svg { width: 8px; height: 8px; }
.pill-text { position: relative; flex: 1; min-width: 0; height: 18px; }
.pill-title, .pill-hush {
  position: absolute; inset: 0;
  font-size: 13px; font-weight: 600; line-height: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pill-hush { color: oklch(0.82 0.10 230); opacity: 0; }
.pill-play {
  position: relative; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: oklch(1 0 0 / 0.10);
}
.pill-play svg { position: absolute; width: 15px; height: 15px; }
.pill-play .ic-play { opacity: 0; }

.scene-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; margin-top: 14px;
}
.scene figcaption { font-size: 0.875rem; color: var(--muted); max-width: 34em; }

.anim-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--muted); cursor: pointer; }
.anim-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

/* One orchestrated loop: muted + playing, unmute -> paused, mute -> resumes. 9s. */
@media (prefers-reduced-motion: no-preference) {
  .mic { animation: mic-bg 9s infinite; }
  .mic .off { animation: hide-mid 9s infinite; }
  .mic .on { animation: show-mid 9s infinite; }
  .tile.you::after { animation: show-mid 9s infinite; }
  .pill-play .ic-pause { animation: hide-mid 9s infinite; }
  .pill-play .ic-play { animation: show-mid 9s infinite; }
  .pill-title { animation: hide-mid 9s infinite; }
  .pill-hush { animation: show-mid 9s infinite; }

  .scene:has(.anim-toggle input:checked) :is(.mic, .mic .off, .mic .on, .pill-play svg, .pill-title, .pill-hush) {
    animation-play-state: paused;
  }
  .scene:has(.anim-toggle input:checked) .tile.you::after { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .anim-toggle { display: none; }
}

@keyframes mic-bg {
  0%, 36% { background: oklch(0.58 0.17 25); }
  38%, 74% { background: oklch(0.32 0.008 250); }
  76%, 100% { background: oklch(0.58 0.17 25); }
}
@keyframes hide-mid { 0%, 36% { opacity: 1; } 38%, 74% { opacity: 0; } 76%, 100% { opacity: 1; } }
@keyframes show-mid { 0%, 36% { opacity: 0; } 38%, 74% { opacity: 1; } 76%, 100% { opacity: 0; } }

/* ---------- Steps (a real sequence, so numbered) ---------- */

.steps { list-style: none; display: grid; gap: 32px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps li { counter-increment: step; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 14px;
  font-size: 0.875rem; font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.steps p { margin-top: 6px; color: var(--muted); }

/* ---------- Auto-pause highlight ---------- */

.hush { background: var(--bg-sunk); }
.hush .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hush .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.hush-copy h2 { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3rem); }
.hush-copy p { margin-top: 18px; color: var(--muted); max-width: 32em; text-wrap: pretty; }

/* timeline: mic row and music row across three moments */
.timeline { width: 100%; border-collapse: collapse; font-size: 0.9375rem; table-layout: fixed; }
.timeline th, .timeline td { text-align: left; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.timeline thead th { color: var(--muted); font-weight: 400; font-size: 0.8125rem; border-bottom-color: var(--line-strong); }
.timeline thead td { border-bottom-color: var(--line-strong); }
.timeline tbody th { color: var(--muted); font-weight: 400; padding-left: 0; }
.timeline tbody td { font-weight: 500; white-space: nowrap; }
.timeline tr > :first-child { width: 26%; padding-left: 0; }
.timeline .dot { display: inline-block; margin-right: 8px; vertical-align: 0.05em; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.live { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dot.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }

/* ---------- Features ---------- */

.features { display: grid; gap: 0 40px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding-block: 22px; border-top: 1px solid var(--line); }
.feature dt { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.feature dt svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.feature dd { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; text-wrap: pretty; }
.feature .tag {
  font-size: 0.75rem; font-weight: 500; color: var(--accent);
  padding: 1px 8px; border-radius: var(--radius-pill); background: var(--accent-soft);
}
.features-note { margin-top: 28px; color: var(--muted); }

.works { margin-top: 56px; display: grid; gap: 24px; }
@media (min-width: 760px) { .works { grid-template-columns: repeat(2, 1fr); gap: 40px; } }
.works h3 { margin-bottom: 8px; }
.works p { color: var(--muted); }

/* ---------- Shortcuts ---------- */

.keys { width: 100%; max-width: 44rem; border-collapse: collapse; }
.keys th, .keys td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.keys th { font-weight: 500; padding-right: 16px; }
.keys td { white-space: nowrap; }
.keys td .muted { display: block; white-space: normal; font-size: 0.875rem; margin-top: 6px; }

kbd {
  display: inline-block; min-width: 1.9em;
  padding: 2px 7px; margin: 0 1px;
  font: 500 0.8125rem/1.5 var(--font);
  text-align: center;
  color: var(--text);
  background: var(--key-bg);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-key);
}
.plus { color: var(--muted); font-size: 0.8125rem; }
.keys-note { margin-top: 20px; color: var(--muted); max-width: 44rem; }

/* ---------- Privacy summary ---------- */

.privacy-sum .wrap { display: grid; gap: 32px; }
@media (min-width: 960px) { .privacy-sum .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; } }
.checks { list-style: none; display: grid; gap: 0; }
.checks li { display: flex; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.checks li:first-child { border-top: 1px solid var(--line); }
.checks svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent); }
.privacy-sum .more { margin-top: 20px; }

/* ---------- FAQ ---------- */

.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-block: 18px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 200ms var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details > div { padding-bottom: 20px; color: var(--muted); max-width: 40em; }
.faq details > div p + p { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- Closing ---------- */

.closing { text-align: left; }
.closing p { margin-top: 12px; color: var(--muted); max-width: 36em; }

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

.site-footer { border-top: 1px solid var(--line); padding-block: 40px 48px; font-size: 0.875rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 20px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.trademark { max-width: 52em; }

/* ---------- Document pages (privacy, 404) ---------- */

.doc { padding-block: clamp(32px, 6vw, 72px) clamp(64px, 8vw, 112px); }
.doc .wrap { max-width: calc(44rem + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem); }
.doc .meta { margin-top: 12px; color: var(--muted); }
.doc h2 { font-size: 1.375rem; margin-top: 48px; margin-bottom: 12px; }
.doc h3 { margin-top: 24px; margin-bottom: 6px; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 1.25em; }
.doc li + li { margin-top: 6px; }
.doc code { font-size: 0.9em; background: var(--bg-sunk); padding: 1px 5px; border-radius: 4px; }

.perm { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.perm h3 { margin-top: 0; }

.lost { min-height: 60vh; display: grid; align-content: center; }
.lost p { margin-top: 16px; color: var(--muted); }
.lost .cta-row { margin-top: 28px; }
