/* ============================================
   acessio Design System V5 · Linear/Vercel-Grade
   Shared across all subpages
   ============================================ */
:root {
  --bg-base: #08090b;
  --bg-elevated: #0f1014;
  --bg-card: rgba(255,255,255,0.025);
  --bg-card-hover: rgba(255,255,255,0.05);
  --bg-glass: rgba(8,9,11,0.65);
  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.20);
  --text-primary: #f5f5f7;
  --text-secondary: rgba(245,245,247,0.72);
  --text-tertiary: rgba(245,245,247,0.58);
  --text-muted: rgba(245,245,247,0.32);
  --accent-blue: #6f8ff5;
  --accent-blue-soft: rgba(111,143,245,0.15);
  --accent-amber: #f5a774;
  --accent-magenta: #e07396;
  --accent-emerald: #5dd6a0;
  --display: clamp(3.5rem, 9vw, 9rem);
  --ease-out-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
:where(a, a:link, a:visited, a:hover, a:active, a:focus) { color: inherit; text-decoration: none; }
:where(button) { color: inherit; }
html, body {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: "Inter", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}
::selection { background: var(--accent-blue-soft); color: var(--text-primary); }
.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -0.025em; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* AMBIENT BG */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(111,143,245,0.08) 0%, transparent 70%);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* NAVIGATION */
.nav-wrap {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.nav-logo {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2.05rem; letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text-primary);
}
.nav-links { display: flex; align-items: center; gap: 2rem; font-size: 0.9rem; }
.nav-link {
  color: var(--text-secondary);
  position: relative;
  transition: color 0.2s var(--ease-out-soft);
  padding: 0.5rem 0;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.has-dd { display: inline-flex; align-items: center; gap: 0.4rem; cursor: default; }
.nav-link.has-dd::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.nav-dd-wrap { position: relative; padding-bottom: 0.5rem; margin-bottom: -0.5rem; }
.nav-dd {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-top: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 0.5rem;
  min-width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out-soft), transform 0.2s var(--ease-out-soft);
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.5);
}
/* Bridge: invisible hit area covering the gap between trigger and dropdown */
.nav-dd::before {
  content: "";
  position: absolute;
  top: -0.5rem; left: 0; right: 0;
  height: 0.5rem;
  background: transparent;
}
.nav-dd-wrap:hover .nav-dd,
.nav-dd-wrap:focus-within .nav-dd { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-dd-item {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.nav-dd-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.nav-dd-item .dd-title { font-weight: 500; color: var(--text-primary); display: block; }
.nav-dd-item .dd-sub { font-size: 0.78rem; color: var(--text-tertiary); display: block; margin-top: 0.15rem; }
.nav-actions { display: inline-flex; align-items: center; gap: 0.5rem; }
.nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: background 0.2s var(--ease-out-soft), border-color 0.2s, color 0.2s;
}
.nav-icon:hover { background: var(--bg-card-hover); border-color: var(--border-strong); color: var(--text-primary); }
.nav-icon svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.7; fill: none; }
@media (max-width: 600px) { .nav-icon { display: none; } }

.nav-cta {
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: background 0.2s var(--ease-out-soft), border-color 0.2s, transform 0.2s;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.nav-cta:hover { background: var(--text-primary); color: var(--bg-base); border-color: var(--text-primary); }
@media (max-width: 900px) { .nav-links { display: none; } }

/* MOBILE BURGER + OVERLAY MENU */
.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.nav-burger:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }
.nav-burger svg { width: 18px; height: 18px; stroke: var(--text-primary); stroke-width: 2; fill: none; display: block; }
@media (max-width: 900px) { .nav-burger { display: inline-flex; } }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8,9,11,0.92);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out-soft);
  overflow-y: auto;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-menu-logo {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.5rem; letter-spacing: -0.02em;
  color: var(--text-primary);
}
.mobile-menu-close {
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
}
.mobile-menu-close svg { width: 18px; height: 18px; stroke: var(--text-primary); stroke-width: 2; fill: none; display: block; }
.mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 3rem;
  flex: 1;
}
.mobile-menu-link {
  display: flex; align-items: baseline; gap: 1rem;
  color: var(--text-primary);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.75rem, 7vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1;
  transition: opacity 0.2s;
}
.mobile-menu-link:hover { opacity: 0.7; }
.mobile-menu-link .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  min-width: 24px;
}
.mobile-menu-sub {
  margin-left: 2.5rem;
  margin-top: 0.5rem;
  display: flex; flex-direction: column;
  gap: 0.6rem;
}
.mobile-menu-sub a {
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.mobile-menu-sub a:hover { color: var(--text-primary); }
.mobile-menu-cta-row {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding-top: 2rem; margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}
.mobile-menu-cta-row a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--text-primary);
  color: var(--bg-base);
  border-radius: 999px;
  text-align: center;
  font-weight: 500;
}
.mobile-menu-meta {
  margin-top: 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  text-align: center;
}
@media (min-width: 901px) {
  .mobile-menu { display: none !important; }
}

