/* ---------- shadcn/ui tokens (zinc, dark) ---------- */
:root {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 5.5%;
  --card-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
  --radius: 0.75rem;

  --signal: 152 100% 60%;     /* Scream accent: phosphor green */
  --signal-2: 190 100% 60%;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border: 0 solid hsl(var(--border)); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: hsl(var(--signal) / .3); }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.mono { font-family: var(--font-mono); }
.muted { color: hsl(var(--muted-foreground)); }

/* ---------- background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(hsl(var(--foreground) / .035) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--foreground) / .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: -260px; width: 1100px; height: 700px; transform: translateX(-50%);
  background: radial-gradient(closest-side, hsl(var(--signal) / .14), transparent 70%),
              radial-gradient(closest-side at 70% 60%, hsl(var(--signal-2) / .08), transparent 70%);
  filter: blur(20px);
}

/* ---------- primitives (shadcn-style) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.5rem; padding: 0 1.1rem; border-radius: calc(var(--radius) - 2px);
  font-size: .875rem; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .2s;
  font-family: inherit;
}
.btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.btn-lg { height: 2.875rem; padding: 0 1.4rem; font-size: .95rem; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / .88); box-shadow: 0 0 0 4px hsl(var(--signal) / .15), 0 8px 30px -8px hsl(var(--signal) / .5); }
.btn-outline { background: hsl(var(--background) / .4); border: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); backdrop-filter: blur(8px); }
.btn-outline:hover { background: hsl(var(--accent)); }
.btn-ghost { background: transparent; color: hsl(var(--muted-foreground)); }
.btn-ghost:hover { color: hsl(var(--foreground)); background: hsl(var(--accent) / .6); }

.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .3rem .75rem .3rem .4rem; border-radius: 999px;
  border: 1px solid hsl(var(--border)); background: hsl(var(--card) / .7);
  font-size: .78rem; color: hsl(var(--muted-foreground)); backdrop-filter: blur(8px);
}
.badge .pill {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em;
  padding: .1rem .45rem; border-radius: 999px;
  background: hsl(var(--signal) / .12); color: hsl(var(--signal)); border: 1px solid hsl(var(--signal) / .25);
}

.card {
  background: linear-gradient(180deg, hsl(var(--card)), hsl(var(--background)));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  position: relative; overflow: hidden;
}

kbd {
  font-family: var(--font-mono); font-size: .72rem;
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem;
  padding: 0 .4rem; border-radius: 6px;
  background: hsl(var(--muted)); border: 1px solid hsl(240 3.7% 22%);
  box-shadow: inset 0 -2px 0 hsl(0 0% 0% / .4); color: hsl(var(--foreground));
}

.dot { width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--signal)); box-shadow: 0 0 10px hsl(var(--signal)); }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
header.nav.scrolled { background: hsl(var(--background) / .72); border-bottom-color: hsl(var(--border)); backdrop-filter: blur(14px) saturate(140%); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: -.02em; font-size: 1.05rem; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: hsl(var(--foreground)); color: hsl(var(--background));
}
.nav-links { display: flex; gap: .25rem; }
.nav-links a { font-size: .875rem; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 88px 0 56px; text-align: center; }
h1 {
  font-size: clamp(2.6rem, 7.4vw, 5.4rem); line-height: .98; letter-spacing: -.045em;
  font-weight: 600; margin: 1.5rem auto 1.25rem; max-width: 14ch;
  background: linear-gradient(180deg, hsl(var(--foreground)) 30%, hsl(var(--foreground) / .55));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 .accent {
  background: linear-gradient(90deg, hsl(var(--signal)), hsl(var(--signal-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1.02rem, 1.7vw, 1.2rem); color: hsl(var(--muted-foreground)); max-width: 40rem; margin: 0 auto 2rem; }
.cta-row { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.meta-row { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; font-size: .8rem; color: hsl(var(--muted-foreground)); }
.meta-row span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- demo console ---------- */
.demo { max-width: 860px; margin: 64px auto 0; text-align: left; box-shadow: 0 40px 120px -40px hsl(var(--signal) / .25), 0 0 0 1px hsl(var(--foreground) / .02); }
.demo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, hsl(var(--foreground) / .06), transparent 30%);
}
.demo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1rem; border-bottom: 1px solid hsl(var(--border));
  font-family: var(--font-mono); font-size: .72rem; color: hsl(var(--muted-foreground));
}
.lights { display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--muted)); }
.demo-status { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.demo-status span { display: inline-flex; align-items: center; gap: .4rem; }
.demo-body { padding: 28px clamp(18px, 4vw, 36px) 24px; }
.demo-lang { font-family: var(--font-mono); font-size: .72rem; color: hsl(var(--signal)); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .6rem; min-height: 1.1em; }
.demo-text { font-size: clamp(1.25rem, 3vw, 1.85rem); line-height: 1.35; letter-spacing: -.02em; min-height: 2.7em; font-weight: 450; }
.caret { display: inline-block; width: 2px; height: 1.05em; vertical-align: -0.15em; margin-left: 2px; background: hsl(var(--signal)); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#wave { width: 100%; height: 96px; margin-top: 18px; }
.demo-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .85rem 1rem; border-top: 1px solid hsl(var(--border)); font-size: .8rem; color: hsl(var(--muted-foreground));
}
.hotkey { display: inline-flex; align-items: center; gap: .4rem; }
.mic-btn { height: 2.1rem; font-size: .8rem; padding: 0 .9rem; }
.mic-btn.live { border-color: hsl(var(--signal) / .6); color: hsl(var(--signal)); box-shadow: 0 0 0 4px hsl(var(--signal) / .1); }

/* ---------- marquee ---------- */
.marquee { margin-top: 72px; border-block: 1px solid hsl(var(--border)); padding: 18px 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 2.75rem; width: max-content; animation: scroll 50s linear infinite; }
.marquee-track span { font-size: 1.05rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.marquee-track span:nth-child(5n+2) { color: hsl(var(--foreground)); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding: 112px 0 0; }
.eyebrow { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: hsl(var(--signal)); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.04em; line-height: 1.04; font-weight: 600; margin: .8rem 0 1rem; max-width: 18ch; }
.section-head p { color: hsl(var(--muted-foreground)); max-width: 36rem; margin: 0; font-size: 1.05rem; }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 48px; }
.bento .card { padding: 26px; min-height: 230px; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.bento .card:hover { border-color: hsl(240 3.7% 26%); }
.bento .card h3 { font-size: 1.12rem; letter-spacing: -.02em; margin: auto 0 .4rem; font-weight: 600; }
.bento .card p { margin: 0; font-size: .92rem; color: hsl(var(--muted-foreground)); }
.icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .5); color: hsl(var(--foreground)); }
.span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
@media (max-width: 900px) { .span-4, .span-3, .span-2 { grid-column: span 6; } }

