/* ══════════════════════════════════════════════
   TOKENS — flat light system, no gradients
══════════════════════════════════════════════ */
:root {
  /* Surfaces */
  --clr-bg: #ffffff;
  --clr-bg-alt: #f4f8fc;
  --clr-bg-deep: #e9f1f9;
  --clr-card: #ffffff;
  --clr-terminal: #10233c;
  --clr-terminal-text: #cfe3f7;

  /* Ink */
  --clr-ink: #0f2038;
  --clr-body: #47617f;
  --clr-muted: #7a91ab;

  /* Brand — solid, single family */
  --clr-brand: #1668c9;
  --clr-brand-dark: #0f4c96;
  --clr-brand-mid: #2b8fdd;
  --clr-brand-soft: #e6f0fb;
  --clr-brand-tint: #f2f7fd;

  /* Lines */
  --clr-border: #dde8f3;
  --clr-border-mid: #c6d9ec;
  --clr-border-strong: #9dc0e2;

  /* Status */
  --clr-ok: #15803d;
  --clr-warn: #b45309;
  --clr-white: #ffffff;

  /* Shadows — flat, soft, no color ramps */
  --shadow-xs: 0 1px 2px rgba(15, 32, 56, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 32, 56, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 32, 56, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 32, 56, 0.10);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --fs-hero: clamp(2.2rem, 8vw, 7.5rem);
  --fs-body: clamp(1rem, 2.5vw, 1.25rem);
  --fs-h2: clamp(1.9rem, 4.6vw, 3.4rem);
  --fs-mega: clamp(3.5rem, 16vw, 15rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;

  --header-h: 66px;
}

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

/* Lenis */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

html {
  -webkit-text-size-adjust: 100%;
  /* `clip`, not `hidden` — `hidden` creates a scroll container that
     breaks ScrollTrigger pinning. */
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-body);
  line-height: 1.6;
  overflow-x: clip;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--clr-brand); color: #fff; }

img { max-width: 100%; display: block; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--clr-brand-dark);
  background: var(--clr-brand-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

h1, h2, h3 { color: var(--clr-ink); }

/* ══════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

.section {
  position: relative;
  padding: clamp(5rem, 11vh, 8.5rem) 0;
  z-index: 2;
}

.section--alt { background: var(--clr-bg-alt); }
.section--line { border-top: 1px solid var(--clr-border); }

.section-header {
  max-width: 660px;
  margin: 0 auto clamp(2.75rem, 6vw, 4rem);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clr-brand);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--clr-brand);
  border-radius: 2px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin-bottom: 14px;
}

.section-header p {
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  color: var(--clr-body);
  line-height: 1.7;
}

/* Flat decorative accents (no gradients) */
.dot-grid {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(var(--clr-border-mid) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  opacity: 0.7;
}

#wave-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--clr-white);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.header.is-stuck {
  border-bottom-color: var(--clr-border);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo — original: plain wordmark, no icon badge */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #2c5ead;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.header-nav { display: flex; align-items: center; gap: 26px; }

.header-nav a {
  color: var(--clr-body);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: color var(--dur) var(--ease-out);
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--clr-brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}

.header-nav a:hover { color: var(--clr-brand); }
.header-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.kofi-header-link img { height: 24px; display: block; }
.kofi-header-link::after { display: none; }

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--clr-brand);
  z-index: 600;
}

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--clr-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--clr-brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: var(--clr-white);
  border-color: var(--clr-border-mid);
  color: var(--clr-ink);
}

.btn-ghost:hover {
  border-color: var(--clr-brand);
  color: var(--clr-brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ══════════════════════════════════════════════
   #hero
══════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(3.5rem, 9vh, 7rem)) 0 clamp(3rem, 7vh, 5rem);
  overflow: hidden;
}

.hero-content {
  max-width: min(1180px, 94vw);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 3;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: var(--radius-full);
  background: var(--clr-brand-soft);
  border: 1px solid var(--clr-border-mid);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--clr-brand-dark);
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clr-brand);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.hero h1 .line { display: block; white-space: nowrap; }
.hero h1 .solid { color: var(--clr-brand); }