/* LAYOUT PRIMITIVES */
section { padding: clamp(5rem, 10vw, 9rem) 2rem; max-width: 1400px; margin: 0 auto; position: relative; }
.section-tight { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.section-head { max-width: 720px; margin-bottom: 4rem; }
.section-h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 1rem 0 1.5rem;
  font-weight: 400;
}
.section-h2 em { color: var(--text-secondary); font-style: italic; }
.section-lead { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; }

/* Sub-page Hero (no chatgpt demo, just clean h1) */
.sub-hero {
  padding: clamp(4rem, 8vw, 7rem) 2rem clamp(2.5rem, 5vw, 4rem);
  max-width: 1400px; margin: 0 auto;
}
.sub-hero-inner { max-width: 920px; }
.sub-hero-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-secondary);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.75rem;
}
.sub-hero-eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--border-strong);
}
.sub-hero-h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.6rem, 6.2vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 1.5rem 0 2rem;
  font-weight: 400;
  max-width: 18ch;
}
.sub-hero-h1 em { font-style: italic; color: var(--text-secondary); }
.sub-hero-sub {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.55;
}
.sub-hero-cta-row { margin-top: 3rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* === THEME COLOR TOKENS (page-cluster theming) ===
   Add .theme-emerald / .theme-blue / .theme-amber on a parent (sub-hero or body)
   to colorize em-tags and eyebrows consistently across a page. */
.theme-emerald .sub-hero-h1 em,
.theme-emerald .section-h2 em,
.theme-emerald .cta-h2 em,
.theme-emerald h3 em { color: var(--accent-emerald); }
.theme-emerald .sub-hero-eyebrow { color: var(--accent-emerald); }
.theme-emerald .sub-hero-eyebrow::before { background: var(--accent-emerald); width: 32px; height: 1px; }

.theme-blue .sub-hero-h1 em,
.theme-blue .section-h2 em,
.theme-blue .cta-h2 em,
.theme-blue h3 em { color: var(--accent-blue); }
.theme-blue .sub-hero-eyebrow { color: var(--accent-blue); }
.theme-blue .sub-hero-eyebrow::before { background: var(--accent-blue); width: 32px; height: 1px; }

.theme-amber .sub-hero-h1 em,
.theme-amber .section-h2 em,
.theme-amber .cta-h2 em,
.theme-amber h3 em { color: var(--accent-amber); }
.theme-amber .sub-hero-eyebrow { color: var(--accent-amber); }
.theme-amber .sub-hero-eyebrow::before { background: var(--accent-amber); width: 32px; height: 1px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem; font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-out-soft), background 0.25s, border-color 0.25s, color 0.25s;
}
.btn-primary { background: var(--text-primary); color: var(--bg-base); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(245,245,247,0.25); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.btn-ghost:hover { background: var(--bg-card-hover); border-color: var(--border-strong); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.25s var(--ease-out-soft); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 5rem 2rem 3rem;
  max-width: 1400px; margin: 0 auto;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-brand {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em; line-height: 1;
  display: block; margin-bottom: 1rem;
  color: var(--text-primary);
}
.footer-tag { color: var(--text-secondary); font-size: 0.95rem; max-width: 320px; line-height: 1.5; }
.footer-col-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--text-secondary); font-weight: 500;
  margin-bottom: 1rem;
}
.footer-link {
  display: block; color: var(--text-secondary);
  font-size: 0.9rem; line-height: 1.9;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 2rem; border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem; color: var(--text-tertiary); flex-wrap: wrap;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-bottom { flex-direction: column; }
}

/* REVEAL */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-out-soft), transform 0.7s var(--ease-out-soft); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* PROSE (for legal/blog) */
.prose { max-width: 720px; }
.prose p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.3em; }
.prose h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 2.5em 0 0.8em;
  color: var(--text-primary);
  font-weight: 400;
}
.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2em 0 0.6em;
  color: var(--text-primary);
}
.prose a { color: var(--accent-blue); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--text-primary); }
.prose ul, .prose ol { color: var(--text-secondary); padding-left: 1.5rem; margin-bottom: 1.3em; }
.prose li { margin-bottom: 0.4em; line-height: 1.7; }
.prose strong { color: var(--text-primary); font-weight: 600; }