/* ============================================================================
   shared.css — the one stylesheet every marketing page links.

   Holds the brand tokens + the chrome that used to be copy-pasted into every
   static HTML file: the CSS reset, the sticky nav, the footer, and the shared
   layout primitives (.container, .eyebrow, .it, .btn, .back-link). Page-unique
   styling stays inline in each page's own <style> block.

   Edit nav/footer *markup* in partials/nav.html and partials/footer.html.
   ============================================================================ */
/* ============================================================================
   Learniva brand tokens — the single source of truth for the marketing site.

   These values mirror the product app (geometry_review) one-for-one:
     --ink   #182157  == product --learniva-navy
     --blue  #4760f1  == product --learniva-blue
     --cyan  #5db3cd  == product --learniva-sky
     --paper #f8f3e5  == product --learniva-cream
   Keep them in sync with geometry_review/app/globals.css :root so the
   marketing site and product never visually drift apart.
   ============================================================================ */
:root {
  --ink: #182157;
  --ink-soft: #2a3370;
  --ink-mute: #5a629a;
  --paper: #F8F3E5;
  --paper-deep: #efe7d0;
  --paper-line: #e6dec3;
  --blue: #4760F1;
  --cyan: #5DB3CD;
  --white: #ffffff;
  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}


/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::-moz-selection { background: var(--ink); color: var(--paper); }

::selection { background: var(--ink); color: var(--paper); }

/* ── nav ── */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav-wrap.scrolled { border-bottom-color: var(--paper-line); }
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.brand-logo {
  display: block;
  width: 276px;
  height: 72px;
  -o-object-fit: contain;
     object-fit: contain;
  -o-object-position: left center;
     object-position: left center;
  mix-blend-mode: multiply;
}
.nav-links {
  display: flex; gap: 28px;
  flex: 1;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--blue); }
.nav-links a.active { color: var(--ink); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 14px; font-size: 14.5px; }
.nav-lang { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); }
.nav-lang-btn { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); transition: color .15s; }
.nav-lang-btn.active { color: var(--ink); font-weight: 500; }
.nav-lang-btn:hover { color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .15s ease, background .15s ease;
}
.nav-cta:hover { background: var(--blue); transform: translateY(-1px); }
.nav-cta .arr { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 0; }

/* On desktop the menu wrapper is transparent — .nav-links / .nav-actions flow
   straight into .nav as flex items, exactly as before. Below 1040px it becomes
   a real dropdown box (see the chrome-responsive media query). */
.nav-menu { display: contents; }

/* Hamburger — hidden on desktop, revealed when the nav collapses. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  margin-left: auto;
  padding: 0;
  background: none; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-wrap.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-wrap.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-wrap.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── shared layout primitives ── */
section { position: relative; }
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px;
  background: var(--ink-mute);
  display: inline-block;
}
.it { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--blue); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arr { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 0; }

/* back link (article / sub pages) */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.12em;
  transition: color .15s ease;
  margin-bottom: 32px;
}

/* ── footer ── */
.foot { background: var(--ink); color: var(--paper); padding: 80px 0 32px; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 64px; border-bottom: 1px solid #2a3370; }
.foot-brand-logo { width: 130px; height: auto; filter: brightness(10); }
.foot-tag { margin-top: 16px; font-family: var(--serif); font-size: 22px; line-height: 1.25; max-width: 24ch; color: color-mix(in oklab, var(--paper) 90%, transparent); }
.foot-tag .em { font-style: italic; color: var(--cyan); }
.foot-col h5 { font-family: var(--mono); font-size: 11px; color: color-mix(in oklab, var(--paper) 60%, transparent); text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 18px; font-weight: 400; }
.foot-col a { display: block; padding: 6px 0; color: color-mix(in oklab, var(--paper) 88%, transparent); font-size: 14.5px; transition: color .15s ease; }
.foot-col a:hover { color: var(--cyan); }
.foot-bottom { margin-top: 28px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: color-mix(in oklab, var(--paper) 55%, transparent); text-transform: uppercase; letter-spacing: 0.12em; }
.foot-bottom a { color: inherit; }
.foot-bottom a:hover { color: var(--cyan); }

/* ── skip link (visually hidden until focused) ── */
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 1000;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 0 0 8px 8px;
  font-family: var(--sans); font-size: 14px; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ── visible breadcrumbs (article pages) ── */
.breadcrumbs { padding: 20px 0 4px; }
.breadcrumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; opacity: 0.5; }
.breadcrumbs a { color: inherit; opacity: 0.7; text-decoration: none; }
.breadcrumbs a:hover { opacity: 1; color: var(--cyan); }
.breadcrumbs [aria-current="page"] {
  max-width: min(48ch, 70vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: 0.95;
}
.breadcrumbs [aria-current="page"] .em { font-style: normal; color: inherit; }

/* ── FAQ accordion ── */
.faq-h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 52px); line-height: 1.04; letter-spacing: -0.02em; color: var(--ink); margin: 14px 0 32px; }
.faq-h2 .em { font-style: italic; color: var(--blue); }
.faq-list { max-width: 760px; }
.faq-item { border-top: 1px solid var(--paper-line); }
.faq-item:last-child { border-bottom: 1px solid var(--paper-line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-family: var(--sans); font-size: clamp(16px, 2vw, 19px); font-weight: 500; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 24px; line-height: 1; color: var(--ink-mute); transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { color: var(--blue); }
.faq-item summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 4px; }
.faq-a { padding: 0 0 22px; }
.faq-a p { margin: 0; max-width: 64ch; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }

/* ── chrome responsive ── */
@media (max-width: 980px) {
  .foot-top { grid-template-columns: 1fr 1fr; }
}

/* Mobile/tablet nav: the full horizontal bar (276px logo + 6 links + actions)
   stops fitting well under ~1040px, so collapse it into the hamburger panel.
   The .nav-menu descendant selectors (specificity 0,2,0) intentionally beat the
   per-page inline `.nav-links { display: none }` rules so the links stay usable
   inside the dropdown. */
@media (max-width: 1040px) {
  .nav { position: relative; }
  .nav-toggle { display: flex; }
  .brand-logo { width: auto; height: 48px; }

  .nav-menu {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: 10px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--paper-line);
    box-shadow: 0 26px 50px -28px rgba(24, 33, 87, 0.55);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .nav-wrap.nav-open .nav-menu { opacity: 1; visibility: visible; transform: none; }

  .nav-menu .nav-links {
    display: flex; flex-direction: column; gap: 0; flex: none;
    font-size: 17px;
  }
  .nav-menu .nav-links a {
    padding: 15px 2px;
    border-bottom: 1px solid var(--paper-line);
  }
  .nav-menu .nav-actions {
    flex-direction: column; align-items: stretch; gap: 18px;
    margin-top: 20px;
  }
  .nav-menu .nav-lang { justify-content: center; font-size: 14px; }
  .nav-menu .nav-cta { justify-content: center; padding: 14px 20px; font-size: 15px; }
}

@media (max-width: 560px) {
  .foot-top { grid-template-columns: 1fr; }
}