.chip-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 24px; }
.chip { font-family: var(--font-mono); font-size: .72rem; padding: .25rem .55rem; border-radius: 6px; border: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); background: hsl(var(--background) / .6); }
.chip.on { color: hsl(var(--signal)); border-color: hsl(var(--signal) / .3); background: hsl(var(--signal) / .06); }

.net {
  font-family: var(--font-mono); font-size: .78rem; margin-bottom: 24px;
  border: 1px solid hsl(var(--border)); border-radius: 10px; background: hsl(var(--background) / .7); padding: 14px 16px;
}
.net div { display: flex; justify-content: space-between; padding: 3px 0; color: hsl(var(--muted-foreground)); }
.net b { font-weight: 500; color: hsl(var(--foreground)); }
.net b.ok { color: hsl(var(--signal)); }

.big-zero { font-size: clamp(4rem, 9vw, 6.5rem); font-weight: 600; letter-spacing: -.06em; line-height: 1; margin: 6px 0 auto;
  background: linear-gradient(180deg, hsl(var(--foreground)), hsl(var(--foreground) / .2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 48px; counter-reset: s; }
.step { padding: 26px; }
.step .num { font-family: var(--font-mono); font-size: .75rem; color: hsl(var(--muted-foreground)); }
.step .visual { height: 120px; display: grid; place-items: center; margin: 18px 0 22px; border-radius: 10px; border: 1px dashed hsl(var(--border)); background: hsl(var(--background) / .5); }
.step h3 { margin: 0 0 .35rem; font-size: 1.08rem; letter-spacing: -.02em; font-weight: 600; }
.step p { margin: 0; color: hsl(var(--muted-foreground)); font-size: .92rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.mini-wave { display: flex; gap: 4px; align-items: center; height: 48px; }
.mini-wave i { width: 4px; border-radius: 4px; background: hsl(var(--signal)); animation: eq 1.1s ease-in-out infinite; }
@keyframes eq { 0%,100% { height: 18%; } 50% { height: 100%; } }
.typed-line { font-size: .95rem; padding: .55rem .8rem; border-radius: 8px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); max-width: 85%; }

/* compare */
.compare { margin-top: 48px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .95rem; }
th, td { text-align: left; padding: 18px 22px; border-bottom: 1px solid hsl(var(--border)); }
thead th { font-weight: 500; font-size: .8rem; font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
thead th.us { color: hsl(var(--signal)); }
tbody tr:last-child td { border-bottom: 0; }
td.us { background: hsl(var(--signal) / .04); color: hsl(var(--foreground)); font-weight: 500; }
th.us { background: hsl(var(--signal) / .04); }
td .yes, td .no { display: inline-flex; align-items: center; gap: .5rem; }
td .no { color: hsl(var(--muted-foreground)); }
td.label { color: hsl(var(--muted-foreground)); }

/* faq */
.faq { margin-top: 40px; max-width: 760px; }
details { border-bottom: 1px solid hsl(var(--border)); }
summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 1rem; font-weight: 500; font-size: 1.04rem; letter-spacing: -.01em; }
summary::-webkit-details-marker { display: none; }
summary .plus { transition: transform .2s; color: hsl(var(--muted-foreground)); flex: none; }
details[open] summary .plus { transform: rotate(45deg); }
details p { margin: -6px 0 22px; color: hsl(var(--muted-foreground)); max-width: 62ch; }

/* final cta */
.final { margin: 120px 0 0; padding: clamp(40px, 7vw, 80px) 24px; text-align: center; }
.final::after {
  content: ""; position: absolute; left: 50%; bottom: -60%; width: 80%; height: 100%; transform: translateX(-50%);
  background: radial-gradient(closest-side, hsl(var(--signal) / .2), transparent); pointer-events: none;
}
.final h2 { margin-inline: auto; }
.final p { color: hsl(var(--muted-foreground)); margin: 0 auto 2rem; max-width: 30rem; }
.platforms { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; position: relative; z-index: 1; }

footer { padding: 56px 0 40px; margin-top: 80px; border-top: 1px solid hsl(var(--border)); }
.foot { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; font-size: .85rem; color: hsl(var(--muted-foreground)); }
.foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot a:hover { color: hsl(var(--foreground)); }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* polish (clean writing) */
.polish { margin-top: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; }
.polish-col { padding: clamp(22px, 4vw, 34px); }
.polish-col + .polish-arrow + .polish-col { background: hsl(var(--signal) / .04); border-left: 1px solid hsl(var(--border)); }
.polish-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-bottom: .9rem; }
.polish-label.ok { color: hsl(var(--signal)); }
.polish p { margin: 0; font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.45; letter-spacing: -.015em; }
.polish .raw { color: hsl(var(--muted-foreground)); }
.polish .filler { text-decoration: line-through; text-decoration-color: hsl(0 80% 65% / .8); color: hsl(var(--muted-foreground) / .6); }
.polish .clean { color: hsl(var(--foreground)); font-weight: 500; }
.polish-arrow { display: grid; place-items: center; padding: 0 4px; color: hsl(var(--signal)); }
@media (max-width: 760px) {
  .polish { grid-template-columns: 1fr; }
  .polish-arrow { transform: rotate(90deg); padding: 4px 0; }
  .polish-col + .polish-arrow + .polish-col { border-left: 0; border-top: 1px solid hsl(var(--border)); }
}
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.trio .card { padding: 26px; }
.trio h3 { margin: 20px 0 .35rem; font-size: 1.08rem; letter-spacing: -.02em; font-weight: 600; }
.trio p { margin: 0; color: hsl(var(--muted-foreground)); font-size: .92rem; }
@media (max-width: 860px) { .trio { grid-template-columns: 1fr; } }

/* sub pages */
.page { position: relative; overflow-x: clip; padding: 80px 0 0; min-height: calc(100vh - 64px - 160px); }
.page-head { max-width: 720px; }
.page-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); text-align: left; margin: .8rem 0 1rem; max-width: 18ch; }
.page-head p { color: hsl(var(--muted-foreground)); font-size: 1.08rem; margin: 0; }
.nav-links a.active { color: hsl(var(--foreground)); }

