/* =========================================================================
   Cosette — English, Urdu & Hindi Text-to-Speech. Design system.
   Light theme by default; dark theme via [data-theme="dark"].
   ========================================================================= */
:root {
  --brand-50: #eef4ff;
  --brand-100: #dbe6ff;
  --brand-200: #bccfff;
  --brand-300: #92acff;
  --brand-400: #6580fb;
  --brand-500: #4259f0;
  --brand-600: #2f3fd6;
  --brand-700: #2733ad;
  --accent: #14b8a6;
  --accent-600: #0d9488;

  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-softer: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --border: #e6ebf3;
  --border-strong: #d3dbe8;

  --text: #0f172a;
  --text-soft: #475569;
  --text-mute: #6b7892;
  --heading: #0b1220;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 6px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
  --ring: 0 0 0 4px rgba(66, 89, 240, .15);

  --radius: 14px;
  --radius-lg: 22px;
  --container: 1200px;
  --header-h: 70px;

  --grad-hero: radial-gradient(1200px 600px at 80% -10%, #e7edff 0%, rgba(231, 237, 255, 0) 60%),
               radial-gradient(900px 500px at 0% 0%, #e6fbf6 0%, rgba(230, 251, 246, 0) 55%);
  --grad-brand: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  --grad-accent: linear-gradient(135deg, #5b8cff, #14b8a6);
}

[data-theme="dark"] {
  --bg: #0b1020;
  --bg-soft: #0e1426;
  --bg-softer: #111a31;
  --surface: #121a2e;
  --surface-2: #0f1729;
  --border: #1e2940;
  --border-strong: #2a3a5c;

  --text: #e7ecf6;
  --text-soft: #aeb9cf;
  --text-mute: #8896b3;
  --heading: #f2f5fb;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --ring: 0 0 0 4px rgba(101, 128, 251, .25);

  --grad-hero: radial-gradient(1200px 600px at 80% -10%, #16224a 0%, rgba(22, 34, 74, 0) 60%),
               radial-gradient(900px 500px at 0% 0%, #0c2a2a 0%, rgba(12, 42, 42, 0) 55%);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans Devanagari', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}

h1, h2, h3, h4 { color: var(--heading); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1rem; color: var(--text-soft); }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(56px, 8vw, 110px) 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-600);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
[data-theme="dark"] .eyebrow { background: rgba(101,128,251,.12); border-color: rgba(101,128,251,.25); color: var(--brand-300); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 1.08rem; }
.lead { font-size: 1.15rem; color: var(--text-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font-weight: 700; font-size: 1rem; border-radius: 12px; cursor: pointer;
  padding: 13px 22px; border: 1px solid transparent; transition: all .2s ease;
  white-space: nowrap; line-height: 1;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--brand-400); transform: translateY(-2px); }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.2rem; color: var(--heading); letter-spacing: -.03em; }
.brand img { width: 32px; height: 32px; }
.brand span b { color: var(--brand-600); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { position: relative; color: var(--text-soft); font-weight: 600; font-size: .98rem; transition: color .2s ease; }
.nav-links a:hover { color: var(--brand-600); }
.nav-links a.active { color: var(--brand-600); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  background: var(--grad-brand); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 11px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  transition: all .2s ease;
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--brand-400); color: var(--brand-600); }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: inline; }
.nav-toggle { display: none; }

/* Hero */
.hero { position: relative; padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); background: var(--grad-hero); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero h1 .grad { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero-trust { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--text-mute); font-size: .92rem; }
.stars { color: #f5a623; letter-spacing: 2px; }

.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 600;
  color: var(--text-soft); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 13px; box-shadow: var(--shadow-sm);
}
.badge svg { color: var(--accent-600); }

/* Demo card */
.demo-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px;
}
.demo-card h3 { display: flex; align-items: center; gap: 8px; }
.demo-card textarea {
  width: 100%; min-height: 120px; resize: vertical; border-radius: 12px; padding: 14px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 1rem; line-height: 1.6;
}
.demo-card textarea:focus { outline: none; border-color: var(--brand-400); box-shadow: var(--ring); }
.demo-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.field label { display: block; font-size: .82rem; font-weight: 700; color: var(--text-mute); margin-bottom: 6px; }
.field select, .field input[type="range"] { width: 100%; }
.field select {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: .95rem;
}
input[type="range"] { accent-color: var(--brand-500); }
.demo-actions { display: flex; gap: 10px; }
.demo-note { font-size: .82rem; color: var(--text-mute); margin: 12px 0 0; }

/* ---------- Live player (top bar, outside the text box) ---------- */
.demo-wrap { display: flex; flex-direction: column; gap: 14px; }
.player { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 16px 18px 12px; box-shadow: var(--shadow-sm); }
.player-voice { position: relative; display: flex; margin-right: 12px; }
.player-top { display: flex; align-items: center; gap: 10px; }
.ptime { font-size: .75rem; font-weight: 700; color: var(--text-mute); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.player-bar { display: flex; align-items: center; justify-content: center; gap: 12px; position: relative; margin-top: 14px; }
.player-avatar {
  width: 46px; height: 46px; border-radius: 50%; overflow: visible; flex: none;
  border: none; background: none; padding: 0; cursor: pointer; position: relative;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ring, var(--brand-400));
  transition: transform .15s ease;
}
.player-avatar:hover { transform: scale(1.06); }
.player-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.player-avatar::after {
  content: ""; position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--brand-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") center/12px no-repeat;
  box-shadow: 0 0 0 2px var(--surface);
}
/* Hover: dim avatar + show change icon */
.avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .5); color: #fff; opacity: 0; transition: opacity .15s ease;
}
.avatar-overlay svg { width: 18px; height: 18px; }
.player-avatar:hover .avatar-overlay { opacity: 1; }
/* Hover: "Change" tooltip above the avatar */
.avatar-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: var(--text); color: var(--surface); font-size: .72rem; font-weight: 800;
  padding: 4px 9px; border-radius: 8px; opacity: 0; pointer-events: none; z-index: 50;
  transition: opacity .15s ease, transform .15s ease;
}
.avatar-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--text);
}
.player-avatar:hover .avatar-tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Voice picker dropdown — one row each: avatar + name + description */
.voice-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 40;
  display: flex; flex-direction: column; gap: 2px;
  width: 300px; max-height: 360px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; box-shadow: var(--shadow); padding: 8px;
  animation: vm-pop .16s ease;
}
.voice-menu[hidden] { display: none !important; }
@keyframes vm-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.vm-item {
  display: flex; flex-direction: row; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: none; background: none; cursor: pointer; padding: 8px 10px; border-radius: 12px;
  color: var(--text); transition: background .15s ease;
}
.vm-item:hover { background: var(--bg-softer); }
.vm-item.active { background: rgba(66, 89, 240, .12); }
.vm-av {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ring, var(--brand-400));
}
.vm-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vm-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.vm-meta b { font-size: .92rem; }
.vm-meta small { color: var(--text-mute); font-size: .76rem; }
.vm-item.active .vm-meta b { color: var(--brand-600); }
.pbtn {
  width: 40px; height: 40px; border-radius: 50%; flex: none; cursor: pointer;
  display: grid; place-items: center; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-mute); transition: all .18s ease;
}
.pbtn svg { width: 20px; height: 20px; }
.pbtn:hover { border-color: var(--brand-400); color: var(--brand-600); transform: translateY(-1px); }
.pbtn-main { width: 52px; height: 52px; border: none; background: var(--brand-500); color: #fff; box-shadow: var(--shadow-sm); }
.pbtn-main svg { width: 26px; height: 26px; }
.pbtn-main:hover { background: var(--brand-600); color: #fff; }
.pbtn-speed { width: auto; padding: 0 12px; font-weight: 800; font-size: .82rem; border-radius: 999px; }

/* Three-dots (kebab) menu */
.pmenu-wrap { position: absolute; right: 0; }
.pmenu-wrap a[hidden] { display: none; }
.pmenu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 45;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 12px;
  max-width: min(92vw, 372px);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; box-shadow: var(--shadow); animation: vm-pop .16s ease;
}
.pmenu[hidden], .pfilter[hidden] { display: none !important; }
.pmenu-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 86px; padding: 10px 6px; border: none; background: none; cursor: pointer;
  border-radius: 12px; color: var(--text); transition: background .15s ease;
}
.pmenu-item:hover { background: var(--bg-softer); }
.pmenu-ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--bg-softer); border: 1px solid var(--border); color: var(--text);
}
.pmenu-ic svg { width: 24px; height: 24px; }
.pmenu-item:hover .pmenu-ic { border-color: var(--brand-400); color: var(--brand-600); }
.pmenu-lbl { font-size: .8rem; font-weight: 600; }
.pmenu-item.disabled { opacity: .45; pointer-events: none; }
.pmenu-tag {
  font-size: .64rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4;
  padding: 1px 8px; border-radius: 999px;
  background: var(--bg-softer); color: var(--muted); border: 1px solid var(--border);
}
.pmenu-item[aria-checked="true"] .pmenu-tag {
  background: color-mix(in srgb, var(--brand-500) 16%, transparent);
  color: var(--brand-600); border-color: var(--brand-400);
}
.pmenu-item[aria-checked="true"] .pmenu-ic { border-color: var(--brand-400); color: var(--brand-600); }

