/* Sayword landing. Same palette and type as the app (mobile/src/shared/theme.ts). */

/* Fonts served from this site (no request to Google): OFL, licenses in /fonts. */
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-400.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/geist-400.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/geist-500.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/geist-600.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/geist-mono-400.woff2) format('woff2'); }
:root {
  --black: #0b0b0c;
  --paper: #f4f1ea;
  --voice: #ff5b2e;
  --soft: #c9c5bc;
  --ash: #9a968e;
  --graphite: #2a2927;
  --surface: #1a1918;
  --amber: #f2b84b;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

a { color: var(--ash); }
a:hover { color: var(--paper); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--voice);
  outline-offset: 3px;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }

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

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---- header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--paper); text-decoration: none; font-weight: 600; font-size: 20px;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.top-links { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
/* The header's Play button: "Get it on" hides on phones; its space is a &nbsp; inside it, so no gap. */
.top .pill { gap: 0; }
.other-lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 15px; text-decoration: none; }

/* ---- pills (links and buttons) */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 28px;
  font: 500 15px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--paper);
  transition: background-color .15s, border-color .15s, color .15s;
}
.pill-outline { border-color: var(--graphite); color: var(--paper); }
.pill-outline:hover { border-color: var(--ash); color: var(--paper); }
.pill-ghost { border-color: var(--graphite); color: var(--soft); }
.pill-ghost:hover:not(:disabled) { color: var(--paper); border-color: var(--ash); }
.pill-paper { background: var(--paper); color: var(--black); font-weight: 600; }
.pill-paper:hover { background: #fff; color: var(--black); }
.pill-big { height: 56px; padding: 0 32px; font-size: 16px; }
.pill:disabled { opacity: .45; cursor: default; }

/* ---- hero: the word screen */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  padding-top: 56px; padding-bottom: 88px;
}
.caption { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ash); }

.word-block { display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 0; max-width: 100%; }
.word {
  font-family: var(--serif); font-weight: 400; line-height: 1; letter-spacing: -1px;
  font-size: clamp(64px, 15vw, 200px);
  max-width: 100%; overflow-wrap: anywhere; hyphens: manual;
}
.word.long { font-size: clamp(48px, 10vw, 150px); }
.word .placeholder { font-size: clamp(28px, 5vw, 44px); color: var(--ash); letter-spacing: 0; }
.ipa { font-family: var(--mono); font-size: 20px; color: var(--soft); }
.saylike { font-size: 16px; color: var(--ash); }
.saylike-text { color: var(--paper); }
.saylike-text:not(:empty)::before { content: '“'; }
.saylike-text:not(:empty)::after { content: '”'; }

.listen { margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.chip {
  min-height: 44px; padding: 0 18px; border-radius: 28px; cursor: pointer;
  font: 400 15px/1 var(--sans);
  background: transparent; color: var(--ash); border: 1px solid var(--graphite);
}
.chip:hover { color: var(--paper); border-color: var(--ash); }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--black); border-color: var(--paper); font-weight: 600; }

/* ---- the mic: an orange disc with a black dot that becomes a square while recording */
.speak { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 32px; }
.mic {
  position: relative; width: 84px; height: 84px; border-radius: 999px; border: 0; padding: 0;
  background: var(--voice); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .15s ease, opacity .15s;
}
.mic:disabled { opacity: .35; cursor: default; }
.mic:active:not(:disabled) { transform: scale(.96); }
.mic-dot {
  width: 22px; height: 22px; border-radius: 999px; background: var(--black);
  transition: border-radius .15s ease, width .15s ease, height .15s ease;
}
.mic.recording .mic-dot { width: 24px; height: 24px; border-radius: 5px; }
.mic.recording::before {
  content: ''; position: absolute; inset: -10px; border-radius: 999px;
  border: 2px solid var(--voice); opacity: .5;
  animation: pulse 1.4s ease-out infinite;
}
.mic.scoring .mic-dot { animation: breathe 1s ease-in-out infinite alternate; }
@keyframes pulse { from { transform: scale(.9); opacity: .6; } to { transform: scale(1.25); opacity: 0; } }
@keyframes breathe { from { opacity: 1; } to { opacity: .3; } }

.status { font-size: 14px; color: var(--ash); min-height: 21px; }
.tries { font-size: 13px; color: var(--ash); min-height: 20px; }

.limit { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 32px; max-width: 30em; }
.limit-text { color: var(--soft); }

.message { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 32em; margin-top: 8px; }
.message p { color: var(--amber); font-size: 15px; }

