/*
 * Seleniora — one stylesheet for the whole site.
 * Fonts are self-hosted (fonts/fonts.css); nothing is loaded from other domains.
 *
 * Tokens:
 *   brand     neutral surfaces and text, shared by every page
 *   product   --accent, --accent-tint, --on-accent — set per product via <body data-product="…">
 * Light and dark follow the operating system (prefers-color-scheme).
 */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  --bg: #f7f5f0;
  --surface: #fffdf9;
  --surface-2: #efebe3;
  --text: #1c1b18;
  --muted: #5e5a52;
  --line: #e2ddd2;
  --strong: #1c1b18;
  --btn: #1c1b18;
  --btn-text: #f7f5f0;
  --shadow: 0 1px 0 #e6e0d4, 0 24px 48px -30px rgb(60 48 28 / 0.35);
  --focus: #1c1b18;

  /* Brand pages have no accent: they use the text colour. */
  --accent: var(--text);
  --accent-tint: var(--surface-2);
  --on-accent: var(--bg);

  --todo-bg: #ffe25c;
  --todo-text: #3a2e00;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif-weight: 400;

  --gutter: clamp(20px, 5.5vw, 96px);
  --max: 1440px;
  --radius: 24px;
}

/* Pulita — indigo from its app icon (indigo → teal). */
[data-product="pulita"] {
  --accent: #4338ca;
  --accent-tint: #ecebfb;
  --on-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1917;
    --surface: #23221f;
    --surface-2: #2c2a26;
    --text: #ece8df;
    --muted: #aaa498;
    --line: #35332e;
    --strong: #ece8df;
    --btn: #ece8df;
    --btn-text: #1a1917;
    --shadow: 0 0 0 1px #35332e;
    --focus: #ece8df;
    --serif-weight: 360; /* light text on dark reads heavier */
  }

  [data-product="pulita"] {
    --accent: #a5b4fc;
    --accent-tint: #25253d;
    --on-accent: #1e1b4b;
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.serif { font-family: var(--serif); font-weight: var(--serif-weight); font-optical-sizing: auto; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

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

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ext-icon { display: inline-block; width: 0.7em; height: 0.7em; margin-left: 0.2em; vertical-align: 0.05em; }

.skip { position: absolute; left: -9999px; top: 8px; padding: 10px 16px; background: var(--btn); color: var(--btn-text); border-radius: 999px; z-index: 10; }
.skip:focus { left: 16px; }

.kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Buttons, chips, tiles, cards ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 500;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.875rem; }
.btn-pending { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.chip-on { background: var(--strong); border-color: var(--strong); color: var(--bg); }
.chip-accent { border-color: var(--accent); color: var(--accent); }
.small { font-size: 0.875rem; }

.tile {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  aspect-ratio: 1;
  border-radius: 24%;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 1.6rem/1 var(--serif);
}
.tile-sm { width: 28px; font-size: 0.9rem; }
img.tile { background: none; height: auto; }
.tile-lg { width: 72px; font-size: 2rem; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
}
.site-header.is-product { border-bottom: 1px solid var(--line); }
.site-header.is-product .wrap { padding-block: 14px; }

.brand { font: var(--serif-weight) 1.75rem/1 var(--serif); letter-spacing: -0.01em; text-decoration: none; }
.is-product .brand { font-size: 1.5rem; }
.crumbs { display: flex; align-items: center; gap: 12px; }
.crumbs .sep { color: var(--muted); }
.crumbs .product { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }

.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.site-nav a:not(.btn) { display: inline-block; padding-block: 10px; text-decoration: none; }
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { text-decoration: underline; }

@media (max-width: 760px) {
  .site-nav .wide-only { display: none; } /* section links and Support: reachable by scrolling and from the footer */
}
@media (max-width: 420px) {
  .is-product .brand { font-size: 1.25rem; }
  .crumbs { gap: 8px; }
  .site-header .btn-small { padding: 0 14px; }
}

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 32px;
  padding-block: 24px 36px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.site-footer a { display: inline-block; padding-block: 6px; color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Home ---------- */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  padding-block: clamp(48px, 9vw, 104px) clamp(48px, 7vw, 88px);
}
.home-hero h1 { font-size: clamp(3.2rem, 1.6rem + 6.4vw, 7rem); line-height: 1.02; letter-spacing: -0.03em; }
.home-hero p { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--muted); padding-bottom: 12px; }

.section-head { padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.section-head h2 { font: 500 0.8125rem/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.products { padding-bottom: clamp(56px, 7vw, 96px); }
.featured { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); overflow: hidden; text-decoration: none; }
.featured-body { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(24px, 3.5vw, 48px); }
.featured-name { display: flex; align-items: center; gap: 18px; }
.featured-name > span:last-child { font: var(--serif-weight) clamp(2.2rem, 1.6rem + 1.8vw, 3rem)/1.1 var(--serif); }
.featured-body p { font-size: 1.1875rem; line-height: 1.5; color: var(--muted); }
.more { font-weight: 500; }
.featured:hover .more { text-decoration: underline; }
.featured-demo { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: clamp(24px, 3.5vw, 48px); background: var(--surface-2); }

.coming { padding: clamp(24px, 3.5vw, 48px); font: var(--serif-weight) clamp(1.4rem, 1.1rem + 1vw, 2rem)/1.3 var(--serif); color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 24px 0 0; padding: 0; list-style: none; }
.product-card { display: flex; flex-direction: column; gap: 18px; padding: 32px; height: 100%; text-decoration: none; }

/* ---------- Demo (said → result) ---------- */

.demo-said { font: 400 0.875rem/1.7 var(--mono); color: var(--muted); }
.demo-rule { height: 1px; background: var(--line); }
.demo-result { font: var(--serif-weight) clamp(1.6rem, 1.2rem + 1vw, 2.15rem)/1.2 var(--serif); }

/* ---------- Product page ---------- */

.p-hero {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
  gap: 48px 80px;
  align-items: center;
  padding-block: clamp(36px, 6vw, 88px) clamp(56px, 7vw, 104px);
}
.p-hero-copy { display: flex; flex-direction: column; gap: 26px; }
.p-ident { display: flex; align-items: center; gap: 14px; }
.p-ident strong { display: block; font-weight: 600; }
.p-ident small { display: block; font-size: 0.8125rem; color: var(--muted); }
.p-hero h1 { font-size: clamp(2.9rem, 1.6rem + 4.2vw, 5.5rem); line-height: 1.03; letter-spacing: -0.03em; }
.p-hero h1 em, .accent { color: var(--accent); }
.lead { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); line-height: 1.55; color: var(--muted); max-width: 32em; }

.notice { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 16px; background: var(--accent-tint); font-size: 0.9375rem; line-height: 1.55; }
.notice svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }
.notice a { color: var(--accent); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cta-row small { font-size: 0.875rem; color: var(--muted); }

/* Hero: the dictation flow, drawn after the real app (menu bar icon, recording capsule). */
.flow { margin: 0; overflow: hidden; }
.menubar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 8px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mb-icon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted); }
.mb-icon svg { width: 16px; height: 16px; }
.mb-on { width: 42px; border-radius: 999px; background: #f29d52; color: #fff; }
.flow-body { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 40px); }
.flow-step { display: flex; flex-direction: column; gap: 12px; }
.flow-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.keys { display: flex; gap: 8px; }
kbd {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  background: var(--bg);
  font: 500 1rem/1 var(--mono);
}
kbd.wide { min-width: 120px; }
.hud { display: flex; align-items: center; justify-content: center; gap: 16px; align-self: center; width: min(100%, 320px); height: 58px; border-radius: 999px; background: #9a9a9a; }
.hud-mic { display: grid; color: #e5484d; }
.hud-mic svg { width: 20px; height: 20px; }
.bars { display: flex; align-items: center; gap: 4px; height: 28px; }
.bars i { width: 3px; border-radius: 2px; background: #333; height: 40%; }
.bars i:nth-child(4n+1) { height: 55%; }
.bars i:nth-child(4n+2) { height: 85%; }
.bars i:nth-child(4n+3) { height: 45%; }
.bars i:nth-child(5n) { height: 100%; }
.bars i:nth-child(7n) { height: 30%; }
.pill { padding: 5px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: 0.8125rem; font-weight: 600; }
.label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.label.accent { color: var(--accent); font-weight: 600; }

.features { display: flex; flex-direction: column; gap: clamp(72px, 9vw, 120px); padding-bottom: clamp(72px, 9vw, 120px); }
.feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 96px; align-items: center; }
.feature:nth-child(even) .feature-copy { order: 2; }
.feature-copy { display: flex; flex-direction: column; gap: 18px; }
.feature h2, .h2 { font-size: clamp(2.1rem, 1.5rem + 2vw, 3.5rem); line-height: 1.06; letter-spacing: -0.025em; }
.feature-copy p:not(.kicker) { font-size: 1.125rem; line-height: 1.6; color: var(--muted); max-width: 32em; }
.feature-visual { padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; gap: 12px; }

.shot { display: block; overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; }
.lang-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quote { font: var(--serif-weight) clamp(1.4rem, 1.1rem + 0.9vw, 1.9rem)/1.25 var(--serif); }
.feature-copy p strong { color: var(--text); }

.start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 80px; }
.start-col { display: flex; flex-direction: column; gap: 14px; }
.start-col h3 { font-size: 1.125rem; font-weight: 600; margin-top: 10px; }
.start-col p, .start-col li { color: var(--muted); line-height: 1.6; }
.start-col strong { color: var(--text); }
.start-col a { color: var(--accent); }
.ticks, .known { display: flex; flex-direction: column; gap: 10px; margin: 0; padding-left: 1.2rem; }

.band { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 80px; padding: clamp(32px, 6vw, 88px) clamp(24px, 5.5vw, 80px); border-radius: 32px; background: var(--surface-2); }
.band-head { display: flex; flex-direction: column; gap: 18px; }
.band .h2 { font-size: clamp(2rem, 1.5rem + 1.6vw, 3.25rem); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; margin: 0; }
.facts > div { display: flex; flex-direction: column; gap: 6px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.facts > div:nth-last-child(-n + 2) { border-bottom: 0; }
.facts dt { font-weight: 600; font-size: 1.0625rem; }
.facts dd { margin: 0; color: var(--muted); line-height: 1.6; }

.section { padding-top: clamp(72px, 9vw, 120px); }
.section > .h2 { margin-bottom: 32px; font-size: clamp(2rem, 1.5rem + 1.4vw, 3rem); }
.platforms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.platforms li { display: flex; flex-direction: column; gap: 32px; padding: 26px; }
.platforms strong { font-size: 1.375rem; font-weight: 600; }
.platforms span { font-size: 0.875rem; color: var(--muted); }
.platforms .on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.platforms .on span { color: inherit; }

.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 80px; padding-block: clamp(72px, 9vw, 120px); }
.faq .h2 { font-size: clamp(2rem, 1.5rem + 1.4vw, 3rem); }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 1.1875rem; font-weight: 500; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details[open] > summary::after { content: "–"; }
.answer { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; color: var(--muted); line-height: 1.65; }
.answer ol { margin: 0; padding-left: 1.3rem; }
.answer li { margin: 4px 0; }
.answer a { color: var(--accent); }

.closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; margin-bottom: clamp(56px, 7vw, 96px); padding: clamp(32px, 5.5vw, 80px); border-radius: 32px; background: var(--accent-tint); }
.closing .h2 { max-width: 14ch; font-size: clamp(2rem, 1.5rem + 1.6vw, 3.25rem); }

