/* Better To Do: Speech to Task — site styles.
   One stylesheet for every page. No web fonts, no JavaScript.
   Colors mirror the app's design tokens (App/DesignSystem/Theme.swift). */

:root {
  color-scheme: light dark;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  --font-serif: ui-serif, "New York", "Iowan Old Style", "Apple Garamond", Charter, Georgia, "Times New Roman", serif;

  /* Light */
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --ink: #1a1d26;
  --ink-2: #4a4f61;
  --muted: #6b7085;
  --line: #e2e4ea;
  --accent: #4a6cf7;          /* brand accent, graphics */
  --accent-ink: #3354e0;      /* accent for text/links/buttons: 5.8:1 on --bg */
  --accent-soft: #eef1ff;
  --on-accent: #ffffff;
  --success: #2f9a4b;
  --shadow: 0 1px 2px rgba(26, 29, 38, 0.04), 0 12px 32px -12px rgba(26, 29, 38, 0.14);
  --glow: radial-gradient(60% 55% at 70% 20%, rgba(74, 108, 247, 0.12), transparent 70%);

  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1080px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #181a22;
    --surface-2: #1f2230;
    --ink: #e8eaf1;
    --ink-2: #b9bdcc;
    --muted: #8b8fa3;
    --line: #2a2d3a;
    --accent: #7b93ff;
    --accent-ink: #9aadff;
    --accent-soft: #1e2440;
    --on-accent: #0f1117;
    --success: #5ae67a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
    --glow: radial-gradient(60% 55% at 70% 20%, rgba(123, 147, 255, 0.14), transparent 70%);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px, iOS body size */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

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

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

::selection { background: var(--accent-soft); color: var(--ink); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--accent-ink);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 0;
}
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

/* ---------- Type ---------- */

.display,
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--ink);
  text-wrap: balance;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}