.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.6px var(--clr-border-strong);
}

.hero-sub {
  font-size: var(--fs-body);
  color: var(--clr-body);
  max-width: 680px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Latest-release line under the hero CTAs */
.hero-release {
  margin-top: 44px;
  display: flex;
  justify-content: center;
}

.hero-release a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--clr-brand-soft);
  border: 1px solid var(--clr-border-mid);
  color: var(--clr-brand-dark);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

.hero-release a:hover { border-color: var(--clr-brand); background: #dbe9fa; }
.hero-release svg { width: 13px; height: 13px; }
.hero-release-sep { opacity: 0.45; }

/* Release meta under the ending CTAs */
.release-meta {
  margin-top: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--clr-muted);
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: var(--clr-brand-soft);
  border: 1px solid var(--clr-border-mid);
  color: var(--clr-brand-dark);
  font-weight: 700;
}

.release-pill svg { width: 12px; height: 12px; }
.release-sep { opacity: 0.5; }
.release-meta a { color: var(--clr-brand); text-decoration: none; }
.release-meta a:hover { text-decoration: underline; }

.hero-trust {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-size: 12.5px;
  color: var(--clr-muted);
}

.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { width: 14px; height: 14px; color: var(--clr-brand); }

/* ══════════════════════════════════════════════
   #interface — replica of the real desktop app
   Palette sampled directly from the app screenshots.
══════════════════════════════════════════════ */
.app {
  --app-bg: #121212;
  --app-rail: #060606;
  --app-top: #090909;
  --app-surface: #1b1b1b;
  --app-sunken: #090909;
  --app-line: #2d2d2d;
  --app-line-soft: #212121;
  --app-text: #f1f1f1;
  --app-dim: #bcbdbd;
  --app-faint: #7a7a7a;
  --app-accent: #0ab881;
  --app-chip: #212121;
}

.mockup-wrap {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.app-window {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid #262626;
  background: var(--app-bg);
  box-shadow: var(--shadow-lg);
  color: var(--app-text);
  font-size: 13px;
}

/* ── top bar ── */
.app-top {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 18px 0 0;
  background: var(--app-top);
  border-bottom: 1px solid var(--app-line-soft);
}

.app-brand {
  width: 61px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.app-brand span {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f5f4f5;
  color: #0d0d0d;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

.app-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--app-text);
  flex: 1;
  min-width: 0;
}

.app-top-icon {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--app-dim);
  flex-shrink: 0;
}

.app-top-icon svg { width: 17px; height: 17px; }

.app-body { display: flex; min-height: 430px; }

