/* ====================================================================
   MentraNova design system — shared tokens, typography, nav, footer
   Linked by: homepage, tests, articles, and other public pages.
   Edit here, update everywhere.
   ==================================================================== */

:root {
  /* palette */
  --bg: #faf5ee;
  --bg-2: #f2ebdf;
  --surface: #ffffff;
  --ink: #16243a;
  --ink-2: #4a5469;
  --ink-3: #8088a0;
  --line: #e8e0d0;
  --line-2: #dacfb9;

  --accent: oklch(0.58 0.16 245);
  --accent-ink: oklch(0.42 0.18 250);
  --accent-soft: oklch(0.90 0.06 245);
  --accent-tint: oklch(0.96 0.02 245);

  --warm: oklch(0.68 0.17 35);
  --warm-ink: oklch(0.54 0.19 30);
  --warm-soft: oklch(0.92 0.07 35);
  --warm-tint: oklch(0.97 0.03 35);

  --amber: oklch(0.78 0.14 75);
  --amber-soft: oklch(0.92 0.07 75);

  --green: oklch(0.68 0.16 155);
  --red: oklch(0.62 0.22 25);

  /* radii + shadow */
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 18px;
  --radius-xl: 28px;
  --shadow-s: 0 1px 2px rgba(20,15,5,.04), 0 1px 1px rgba(20,15,5,.03);
  --shadow-m: 0 2px 4px rgba(20,15,5,.04), 0 8px 24px rgba(20,15,5,.06);
  --shadow-l: 0 4px 8px rgba(20,15,5,.05), 0 24px 48px rgba(20,15,5,.08);

  /* fonts */
  --ff-sans: 'Geist', system-ui, -apple-system, 'Plus Jakarta Sans', sans-serif;
  --ff-mono: 'Geist Mono', ui-monospace, 'JetBrains Mono', monospace;
  /* Fraunces is loaded by the homepage and any page using `var(--ff-serif)`
     for headings/FAQs. Falls back to Georgia/Times if Fraunces isn't loaded. */
  --ff-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* legacy var aliases — keep working for inline styles on older pages */
  --primary: var(--accent);
  --primary-dark: var(--accent-ink);
  --primary-light: var(--accent-soft);
  --primary-bg: var(--accent-tint);
  --blue: var(--accent);
  --blue-dark: var(--accent-ink);
  --black: var(--ink);
  --white: var(--surface);
  --gray-50: var(--bg);
  --gray-100: var(--bg-2);
  --gray-200: var(--line);
  --gray-300: var(--line-2);
  --gray-400: var(--ink-3);
  --gray-600: var(--ink-2);
  --gray-800: var(--ink);
  --gray-900: var(--ink);
  --orange: var(--warm);
  --success: var(--green);
}

/* ---- RESET + BASE ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-sans);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
.display { font-size: clamp(40px, 5.5vw, 68px); letter-spacing: -0.045em; font-weight: 800; line-height: .98; }
.sec-kicker {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---- LAYOUT ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

/* ---- NAV ---- */
.nav,
nav.nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 1px solid color-mix(in oklch, var(--line) 50%, transparent);
}
@media (max-width: 720px) { .nav, nav.nav { padding: 14px 20px; } }

.nav-logo {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-logo::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: url('/icon-192.png') center / cover no-repeat;
  display: inline-block;
  flex-shrink: 0;
}

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-link {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all .15s;
}
.nav-link:hover {
  background: var(--surface);
  color: var(--ink);
}

/* ---- CTA buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  transition: all .15s;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { color: var(--ink-2); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--line-2); color: var(--ink); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-ink); }

/* Legacy nav-cta (used on old articles) — restyle to match */
.nav-cta {
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  transition: all .15s;
}
.nav-cta:hover { background: var(--accent-ink); transform: none; }

/* ---- Language switcher (embedded in nav on articles) ---- */
.lang-switcher { position: relative; margin-left: 4px; }
.lang-btn-nav {
  background: transparent;
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 13px;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  white-space: nowrap;
}
.lang-btn-nav:hover { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.lang-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 6px;
  width: 160px;
  box-shadow: var(--shadow-m);
  display: none;
  z-index: 1001;
}
.lang-dropdown.active { display: block; animation: langIn .2s ease-out; }
.lang-opt {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  transition: background .15s;
}
.lang-opt:hover { background: var(--bg); color: var(--ink); }
.lang-opt.active { background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; }
@keyframes langIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- FOOTER (shared) ---- */
.footer {
  background: var(--surface);
  color: var(--ink-2);
  padding: 48px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.footer a {
  color: var(--ink-2);
  text-decoration: none;
  margin: 0 10px;
  transition: color .15s;
}
.footer a:hover { color: var(--ink); }

/* ---- Breadcrumb ---- */
.breadcrumb {
  padding: 28px 24px 0;
  max-width: 820px;
  margin: 0 auto;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.breadcrumb a { color: var(--accent-ink); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