/* form */
.form-card { max-width: 640px; margin-top: 40px; padding: clamp(22px, 4vw, 34px); }
.field { display: grid; gap: .45rem; margin-bottom: 1.15rem; }
.field label { font-size: .875rem; font-weight: 500; }
.input {
  width: 100%; font: inherit; font-size: .95rem; color: hsl(var(--foreground));
  background: hsl(var(--background) / .6); border: 1px solid hsl(var(--input)); border-radius: calc(var(--radius) - 2px);
  padding: .65rem .8rem; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: hsl(var(--muted-foreground) / .7); }
.input:focus { outline: none; border-color: hsl(var(--signal) / .6); box-shadow: 0 0 0 3px hsl(var(--signal) / .15); }
textarea.input { min-height: 150px; resize: vertical; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .4rem; font-size: .8rem; color: hsl(var(--muted-foreground)); }
.success { text-align: center; padding: 28px 8px; }
.success .check { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; color: hsl(var(--signal)); background: hsl(var(--signal) / .1); border: 1px solid hsl(var(--signal) / .3); }
.success h2 { font-size: 1.6rem; margin: 0 auto .5rem; }
.success p { color: hsl(var(--muted-foreground)); margin: 0 auto 1.5rem; max-width: 26rem; }
[hidden] { display: none !important; }