/* ---------- Text pages: legal, support, 404 ---------- */

.page { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); }
.page > * { max-width: 44rem; }
.page h1 { font: var(--serif-weight) clamp(2.4rem, 1.8rem + 2.4vw, 3.75rem)/1.05 var(--serif); letter-spacing: -0.025em; margin-bottom: 0.6em; }
.page h2 { font-size: 1.25rem; font-weight: 600; margin: 2.2em 0 0.6em; }
.page p { margin: 0 0 1.1em; }
.page ul, .page ol { padding-left: 1.2rem; margin: 0 0 1.1em; }
.page li { margin: 0.35em 0; }
.page .lead { margin-bottom: 1.6em; }

.page h3 { font-size: 1.0625rem; font-weight: 600; margin: 1.6em 0 0.5em; }
.legal p:has(> strong:first-child) strong:first-child { font-weight: 600; }

.contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 2.4em; max-width: 26rem; }
.contact > div { padding: 22px 24px; }
.contact dt { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact dd { margin: 6px 0 0; font-size: 1.125rem; }

code { font-family: var(--mono); font-size: 0.92em; white-space: nowrap; }

/* Placeholders must be impossible to miss until they are filled. */
mark.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  padding: 0.05em 0.3em;
  border-radius: 4px;
  font: 600 0.9em/1.4 var(--sans);
  overflow-wrap: anywhere;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .home-hero, .p-hero, .feature, .band, .faq, .start { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-child(even) .feature-copy { order: 0; }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .coming { padding: clamp(24px, 3.5vw, 48px); font: var(--serif-weight) clamp(1.4rem, 1.1rem + 1vw, 2rem)/1.3 var(--serif); color: var(--muted); }
.product-grid { grid-template-columns: minmax(0, 1fr); }
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .facts, .contact { grid-template-columns: minmax(0, 1fr); }
  .facts > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .platforms { gap: 10px; }
  .platforms li { padding: 18px; gap: 20px; }
  .platforms strong { font-size: 1.0625rem; }
  .closing .btn, .p-hero .btn { width: 100%; }
}

/* ---------- Test builds only (not on seleniora.com) ---------- */

.test-banner {
  margin: 0;
  padding: 8px 16px;
  background: var(--todo-bg);
  color: var(--todo-text);
  font: 600 0.8125rem/1.4 var(--sans);
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
