/* ============================================================================
   Lingua·Lab — shared marketing design system
   ----------------------------------------------------------------------------
   Single source of truth for the design tokens, base reset, top nav, and footer
   shared across every marketing surface: index, about, contact, docs, privacy,
   terms, mobile, and the generated blog (scripts/build-blog.mjs).

   Pages link this file in <head> BEFORE their own inline <style>, so a page may
   still override any rule here with a page-specific declaration that comes later
   in the cascade. Page-specific layout (hero, chapters, legal prose, forms, blog
   cards, …) stays inline per page and inherits the tokens below.

   Fonts (Atkinson Hyperlegible + Source Sans 3) are loaded per page via the
   Google Fonts <link>; this file only references them through the --serif /
   --sans tokens.
   ========================================================================== */

:root {
  --bg: #fffdf8;
  --bg2: #f4efe7;
  --ink: #171512;
  --ink2: #342f29;
  --ink3: #5f554b;
  --line: #d8cebf;
  --paper: #ffffff;
  --terracotta: #8e452b;
  --terracotta-dark: #65301f;
  --good: #246b2f;
  --serif: "Atkinson Hyperlegible","Source Sans 3","Segoe UI",sans-serif;
  --sans: "Atkinson Hyperlegible","Source Sans 3","Segoe UI",sans-serif;
  --mono: ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--sans);background:var(--bg);color:var(--ink);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}

/* ── Top nav ── */
.nav{position:sticky;top:0;z-index:100;background:rgba(249,246,240,.92);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);padding:0 40px}
.nav-inner{max-width:1200px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;height:64px}
.brand{display:flex;align-items:center;gap:9px;font-family:var(--serif);font-size:20px;font-weight:500;letter-spacing:-.01em}
.brand i{font-style:normal;color:var(--terracotta);margin:0 1px}
.nav-links{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
.nav-link{font-size:15px;font-weight:600;padding:7px 14px;border-radius:8px;color:var(--ink2);transition:all .15s;white-space:nowrap}
.nav-link:hover{background:var(--bg2);color:var(--ink)}
.nav-link.active{color:var(--terracotta);background:rgba(142,69,43,.07)}
.nav-cta{font-size:14px;font-weight:700;padding:9px 20px;border-radius:10px;background:linear-gradient(160deg,#2e2c28,#1a1815);color:var(--bg);border:none;cursor:pointer;transition:opacity .15s;text-decoration:none;display:inline-block;white-space:nowrap;flex-shrink:0}
.nav-cta:hover{opacity:.88}

/* ── Footer ── */
.footer{background:var(--ink);color:rgba(255,255,255,.6);padding:60px 40px}
.footer-inner{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:1fr repeat(3,auto);gap:60px;align-items:start}
.footer-brand{font-family:var(--serif);font-size:20px;color:white;margin-bottom:12px;letter-spacing:-.01em}
.footer-brand i{font-style:normal;color:rgba(255,255,255,.4)}
.footer-tagline{font-size:14px;line-height:1.6;max-width:260px}
.footer-col h4{font-size:11px;text-transform:uppercase;letter-spacing:.15em;color:rgba(255,255,255,.45);margin-bottom:16px;font-weight:400}
.footer-col ul{list-style:none;display:flex;flex-direction:column;gap:10px}
.footer-col a{font-size:14px;color:rgba(255,255,255,.6);transition:color .15s}
.footer-col a:hover{color:white}
.footer-bottom{max-width:1200px;margin:40px auto 0;padding-top:24px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:space-between;font-size:12px;font-family:var(--mono)}
.footer-notice{max-width:1200px;margin:32px auto 0;font-size:11px;color:rgba(255,255,255,.4);line-height:1.7;font-family:var(--sans)}
.footer-notice a{color:rgba(255,255,255,.5);text-decoration:underline}
.footer-legal-link{color:inherit;text-decoration:underline}

/* ── Responsive (nav / footer) ── */
@media(max-width:1024px){.footer-inner{grid-template-columns:1fr 1fr}}
/* Narrower desktop widths: longer translated nav labels (fr/de/pt/…) can
   overflow the row. Shrink type/spacing rather than let it wrap mid-word —
   .nav-link/.nav-cta already have white-space:nowrap above, so without this
   they'd just overflow instead of wrapping (the upper bound was 1120px; the
   translated French row still overflowed up to ~1250px). Mobile (<=700px)
   keeps its existing "hide nav-link, show CTA only" behavior untouched below. */
/* Wide-desktop guard: at 1121-1400px the full-size row (six links + CTA +
   brand) is 4-6px wider than a 1366px viewport on French once every label is
   translated, which draws a horizontal scrollbar. Trim link padding a touch
   before the narrower breakpoint below takes over. */
@media(max-width:1400px) and (min-width:1261px){
  .nav-links{gap:4px}
  .nav-link{padding:7px 10px}
}
@media(max-width:1260px) and (min-width:701px){
  /* Let the row wrap onto a second line instead of overflowing: with the
     compact type below, French/Portuguese still exceed a ~1130px viewport. */
  .nav-inner{height:auto;min-height:64px;padding:6px 0}
  .nav-links{gap:4px;flex-wrap:wrap;justify-content:flex-end;row-gap:4px}
  .nav-link{font-size:13px;padding:6px 10px}
  .nav-cta{font-size:13px;padding:8px 16px}
}
@media(max-width:700px){
  .nav{padding:0 20px}
  .footer-inner{grid-template-columns:1fr}
  .footer{padding:40px 20px}
  .nav-links .nav-link{display:none}
  /* Mobile keeps only the brand + nav-cta visible (nav-link is hidden just
     above). nav-cta's white-space:nowrap + a translated label ("Commencer
     l'essai gratuit", "無料トライアルを開始", …) forced .nav-inner past a
     390px viewport on every non-English locale — measured up to 481px of
     scrollWidth. Letting the label wrap onto two lines and capping its width
     keeps the button — and the whole row — inside the viewport without
     shrinking the brand. */
  .nav-inner{gap:8px;height:auto;min-height:64px;padding:6px 0}
  /* When the (opt-in) locale switcher is shown next to the CTA, wrap it onto
     a second row rather than pushing the row past the viewport. */
  .nav-links{flex-wrap:wrap;justify-content:flex-end;row-gap:4px}
  .brand{flex-shrink:0}
  .nav-cta{
    white-space:normal;text-align:center;line-height:1.2;
    font-size:12px;padding:8px 12px;
    max-width:min(40vw,156px);
  }
}