.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
  max-width: 34em;
  text-wrap: pretty;
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 96px);
  background: var(--glow);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(3rem, 8.2vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero h1 .line { display: block; }
.hero h1 .accent { color: var(--accent-ink); font-style: italic; font-weight: 500; }
.hero .lede { margin: 0 0 32px; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

/* App Store badge placeholder (swap for Apple's official badge artwork once the app is live) */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 20px 8px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  line-height: 1.15;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.store-badge:hover { transform: translateY(-1px); text-decoration: none; }
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge small {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}
.store-badge strong { display: block; font-size: 1.0625rem; font-weight: 600; }

.text-link {
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

/* Demo card: memo in, tasks out */
.demo {
  position: relative;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.demo-label {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.memo {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 22px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}
.memo blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}
.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  flex: none;
  padding-top: 2px;
}
.wave span {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transform-origin: center;
  animation: wave 1.2s ease-in-out infinite;
}
.wave span:nth-child(1) { transform: scaleY(0.35); animation-delay: -0.9s; }
.wave span:nth-child(2) { transform: scaleY(0.8);  animation-delay: -0.6s; }
.wave span:nth-child(3) { transform: scaleY(0.55); animation-delay: -0.3s; }
.wave span:nth-child(4) { transform: scaleY(1);    animation-delay: -0.75s; }
.wave span:nth-child(5) { transform: scaleY(0.45); animation-delay: -0.15s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.flow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.tasks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.task {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  /* Visible by default; the keyframe supplies the hidden start state (fill-mode both covers the delay). */
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.task:nth-child(1) { animation-delay: 0.35s; }
.task:nth-child(2) { animation-delay: 0.55s; }
.task:nth-child(3) { animation-delay: 0.75s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.task .check {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
}
.task-title { display: block; font-weight: 600; line-height: 1.35; }
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
}
.chip.due { background: var(--accent-soft); color: var(--accent-ink); }
.subtasks {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.subtasks li { display: flex; gap: 8px; align-items: center; }
.subtasks li::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1.25px solid var(--muted);
  border-radius: 4px;
  flex: none;
}
.demo-note { margin: 16px 0 0; font-size: 0.8125rem; color: var(--muted); }

/* ---------- Home: benefits ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.section-title {
  margin: 0 0 clamp(28px, 4vw, 48px);
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  max-width: 18em;
}
.benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.benefit {
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}
.benefit .num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--accent-ink);
}
.benefit h3 { margin: 0 0 10px; font-size: 1.5rem; }
.benefit p { margin: 0; color: var(--ink-2); text-wrap: pretty; }

.premium {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.premium h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); }
.premium p { margin: 0; color: var(--ink-2); max-width: 40em; }
.price {
  text-align: right;
  font-size: 0.9375rem;
  color: var(--muted);
  white-space: nowrap;
}
.price strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--ink);
}
.fineprint { margin: 16px 0 0; font-size: 0.8125rem; color: var(--muted); }

/* ---------- Document pages (privacy, terms, support) ---------- */

.doc-head {
  padding: clamp(40px, 7vw, 80px) 0 clamp(28px, 4vw, 40px);
  background: var(--glow);
}
.doc-head h1 {
  margin: 0 0 12px;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.025em;
}
.doc-meta { margin: 0; color: var(--muted); font-size: 0.9375rem; }

.summary {
  margin: 0 0 clamp(32px, 5vw, 48px);
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}
.summary h2 {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.summary ul { margin: 0; padding-left: 1.2em; max-width: 80ch; }
.summary li { margin: 6px 0; }
.summary li::marker { color: var(--accent); }

.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 96px);
}
.toc {
  position: sticky;
  top: 24px;
  font-size: 0.875rem;
}
.toc summary {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }

.prose { max-width: var(--measure); }
.prose > section { margin-bottom: 40px; }
.prose h2 {
  margin: 0 0 14px;
  padding-top: 8px;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
}
.prose h2 .n {
  margin-right: 0.3em;
  font-style: italic;
  font-weight: 500;
  color: var(--accent-ink);
}
.prose h3 {
  margin: 26px 0 8px;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: 0;
}
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 650; }
.prose .caps { text-transform: uppercase; font-size: 0.9375rem; letter-spacing: 0.01em; }

.table-wrap { overflow-x: auto; margin: 0 0 18px; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.data-table caption {
  text-align: left;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--muted);
}
.data-table th,
.data-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.data-table tbody th { font-weight: 600; }

.callout {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.path {
  font-weight: 600;
  white-space: normal;
}

/* ---------- Support FAQ ---------- */

.faq-group { margin-bottom: 40px; }
.faq-group > h2 { margin-bottom: 8px; }
.faq {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  position: relative;
  display: block;
  padding: 16px 40px 16px 0;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq summary:hover { color: var(--accent-ink); }
.faq .answer { padding: 0 0 18px; color: var(--ink-2); }
.faq .answer > :last-child { margin-bottom: 0; }

.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 0;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
}
.contact-card h2 { margin: 0 0 6px; font-size: 1.5rem; }
.contact-card p { margin: 0; color: var(--ink-2); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent-ink);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { text-decoration: none; filter: brightness(1.06); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer p { margin: 0; }

/* ---------- 404 ---------- */

.not-found { padding: clamp(64px, 12vw, 140px) 0; }
.not-found h1 { margin: 0 0 16px; font-size: clamp(2.5rem, 7vw, 4.5rem); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .benefits { grid-template-columns: minmax(0, 1fr); }
  .premium { grid-template-columns: minmax(0, 1fr); }
  .price { text-align: left; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: static;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
  }
  .toc summary { margin: 0; }
  .toc summary::after { content: " +"; }
  .toc[open] summary::after { content: " −"; }
  .toc[open] summary { margin-bottom: 10px; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .demo { padding: 18px; }
  .memo { padding: 14px; }
  .memo blockquote { font-size: 1.0625rem; }
  .site-nav ul { gap: 4px 16px; }
}

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

@media (forced-colors: active) {
  .task .check, .benefit, .summary { border-color: CanvasText; }
  .wave span { background: CanvasText; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --ink-2: #222; --muted: #444; --line: #bbb; --accent-soft: #fff; }
  .site-header nav, .skip-link, .toc, .site-footer ul, .store-badge { display: none !important; }
  .doc { display: block; }
  .doc-head, .hero { background: none; }
  .faq .answer { display: block; }
  a { color: #000; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
