/* System fonts, neutral grays, one terracotta accent. No CSS animation; the demo clips on Home and Setup are the only motion. */
:root {
  --ink: #1f1f22;
  --muted: #5c5c63;
  --line: #e4e4e7;
  --paper: #fafafa;
  --surface: #fff;
  --accent: #9a4a3b; /* Text-safe terracotta; the logo uses #c16b5c. */
  --accent-strong: #823c2f;
  --accent-tint: #f6ece9;
  --hover: #efeff1;
  --focus: #1f1f22;
  --section-gap: 3.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: 3rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.125rem; margin-bottom: .5rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.4rem; margin-block: 0; }
li { margin-bottom: .75rem; }
.container { width: min(1080px, calc(100% - 4rem)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 10; top: -100vh; left: 1rem; background: var(--surface); padding: .8rem; }
.skip-link:focus { top: .5rem; }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: .875rem; }
.identity { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .875rem; }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: .625rem; font-size: 1.1875rem; font-weight: 650; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: .5rem; }
.preview-label { color: var(--muted); font-size: .8125rem; border: 1px solid var(--line); border-radius: 999px; padding: .125rem .625rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .25rem .375rem; }
.site-header .nav-links a { color: var(--muted); display: inline-block; padding: .6rem .875rem; border-radius: .625rem; text-decoration: none; }
.site-header .nav-links a:hover { color: var(--ink); background: var(--hover); }
.site-header .nav-links a[aria-current="page"] { color: var(--accent); background: var(--accent-tint); font-weight: 600; }
/* Language menu: the same page in each of the eight languages, each named in itself. */
.language-bar { border-top: 1px solid var(--line); padding-block: .25rem; }
.language-menu { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 .125rem; margin: 0; padding: 0; font-size: .875rem; }
.language-menu li { margin: 0; }
.language-menu a { color: var(--muted); display: inline-block; min-height: 1.75rem; padding: .25rem .5rem; border-radius: .5rem; text-decoration: none; }
.language-menu a:hover { color: var(--ink); background: var(--hover); }
.language-menu a[aria-current="true"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: .3em; }
/* The suggestion line (home.js, English Home and Setup only). */
.language-suggestion-bar { border-bottom: 1px solid var(--line); }
.language-suggestion { margin: 0; padding-block: .5rem; font-weight: 600; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.5rem 2rem; font-size: .875rem; }
/* The company link sits inside a sentence. A tight ring and a little room on each side keep its focus
   ring off the neighbouring characters; Korean puts the particle 의 right after the link, with no space. */
.site-footer span a { margin-inline: .125rem; }
.site-footer span a:focus-visible { outline-offset: 0; }
:lang(ko) .site-footer span a { margin-inline-end: .375rem; }

/* Shared page rhythm */
main { padding-block: 4rem 4rem; overflow-wrap: anywhere; }
section { scroll-margin-top: 1.5rem; }
.eyebrow { color: var(--accent); font-size: .8125rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .75rem; }
.lead { font-size: 1.1875rem; color: var(--muted); }
.section { border-top: 1px solid var(--line); padding-top: var(--section-gap); margin-top: var(--section-gap); }