/* ---- the result card */
.result {
  width: 100%; max-width: 560px; margin-top: 28px; padding: 28px 24px;
  background: var(--surface); border: 1px solid var(--graphite); border-radius: 24px;
  display: flex; flex-direction: column; align-items: stretch; gap: 20px; text-align: left;
}
.score { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.score-number { font-family: var(--serif); font-size: 96px; line-height: 1; color: var(--voice); }
.score-of { font-family: var(--sans); font-size: 18px; color: var(--ash); }
.result-row { display: flex; flex-direction: column; gap: 6px; }
.result-row p { color: var(--soft); font-size: 16px; }
.label { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ash); font-weight: 500; }
.sounds { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sound {
  font-family: var(--mono); font-size: 16px; min-width: 40px; height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  border: 1px solid var(--graphite);
}
.sound.ok { color: var(--paper); border-color: var(--graphite); }
.sound.close { color: var(--amber); border-color: rgba(242, 184, 75, .45); }
.sound.miss { color: var(--voice); border-color: rgba(255, 91, 46, .55); background: rgba(255, 91, 46, .08); }
.example { font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--paper) !important; }
.translation { font-size: 15px; color: var(--ash) !important; }
.result-app { align-self: center; margin-top: 4px; }

/* ---- sections below */
.band { border-top: 1px solid var(--graphite); }
.pitch {
  max-width: 760px; padding-top: 88px; padding-bottom: 88px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6vw, 72px); line-height: 1.05; text-wrap: balance; }
.lead { font-size: 19px; line-height: 1.55; color: var(--soft); max-width: 34em; }
.pitch .pill-big { margin-top: 12px; }
.note { font-size: 13px; color: var(--ash); }

.section { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.5vw, 52px); line-height: 1.1; }

.steps, .faq {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 48px;
}
.steps li { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step-number { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--voice); }
.steps h3, .faq dt { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; }
.steps p, .faq dd { font-size: 16px; line-height: 1.55; color: var(--soft); }
.faq div { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-top: 20px; border-top: 1px solid var(--graphite); }

.foot {
  padding-top: 32px; padding-bottom: 48px;
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--ash);
}
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- word pages (/words/..., /es/palabras/...) */
.words-main { display: flex; flex-direction: column; gap: 48px; padding-top: 16px; padding-bottom: 88px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; color: var(--ash); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: '/'; margin: 0 10px; color: var(--graphite); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs [aria-current] { color: var(--soft); }

.word-page { display: flex; flex-direction: column; gap: 40px; }
.word-heading { font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ash); text-align: center; }
.word-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.word-card .word { font-size: clamp(56px, 12vw, 160px); }
.kind { font-size: 14px; color: var(--ash); font-style: italic; }
.word-facts {
  width: 100%; max-width: 640px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 24px;
  background: var(--surface); border: 1px solid var(--graphite); border-radius: 24px; padding: 28px 24px;
}
.word-facts section { display: flex; flex-direction: column; gap: 6px; }
.word-facts p { color: var(--soft); }
.examples { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }

.word-cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding-top: 48px; border-top: 1px solid var(--graphite); }
.display-sm { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.5vw, 52px); line-height: 1.1; text-wrap: balance; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

.related, .words-group, .words-index { display: flex; flex-direction: column; gap: 20px; }
.section-title-sm { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.5vw, 38px); line-height: 1.15; }
.section-title-sm a { color: inherit; text-decoration: none; }
.section-title-sm a:hover { text-decoration: underline; }
.word-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.word-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 28px;
  border: 1px solid var(--graphite); color: var(--paper); text-decoration: none; font-size: 16px;
}
.word-links a:hover { border-color: var(--ash); }
.more-link { display: inline-flex; align-items: center; min-height: 44px; }
.words-index .lead { max-width: 40em; }

@media (max-width: 480px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .top { padding-top: 16px; padding-bottom: 16px; }
  .top .pill { padding: 0 14px; font-size: 14px; }
  .top { flex-wrap: nowrap; }
  .top-links { gap: 4px 12px; flex-wrap: nowrap; }
  .top .wide { display: none; }
  .other-lang { font-size: 14px; }
  .hero { padding-top: 32px; padding-bottom: 64px; }
  .ipa { font-size: 18px; }
  .chip { padding: 0 14px; }
  .result { padding: 24px 18px; }
  .score-number { font-size: 80px; }
  .pitch { padding-top: 64px; padding-bottom: 64px; }
  .lead { font-size: 17px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .words-main { gap: 40px; padding-bottom: 64px; }
  .word-facts { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