/* ── left rail ── */
.app-rail {
  width: 61px;
  flex-shrink: 0;
  background: var(--app-rail);
  border-right: 1px solid var(--app-line-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 14px;
  gap: 10px;
}

.rail-btn {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #8b8b8b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.rail-btn svg { width: 18px; height: 18px; }
.rail-btn:hover { color: var(--app-text); background: #171717; }
.rail-btn.active { color: var(--app-text); background: var(--app-chip); }
.rail-btn.is-last { margin-top: auto; }

/* ── main pane ── */
.app-main {
  flex: 1;
  min-width: 0;
  padding: 26px 30px 30px;
  text-align: left;
  overflow: hidden;
}

.app-h1 {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--app-text);
  margin-bottom: 6px;
}

.app-sub { font-size: 12.5px; color: #9a9a9a; }

.app-rule {
  height: 1px;
  background: var(--app-line-soft);
  margin: 18px 0 16px;
}

/* segmented tabs */
.app-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 11px;
  border: 1px solid var(--app-line);
  background: var(--app-bg);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.app-tab {
  flex: 1;
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #9c9c9c;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.app-tab svg { width: 14px; height: 14px; }
.app-tab:hover { color: var(--app-text); }
.app-tab.active { background: var(--app-surface); color: var(--app-text); }

/* panels */
.app-panel { display: none; }
.app-panel.active { display: block; }

/* link cards row */
.app-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.app-link-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-radius: 11px;
  border: 1px solid var(--app-line);
  background: var(--app-bg);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.app-link-card:hover { border-color: #3d3d3d; background: #161616; }
.app-link-card h4 { font-size: 13.5px; font-weight: 700; color: var(--app-text); margin-bottom: 4px; }
.app-link-card p { font-size: 12px; color: #8f8f8f; line-height: 1.5; }
.app-link-card .arrow { color: #8f8f8f; flex-shrink: 0; }
.app-link-card .arrow svg { width: 14px; height: 14px; }

/* generic card */
.app-card {
  border-radius: 11px;
  border: 1px solid var(--app-line);
  background: var(--app-bg);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.app-card:last-child { margin-bottom: 0; }

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.app-card h4 { font-size: 14px; font-weight: 700; color: var(--app-text); margin-bottom: 5px; }
.app-card .muted { font-size: 12.5px; color: #8f8f8f; line-height: 1.55; }

.app-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--app-accent);
}

.app-status i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--app-accent);
  display: block;
}

.app-field {
  display: flex;
  align-items: stretch;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--app-line);
  min-width: 0;
}

.app-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  background: var(--app-sunken);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--app-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-btn {
  padding: 11px 16px;
  background: var(--app-bg);
  border: none;
  border-left: 1px solid var(--app-line);
  color: var(--app-text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease;
}

.app-btn:hover { background: #242424; }

/* setting rows */
.app-row {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--app-line-soft);
}

.app-row:first-of-type { border-top: none; }
.app-row h5 { font-size: 13px; font-weight: 700; color: var(--app-text); margin-bottom: 3px; }
.app-row p { font-size: 11.5px; color: #8a8a8a; line-height: 1.5; }

.app-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 9px;
  background: var(--app-surface);
  border: 1px solid #2a2a2a;
  color: var(--app-text);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.18s ease;
}

.app-select:hover { border-color: #3d3d3d; }
.app-select svg { width: 13px; height: 13px; color: #8f8f8f; flex-shrink: 0; }

/* console / logs */
.app-console {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  background: var(--app-sunken);
  border: 1px solid var(--app-line);
  border-radius: 9px;
  padding: 15px 16px;
  color: #b9c6bf;
  min-height: 150px;
}

.app-console .cursor {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--app-accent);
  margin-left: 3px;
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* meters (GPU panel) */
.app-meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #9a9a9a;
  margin-bottom: 7px;
}

.app-meter-label b { color: var(--app-text); font-family: var(--font-mono); font-weight: 700; }

.app-meter {
  height: 6px;
  border-radius: 6px;
  background: #242424;
  overflow: hidden;
  margin-bottom: 16px;
}

.app-meter span {
  display: block;
  height: 100%;
  background: var(--app-accent);
  border-radius: 6px;
}

/* waveform */
.app-wave {
  height: 62px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 9px 11px;
  background: var(--app-sunken);
  border: 1px solid var(--app-line);
  border-radius: 9px;
  margin-bottom: 14px;
}

.v-bar {
  flex: 1;
  height: 18%;
  border-radius: 2px;
  background: var(--app-accent);
  opacity: 0.5;
  transition: height 0.14s ease, opacity 0.14s ease;
}

/* ── page system: rail icons switch whole pages ── */
.app-page { display: none; }
.app-page.active { display: block; }

/* main pane is #090909; cards sit at #121212 (sampled from app) */
.app-main { background: #090909; }

.app-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8e8e8a;
  margin-bottom: 10px;
  display: block;
}

/* Text-to-Speech page */
.tts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.tts-area {
  border-radius: 12px;
  background: var(--app-bg);
  border: 1px solid #1e1e1e;
  padding: 18px 20px;
  min-height: 268px;
  font-size: 14px;
  color: #6f6f6f;
  line-height: 1.6;
}

.tts-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tts-side-head .app-label { margin-bottom: 0; }

.tts-manage {
  font-size: 12px;
  font-weight: 700;
  color: var(--app-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.tts-manage:hover { color: var(--app-accent); }

.tts-rule { height: 1px; background: #232323; margin-bottom: 10px; }

.tts-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--app-bg);
  border: 1px solid #1e1e1e;
  color: var(--app-text);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 22px;
  transition: border-color 0.18s ease;
}

.tts-pick:hover { border-color: #3a3a3a; }
.tts-pick svg { width: 14px; height: 14px; color: #9a9a9a; flex-shrink: 0; }

.tts-speed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tts-speed-head b { font-size: 13px; color: var(--app-text); }

.tts-slider-box {
  padding: 18px 18px;
  border-radius: 10px;
  background: var(--app-bg);
  border: 1px solid #1e1e1e;
}

.tts-track {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: #1b1b1b;
}

.tts-knob {
  position: absolute;
  top: 50%;
  left: 32%;
  width: 15px; height: 15px;
  margin: -7.5px 0 0 -7.5px;
  border-radius: 50%;
  background: #ededed;
}

.tts-cta {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.tts-generate {
  padding: 13px 30px;
  border-radius: 999px;
  background: #666666;
  border: none;
  color: #f4f4f4;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease;
}

.tts-generate:hover { background: #767676; }

/* Models / Engines / History list rows */
.app-list { display: flex; flex-direction: column; gap: 10px; }

.app-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border-radius: 11px;
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  transition: border-color 0.18s ease;
}

.app-item:hover { border-color: #3a3a3a; }

.app-item-ico {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--app-chip);
  color: var(--app-dim);
}

.app-item-ico svg { width: 16px; height: 16px; }
.app-item-main { flex: 1; min-width: 0; }
.app-item h5 { font-size: 13.5px; font-weight: 700; color: var(--app-text); margin-bottom: 3px; }
.app-item p { font-size: 11.5px; color: #8a8a8a; }

.app-chip {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--app-chip);
  color: #9a9a9a;
}

.app-chip.on { color: var(--app-accent); }

/* footer strip */
.app-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--app-line-soft);
  flex-wrap: wrap;
}

.app-foot .left { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: #9a9a9a; }
.app-foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--app-accent); }
.app-foot .right { font-family: var(--font-mono); font-size: 11px; color: #7a7a7a; }

.app-run {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 9px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  color: var(--app-text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.app-run svg { width: 13px; height: 13px; }
.app-run:hover { background: #242424; border-color: #3d3d3d; }

/* ══════════════════════════════════════════════
   MARQUEE
══════════════════════════════════════════════ */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 13px 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-white);
}

.marquee-inner { display: flex; width: max-content; will-change: transform; }

.marquee-group {
  display: flex;
  align-items: center;
  gap: 38px;
  padding-right: 38px;
}

.marquee-group span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-body);
}

.marquee-group span svg { width: 14px; height: 14px; color: var(--clr-brand); flex-shrink: 0; }

/* ══════════════════════════════════════════════
   #how-it-works — pinned
══════════════════════════════════════════════ */
.pin-stage {
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.pin-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
  width: 100%;
}

.pin-left h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.pin-left p {
  color: var(--clr-body);
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  max-width: 440px;
  margin-bottom: 26px;
}

.pin-progress {
  display: block;
  width: 100%;
  max-width: 300px;
  height: 3px;
  background: var(--clr-border);
  border-radius: 3px;
  overflow: hidden;
}

.pin-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--clr-brand);
}

.pin-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--clr-muted);
  margin-top: 12px;
  text-transform: uppercase;
}

.pin-right { display: flex; flex-direction: column; gap: 14px; }

.step-card {
  display: flex;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.step-card:hover { border-color: var(--clr-border-strong); box-shadow: var(--shadow-md); }

.step-number {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--clr-brand-soft);
  border: 1px solid var(--clr-border-mid);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--clr-brand);
}

.step-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.step-card p { font-size: 14px; color: var(--clr-body); line-height: 1.65; margin: 0; }

/* ══════════════════════════════════════════════
   #stats
══════════════════════════════════════════════ */
.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.counter-card {
  padding: 30px 24px;
  border-radius: var(--radius-lg);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  text-align: center;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.counter-card:hover {
  border-color: var(--clr-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.counter-value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--clr-brand);
}

.counter-suffix { font-size: 0.55em; }

.counter-label {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-muted);
}

/* ══════════════════════════════════════════════
   #engines
══════════════════════════════════════════════ */
.engine-filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 38px;
}

.engine-filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--clr-body);
  background: var(--clr-white);
  border: 1px solid var(--clr-border-mid);
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
}