/* Home */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.5rem; }
.button { display: inline-block; min-height: 2.75rem; padding: .625rem 1.25rem; border-radius: .625rem; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.button:hover { background: var(--accent-strong); color: #fff; }
.setup-link, .privacy-link { font-weight: 600; }
/* Apple's official App Store badge, unmodified, at its 40 px minimum height; the gaps around it
   are at least a quarter of its height, Apple's minimum clear space. */
.store-badge { display: inline-block; line-height: 0; border-radius: .5rem; }
.store-badge img { width: auto; height: 2.5rem; }
/* Feature tabs. Without JavaScript: an in-page index, then the four panels one after another. */
.features { border-top: 1px solid var(--line); padding-top: 2.5rem; margin-top: 2.5rem; }
.features h2 { font-size: 1.375rem; }
.feature-index { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.feature-index li { margin-bottom: 0; }
.feature-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.feature-tab { font: inherit; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: .625rem .625rem 0 0; min-height: 2.75rem; padding: .625rem 1rem; cursor: pointer; text-align: left; }
.feature-tab:hover { color: var(--ink); background: var(--hover); }
.feature-tab[aria-selected="true"] { color: var(--accent); background: var(--accent-tint); border-bottom-color: var(--accent); font-weight: 600; }
/* Each panel: a head (name, one sentence, at most three one-line points), one stage with the
   media, then small print. On a wide screen every stage has the same top edge and height. */
.feature-panel { --stage-height: 33rem; --stage-padding: 2.25rem; margin-top: 2rem; }
/* A fragment such as #files scrolls to its panel; the margin keeps the (possibly wrapped) tab list in view. */
.feature-tabs ~ .feature-panel { margin-top: 0; scroll-margin-top: 14rem; }
.feature-index ~ .feature-panel + .feature-panel { border-top: 1px solid var(--line); padding-top: 2.5rem; margin-top: 2.5rem; }
.feature-head { display: grid; gap: 1rem 4rem; margin-bottom: 1.75rem; }
.feature-tag { margin-bottom: .375rem; }
.feature-intro h3 { font-size: 2rem; margin-bottom: .5rem; }
.feature-sentence { font-size: 1.1875rem; color: var(--muted); margin-bottom: 0; }
.feature-points { list-style: none; padding: 0; margin: 0; font-size: 1.125rem; }
.feature-points li { position: relative; padding-left: 1.25rem; margin-bottom: .5rem; }
.feature-points li:last-child { margin-bottom: 0; }
.feature-points li::before { content: ""; position: absolute; left: 0; top: .7em; width: .4375rem; height: .4375rem; border-radius: 50%; background: var(--accent); }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; background: var(--accent-tint); border-radius: 1.25rem; padding: 1.5rem 1rem; }
.small-print { color: var(--muted); font-size: .8125rem; line-height: 1.55; margin-top: 1rem; }
.small-print p { margin-bottom: .375rem; }
.small-print p:last-child { margin-bottom: 0; }
/* Real screen recordings of the app; the poster is a still frame of the same recording. */
.clip { margin: 0; width: 100%; }
.clip video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); }
/* Pause/Play and, for a clip with sound, Unmute/Mute (added by home.js). */
.clip-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: .75rem; }
.clip-toggle { font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--muted); border-radius: .625rem; min-height: 2.75rem; padding: .5rem 1rem; cursor: pointer; }
.clip-toggle:hover { background: var(--hover); }
/* Real app screenshots, where a still image says enough. */
.shot { margin: 0; }
.shot img { width: 100%; border: 1px solid var(--line); border-radius: .5rem; }
.phone-shot img { width: min(100%, 14rem); margin-inline: auto; border: 0; }
/* Live Captions: the stacked version fits a narrow screen, the side-by-side version a wide one. */
/* Each version's poster is its CSS background, not a poster attribute: a browser fetches a
   poster attribute even for a hidden video, but never a hidden element's background. */