/* Text Filter panel */
.pfilter {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 46; width: 268px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; animation: vm-pop .16s ease;
  text-align: left;
}
.pfilter-h { margin: 0 0 8px; font-weight: 800; font-size: .82rem; color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.pfilter-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; font-size: .92rem; color: var(--text); }
.pfilter-row input { width: 17px; height: 17px; accent-color: var(--brand-500); cursor: pointer; flex: none; }
.pfilter-note { margin: 8px 0 0; font-size: .76rem; color: var(--text-mute); }
.player-progress { flex: 1; height: 7px; border-radius: 999px; background: var(--bg-softer); cursor: pointer; overflow: hidden; }
.player-progress-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); transition: width .1s linear; }
.player-caption { text-align: center; font-weight: 700; font-size: .86rem; color: var(--text-mute); margin-top: 10px; }
/* Editable text + in-place highlighting */
.reader {
  margin-top: 14px; min-height: 180px; max-height: 360px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  padding: 16px 18px; font-size: 1.06rem; line-height: 2; color: var(--text);
  outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.reader:focus { border-color: var(--brand-400); box-shadow: var(--ring); }
.reader p { margin: 0 0 12px; }
.reader p:last-child { margin-bottom: 0; }
.reader .para {
  margin: 0 0 12px; padding: 8px 10px; border-radius: 12px;
  transition: background .25s ease;
}
.reader .para:last-child { margin-bottom: 0; }
.reader .para.para-active { background: var(--bg-softer); }
.reader .sent {
  display: inline; border-radius: 6px; padding: 2px 3px; cursor: pointer;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background .2s ease, color .2s ease;
}
.reader .sent:hover { background: rgba(66, 89, 240, .12); }
.reader .sent.active { background: var(--brand-500); color: #fff; font-weight: 600; }

/* Loading state on the play button while generating */
.player.loading .pbtn-main { pointer-events: none; opacity: .65; }
.player.loading .pbtn-main svg { animation: va-spin 1s linear infinite; }
@keyframes va-spin { to { transform: rotate(360deg); } }
.title-ic { width: 22px; height: 22px; color: var(--brand-500); flex: none; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { text-align: center; padding: 26px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat .num { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 900; color: var(--brand-600); letter-spacing: -.03em; }
.stat .label { color: var(--text-mute); font-weight: 600; font-size: .95rem; }

/* Cards grid */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card .ico {
  width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-600); margin-bottom: 16px;
}
[data-theme="dark"] .card .ico { background: rgba(101,128,251,.12); color: var(--brand-300); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .98rem; }

/* Voice gallery */
.voice-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.voice-tab {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft);
  padding: 9px 18px; border-radius: 999px; font-weight: 700; cursor: pointer; font-size: .92rem; transition: all .2s ease;
}
.voice-tab.active { background: var(--grad-brand); color: #fff; border-color: transparent; }
.voices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.voice {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.voice:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.voice-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 1.25rem; flex: none; overflow: hidden; position: relative; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ring, var(--brand-400)); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.avatar-fallback { box-shadow: none; }
.voice h3 { margin: 0; font-size: 1.12rem; }
.voice .role { color: var(--text-mute); font-size: .86rem; font-weight: 600; }
.voice .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; }
.tag { font-size: .72rem; font-weight: 700; color: var(--text-soft); background: var(--bg-softer); border-radius: 6px; padding: 3px 8px; }
.voice .play {
  display: inline-flex; align-items: center; gap: 9px; width: 100%; justify-content: center;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  border-radius: 11px; padding: 11px; font-weight: 700; cursor: pointer; transition: all .2s ease;
}
.voice .play:hover { border-color: var(--brand-400); color: var(--brand-600); }
.voice .play.playing { background: var(--grad-brand); color: #fff; border-color: transparent; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow-sm); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; left: 26px; width: 40px; height: 40px; border-radius: 11px;
  background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow);
}
.step h3 { margin-top: 8px; }

/* Use cases */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.use { display: flex; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.use .ico { color: var(--accent-600); flex: none; }
.use h4 { margin: 0 0 4px; font-size: 1.02rem; color: var(--heading); }
.use p { margin: 0; font-size: .92rem; }

/* Testimonials */
.testi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.quote .stars { margin-bottom: 12px; }
.quote p { font-size: 1rem; color: var(--text); }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; }
.quote .who .avatar { width: 44px; height: 44px; font-size: 1.05rem; }
.quote .who b { display: block; color: var(--heading); font-size: .96rem; }
.quote .who span { color: var(--text-mute); font-size: .85rem; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; padding: 4px 20px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--heading); padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--brand-500); transition: transform .2s ease; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 18px; margin: 0; }