.engine-filter-btn:hover { border-color: var(--clr-brand); color: var(--clr-brand); }

.engine-filter-btn.active {
  background: var(--clr-brand);
  color: #fff;
  border-color: var(--clr-brand);
}

.engines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.engine-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.engine-card:hover {
  border-color: var(--clr-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.engine-card.hidden { display: none; }

.engine-icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--clr-brand-soft);
  border: 1px solid var(--clr-border-mid);
  color: var(--clr-brand);
  margin-bottom: 16px;
}

.engine-icon svg { width: 20px; height: 20px; }

.engine-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-brand);
  margin-bottom: 8px;
}

.engine-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 7px; letter-spacing: -0.01em; }
.engine-card p { font-size: 13.6px; color: var(--clr-body); line-height: 1.7; }

/* ══════════════════════════════════════════════
   PARALLAX TYPE — #privacy / #voice-cloning
══════════════════════════════════════════════ */
.parallax-section {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  z-index: 2;
  background: var(--clr-bg-alt);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.px-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  will-change: transform;
}

.px-bg {
  font-family: var(--font-display);
  font-size: var(--fs-mega);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--clr-border-mid);
  white-space: nowrap;
  user-select: none;
}

.px-fg {
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 1.4vw, 0.9rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--clr-muted);
  align-content: end;
  padding-bottom: 11vh;
}

