/* ==========================================================================
   seo.css — shared design system for the public marketing pages.

   Lives in a cached external file (max-age=86400 via _static_cache_headers)
   rather than inline, because it is reused across every /seo page. The small
   above-the-fold subset is inlined in seo_page.html as critical CSS so the
   first paint does not wait on this request.

   Scoped intentionally: only the marketing templates load this file, so it
   cannot leak into the application UI or the landing builder.
   ========================================================================== */

:root {
  --bg:      #05080f;
  --bg2:     #0a0f1e;
  --bg3:     #0f1629;
  --border:  rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
  --txt:     #eef1ff;
  /* #93a3c4 on #05080f = 8.4:1 contrast — WCAG AAA for body text.
     The previous marketing palette used #7d8fb3 (5.6:1), which passes AA but
     fails AAA and reads poorly on low-brightness phones. */
  --txt2:    #93a3c4;
  --indigo:  #6366f1;
  --violet:  #8b5cf6;
  --cyan:    #22d3ee;
  --grad:      linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-text: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #67e8f9 100%);
  --r: 16px;
  --maxw: 900px;
}

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

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

body {
  font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Keyboard users must always be able to see where they are. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--indigo);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { inset-inline-start: 0; }

/* ── NAV ─────────────────────────────────────────────────────────────────── */
.seo-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(16px, 5vw, 60px);
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}
.seo-nav .nav-logo {
  font-size: 20px; font-weight: 900; letter-spacing: -0.5px;
  text-decoration: none;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.seo-nav ul { display: flex; gap: clamp(10px, 2vw, 22px); list-style: none; flex-wrap: wrap; }
.seo-nav a.nav-link { font-size: 14px; color: var(--txt2); text-decoration: none; transition: color .2s; }
.seo-nav a.nav-link:hover, .seo-nav a.nav-link:focus { color: var(--txt); }
.seo-nav a[aria-current="page"] { color: var(--txt); font-weight: 700; }

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 5vw, 32px); }

.crumbs { padding: 22px 0 0; font-size: 14px; color: var(--txt2); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li::after { content: "‹"; margin-inline-start: 8px; color: var(--border2); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--txt2); text-decoration: none; }
.crumbs a:hover { color: var(--txt); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--txt); }

.seo-hero { padding: 40px 0 24px; }
.seo-hero h1 {
  font-size: clamp(30px, 5.4vw, 50px);
  font-weight: 900; line-height: 1.18; letter-spacing: -1px;
  margin-bottom: 20px;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.seo-hero .lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--txt2); max-width: 68ch; }

.seo-cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 999px;
  font-size: 16px; font-weight: 700; text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px rgba(99, 102, 241, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(99, 102, 241, .5); }
.btn-ghost { border: 1px solid var(--border2); color: var(--txt); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); }

/* ── TOC ─────────────────────────────────────────────────────────────────── */
.toc {
  margin: 34px 0; padding: 22px 26px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r);
}
.toc h2 { font-size: 15px; font-weight: 800; color: var(--txt2); margin-bottom: 12px; letter-spacing: .04em; }
.toc ol { margin-inline-start: 20px; }
.toc li { margin: 6px 0; }
.toc a { color: var(--txt); text-decoration: none; border-bottom: 1px solid transparent; }
.toc a:hover { border-bottom-color: var(--cyan); }

/* ── BODY SECTIONS ───────────────────────────────────────────────────────── */
.seo-body section { padding: 34px 0; border-top: 1px solid var(--border); }
.seo-body h2 {
  font-size: clamp(23px, 3.2vw, 31px);
  font-weight: 800; line-height: 1.3; letter-spacing: -.5px;
  margin-bottom: 18px; scroll-margin-top: 84px;
}
.seo-body h3 { font-size: clamp(18px, 2.2vw, 21px); font-weight: 700; margin: 24px 0 10px; }
.seo-body p { color: var(--txt2); margin-bottom: 16px; max-width: 72ch; }
.seo-body ul.checks { list-style: none; margin: 20px 0; display: grid; gap: 11px; }
.seo-body ul.checks li {
  position: relative; padding-inline-start: 30px; color: var(--txt2); max-width: 72ch;
}
.seo-body ul.checks li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 0;
  color: var(--cyan); font-weight: 900;
}
.seo-body a { color: #a5b4fc; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
/* <details> keeps answers in the DOM even when collapsed, which is what makes
   them eligible for FAQ rich results — a JS accordion that injects text later
   would not be. */
.faq details {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg2); margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 22px; font-weight: 700; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-size: 22px; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details > p { padding: 0 22px 20px; color: var(--txt2); margin: 0; }

/* ── RELATED / INTERNAL LINKS ────────────────────────────────────────────── */
.related { padding: 34px 0; border-top: 1px solid var(--border); }
.related h2 { font-size: 21px; font-weight: 800; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.related-card {
  display: block; padding: 18px 20px; text-decoration: none;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .2s, transform .2s;
}
.related-card:hover { border-color: var(--indigo); transform: translateY(-2px); }
.related-card .rc-title { font-weight: 700; color: var(--txt); margin-bottom: 6px; }
.related-card .rc-desc { font-size: 14px; color: var(--txt2); line-height: 1.6; }

/* ── FINAL CTA ───────────────────────────────────────────────────────────── */
.seo-final-cta {
  margin: 40px 0; padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(139, 92, 246, .1));
  border: 1px solid var(--border2); border-radius: 22px; text-align: center;
}
.seo-final-cta h2 { font-size: clamp(23px, 3.4vw, 31px); font-weight: 800; margin-bottom: 12px; }
.seo-final-cta p { color: var(--txt2); margin-bottom: 24px; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.seo-footer { border-top: 1px solid var(--border); padding: 40px 0 56px; margin-top: 20px; }
.seo-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.seo-footer h2 { font-size: 14px; font-weight: 800; color: var(--txt); margin-bottom: 12px; }
.seo-footer ul { list-style: none; }
.seo-footer li { margin: 7px 0; }
.seo-footer a { color: var(--txt2); text-decoration: none; font-size: 14px; }
.seo-footer a:hover { color: var(--txt); text-decoration: underline; }
.seo-footer .copy {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--txt2);
}
