/* AdvisorAI website - stylesheet (v8)
   No external fonts or CDNs: works under a strict Content-Security-Policy. */

:root {
  --navy: #0F2A44;
  --navy-2: #16395C;
  --teal: #0E7C86;
  --teal-dark: #0A5F67;
  --teal-soft: #E3F2F3;
  --amber: #B7791F;
  --amber-soft: #FFF8EB;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --text: #1B2733;
  --muted: #556575;
  --border: #DCE3EA;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65;
  color: var(--text); background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid #7CC4CA; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 .6rem; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 750; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.95rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1rem; }
code, pre { font-family: var(--mono); font-size: .9em; }
pre {
  background: #0E1B29; color: #E6EEF6; padding: 1rem 1.1rem; border-radius: 10px;
  overflow-x: auto; line-height: 1.5;
}
:not(pre) > code { background: #EDF1F5; padding: .1em .35em; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--border); backdrop-filter: saturate(1.2) blur(6px);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 750; font-size: 1.1rem; }
.brand-sub { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; margin-top: -2px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: .45rem .6rem; color: var(--navy); font: inherit; cursor: pointer;
}
.nav-list { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: .45rem .7rem; border-radius: 8px; text-decoration: none;
  color: var(--text); font-size: .94rem; font-weight: 500;
}
.nav-list a:hover { background: var(--teal-soft); color: var(--navy); }
.nav-list a[aria-current="page"] { color: var(--teal-dark); background: var(--teal-soft); font-weight: 650; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .72rem 1.15rem; border-radius: 10px; font-weight: 650; font-size: .98rem;
  text-decoration: none; border: 1.5px solid transparent; transition: background .15s, color .15s;
  cursor: pointer; line-height: 1.2;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-outline { border-color: var(--border); color: var(--navy); background: var(--surface); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--teal-soft); color: var(--navy); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-cta { margin-left: .5rem; padding: .5rem .9rem; font-size: .9rem; }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1B4D6E 100%);
  color: #fff; padding: 4.5rem 0 4rem;
}
.hero h1 { color: #fff; max-width: 17ch; }
.hero .lead { font-size: clamp(1.05rem, .95rem + .45vw, 1.25rem); color: #D5E2EE; max-width: 60ch; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: #9FD6DB; margin-bottom: .8rem;
}
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-panel {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 1.3rem 1.4rem;
}
.hero-panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; }
.hero-panel dt { color: #9FD6DB; font-weight: 650; font-size: .85rem; }
.hero-panel dd { margin: 0; color: #E6EEF6; font-size: .92rem; }

.page-hero { background: var(--navy); color: #fff; padding: 3rem 0 2.6rem; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #D5E2EE; max-width: 70ch; margin: 0; font-size: 1.08rem; }
.breadcrumb { font-size: .85rem; margin-bottom: .6rem; }
.breadcrumb a { color: #9FD6DB; }
.breadcrumb span { color: #C9D6E3; }

/* ---------------- Sections ---------------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 70ch; margin-bottom: 2rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem; box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-dark);
  display: grid; place-items: center; margin-bottom: .9rem;
}
.card-icon svg { width: 22px; height: 22px; }

.stat { text-align: left; }
.stat-value { font-size: 1.9rem; font-weight: 750; color: var(--navy); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .9rem; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(4, 1fr); }
.steps li {
  counter-increment: step; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.1rem 1rem; position: relative;
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: .9rem;
  margin-bottom: .6rem;
}
.steps h3 { font-size: 1rem; margin-bottom: .3rem; }
.steps p { color: var(--muted); font-size: .93rem; margin: 0; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding-left: 1.8rem; position: relative; margin-bottom: .55rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35rem; width: 1.05rem; height: 1.05rem;
  border-radius: 50%; background: var(--teal-soft) url("../img/check.svg") center / 70% no-repeat;
}

.callout {
  border-left: 4px solid var(--amber); background: var(--amber-soft); padding: 1rem 1.2rem;
  border-radius: 0 10px 10px 0; color: #5A3E0B;
}
.callout strong { color: #4A320A; }
.callout-info { border-left-color: var(--teal); background: var(--teal-soft); color: #0B4A50; }
.callout-info strong { color: #083B40; }

.tag { display: inline-block; font-size: .78rem; font-weight: 650; padding: .2rem .55rem;
  border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); margin: 0 .3rem .3rem 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
caption { text-align: left; padding: .8rem 1rem; font-weight: 650; color: var(--navy); }
th, td { padding: .65rem .9rem; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { background: #EEF3F7; color: var(--navy); font-weight: 650; border-top: none; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Figures */
figure { margin: 0; }
.figure { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.figure figcaption { font-size: .88rem; color: var(--muted); margin-top: .6rem; }

/* Docs layout */
.docs { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; align-items: start; }
.docs-nav { position: sticky; top: 84px; font-size: .92rem; }
.docs-nav ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.docs-nav a { display: block; padding: .3rem .8rem; color: var(--muted); text-decoration: none; margin-left: -2px;
  border-left: 2px solid transparent; }
.docs-nav a:hover { color: var(--navy); border-left-color: var(--teal); }
.docs-body > section { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.docs-body > section:last-child { border-bottom: none; }
.docs-body h2 { scroll-margin-top: 84px; }
.docs-body h3 { margin-top: 1.4rem; }
.docs-body ul, .docs-body ol { padding-left: 1.3rem; }
.docs-body li { margin-bottom: .35rem; }

/* CTA band */
.cta-band { background: var(--teal); color: #fff; padding: 3rem 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #E3F2F3; max-width: 60ch; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }

/* Contact */
.contact-card dl { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.2rem; margin: 0; }
.contact-card dt { font-weight: 650; color: var(--navy); }
.contact-card dd { margin: 0; color: var(--muted); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--navy); color: #C9D6E3; padding: 3rem 0 1.5rem; margin-top: 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: #fff; font-size: .95rem; margin-bottom: .7rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #E6EEF6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-brand p { color: #AFC1D3; max-width: 36ch; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.2rem; padding-top: 1.2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: #AFC1D3; font-size: .85rem;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1000px) {
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 64px; background: #fff;
    border-bottom: 1px solid var(--border); display: none; }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: .6rem 1.25rem 1rem; gap: .2rem; }
  .nav-cta { margin: .4rem 0 0; }
  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 3.2rem 0 3rem; }
}
@media (max-width: 560px) {
  .grid-4, .steps, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  th, td { padding: .55rem .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle, .skip-link { display: none !important; }
  body { background: #fff; }
  .hero, .page-hero { background: #fff; color: #000; padding: 1rem 0; }
  .hero h1, .page-hero h1, .hero .lead, .page-hero p { color: #000; }
}
.muted { color: var(--muted); font-size: .95rem; margin-top: 1rem; }
