/* carvoice.app: one stylesheet, system fonts, light and dark. Colours follow the app's brand
   (indigo #3949AB, teal #00897B); every text colour meets WCAG 2.2 AA on its background. */

:root {
  color-scheme: light dark;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #edeef5;
  --text: #1a1b21;
  --muted: #46464f;
  --border: #d6d7e1;
  --primary: #3949ab;
  --on-primary: #ffffff;
  --link: #2f3c99;
  --accent: #00695c;
  --code-bg: #eceef6;
  --focus: #3949ab;
  --note-bg: #fff4e0;
  --note-border: #9a5b00;
  --hero-from: #e8eaff;
  --hero-to: #dff5f0;
  --shadow: 0 1px 2px rgba(26, 27, 33, 0.06), 0 8px 24px rgba(26, 27, 33, 0.06);
  --shadow-lift: 0 2px 6px rgba(26, 27, 33, 0.08), 0 28px 64px -16px rgba(40, 50, 120, 0.38);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1d1f25;
    --surface-2: #262830;
    --text: #e3e2e9;
    --muted: #c7c5d0;
    --border: #3a3c45;
    --primary: #bac3ff;
    --on-primary: #08218a;
    --link: #bac3ff;
    --accent: #7fdac6;
    --code-bg: #24262e;
    --focus: #bac3ff;
    --note-bg: #2e2416;
    --note-border: #ffb960;
    --hero-from: #1b1f3a;
    --hero-to: #0f2a27;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.5), 0 28px 64px -16px rgba(0, 0, 0, 0.7);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; outline: none; }

img { max-width: 100%; height: auto; }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

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

/* ------------------------------------------------------------------ header, footer */
.bar { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  min-height: 44px;
}
.brand img { width: 32px; height: 32px; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 0.25rem 0.25rem; margin: 0; padding: 0; list-style: none; }
.site-header nav a {
  display: inline-block;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  line-height: 1.6;
}
.site-header nav a:hover { color: var(--text); background: var(--surface-2); }
.site-header nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .bar { padding-top: 1.5rem; padding-bottom: 2rem; }
.site-footer p { margin: 0.35rem 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ------------------------------------------------------------------ layout */
main.narrow { width: 100%; max-width: 48rem; margin: 0 auto; padding: 2rem 1.25rem 0; }
main.wide { width: 100%; }

.section { max-width: 72rem; margin: 0 auto; padding: 3rem 1.25rem 0; }
.section > h2 { margin-top: 0; }

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.9rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.85rem); margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
h4 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }

/* ------------------------------------------------------------------ buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--primary); color: var(--on-primary); }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--link); border-color: var(--border); }
.button.secondary:hover { border-color: var(--link); }
.button[hidden] { display: none; }

/* ------------------------------------------------------------------ home */
main.wide .section > h2 { text-align: center; margin-bottom: 1.25rem; }

.hero { text-align: center; }
/* The gradient fades into the plain page colour, so the Google Play badge below sits on a solid background. */
.hero-copy {
  padding: 3rem 1.25rem 2rem;
  background:
    linear-gradient(to bottom, transparent 45%, var(--bg)),
    radial-gradient(48rem 26rem at 10% -10%, var(--hero-from), transparent 70%),
    radial-gradient(44rem 24rem at 95% 0%, var(--hero-to), transparent 70%),
    var(--bg);
}
.hero-copy > * { max-width: 46rem; margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}
.hero h1 {
  font-size: clamp(2.1rem, 1.45rem + 3.2vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 16em;
  text-wrap: balance;
}
.lead {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  color: var(--muted);
  text-wrap: balance;
}

.hero-cta { padding: 0 1.25rem 2rem; background: var(--bg); }
.availability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
}
/* Google's badge guidelines: at least 28 px high, clear space of a quarter of its height on every side,
   the artwork unchanged. The padding is that clear space; nothing else is drawn inside it. */
.play-badge { --badge-h: 56px; display: inline-block; padding: calc(var(--badge-h) / 4); line-height: 0; border-radius: 12px; }
.play-badge img { display: block; height: var(--badge-h); width: auto; }
.soon-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.3rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.cta-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.75rem; margin: 0.25rem 0 0; }
.arrow-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
  text-decoration: none;
}
.arrow-link::after {
  content: "\2192";
  content: "\2192" / "";
  margin-left: 0.4rem;
  transition: transform 0.15s ease;
}
.arrow-link:hover::after { transform: translateX(3px); }
.arrow-link:hover { text-decoration: underline; }
.price-line { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; text-wrap: balance; }