/* CTA banner */
.cta-band { background: var(--grad-brand); border-radius: var(--radius-lg); padding: clamp(36px, 5vw, 64px); text-align: center; color: #fff; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 640px; margin: 0 auto 26px; font-size: 1.1rem; }
.cta-band .btn-primary { background: #fff; color: var(--brand-700); }
.cta-band .btn-primary:hover { color: var(--brand-700); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; }
.contact-info li { display: flex; gap: 14px; align-items: flex-start; list-style: none; margin-bottom: 22px; }
.contact-info .ico { width: 44px; height: 44px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex: none; }
[data-theme="dark"] .contact-info .ico { background: rgba(101,128,251,.12); color: var(--brand-300); }
.contact-info b { color: var(--heading); display: block; }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .field { margin-bottom: 16px; }
.form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 7px; color: var(--text); }
.form input, .form textarea, .form select {
  width: 100%; padding: 13px 14px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 1rem;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--brand-400); box-shadow: var(--ring); }
.form textarea { min-height: 130px; resize: vertical; }
.form-msg { margin-top: 14px; padding: 12px 16px; border-radius: 11px; font-weight: 600; display: none; }
.form-msg.ok { display: block; background: #e7f9f1; color: #0a7d52; border: 1px solid #b6ecd4; }
.form-msg.err { display: block; background: #fdeaea; color: #b42318; border: 1px solid #f6c9c4; }

/* Footer */
.site-footer { background: var(--bg-softer); border-top: 1px solid var(--border); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 36px; }
.footer-grid h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-soft); font-weight: 500; }
.footer-grid a:hover { color: var(--brand-600); }
.footer-about p { font-size: .95rem; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-mute); font-size: .9rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal a { color: var(--text-mute); font-weight: 500; }
.footer-legal a:hover { color: var(--brand-600); }

/* Legal / content pages (privacy, terms, etc.) */
.legal { max-width: 820px; margin-inline: auto; }
.legal .eyebrow { margin-bottom: 18px; }
.legal h1 { margin-bottom: .3em; }
.legal .legal-updated { color: var(--text-mute); font-size: .92rem; margin-bottom: 2.4em; }
.legal h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-top: 1.9em; }
.legal h3 { margin-top: 1.4em; }
.legal ul, .legal ol { padding-left: 1.4em; margin: 0 0 1.1rem; }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal li { margin-bottom: .5em; color: var(--text-soft); }
.legal a { text-decoration: underline; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Skip link / a11y */
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand-600); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .lead { max-width: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links, .nav .desktop-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px 22px; gap: 16px; box-shadow: var(--shadow);
  }
  .grid-3, .grid-2, .voices-grid, .steps, .uses, .testi, .stats { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-3, .grid-2, .voices-grid, .steps, .uses, .testi, .stats, .demo-controls, .form-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn, .demo-actions .btn { width: 100%; }
  .demo-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
