/* SayThrough marketing site — shared styles. Static, dependency-free,
   theme-aware (respects the visitor's light/dark preference). */
:root {
  --green: #2e7d32;
  --green-600: #388e3c;
  --green-500: #2e7d32; /* used as TEXT (.dot, badges) — must clear AA on --bg */
  --btn-bg: #2e7d32;
  --btn-fg: #ffffff;
  --btn-bg-hover: #1b5e20;
  --cta-from: #2e7d32;
  --cta-to: #1b5e20;
  --on-cta: #ffffff;
  --green-50: #e8f5e9;
  --ink: #17202a;
  --muted: #566372;
  --bg: #ffffff;
  --surface: #f6f9f8;
  --surface-2: #eef3f1;
  --border: #e2e8ec;
  --card: #ffffff;
  --shadow: 0 2px 6px rgba(23, 32, 42, 0.06), 0 12px 28px rgba(23, 32, 42, 0.06);
  --radius: 16px;
  --maxw: 1120px;
  /* Fitzgerald accents (match the app's color coding) */
  --f-pron: #fff9c4;
  --f-verb: #c8e6c9;
  --f-little: #ffe0b2;
  --f-desc: #e1bee7;
  --f-social: #f8bbd9;
  --f-q: #bbdefb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --green: #7bd389;
    --green-500: #7bd389;
    --btn-bg: #7bd389;
    --btn-fg: #0f1416;
    --btn-bg-hover: #a5e0ad;
    --cta-from: #1b5e20;
    --cta-to: #14401a;
    --on-cta: #ffffff;
    --green-50: #17251a;
    --ink: #e9edf0;
    --muted: #9fb0bd;
    --bg: #0f1416;
    --surface: #151c1f;
    --surface-2: #1b2429;
    --border: #26323a;
    --card: #151c1f;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tint { background: var(--surface); }
.center { text-align: center; }
.eyebrow {
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  margin: 0 0 0.6em;
}
.lead { font-size: 1.18rem; color: var(--muted); max-width: 720px; }
/* `.lead` is capped at 720px, so centering its TEXT is not enough — the box
   itself has to be centered or it sits flush left in the 1120px container and
   reads as misaligned. Covers `.center` on an ancestor and on the lead itself;
   the second form was missing, which left the comparison section's lead
   visibly off to the left. */
.center .lead,
.lead.center { margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 20px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--green); }
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--green);
  display: grid; place-items: center;
}
.nav-links { display: flex; gap: 22px; margin-left: 12px; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: 0.96rem; white-space: nowrap; }
.nav-spacer { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
  font-weight: 700; font-size: 1rem; border-radius: 12px; padding: 13px 22px;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .05s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-lg { padding: 16px 28px; font-size: 1.08rem; }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
.hero .lead { font-size: 1.28rem; margin-top: 0.2em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-note { color: var(--muted); font-size: 0.92rem; margin-top: 14px; }
.hero-art { margin-top: 40px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }

/* Trust strip */
.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; color: var(--muted); font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.dot { color: var(--green-500); }

/* Feature / card grids */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green); margin-bottom: 14px;
}
.icon svg { width: 26px; height: 26px; }

/* Steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  counter-increment: step; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 800; display: grid; place-items: center;
}
.step-num::before { content: counter(step); }

/* Audience cards with accent */
.aud { border-top: 5px solid var(--accent, var(--green-500)); }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table.compare { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--card); }
table.compare th, table.compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.compare thead th { font-size: 0.9rem; color: var(--muted); }
table.compare th.us { color: var(--green); }
table.compare tbody th { font-weight: 600; }
.yes { color: var(--green); font-weight: 800; }
.no { color: #b0392f; font-weight: 700; }
@media (prefers-color-scheme: dark) { .no { color: #ef9a9a; } }
.price { font-weight: 800; }

/* Sample board (hero art / accents) */
.board { display: flex; flex-wrap: wrap; gap: 12px; }
.tile {
  width: 104px; height: 108px; border-radius: 14px; border: 1.5px solid rgba(0,0,0,.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: #17202a; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.tile svg { width: 40px; height: 40px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--cta-from), var(--cta-to)); color: var(--on-cta); border-radius: 22px; padding: 48px; text-align: center; }
.cta-band h2 { color: var(--on-cta); }
.cta-band .btn-primary { background: #fff; color: #1b5e20; }
.cta-band .btn-primary:hover { background: #f1f1f1; color: #1b5e20; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 48px 0 40px; color: var(--muted); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--muted); padding: 4px 0; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.88rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* Article (guides) */
.article { max-width: 760px; margin: 0 auto; padding: 48px 24px 72px; }
.article h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.article h2 { margin-top: 1.6em; font-size: 1.5rem; }
.article h3 { margin-top: 1.3em; font-size: 1.18rem; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin: 0.4em 0; }
.article .kbd { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; font-weight: 600; font-size: 0.92em; }
.breadcrumb { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.callout { background: var(--green-50); border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border)); border-radius: 12px; padding: 16px 18px; margin: 20px 0; }
.callout p:last-child { margin: 0; }
.guide-list { list-style: none; padding: 0; }
.guide-list li { margin: 0; }
.guide-list a { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); }
.guide-list a:hover { text-decoration: none; border-color: var(--green-500); }
.guide-list .g-title { font-weight: 700; color: var(--green); display: block; }
.guide-list .g-desc { color: var(--muted); font-size: 0.95rem; }

/* Responsive */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .section { padding: 52px 0; }
  .nav-links { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .cta-band { padding: 34px 22px; }
  .hero { padding: 48px 0 24px; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- Language switcher & suggestion banner (§19.7) ---------------------- */
/* Real links, so the switcher works with no JavaScript and is crawlable. */
.lang-nav { display: flex; align-items: center; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 0.82rem; }
.lang-switch a,
.lang-switch .lang-current {
  padding: 4px 8px;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch a { color: var(--muted); }
.lang-switch a:hover { color: var(--ink); background: var(--surface-2); }
.lang-switch a:focus-visible { outline: 2px solid var(--green-600); outline-offset: 1px; }
.lang-switch .lang-current { color: var(--ink); font-weight: 700; background: var(--surface-2); }

/* The header switcher always uses short codes; the endonym is the accessible
   name via aria-label, and the footer shows it in full. Chasing a breakpoint
   where four endonyms fit was the wrong shape of fix: "English Español Polski
   Português" is ~250px, and the header also carries a brand, five nav links
   and a call to action whose label is longest in exactly the languages that
   make the switcher widest ("Otwórz aplikację", "Abrir o aplicativo"). Short
   codes are the same width in every language, so the row is predictable. */
.lang-full { display: none; }
.lang-short { display: inline; }

/* The header carries brand + five nav links + switcher + call to action. The
   nav labels are longest in Portuguese and Polish, so they go first — each
   one is repeated in the footer and the three in-page anchors are reachable
   by scrolling, so nothing becomes unreachable. A header that overflows its
   own box is broken for everyone.

   These thresholds moved up ~60px when Italian brought the switcher to five
   chips. The failure it caused is worth recording: at 1120px the Spanish
   call to action ("Abrir la aplicación") was pushed past the header's right
   edge — the widest label in the language whose switcher is also widest.
   Every new language costs one chip, so expect to move these again. */
@media (max-width: 1319px) {
  .nav-links { gap: 16px; margin-left: 4px; }
}
@media (max-width: 1199px) {
  .nav-links { display: none; }
}

/* The footer has room, so it always shows the endonyms. */
.footer-lang { margin-top: 14px; }
.footer-lang .lang-switch { flex-wrap: wrap; }
.footer-lang .lang-full { display: inline; }
.footer-lang .lang-short { display: none; }

.lang-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.lang-banner-go { font-weight: 700; }
.lang-banner-x {
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
}
.lang-banner-x:hover { color: var(--ink); }
.lang-banner-x:focus-visible { outline: 2px solid var(--green-600); outline-offset: 1px; }

/* Narrow screens: let the row wrap once brand + switcher + button stop
   fitting side by side, and give it breathing room when it does. */
@media (max-width: 600px) {
  .nav { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 10px 14px; }
  .nav-spacer { display: none; }
  .lang-nav { margin-left: auto; }
}

/* ---- Hero tagline ------------------------------------------------------- */
/* The H1 carries the query; this is the line it used to be. */
.hero-tagline {
  margin: 10px 0 0;
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.01em;
}

/* ---- Screenshots -------------------------------------------------------- */
/* Real product images with real alt text — the site shipped with none, which
   cost it image search and the "this is an actual product" signal. */
.shot { margin: 40px 0 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--card);
}
.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.93rem;
  text-align: center;
  max-width: 62ch;
  margin-inline: auto;
}
.shot--narrow { max-width: 760px; margin-inline: auto; text-align: left; }

/* ---- Core word list ----------------------------------------------------- */
/* Generated from src/data/coreWords.*.json, so the page cannot drift from the
   product. Colours are the Fitzgerald key the app itself uses. */
.cw-wrap { margin-top: 24px; }
.cw-group { margin-top: 26px; }
.cw-group h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.cw-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
.cw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cw-list li { margin: 0; }
.cw {
  background: var(--cw-bg, var(--surface-2));
  /* The Fitzgerald pastels are light in both themes, exactly as they are on a
     board — so the label stays dark ink rather than following the theme. */
  color: #17202a;
  border: 1px solid rgba(23, 32, 42, 0.14);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.93rem;
  font-weight: 600;
}

/* ---- Article furniture -------------------------------------------------- */
.fineprint { color: var(--muted); font-size: 0.88rem; margin-top: 12px; }
.article ul.sources { padding-left: 1.1em; }
.article ul.sources li { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---- FAQ ---------------------------------------------------------------- */
/* Question-and-answer pairs. No FAQPage markup: Google restricted those rich
   results to government and health sites in 2023, so the schema would be
   decoration — the copy is what earns the long tail and the AI answers. */
.qa { margin-top: 8px; }
.qa h3 {
  margin-top: 1.5em;
  font-size: 1.06rem;
  color: var(--ink);
}
.qa h3:first-child { margin-top: 0.8em; }
.qa p { color: var(--muted); margin: 0.5em 0 0; }

/* ---- Printable low-tech boards ------------------------------------------ */
/* Generated from src/data/coreWords.*.json + the per-language symbol map, so
   a printed board and the board on screen show the same picture for the same
   word — which is the whole point: the motor plan has to transfer. */
.pb-wrap { margin-top: 24px; display: flex; flex-direction: column; gap: 34px; }
.pb-board { margin: 0; }
.pb-board figcaption {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.pb-board figcaption strong { color: var(--ink); }
.pb-grid {
  display: grid;
  grid-template-columns: repeat(var(--pb-cols, 3), 1fr);
  gap: 8px;
  max-width: 620px;
}
.pb-cell {
  background: var(--pb-bg, #fff);
  border: 1.5px solid rgba(23, 32, 42, 0.18);
  border-radius: 10px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px;
  /* The Fitzgerald pastels are light in both themes, exactly as on a board,
     so the label stays dark ink rather than following the page theme. */
  color: #17202a;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
}
.pb-cell img { width: 68%; height: auto; max-height: 62%; object-fit: contain; }
/* The label has to be readable across a table by a communication partner, not
   just by whoever is holding the board — so it scales with the cell rather
   than sitting at a fixed caption size. */
.pb-cell span {
  font-size: clamp(0.8rem, calc(0.45rem + 1.1vw), 1.35rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

@media print {
  /* Paper gets the board and nothing else — no nav, no prose, no footer. */
  .site-header, .site-footer, .no-print, .lang-banner { display: none !important; }
  .article { max-width: none; padding: 0; }
  .article h1, .article .lead { display: none; }
  .pb-wrap { gap: 0; }
  .pb-board { break-after: page; page-break-after: always; }
  .pb-board:last-child { break-after: auto; page-break-after: auto; }
  .pb-grid { max-width: none; gap: 6px; }
  /* Without this most browsers drop the fills, and the Fitzgerald colour
     coding is not decoration — it is how a word class is recognised. */
  .pb-cell { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* vw units mean nothing on paper — pin the label to a real point size. */
  .pb-cell span { font-size: 13pt; }
  .pb-board figcaption { font-size: 9pt; margin-bottom: 6px; }
}
