/* Public pages (landing, terms, refunds, privacy). Loaded after styles.css,
 * which supplies the palette tokens and the top bar. The app itself never
 * loads this file.
 *
 * Brand colours come from those tokens, never as literals here: the landing
 * page and the app must not drift apart, which is exactly what happened
 * while this file hardcoded #7A2BF0 and the app ran on an unrelated indigo.
 * The one exception is the hero faces, whose two tints ARE the identity pair
 * and must stay the same in either theme. */

.site main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

#sitenav { display: flex; gap: 4px; margin-left: auto; }
#sitenav a {
  padding: 6px 12px; border-radius: 999px; color: var(--text); font-size: 15px;
}
#sitenav a:last-child {
  background: var(--primary); color: var(--primary-contrast); font-weight: 600;
}

.site section { padding: 8px 0 24px; }
.site h1 { font-size: 30px; line-height: 1.2; margin: 32px 0 12px; }
.site h2 {
  font-size: 22px; color: var(--text); margin: 28px 0 10px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.site h3 { font-size: 16px; margin: 0 0 6px; }
.site p { margin: 0 0 12px; }
.lede { font-size: 17px; color: var(--muted); max-width: 62ch; }
.lede.small { font-size: 14px; margin-top: -6px; }

.hero { padding-top: 8px; }
.hero h1 { max-width: 24ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 10px; }
/* Landing buttons use the two logo colours only: purple for every
   action, amber (.alt) for the main $19 one. Owner instruction 2026-08-16. */
.btn, .btn.primary {
  display: inline-block; padding: 11px 18px; border-radius: var(--radius);
  border: 1px solid var(--primary); background: var(--primary);
  /* Not #fff: the dark palette's primary is a LIGHT purple, on which white
     text falls to a 2.4:1 contrast ratio. The token carries the right ink
     for whichever ground is in play. */
  color: var(--primary-contrast); font-size: 15px; font-weight: 600;
}
.btn:hover, .btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.feature, .plan {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.price-grid { align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 30px; font-weight: 700; margin: 4px 0 0; }
.plan .cadence { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .per { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.plan ul { margin: 0 0 14px; padding-left: 18px; color: var(--muted); font-size: 15px; }
.plan li { margin-bottom: 4px; }
.plan .btn { margin-top: auto; text-align: center; }
/* Ladder decorations: the badge names the tier's role, the occasion line
   turns an abstract hour count into something a buyer can picture. */
.plan .badge {
  display: inline-block; align-self: flex-start;
  margin: -6px 0 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  background: var(--accent); color: var(--accent-contrast);
}
.plan .badge.quiet { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.plan .occasion { font-size: 14px; color: var(--muted); margin: -4px 0 12px; font-style: italic; }
.plan .per { margin-bottom: 4px; }
.anchor-line { max-width: 640px; }

/* Legal pages: one narrow column, numbered sections. The selector has to
 * out-specify `.site main` above, which sets the wider content width. */
.site main.legal { max-width: 72ch; }
/* The pricing page is a legal-width text column, but its three plan cards
   need the full content width or the third wraps onto its own row. */
.site main.legal .price-grid {
  max-width: 900px; width: calc(100vw - 32px);
  margin-left: 50%; transform: translateX(-50%);
}
@media (max-width: 900px) { .site main.legal .price-grid { width: 100%; } }
.legal h1 { font-size: 26px; }
.legal h2 { font-size: 18px; }
.legal p, .legal li { color: var(--text); font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 14px; }
.legal table { border-collapse: collapse; width: 100%; margin: 0 0 12px; }
.legal th, .legal td {
  border: 1px solid var(--border); padding: 6px 8px;
  font-size: 14px; text-align: left; vertical-align: top;
}

/* Inner elements carry the same max-width and padding as `main`, so the
 * footer's first character sits on the page's text column, not 16px left
 * of it. */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 24px;
  padding: 20px 0 calc(24px + env(safe-area-inset-bottom));
}
.site-footer nav, .site-footer p {
  max-width: 900px; margin: 0 auto; padding: 0 16px;
}
.site-footer nav {
  margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 16px;
}

@media (max-width: 520px) {
  .site h1 { font-size: 25px; }
  #sitenav a { padding: 6px 9px; font-size: 14px; }
  .cta-row .btn { flex: 1 1 100%; text-align: center; }
}

/* Hero sample transcript: the app's own .seg styles, in a card. */
.sample {
  margin: 22px 0 6px; padding: 10px 16px 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  max-width: 640px;
}
.sample-head {
  display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted);
  padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.sample-head strong { color: var(--text); font-variant-numeric: tabular-nums; }
.sample .spacer { flex: 1; }
.sample .seg .tag {
  font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--surface2);
}
.sample .seg .src { font-size: 15px; }
.sample .seg .tr { font-size: 14px; }
.legal.pay .small { font-size: 14px; }

/* --- 0.15.2 landing: header link, hero animation, features, gift ------- */
/* Brand amber (the logo mark) for the main purchase button; dark text for contrast. */
.btn.primary.alt { background: var(--brand-amber); border-color: var(--brand-amber); color: var(--brand-amber-ink); }
.btn.primary.alt:hover { background: var(--brand-amber-hover); border-color: var(--brand-amber-hover); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.besides { margin: 18px 0 4px; }
.besides-list { margin: 0; padding-left: 20px; color: var(--muted); }
.besides-list li { margin-bottom: 5px; }
[dir="rtl"] .besides-list { padding-left: 0; padding-right: 20px; }
#for-others .lede { max-width: 70ch; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
#site-lang {
  width: auto; padding: 4px 8px; font-size: 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  max-width: 150px;
}
#sitenav { align-items: center; flex-wrap: wrap; }

.hero-anim { padding: 18px 0 8px; }
.anim-stage {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px;
  gap: 14px; align-items: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 8%, var(--surface)), var(--surface));
  border: 1px solid var(--border); border-radius: 16px; padding: 18px 16px 12px;
}
/* Faces: generated profile silhouettes (web/face-f.png, face-m.png, white
 * shape on alpha) used as CSS masks so each face takes its speaker's colour.
 * The mouth is a surface-coloured ellipse over the lips; the waves sit
 * beyond the lips. Both assets face right; the right face is mirrored. */
/* Silhouettes in the two logo colours: purple ground, amber mark. */
.face { position: relative; width: 150px; margin: 0 auto; }
.face-left { aspect-ratio: 360 / 478; --face: var(--brand-purple-fixed); }
.face-right { aspect-ratio: 360 / 440; --face: var(--brand-amber); }
.face .face-shape {
  position: absolute; inset: 0; background: var(--face); transition: background 0.6s;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.face-left .face-shape { -webkit-mask-image: url(face-f.png); mask-image: url(face-f.png); }
.face-right .face-shape { -webkit-mask-image: url(face-m.png); mask-image: url(face-m.png); }
.face .mouth {
  position: absolute; width: 6.5%; height: 1.4%; border-radius: 50%;
  background: var(--surface); transform: translate(-50%, -50%);
}
.face-left .mouth { left: 88%; top: 44%; }
.face-right .mouth { left: 82.5%; top: 45.5%; }
.face.speaking .mouth { animation: mouth 0.3s ease-in-out infinite alternate; }
@keyframes mouth { from { height: 1.2%; } to { height: 4.5%; } }
.face .waves { position: absolute; width: 22%; height: 30%; overflow: visible; }
.face-left .waves { left: 96%; top: 29%; }
.face-right .waves { left: 90%; top: 30%; }
.face .waves path { fill: none; stroke: var(--face); stroke-width: 7; stroke-linecap: round; opacity: 0; }
.face.speaking .waves path { animation: wave 1.1s ease-out infinite; }
.face.speaking .waves path:nth-child(2) { animation-delay: 0.18s; }
.face.speaking .waves path:nth-child(3) { animation-delay: 0.36s; }
@keyframes wave { 0% { opacity: 0; } 30% { opacity: 0.85; } 100% { opacity: 0; } }
.face-right { transform: scaleX(-1); }
[dir="rtl"] .face-right { transform: none; }
[dir="rtl"] .face-left { transform: scaleX(-1); }

.anim-transcript {
  min-height: 250px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 14px 6px; align-self: stretch;
  display: flex; flex-direction: column;
}
.anim-transcript .scene {
  font-size: 12px; padding: 1px 8px; border-radius: 999px;
  background: var(--surface2); color: var(--muted); margin-inline-start: 6px;
}
.anim-lines { flex: 1; transition: opacity 0.6s; }
.anim-lines.fade { opacity: 0; }
.anim-lines .seg { padding: 6px 0; opacity: 0; transform: translateY(4px); transition: opacity 0.35s, transform 0.35s; }
.anim-lines .seg.show { opacity: 1; transform: none; }
.anim-lines .seg .src { font-size: 15px; min-height: 1.4em; }
.anim-lines .seg .tr { font-size: 14px; opacity: 0; transition: opacity 0.5s; }
.anim-lines .seg .tr.show { opacity: 1; }
.anim-lines .seg .tag { font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--surface2); }
.anim-lines .caret::after { content: "▍"; color: var(--muted); animation: caret 0.8s steps(1) infinite; margin-left: 1px; }
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 720px) {
  .anim-stage { grid-template-columns: 76px minmax(0, 1fr) 76px; gap: 8px; padding: 12px 8px 8px; }
  .face { width: 76px; }
  .anim-transcript { min-height: 230px; padding: 6px 10px 4px; }
  .anim-lines .seg .src { font-size: 14px; }
  .anim-lines .seg .tr { font-size: 13px; }
  .anim-transcript .scene { display: none; }
}
@media (max-width: 420px) {
  .anim-stage { grid-template-columns: 54px minmax(0, 1fr) 54px; gap: 6px; }
  .face { width: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .face.speaking .mouth, .face.speaking .waves path, .anim-lines .caret::after { animation: none; }
}
/* Header on narrow screens: brand stays on one line, in-page links hide. */
#brand { white-space: nowrap; }
@media (max-width: 600px) {
  #sitenav a[href^="#"] { display: none; }
  #sitenav { gap: 6px; }
  #site-lang { max-width: 120px; font-size: 13px; }
  /* Header of the demo transcript: REC + clock on the first row, the target
   * language on its own row so long language names never overflow. */
  .sample-head { font-size: 12px; gap: 6px; flex-wrap: wrap; }
  .sample-head .spacer { display: none; }
  .sample-head .muted { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; }
}
.anim-transcript .sample-head .muted { min-width: 0; overflow-wrap: anywhere; }

/* Pricing cards: equal height, price block a fixed height so the bullets and
 * the buttons line up across the three cards. */
.plan .price { min-height: 40px; }
.plan .per { min-height: 40px; }
.plan ul { flex: 1; }
.plan .btn { margin-top: 12px; }

/* Contact address: a reveal control, never a raw mailto in the source
   (see web/mail.js). Styled as a quiet inline link, not a button block. */
.contact-mail-reveal {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer;
}
.contact-mail-reveal:hover { opacity: 0.75; }
.contact-mail-link { word-break: break-all; }

/* --- accessibility (Lighthouse 2026-08-19) ----------------------------- */
/* The anim stage tints the surface purple (8% primary mix), which took the
 * 14px translation lines below AA contrast; darker ink there. The dark
 * theme's light-on-dark accent only gains contrast from the tint. */
.anim-lines .seg .tr { color: #084f47; }
@media (prefers-color-scheme: dark) { .anim-lines .seg .tr { color: var(--accent); } }
/* In-text links must not rely on colour alone. Buttons are <a class="btn">
 * outside paragraphs, so they keep their button look. */
.site main p a { text-decoration: underline; }

/* --- content pages (SEO P1: situation + language-pair pages) ------------ */
/* Static transcript samples: the landing's animated stage, reduced to a
 * finished card. Line anatomy matches the live view (bar/meta/src/tr);
 * left speakers purple, right amber, like the hero faces. */
.static-sample {
  border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 8%, var(--surface)), var(--surface));
  padding: 12px 16px 6px; margin: 6px 0 10px;
}
.static-sample .sample-title { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.static-sample .seg { padding: 9px 0; }
.static-sample .bar { width: 4px; border-radius: 2px; flex: none; align-self: stretch; }
.static-sample .segbody { flex: 1; min-width: 0; }
.static-sample .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.static-sample .speaker { padding: 1px 8px; border-radius: 10px; font-weight: 600; }
.static-sample .seg.left .bar { background: #7A2BF0; }
.static-sample .seg.left .speaker { background: rgba(122, 43, 240, 0.16); color: #7A2BF0; }
.static-sample .seg.right .bar { background: #FFC53D; }
.static-sample .seg.right .speaker { background: rgba(255, 197, 61, 0.30); color: #8a5a00; }
.static-sample .src { font-size: 15px; }
.static-sample .tr { font-size: 14px; color: #084f47; margin-top: 2px; }
@media (prefers-color-scheme: dark) {
  .static-sample .tr { color: var(--accent); }
  .static-sample .seg.left .speaker { color: #c9a6ff; background: rgba(122, 43, 240, 0.35); }
}
.subpage .crossrow { margin-top: 10px; }
.subpage .crossrow a { white-space: nowrap; }
.subpage h2 { margin-top: 6px; }
.site-footer .footer-pages { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-bottom: 6px; }
.site-footer .footer-pages a {
  display: inline-flex; align-items: center; min-height: 24px;
}
/* Comparison table (/compare): scrolls inside its own wrapper on narrow
 * screens; the page body never scrolls sideways. */
.compare-wrap { overflow-x: auto; margin: 10px 0; }
.compare-table { border-collapse: collapse; font-size: 13.5px; min-width: 680px; }
.compare-table th, .compare-table td { border: 1px solid var(--border); padding: 7px 9px; text-align: left; vertical-align: top; }
.compare-table thead th, .compare-table tr:first-child th { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.compare-table td:first-of-type { font-weight: 600; color: var(--primary); }
.compare-table th[scope], .compare-table tr th:first-child { font-weight: 600; }
/* The qualification list at the foot of /compare. Deliberately a list and
 * not cards: four boxes competed with our own claims for the eye, which is
 * a lot of the page spent selling other people's products. The case is the
 * bold lead-in, so the bullets would only add noise. */
ul.tradeoffs { list-style: none; padding-left: 0; margin: 6px 0 0; }
.tradeoffs li { margin-bottom: 10px; color: var(--muted); max-width: 62ch; }
.tradeoffs b { color: var(--text); font-weight: 600; }

/* Under 700px the comparison table becomes one card per capability: the
 * header row is hidden and every cell prints its own column name from
 * data-col. A 680px-wide table on a 390px phone is a sideways scroll
 * nobody performs, and this page is read on phones. */
@media (max-width: 700px) {
  .compare-wrap { overflow-x: visible; }
  .compare-table { display: block; min-width: 0; width: 100%; }
  .compare-table tbody { display: block; }
  .compare-table tr {
    display: block; padding: 10px 12px; margin-bottom: 10px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface);
  }
  .compare-table tr:first-child { display: none; }
  .compare-table th, .compare-table td { display: block; border: 0; padding: 0; }
  .compare-table tr th:first-child {
    font-size: 15px; margin-bottom: 6px;
    padding-bottom: 6px; border-bottom: 1px solid var(--border);
  }
  .compare-table td { display: flex; gap: 10px; padding: 2px 0; }
  .compare-table td::before {
    content: attr(data-col); color: var(--muted); flex: 0 0 45%;
  }
}

/* Three claim cards on /compare: inside the .legal reading measure the
 * default 250px track minimum only fits two, orphaning the third. Below
 * 700px they stack one per row like every other .grid. */
@media (min-width: 700px) { .grid.trio { grid-template-columns: repeat(3, 1fr); } }

/* Six columns do not fit a 72ch text measure: every cell wrapped to three
 * lines. Same widening the pricing plans use. */
.site main.legal .compare-wrap {
  max-width: 900px; width: calc(100vw - 32px);
  margin-left: 50%; transform: translateX(-50%);
}
@media (max-width: 900px) { .site main.legal .compare-wrap { width: 100%; } }