.promo { padding: 0 1.25rem; }
.promo-card { max-width: 62rem; margin: 0 auto; }
.promo-card video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #0b0d12;
  box-shadow: var(--shadow-lift);
}
.promo-card figcaption { margin-top: 0.8rem; text-align: center; color: var(--muted); font-size: 0.85rem; }

.benefits {
  display: grid;
  gap: 1.75rem;
  max-width: 62rem;
  margin: 0.5rem auto 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.benefit-icon {
  box-sizing: content-box;
  width: 28px;
  height: 28px;
  padding: 14px;
  border-radius: 16px;
  color: var(--primary);
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
}
.benefits h3 { margin: 0.85rem 0 0.25rem; font-size: 1.15rem; }
.benefits p { margin: 0 auto; max-width: 20rem; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 auto; max-width: 62rem; display: grid; gap: 1rem; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.1rem 1.25rem 1.1rem 3.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.15rem;
  top: 1rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.prompt-section {
  max-width: 52rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
}
main.wide .prompt-section h2 { margin-top: 0; text-align: left; }
.prompt-box { margin: 1.25rem 0; }
.prompt-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.5rem; }
.prompt-text summary { cursor: pointer; padding: 0.6rem 0; color: var(--link); font-weight: 650; }
.prompt-text[open] summary { margin-bottom: 0.25rem; }
.prompt-note { margin: 0; color: var(--muted); font-size: 0.95rem; }
pre.prompt {
  max-height: 24rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.needs { max-width: 40rem; margin: 0 auto; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.needs li { position: relative; padding-left: 2rem; }
.needs li::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.3em;
  width: 0.45rem;
  height: 0.85rem;
  border: solid var(--accent);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.section-note { max-width: 40rem; margin: 1rem auto 0; color: var(--muted); }
main.wide .section-note { text-align: center; }
.section-text { max-width: 40rem; margin: 0 auto; }
main.wide .section-text { text-align: center; }

.cards { display: grid; gap: 1rem; margin: 0 auto; padding: 0; max-width: 62rem; list-style: none; }
.cards li, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.cards h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.cards p { margin: 0; color: var(--muted); }

.pricing {
  display: grid;
  gap: 1.25rem;
  max-width: 62rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.pricing h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.pricing p { margin: 0; color: var(--muted); }

.faq { max-width: 48rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0.6rem 0;
  padding: 0 1.1rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.9rem 0;
  min-height: 44px;
}
.faq details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; }
.faq details p { margin: 0 0 0.9rem; color: var(--text); }

.final-cta { text-align: center; }
main.wide .final-cta h2 { margin-bottom: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  .arrow-link::after { transition: none; }
}

/* ------------------------------------------------------------------ documents */
.doc { max-width: 48rem; }
.doc h1 { margin-bottom: 1.25rem; }
.doc h2 { padding-top: 0.5rem; border-top: 1px solid var(--border); }
.doc h1 + p, .doc h1 + blockquote { font-size: 1.1rem; }
.doc li { margin: 0.3rem 0; }
.doc li > p { margin: 0.4rem 0; }
.doc ol, .doc ul { padding-left: 1.4rem; }

.toc {
  margin: 1.5rem 0 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.toc-title { margin: 0 0 0.35rem; font-weight: 700; }
.toc ol { margin: 0; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
pre {
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.55;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
}
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }

blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1.1rem;
  background: var(--note-bg);
  border-left: 4px solid var(--note-border);
  border-radius: 0 10px 10px 0;
}
blockquote p { margin: 0.35rem 0; }

.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--border); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }

.draft-banner {
  padding: 0.75rem 1rem;
  border: 2px dashed var(--note-border);
  border-radius: 10px;
  background: var(--note-bg);
}

hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.company-details {
  font-style: normal;
  line-height: 1.8;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* ------------------------------------------------------------------ wider screens */
@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prompt-section { padding: 2rem; }
  .pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1.75rem 2rem; }
  .play-badge { --badge-h: 60px; }
  .hero-copy { padding-top: 4rem; }
}

@media (min-width: 60rem) {
  .hero-copy { padding: 5rem 1.25rem 2.5rem; }
  .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps, .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media print {
  .site-header nav, .skip-link, .prompt-actions, .promo { display: none; }
  body { background: #fff; color: #000; }
  pre.prompt { max-height: none; }
}
