/* WhisperFly site. No build step, no external requests. */

:root {
  --bg: #000;
  --bg-2: #0b0b0d;
  --card: #111114;
  --card-2: #1a1a1e;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --fg: #f5f5f7;
  --muted: #a1a1a6;
  --dim: #6e6e73;
  --link: #2997ff;
  --cyan: #5ee2ff;
  --blue: #2f7bff;
  --violet: #8b6cff;
  --green: #30d158;
  --red: #ff453a;
  --orange: #ff9f0a;
  --brand: linear-gradient(100deg, #6ee7ff 0%, #3b8cff 45%, #8b6cff 100%);
  --warm: linear-gradient(100deg, #c38bff 0%, #ff6fae 50%, #ffb35c 100%);
  --radius: 28px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "JetBrains Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b { font-weight: 600; }

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 0.05em 0.45em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 0.4em;
  background: rgba(255, 255, 255, 0.06);
  font: 600 0.82em/1.4 var(--font);
  text-align: center;
  color: var(--fg);
  vertical-align: 0.08em;
}

code { font-family: var(--mono); font-size: 0.9em; }

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

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 10px; background: var(--fg); color: #000;
}
.skip:focus { top: 12px; }

.grad {
  background: var(--brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.grad--warm { background-image: var(--warm); }

.eyebrow {
  font-size: 17px; font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0;
  margin-bottom: 14px;
}

/* ── Buttons ─────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 17px; font-weight: 500;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.btn:hover { background: #4a8dff; text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn--small { padding: 5px 14px; font-size: 13px; font-weight: 500; }
.btn--large { padding: 16px 30px; font-size: 19px; }

.link { font-size: 17px; }
.link span { display: inline-block; transition: transform 0.2s var(--ease); }
.link:hover span { transform: translateX(3px); }

/* ── Navigation ──────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--wrap); margin: 0 auto;
  height: 52px; padding: 0 22px;
  display: flex; align-items: center; gap: 28px;
}
.nav__brand { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; font-size: 17px; }
.nav__brand:hover { text-decoration: none; }
.nav__brand img { border-radius: 5px; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { color: #d2d2d7; font-size: 13px; transition: color 0.2s; }
.nav__links a:hover { color: #fff; text-decoration: none; }

/* ── Hero ────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 72px 22px 40px;
  text-align: center;
  isolation: isolate;
}
.hero__glow {
  position: absolute; inset: -10% 0 auto; height: 900px; z-index: -1;
  background:
    radial-gradient(40% 35% at 50% 20%, rgba(59, 140, 255, 0.28), transparent 70%),
    radial-gradient(30% 30% at 30% 45%, rgba(110, 231, 255, 0.12), transparent 70%),
    radial-gradient(30% 30% at 72% 40%, rgba(139, 108, 255, 0.16), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero__icon {
  margin: 0 auto 26px;
  width: 128px; height: 128px;
  filter: drop-shadow(0 18px 40px rgba(47, 123, 255, 0.45));
}
.hero__title {
  font-size: clamp(56px, 10vw, 120px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hero__lede {
  max-width: 640px; margin: 26px auto 0;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.hero__lede kbd { font-size: 0.8em; }
.hero__cta {
  margin-top: 34px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px;
}
.hero__meta { margin-top: 20px; font-size: 14px; color: var(--dim); }

/* ── Demo stage ──────────────────────────────────────── */

.stage { margin: 72px auto 0; max-width: 1000px; }

.mac {
  container-type: inline-size;
  padding: 1.1% 1.1% 1.4%;
  border-radius: 22px;
  background: linear-gradient(180deg, #2b2b30, #151518);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 40px 120px -20px rgba(47, 123, 255, 0.35),
    0 30px 60px rgba(0, 0, 0, 0.6);
}

/* Everything inside the screen is sized in em so it scales with the screen. */
.mac__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  font-size: 16px;
  font-size: calc(100cqw / 62.5);
  background:
    radial-gradient(70% 90% at 15% 110%, #ff7a59 0%, transparent 55%),
    radial-gradient(60% 80% at 95% 100%, #c03bff 0%, transparent 60%),
    radial-gradient(90% 90% at 70% -10%, #1fb6ff 0%, transparent 60%),
    linear-gradient(160deg, #0e3a8a 0%, #3a1c8f 55%, #1a0b3d 100%);
}

.menubar {
  position: absolute; inset: 0 0 auto;
  height: 1.8em;
  padding: 0 0.9em;
  display: flex; align-items: center; gap: 1.2em;
  font-size: 0.82em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.menubar b { font-weight: 700; }
.menubar__apple {
  width: 0.95em; height: 1.1em;
  background: rgba(255, 255, 255, 0.92);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 20'><path d='M14.1 10.6c0-2.4 2-3.6 2.1-3.6-1.1-1.7-2.9-1.9-3.5-1.9-1.5-.2-2.9.9-3.7.9-.8 0-1.9-.9-3.2-.8-1.6 0-3.1 1-4 2.4-1.7 3-.4 7.4 1.2 9.8.8 1.2 1.8 2.5 3 2.4 1.2 0 1.7-.8 3.1-.8 1.5 0 1.9.8 3.2.8 1.3 0 2.2-1.2 3-2.4.9-1.4 1.3-2.7 1.3-2.8 0 0-2.5-1-2.5-4zM11.7 3.5c.7-.8 1.1-1.9 1-3.1-1 0-2.2.7-2.9 1.5-.6.7-1.2 1.9-1 3 1.1.1 2.2-.6 2.9-1.4z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 20'><path d='M14.1 10.6c0-2.4 2-3.6 2.1-3.6-1.1-1.7-2.9-1.9-3.5-1.9-1.5-.2-2.9.9-3.7.9-.8 0-1.9-.9-3.2-.8-1.6 0-3.1 1-4 2.4-1.7 3-.4 7.4 1.2 9.8.8 1.2 1.8 2.5 3 2.4 1.2 0 1.7-.8 3.1-.8 1.5 0 1.9.8 3.2.8 1.3 0 2.2-1.2 3-2.4.9-1.4 1.3-2.7 1.3-2.8 0 0-2.5-1-2.5-4zM11.7 3.5c.7-.8 1.1-1.9 1-3.1-1 0-2.2.7-2.9 1.5-.6.7-1.2 1.9-1 3 1.1.1 2.2-.6 2.9-1.4z'/></svg>") center / contain no-repeat;
}
.menubar__spacer { flex: 1; }
.menubar svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menubar__wf {
  display: grid; place-items: center;
  padding: 0.12em 0.35em; border-radius: 0.35em;
  transition: background 0.3s, color 0.3s;
}
.menubar__wf.is-live { background: rgba(255, 255, 255, 0.22); }
.menubar__wf.is-live svg { stroke: #fff; animation: wf-pulse 0.9s ease-in-out infinite; }
@keyframes wf-pulse { 50% { opacity: 0.45; } }

.window {
  position: absolute;
  left: 50%; top: 3.6em;
  width: 40em; height: 28em;
  transform: translateX(-50%);
  border-radius: 0.85em;
  background: rgba(30, 30, 32, 0.9);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 1.6em 4em rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.window__bar {
  height: 2.3em; padding: 0 0.85em;
  display: flex; align-items: center; gap: 0.5em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.window__bar i { width: 0.75em; height: 0.75em; border-radius: 50%; background: #ff5f57; }
.window__bar i:nth-child(2) { background: #febc2e; }
.window__bar i:nth-child(3) { background: #28c840; }
.window__title { margin-left: 0.8em; font-size: 0.8em; font-weight: 600; color: rgba(255, 255, 255, 0.55); }
.window__body { padding: 1.6em 2.2em; }
.note__title { font-size: 1.55em; font-weight: 700; letter-spacing: -0.02em; }
.note__meta { margin: 0.2em 0 1.1em; font-size: 0.78em; color: rgba(255, 255, 255, 0.4); }
.note__line {
  min-height: 4.5em;
  font-size: 1.12em; line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.caret {
  display: inline-block;
  width: 2px; height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--link);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Floating pill */

.pill-wrap {
  position: absolute;
  left: 50%; top: 17.2em;
  display: flex; align-items: center; gap: 0.4em;
  transform: translateX(-50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.pill-wrap:not([data-state="idle"]) { opacity: 1; transform: translateX(-50%) scale(1); }

.pill, .pill__side {
  background: rgba(40, 40, 46, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0.6em 1.8em rgba(0, 0, 0, 0.4);
}
.pill {
  position: relative;
  height: 2.75em;
  padding: 0 1em;
  width: 12em; /* set from the active content by app.js */
  border-radius: 999px;
  overflow: hidden;
  transition: background 0.4s, width 0.45s var(--ease);
}
.pill-wrap[data-state="done"] .pill { background: rgba(48, 209, 88, 0.22); }

.pill__content {
  position: absolute; left: 1em; top: 0; bottom: 0;
  display: flex; align-items: center; gap: 0.62em;
  white-space: nowrap;
  opacity: 0; transform: scale(0.92);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}
.pill-wrap[data-state="recording"] .pill__content--recording,
.pill-wrap[data-state="transcribing"] .pill__content--transcribing,
.pill-wrap[data-state="rewriting"] .pill__content--rewriting,
.pill-wrap[data-state="done"] .pill__content--done { opacity: 1; transform: none; }

.pill__side {
  width: 2.25em; height: 2.25em; border-radius: 50%;
  display: grid; place-items: center;
  flex: none;
  max-width: 0; opacity: 0; margin: 0 -0.2em;
  transform: scale(0.5);
  transition: max-width 0.45s var(--ease), opacity 0.3s, transform 0.45s var(--ease), margin 0.45s var(--ease);
}
.pill__side svg { width: 0.85em; height: 0.85em; fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 3; stroke-linecap: round; }
.pill__stop { background: rgba(255, 69, 58, 0.55); }
.pill__stop span { width: 0.75em; height: 0.75em; border-radius: 0.22em; background: #fff; }
.pill-wrap:is([data-state="recording"], [data-state="transcribing"], [data-state="rewriting"]) .pill__cancel,
.pill-wrap[data-state="recording"] .pill__stop { max-width: 2.25em; opacity: 1; transform: none; margin: 0; }

.rec-dot {
  width: 0.45em; height: 0.45em; border-radius: 50%; flex: none;
  background: var(--red);
  box-shadow: 0 0 0.3em var(--red);
}

.wave {
  display: flex; align-items: center; gap: 0.12em;
  width: 7.4em; height: 1.5em;
}
.wave i {
  flex: 1;
  height: 12%;
  min-height: 2px;
  border-radius: 99px;
  background: #fff;
  transition: height 0.09s ease-out;
}
.pill__timer {
  min-width: 2.2em; text-align: right;
  font-size: 0.82em; font-weight: 600; font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.6);
}
.pill__label { display: flex; flex-direction: column; line-height: 1.15; }
.pill__label b { font-size: 0.82em; }
.pill__label small { font-size: 0.62em; font-weight: 500; color: rgba(255, 255, 255, 0.55); }

.spinner {
  width: 1em; height: 1em; border-radius: 50%;
  border: 0.14em solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.85);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sparkles { width: 1.1em; height: 1.1em; }
.sparkles path { fill: #d58bff; }
.pill__content--rewriting .sparkles { animation: sparkle 1s ease-in-out infinite; }
@keyframes sparkle { 50% { transform: scale(0.82); opacity: 0.6; } }

.check { width: 1.2em; height: 1.2em; }
.check circle { fill: var(--green); }
.check path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pill-wrap[data-state="done"] .check { animation: pop 0.5s var(--ease); }
@keyframes pop { 0% { transform: scale(0.4); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

.speech {
  position: absolute;
  left: 50%; bottom: 1.6em;
  transform: translateX(-50%);
  max-width: 44em; width: max-content;
  padding: 0.55em 1.1em;
  border-radius: 0.8em;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 0.95em; font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s;
}
.speech.is-on { opacity: 1; }
.speech::before {
  content: "";
  display: inline-block; width: 0.9em; height: 0.9em; margin-right: 0.5em; vertical-align: -0.1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><rect x='9' y='3' width='6' height='11' rx='3'/><path d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><rect x='9' y='3' width='6' height='11' rx='3'/><path d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21'/></svg>") center / contain no-repeat;
}
.speech .w { opacity: 0; transition: opacity 0.2s; }
.speech .w.is-on { opacity: 1; }

/* Keys under the screen */

.keys {
  display: flex; justify-content: flex-start; gap: 8px;
  max-width: 560px;
  margin: 26px auto 0;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1a1a1d, #0f0f11);
  box-shadow: 0 0 0 1px var(--line) inset;
}
.key {
  height: 54px; min-width: 62px;
  padding: 6px 9px;
  display: flex; align-items: flex-end; justify-content: flex-end;
  border-radius: 9px;
  background: linear-gradient(180deg, #2a2a2e, #222225);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 2px 0 #050506;
  font-size: 11px; color: #c7c7cc;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.key--fn { justify-content: space-between; flex-direction: column; align-items: flex-start; }
.key--fn small { font-size: 11px; align-self: flex-end; }
.key--fn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.key--cmd { min-width: 82px; }
.key--space { flex: 1; }
.key.is-down {
  transform: translateY(2px);
  background: linear-gradient(180deg, #2b3c5e, #22324f);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(94, 226, 255, 0.55) inset, 0 0 24px rgba(59, 140, 255, 0.55), 0 0 0 #050506;
}

.steps {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px;
  margin-top: 26px;
  font-size: 15px; font-weight: 500;
  color: var(--dim);
}
.steps span { display: inline-flex; align-items: center; gap: 8px; transition: color 0.3s; }
.steps span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.6;
}
.steps span.is-on { color: var(--fg); }
.steps span.is-on::before { background: var(--cyan); opacity: 1; box-shadow: 0 0 8px var(--cyan); }

/* ── Statement ───────────────────────────────────────── */

.statement { padding: 140px 22px; }
.statement__text {
  max-width: 980px; margin: 0 auto;
  font-size: clamp(32px, 5.4vw, 64px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.statement__text .w { color: #2c2c2e; transition: color 0.25s; }
.statement__text .w.is-on { color: var(--fg); }
.no-js .statement__text, .reduced .statement__text .w { color: var(--fg); }

/* ── Sections ────────────────────────────────────────── */

.section { padding: 110px 22px; max-width: calc(var(--wrap) + 44px); margin: 0 auto; }
.section--tint {
  max-width: none;
  background: radial-gradient(70% 60% at 50% 0%, rgba(195, 139, 255, 0.12), transparent 70%), var(--bg-2);
  border-block: 1px solid var(--line);
}
.section__head { text-align: center; max-width: 780px; margin: 0 auto 64px; }
.section__head h2 {
  font-size: clamp(40px, 6.4vw, 80px);
  line-height: 1.05; font-weight: 700; letter-spacing: -0.032em;
}
.section__lede {
  margin-top: 22px;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.45;
  color: var(--muted);
}
.section__lede kbd { font-size: 0.8em; }

/* How it works */

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how__card {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset;
}
.how__card h3 { margin-top: 26px; font-size: 24px; letter-spacing: -0.02em; }
.how__card p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.how__card kbd { font-size: 0.78em; }
.how__visual {
  height: 150px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: radial-gradient(80% 90% at 50% 100%, rgba(47, 123, 255, 0.28), transparent 70%), #0a0a0c;
  box-shadow: 0 0 0 1px var(--line) inset;
  overflow: hidden;
}
.key--big {
  width: 86px; height: 76px; padding: 10px 12px;
  font-size: 16px; justify-content: flex-start; align-items: flex-start;
  animation: press 2.4s ease-in-out infinite;
}
.key--big small { font-size: 18px; }
@keyframes press {
  0%, 30%, 100% { transform: none; color: #c7c7cc; box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 3px 0 #050506; }
  40%, 85% { transform: translateY(3px); color: #fff; box-shadow: 0 0 0 1px rgba(94,226,255,.6) inset, 0 0 30px rgba(59,140,255,.6), 0 0 0 #050506; }
}
.mini-pill {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-size: 16px;
}
.wave--static { width: 120px; height: 26px; }
.wave--static i { animation: bars 1.1s ease-in-out infinite; }
.wave--static i:nth-child(3n) { animation-duration: 0.9s; }
.wave--static i:nth-child(3n+1) { animation-duration: 1.3s; animation-delay: -0.4s; }
.wave--static i:nth-child(4n) { animation-delay: -0.7s; }
.wave--static i:nth-child(5n) { animation-delay: -0.2s; animation-duration: 0.75s; }
@keyframes bars { 0%, 100% { height: 14%; } 50% { height: 92%; } }
.how__type { font-size: 19px; font-weight: 500; }
.how__type b { color: var(--cyan); }

/* Bento */

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
  position: relative;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset;
  overflow: hidden;
}
.tile h3 { font-size: 24px; line-height: 1.17; letter-spacing: -0.02em; }
.tile p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.tile p b { color: var(--fg); font-weight: 500; }
.tile--wide { grid-column: span 2; }
.tile--glass, .tile--split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: center; }
.tile__text h3 { font-size: 30px; }

.tile__icon {
  width: 48px; height: 48px; margin-bottom: 22px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(47, 123, 255, 0.16);
  color: #6fa8ff;
}
.tile__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile__icon--orange { background: rgba(255, 159, 10, 0.15); color: #ffb340; }
.tile__icon--purple { background: rgba(191, 90, 242, 0.16); color: #d08cff; }
.tile__icon--green  { background: rgba(48, 209, 88, 0.14); color: #4ee07a; }
.tile__icon--teal   { background: rgba(100, 210, 255, 0.14); color: #6fd8ff; }
.tile__icon--pink   { background: rgba(255, 55, 95, 0.14); color: #ff6b8a; }
.tile__icon--indigo { background: rgba(94, 92, 230, 0.2); color: #9a98ff; }

.tile__big {
  font-size: 96px; line-height: 1; font-weight: 700; letter-spacing: -0.05em;
  background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 14px;
}
.hello { position: relative; height: 1.6em; overflow: hidden; font-size: 20px !important; color: var(--fg) !important; font-weight: 600; }
.hello span { position: absolute; inset: 0; opacity: 0; transform: translateY(60%); transition: opacity 0.5s, transform 0.6s var(--ease); }
.hello span.is-on { opacity: 1; transform: none; }
.hello span.is-out { opacity: 0; transform: translateY(-60%); }
.no-js .hello span:first-child, .reduced .hello span:first-child { opacity: 1; transform: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.chips li {
  padding: 4px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: #d2d2d7; background: rgba(255, 255, 255, 0.07);
}

/* Glass demo tile */
.glass-demo {
  position: relative;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  background: #0b1020;
  display: grid; place-items: center;
}
.glass-demo__blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.glass-demo__blob--a { width: 160px; height: 160px; background: radial-gradient(circle at 30% 30%, #6ee7ff, #2f7bff 60%, transparent 70%); animation: drift-a 9s ease-in-out infinite; }
.glass-demo__blob--b { width: 140px; height: 140px; background: radial-gradient(circle at 60% 40%, #ff8bd0, #8b6cff 60%, transparent 70%); animation: drift-b 11s ease-in-out infinite; }
@keyframes drift-a { 0%, 100% { transform: translate(-110px, -30px); } 50% { transform: translate(90px, 30px); } }
@keyframes drift-b { 0%, 100% { transform: translate(100px, 40px); } 50% { transform: translate(-90px, -40px); } }
.glass-demo__row { position: relative; display: flex; align-items: center; gap: 8px; }
.glass-pill, .glass-btn {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.glass-pill { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 99px; }
.glass-pill .wave { width: 96px; height: 24px; }
.glass-pill b { font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.75); }
.glass-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; animation: merge 4s var(--ease) infinite; }
.glass-btn svg { width: 14px; height: 14px; fill: none; stroke: rgba(255, 255, 255, 0.8); stroke-width: 3; stroke-linecap: round; }
.glass-btn--red { background: rgba(255, 69, 58, 0.5); animation-name: merge-r; }
.glass-btn--red span { width: 13px; height: 13px; border-radius: 4px; background: #fff; }
@keyframes merge   { 0%, 100% { transform: none; } 45%, 60% { transform: translateX(26px) scale(0.6); opacity: 0.4; } }
@keyframes merge-r { 0%, 100% { transform: none; } 45%, 60% { transform: translateX(-26px) scale(0.6); opacity: 0.4; } }

/* Fallback chain */
.chain { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chain__node {
  display: flex; flex-direction: column; align-items: center;
  width: 210px; padding: 12px 16px;
  border-radius: 16px;
  background: var(--card-2);
  box-shadow: 0 0 0 1px var(--line) inset;
  font-weight: 600; font-size: 15px;
}
.chain__node small { margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--dim); }
.chain__node--fail { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(255, 69, 58, 0.7); }
.chain__node--fail small { color: #ff6961; text-decoration: none; }
.chain__node--ok { box-shadow: 0 0 0 1px rgba(48, 209, 88, 0.55) inset, 0 0 30px rgba(48, 209, 88, 0.15); }
.chain__node--ok small { color: #4ee07a; }
.chain__arrow { position: relative; width: 2px; height: 22px; background: rgba(255, 255, 255, 0.2); border-radius: 2px; overflow: hidden; }
.chain__arrow::after { content: ""; position: absolute; inset: 0; height: 40%; background: var(--cyan); animation: flow 1.4s linear infinite; }
.chain__arrow--idle::after { display: none; }
@keyframes flow { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* ── Rewrite ─────────────────────────────────────────── */

.rewrite { max-width: 1000px; margin: 0 auto; text-align: center; }
.segmented {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px;
  padding: 4px;
  border-radius: 99px;
  background: #1d1d1f;
  box-shadow: 0 0 0 1px var(--line) inset;
}
.segmented button {
  appearance: none; border: 0; cursor: pointer;
  padding: 9px 20px;
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font: 500 15px var(--font);
  transition: background 0.25s, color 0.25s;
}
.segmented button:hover { color: var(--fg); }
.segmented button[aria-selected="true"] { background: #3a3a3c; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.segmented--small button { padding: 7px 16px; font-size: 14px; }

.rewrite__panes {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 18px;
  margin-top: 36px;
  text-align: left;
}
.rewrite__pane {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset;
}
.rewrite__pane--out {
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--warm) border-box;
  border: 1px solid transparent;
  box-shadow: 0 20px 60px -20px rgba(255, 111, 174, 0.3);
}
.rewrite__label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--dim);
  margin-bottom: 14px;
}
.rewrite__label svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rewrite__raw { font-size: 21px; line-height: 1.45; color: var(--muted); font-style: italic; }
.rewrite__out { font-size: 21px; line-height: 1.45; font-weight: 500; transition: opacity 0.25s, filter 0.25s; }
.rewrite__out.is-swapping { opacity: 0; filter: blur(6px); }
.rewrite__arrow { display: grid; place-items: center; }
.rewrite__arrow svg { width: 30px; height: 30px; }
.rewrite__arrow path { fill: #e08cff; }
.rewrite__hint { margin-top: 24px; color: var(--muted); font-size: 16px; min-height: 1.5em; }

/* ── Engines ─────────────────────────────────────────── */

.engines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.engine {
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.engine:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-2) inset, 0 24px 50px rgba(0, 0, 0, 0.5); }
.engine h3 { margin-top: 20px; font-size: 24px; letter-spacing: -0.02em; }
.engine__model { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--fg) !important; opacity: 0.75; }
.engine p:last-child { margin-top: 12px; color: var(--muted); font-size: 15px; }
.badge {
  display: inline-block;
  padding: 4px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, 0.08); color: #d2d2d7;
}
.badge--green { background: rgba(48, 209, 88, 0.15); color: #4ee07a; }
.badge--blue { background: rgba(47, 123, 255, 0.18); color: #79adff; }

.privacy {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 44px;
  color: var(--muted); font-size: 16px; text-align: center;
}
.privacy svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ── Numbers ─────────────────────────────────────────── */

.section--numbers { padding-top: 40px; }
.numbers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 70px;
}
.numbers li { text-align: left; }
.numbers b {
  display: block;
  font-size: clamp(56px, 7vw, 88px); line-height: 1; font-weight: 700; letter-spacing: -0.05em;
  background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.numbers span { display: block; margin-top: 12px; max-width: 220px; color: var(--muted); font-size: 16px; }

/* ── Download ────────────────────────────────────────── */

.download { text-align: center; }
.download__icon { margin: 0 auto 28px; filter: drop-shadow(0 14px 34px rgba(47, 123, 255, 0.45)); }
.download .section__head { margin-bottom: 40px; }
.install { max-width: 720px; margin: 0 auto; }
.install__panel { margin-top: 26px; }
.install__panel[hidden] { display: none; }
.install__note { margin: 16px auto 0; max-width: 600px; color: var(--muted); font-size: 15px; }
.install__note + .code { margin-top: 16px; }
.code {
  position: relative;
  text-align: left;
  border-radius: 18px;
  background: #0d0d10;
  box-shadow: 0 0 0 1px var(--line) inset;
}
.code pre { margin: 0; padding: 22px 100px 22px 24px; overflow-x: auto; font: 15px/1.7 var(--mono); color: #e5e5ea; }
.code code { font-size: inherit; }
.code__prompt { color: var(--dim); user-select: none; -webkit-user-select: none; }
.code__copy {
  position: absolute; top: 14px; right: 14px;
  appearance: none; border: 0; cursor: pointer;
  padding: 6px 14px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.1); color: var(--fg);
  font: 500 13px var(--font);
  transition: background 0.2s;
}
.code__copy:hover { background: rgba(255, 255, 255, 0.18); }
.code__copy.is-done { background: rgba(48, 209, 88, 0.25); color: #7ef0a0; }

.setup {
  max-width: 720px; margin: 56px auto 0;
  padding: 30px 34px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset;
  text-align: left;
}
.setup h3 { font-size: 21px; letter-spacing: -0.015em; }
.setup ol { counter-reset: step; margin-top: 18px; display: grid; gap: 14px; }
.setup li { counter-increment: step; position: relative; padding-left: 40px; color: var(--muted); font-size: 16px; }
.setup li b { color: var(--fg); }
.setup li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(47, 123, 255, 0.2); color: #8bb8ff;
  font-size: 13px; font-weight: 700;
}
.setup kbd { font-size: 0.78em; }

/* ── Footer ──────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 34px 22px 46px; font-size: 13px; color: var(--dim); }
.footer__brand { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; font-size: 15px; }
.footer__brand img { border-radius: 4px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 18px 0; }
.footer__links a { color: #d2d2d7; }
.footer__fine { max-width: 760px; line-height: 1.6; }
.footer__fine a { color: #d2d2d7; }

/* ── Scroll reveal ───────────────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--wide { grid-column: span 2; }
  .engines { grid-template-columns: repeat(2, 1fr); }
  .numbers { grid-template-columns: repeat(2, 1fr); row-gap: 50px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
  .hero { padding-top: 48px; }
  .hero__icon { width: 96px; height: 96px; }
  .stage { margin-top: 52px; }
  .mac { border-radius: 16px; padding: 7px; }
  /* Taller, more zoomed-in screen so the mock stays legible on phones */
  .mac__screen { aspect-ratio: 4 / 5; font-size: calc(100cqw / 26); border-radius: 10px; }
  .window { width: 92%; top: 3em; height: auto; bottom: 6.5em; }
  .window__body { padding: 1.2em 1.3em; }
  .speech { bottom: 1.2em; width: 90%; max-width: none; font-size: 0.85em; }
  .hide-sm { display: none; }
  .keys { gap: 5px; padding: 7px; border-radius: 12px; }
  .key { height: 44px; min-width: 44px; font-size: 9px; padding: 5px 6px; }
  .key--cmd { min-width: 60px; }
  .steps { gap: 8px 20px; font-size: 14px; }
  .statement { padding: 90px 22px; }
  .section { padding: 80px 20px; }
  .section__head { margin-bottom: 44px; }
  .how { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .tile--wide { grid-column: auto; }
  .tile--glass, .tile--split { grid-template-columns: 1fr; }
  .tile { padding: 28px; }
  .rewrite__panes { grid-template-columns: 1fr; }
  .rewrite__arrow svg { transform: rotate(90deg); }
  .rewrite__raw, .rewrite__out { font-size: 19px; }
  .segmented button { padding: 8px 13px; font-size: 14px; }
  .engines { grid-template-columns: 1fr; }
  .code pre { font-size: 13px; padding-right: 24px; padding-top: 52px; }
}

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