/* prose (privacy) */
.prose { margin-top: 48px; }
.prose h2 { font-size: 1.35rem; letter-spacing: -.02em; margin: 2.4rem 0 .6rem; max-width: none; }
.prose p, .prose li { color: hsl(var(--muted-foreground)); }
.prose p { margin: 0 0 1rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin: .35rem 0; }
.prose strong { color: hsl(var(--foreground)); font-weight: 500; }
.prose a { color: hsl(var(--signal)); }
.narrow { max-width: 720px; margin-inline: auto; }
.tldr { margin-top: 40px; }
.tldr .net { margin: 0; padding: 18px 20px; background: linear-gradient(180deg, hsl(var(--card)), hsl(var(--background))); font-size: .82rem; }
.tldr .net div { padding: 6px 0; border-bottom: 1px dashed hsl(var(--border)); }
.tldr .net div:last-child { border-bottom: 0; }

/* contact layout */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-grid .form-card { margin-top: 0; max-width: none; }
.info-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .icon { flex: none; }
.info-list b { display: block; font-weight: 500; font-size: .95rem; margin-bottom: .15rem; }
.info-list span { color: hsl(var(--muted-foreground)); font-size: .9rem; }
.info-list a { color: hsl(var(--foreground)); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: hsl(var(--muted-foreground) / .5); }
.info-list a:hover { text-decoration-color: hsl(var(--foreground)); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