.clip-wide { display: none; }
.stage-fill .clip video { border: 0; border-radius: .75rem; background: var(--accent-tint) center / contain no-repeat; }
.stage-fill .clip-narrow video { aspect-ratio: 1440 / 1884; background-image: url("assets/demo-live-captions.png"); }
.stage-fill .clip-wide video { aspect-ratio: 2160 / 1056; background-image: url("assets/demo-live-captions-wide.png"); }
/* File Transcription: an excerpt of the saved transcript as text, beside the subtitles clip. */
.excerpt { margin: 0; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; padding: .875rem 1.25rem; font-size: .8125rem; line-height: 1.45; }
.excerpt p { margin-bottom: 0; }
.excerpt-label { color: var(--accent); font-size: .6875rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.excerpt .excerpt-title { font-size: 1rem; font-weight: 650; margin-bottom: .25rem; }
.excerpt-heading { font-weight: 650; font-size: .875rem; border-bottom: 1px solid var(--line); padding-bottom: .125rem; margin-top: .5rem; }
.excerpt-subheading { font-weight: 600; margin-top: .25rem; }
.excerpt ul { padding-left: 1.1rem; margin: 0; }
.excerpt li { margin-bottom: .125rem; }
.excerpt .excerpt-lines { list-style: none; padding: 0; margin-top: .25rem; }
.excerpt-time { color: var(--muted); }
@media (min-width: 60rem) {
  .feature-head { grid-template-columns: 5fr 6fr; align-items: end; min-height: 9.5rem; }
  /* Longer Portuguese and Russian heads: one height for all four tabs keeps one stage top edge. */
  :is(:lang(pt), :lang(ru)) .feature-head { min-height: 10.25rem; }
  /* min-height, so enlarged text grows the stage instead of overflowing it. */
  .stage { flex-direction: row; min-height: var(--stage-height); padding: var(--stage-padding); gap: 2.25rem; }
  .stage .clip video, .stage .shot img { max-height: calc(var(--stage-height) - 2 * var(--stage-padding)); width: auto; max-width: 100%; margin-inline: auto; }
  .stage .clip { width: auto; max-width: 100%; }
  .stage .clip-controls { position: absolute; right: 1rem; bottom: 1rem; margin: 0; }
  /* The phone screenshot fills the right side; the Relay clip's bottom-left corner is empty. */
  .stage-phone .clip-controls { right: auto; left: 1rem; }
  .clip-wide { display: block; }
  .clip-narrow { display: none; }
  /* The wide clip's backdrop is the stage tint, so it fills the stage edge to edge. */
  .stage-fill { padding: 0; }
  .stage-fill .clip, .stage-fill .clip video { width: 100%; max-height: none; border-radius: 1.25rem; }
  .stage-files { gap: 4%; padding-inline: 2%; }
  .stage-files .excerpt { flex: 0 0 44%; }
  .stage-files .clip { flex: 0 0 52%; }
  .stage-files .clip video { width: 100%; max-height: none; }
}
.price-card { border: 1px solid var(--line); border-radius: .75rem; padding: 1.5rem; background: var(--surface); }
.section-heading p:not(.eyebrow) { color: var(--muted); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin-top: 1.5rem; }
.price-card.lifetime { border-color: var(--accent); }
.price-card.lifetime h3 { color: var(--accent); }
.price { font-size: 2.25rem; font-weight: 650; line-height: 1.2; margin-bottom: .75rem; }
.price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-card > :last-child { color: var(--muted); margin-bottom: 0; }
.pricing-grid + .small-print { margin-top: 1.5rem; }
.availability { border-top: 1px solid var(--line); padding-top: 2rem; margin-top: var(--section-gap); }
.availability h2 { margin-bottom: 1.5rem; }
/* Download: Mac, iPhone and Android side by side on a wide screen, stacked on a narrow one. */
.download-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem 2rem; }
.download-list li { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.availability p { color: var(--muted); margin-bottom: 0; }

/* Setup and Privacy: paragraphs and steps use their sections' full available width. */
.page-opening { margin-bottom: 3rem; }
.page-opening > p:not(.eyebrow) { color: var(--muted); }
.privacy-section { border-top: 1px solid var(--line); padding-top: 2.25rem; margin-top: 2.75rem; }
.privacy-section > p { color: var(--muted); }
.privacy-section > p:last-child { margin-bottom: 0; }
.route-link { margin-top: 1.5rem; }
.setup-page .setup-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.75rem; align-items: start; }
.routes-panel, .setup-notes { border-top: 1px solid var(--line); padding-top: 2.25rem; }
.setup-notes { color: var(--muted); }
.setup-notes h2 { color: var(--ink); font-size: 1.125rem; }
.setup-notes p:last-child { margin-bottom: 0; }
.setup-notes [id] { scroll-margin-top: 1.5rem; }
.steps { padding-left: 1.6rem; margin-block: 1.5rem; }
.steps li { padding-left: .4rem; margin-bottom: 1.25rem; color: var(--muted); }
.steps strong { display: block; color: var(--ink); }
.steps li::marker { color: var(--accent); font-weight: 650; }
.route + .route { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 1.5rem; }
.route p { color: var(--muted); margin-bottom: .75rem; }
.route p:last-child { margin-bottom: 0; }
/* Setup's Relay illustration: about half the clip's frame width, so it stays sharp. */
.route .clip { max-width: 45.75rem; margin-block: 1.25rem 1.5rem; }
.route figcaption { color: var(--muted); margin-top: .75rem; }
.status { font-size: .875rem; color: var(--muted); font-weight: 400; margin-left: .5rem; display: inline-block; }
.availability-link { margin-block: 2.75rem 0; }

/* Tailscale guide: numbered sections; commands wrap inside their own box. */
.guide-section { border-top: 1px solid var(--line); padding-top: 2.25rem; margin-top: 2.75rem; }
.guide-section p, .guide-section li { color: var(--muted); }
.guide-section strong { color: var(--ink); }
.guide-section ol, .guide-section ul { margin-bottom: 1rem; }
.guide-section > :last-child { margin-bottom: 0; }
.guide-page code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9375em; }
.guide-page pre { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; padding: .75rem 1rem; margin-block: .75rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-page pre code { font-size: .9375rem; }
.guide-page .nobreak { white-space: nowrap; }
.guide-page .warning { color: var(--ink); border-left: 3px solid var(--accent); padding-left: .875rem; }

@media (max-width: 40rem) {
  :root { --section-gap: 2.5rem; }
  .container { width: calc(100% - 2rem); }
  .navigation { gap: .5rem 1rem; }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.5rem; }
  main { padding-block: 2.5rem 3rem; }
  .setup-page .setup-grid { gap: 2rem; }
  .price-card { padding: 1.25rem; }
  .page-opening { margin-bottom: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