.px-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 860px;
  padding: 0 32px;
  will-change: transform;
}

.px-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6.6vw, 5rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--clr-ink);
  text-wrap: balance;
}

.px-content h2 .word { white-space: nowrap; }

.px-content p {
  font-size: var(--fs-body);
  color: var(--clr-body);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════
   #pricing
══════════════════════════════════════════════ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 840px;
  margin: 0 auto;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.pricing-card:hover { border-color: var(--clr-border-strong); box-shadow: var(--shadow-md); }
.pricing-card.highlight { border-color: var(--clr-brand); border-width: 2px; padding: 31px 27px; }

.pricing-tier {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-brand);
  margin-bottom: 14px;
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--clr-ink);
  margin-bottom: 5px;
}

.pricing-duration { font-size: 13px; color: var(--clr-muted); margin-bottom: 24px; }

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--clr-body);
}

.pricing-features li svg { width: 16px; height: 16px; color: var(--clr-brand); flex-shrink: 0; }

.pricing-card > p { font-size: 13.5px; color: var(--clr-body); margin-bottom: 24px; flex: 1; }

/* ══════════════════════════════════════════════
   #faq
══════════════════════════════════════════════ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border-radius: var(--radius-md);
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out);
}

.faq-item:hover { border-color: var(--clr-border-strong); }
.faq-item.open { border-color: var(--clr-brand); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  color: var(--clr-ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-question svg {
  width: 18px; height: 18px;
  color: var(--clr-brand);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}

.faq-item.open .faq-question svg { transform: rotate(180deg); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease-out); }
.faq-item.open .faq-answer { max-height: 320px; }

.faq-answer-inner {
  padding: 0 22px 18px;
  font-size: 13.6px;
  color: var(--clr-body);
  line-height: 1.75;
}

/* ══════════════════════════════════════════════
   #download — ending
══════════════════════════════════════════════ */
.ending {
  position: relative;
  padding: clamp(5rem, 13vh, 9rem) 0;
  text-align: center;
  overflow: hidden;
  background: var(--clr-bg-alt);
  border-top: 1px solid var(--clr-border);
  z-index: 2;
}

.ending-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

.ending-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 38vmax; height: 38vmax;
  margin: -19vmax 0 0 -19vmax;
  border-radius: 50%;
  border: 1px solid var(--clr-border-mid);
  pointer-events: none;
}

.ending-ring.r2 { width: 56vmax; height: 56vmax; margin: -28vmax 0 0 -28vmax; }
.ending-ring.r3 { width: 76vmax; height: 76vmax; margin: -38vmax 0 0 -38vmax; }

.ending-content { position: relative; z-index: 4; padding: 0 32px; max-width: 860px; margin: 0 auto; }

.ending-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 5.4rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--clr-ink);
  text-wrap: balance;
}

.ending-content h2 .word { white-space: nowrap; }
/* chars are transformed, never re-laid-out, so the headline can't reflow */
.ending-content h2 .char { display: inline-block; will-change: transform, opacity; }

.ending-content > p {
  font-size: var(--fs-body);
  color: var(--clr-body);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Honest pre-release note, placed where it matters: before download */
.dev-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 620px;
  margin: 40px auto 0;
  padding: 13px 18px;
  text-align: left;
  border-radius: var(--radius-md);
  background: var(--clr-white);
  border: 1px solid var(--clr-border-mid);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--clr-body);
}

.dev-note svg { width: 15px; height: 15px; color: var(--clr-warn); flex-shrink: 0; margin-top: 2px; }
.dev-note strong { color: var(--clr-ink); }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--clr-border);
  padding: 34px 0;
  background: var(--clr-white);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-left span { font-family: var(--font-mono); font-size: 12.5px; color: var(--clr-muted); }

.footer-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.footer-right a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--clr-body);
  text-decoration: none;
  font-size: 13.5px;
  transition: color var(--dur) var(--ease-out);
}

.footer-right a:hover { color: var(--clr-brand); }
.footer-right svg { width: 15px; height: 15px; }

/* Floating Home Button — original styling, unchanged */
.floating-home-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.2s ease;
  cursor: pointer;
  padding: 0.25rem;
}

.floating-home-btn:hover {
  transform: translateY(-4px) scale(1.08);
}

.floating-home-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .counter-grid { grid-template-columns: repeat(2, 1fr); }
  .engines-grid { grid-template-columns: repeat(2, 1fr); }
  .pin-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .pin-stage { min-height: auto; padding: 6rem 0; }
}

@media (max-width: 860px) {
  .header-nav { gap: 16px; }
  .header-nav a:not(.kofi-header-link):not(.nav-cta) { display: none; }
}

@media (max-width: 900px) {
  .tts-grid { grid-template-columns: 1fr; gap: 22px; }
  .tts-area { min-height: 150px; }
  .app-links { grid-template-columns: 1fr; }
  .app-row { grid-template-columns: 1fr; gap: 10px; align-items: stretch; }
  .app-card-head { flex-direction: column; align-items: stretch; }
  .app-card-head > div:last-child { align-items: stretch !important; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .engines-grid, .pricing-grid { grid-template-columns: 1fr; }

  /* app replica → stack the rail on top */
  .app-body { flex-direction: column; }
  .app-rail {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    padding: 9px 12px;
    gap: 6px;
    border-right: none;
    border-bottom: 1px solid var(--app-line-soft);
  }
  .rail-btn.is-last { margin-top: 0; margin-left: auto; }
  .app-main { padding: 20px 16px 22px; }
  .app-tab { min-width: 0; flex: 1 1 44%; }
  .app-field { flex-direction: column; }
  .app-btn { border-left: none; border-top: 1px solid var(--app-line); }
  .app-h1 { font-size: 18px; }
}

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