/* Avanis AI v2: institutional light theme shared with StockLens.
   Tokens mirror stocklens/frontend/app/globals.css. Legacy pages still
   use styles.css; pages migrate here one by one. */

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-hover: #f4f7fa;
  --edge: #d4e2ec;
  --edge-strong: #b7cbdc;
  --ink: #1f4262;
  --ink-muted: #5a728a;
  --ink-faint: #8098ae;
  --accent: #46ad96;
  --accent-strong: #3a9a84;
  --accent-soft: rgba(70, 173, 150, 0.12);
  --gold: #c9a24d;
  --paper: #f8fafb;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: Inter, system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; color: var(--ink); text-wrap: pretty; }
p { text-wrap: pretty; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}
.nav .container { max-width: none; padding: 0 44px; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { height: 32px; width: auto; }
.nav-brand span { font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--ink-muted); padding-bottom: 4px; border-bottom: 2px solid transparent; }
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle svg { display: block; stroke: var(--ink); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font-size: 15px; font-weight: 600; padding: 14px 28px; border-radius: var(--radius-sm); border: 0; cursor: pointer; font-family: inherit; transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease; }
.btn-primary { background: var(--accent); color: var(--paper); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-strong); color: var(--paper); transform: translateY(-1px); }
.btn-outline { background: var(--panel); color: var(--ink); border: 1px solid var(--edge-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.btn-sm { font-size: 14px; padding: 11px 22px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--panel-hover); border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.section-head { font-size: clamp(1.7rem, 3vw, 2.25rem); margin-top: 10px; }
.section-sub { color: var(--ink-muted); font-size: 15px; margin-top: 8px; max-width: 640px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; align-items: center; padding: 88px 0 96px; }
.hero h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1.08; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-lede { font-size: 18px; line-height: 1.65; color: var(--ink-muted); max-width: 540px; margin-top: 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-note { font-size: 13px; color: var(--ink-faint); margin-top: 20px; }

/* ---------- Cards & grids ---------- */
.card { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform 0.18s ease, border-color 0.18s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--edge-strong); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card h3 { font-family: var(--font-sans); font-size: 17px; font-weight: 600; }
.card-serif h3 { font-family: var(--font-serif); font-size: 24px; }
.card p { font-size: 14px; line-height: 1.65; color: var(--ink-muted); margin-top: 10px; }
.card .accent-line { color: var(--ink); }
.card .accent-line b { color: var(--accent); font-weight: 600; }
.card .k { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }
.card .icon { width: 24px; height: 24px; stroke: var(--accent); margin-bottom: 12px; }
.link-arrow { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; transition: gap 0.15s ease; }
.link-arrow:hover { gap: 10px; }

/* ---------- Demo card ---------- */
.demo-card { border: 1px solid var(--edge); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.demo-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--edge); background: var(--panel-hover); }
.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--edge); }
.demo-title { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); margin-left: 8px; }
.demo-body { display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.demo-q { align-self: flex-end; background: var(--panel-hover); border-radius: 12px; padding: 12px 16px; font-size: 14px; max-width: 400px; }
.demo-block { border: 1px solid var(--edge); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.demo-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.demo-label { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.demo-figure { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.demo-figure b { color: var(--accent); font-weight: 500; }
.demo-quote { background: var(--panel-hover); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.55; color: var(--ink-muted); font-style: italic; }
.demo-cite { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.demo-cite svg { stroke: var(--accent); flex-shrink: 0; }
.demo-ticks { display: flex; gap: 5px; }
.demo-tick { width: 30px; height: 8px; border-radius: 4px; background: var(--accent); }
.demo-tick.miss { background: var(--edge); }
.demo-foot { font-size: 12px; color: var(--ink-faint); }
.demo-input { display: flex; align-items: center; gap: 10px; border: 1px solid var(--edge); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; color: var(--ink-faint); }
.demo-input .chip { background: var(--accent); color: var(--paper); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 8px; }
.demo-caption { font-size: 12px; color: var(--ink-faint); text-align: right; margin-top: 8px; }

/* ---------- Team ---------- */
.team-card { display: flex; gap: 18px; align-items: flex-start; }
.team-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 12%; flex-shrink: 0; }
.team-name { font-family: var(--font-sans); font-size: 16px; font-weight: 600; }
.team-role { font-size: 13px; font-weight: 500; color: var(--accent); margin-top: 2px; }
.team-bio { font-size: 13px; line-height: 1.6; color: var(--ink-muted); margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq-list { border: 1px solid var(--edge); border-radius: 14px; background: var(--panel); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--edge); }
.faq-item:last-child { border-bottom: 0; }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 17px 22px; background: none; border: 0; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; }
.faq-q .faq-mark { color: var(--ink-faint); font-size: 16px; transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item.open .faq-mark { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s ease; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a p { overflow: hidden; min-height: 0; padding: 0 22px; font-size: 14px; line-height: 1.65; color: var(--ink-muted); }
.faq-a p::after { content: ""; display: block; height: 18px; }

/* ---------- Contact ---------- */
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 1px solid var(--edge); border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 500; color: var(--ink-muted); background: var(--panel); }
.booking-card { display: flex; align-items: center; gap: 16px; border: 1px solid var(--edge); border-radius: 14px; padding: 18px 22px; background: var(--panel); box-shadow: var(--shadow); color: var(--ink); transition: border-color 0.15s ease, transform 0.15s ease; }
.booking-card:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.booking-card svg { stroke: var(--accent); flex-shrink: 0; }
.booking-text { flex-grow: 1; }
.booking-text b { display: block; font-size: 15px; }
.booking-text span { font-size: 13px; color: var(--ink-muted); }
.booking-arrow { color: var(--accent); font-size: 18px; }
.or-divider { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--ink-faint); }
.or-divider::before, .or-divider::after { content: ""; flex-grow: 1; height: 1px; background: var(--edge); }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-muted); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; border: 1px solid var(--edge-strong); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; font-family: inherit; color: var(--ink); background: var(--panel); outline: none; transition: border-color 0.15s ease; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 96px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.contact-email { font-size: 13px; color: var(--ink-faint); }

/* ---------- Tiers ---------- */
.tier-card { display: flex; flex-direction: column; gap: 16px; position: relative; }
.tier-card.is-featured { border: 2px solid var(--accent); }
.tier-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--paper); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.tier-name { font-size: 16px; font-weight: 600; }
.tier-sub { font-size: 13px; color: var(--ink-faint); }
.tier-price { font-family: var(--font-mono); font-size: 30px; font-weight: 500; }
.tier-price small { font-family: var(--font-sans); font-size: 13px; color: var(--ink-faint); font-weight: 400; }
.tier-feats { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.tier-cta { margin-top: auto; }
.billing-toggle { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--edge); border-radius: var(--radius-sm); padding: 3px; background: var(--panel-hover); }
.billing-toggle button { appearance: none; border: 0; background: none; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--ink-muted); padding: 8px 18px; border-radius: 8px; cursor: pointer; }
.billing-toggle button.is-on { font-weight: 600; color: var(--ink); background: var(--panel); box-shadow: var(--shadow); }

/* ---------- Coverage table ---------- */
.coverage { border: 1px solid var(--edge); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.coverage-row { display: grid; grid-template-columns: 1.2fr 2fr 0.8fr; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--edge); align-items: center; }
.coverage-row:last-child { border-bottom: 0; }
.coverage-row.head { padding: 14px 24px; background: var(--panel-hover); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.coverage-market { font-size: 15px; font-weight: 600; }
.coverage-desc { font-size: 14px; color: var(--ink-muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.pill-live { background: var(--accent-soft); color: #2e7d68; }
.pill-soon { background: var(--panel-hover); border: 1px solid var(--edge); color: var(--ink-muted); }

/* ---------- Flow / steps ---------- */
.flow { display: flex; align-items: stretch; gap: 18px; }
.flow-arrow { display: flex; align-items: center; color: var(--ink-faint); font-size: 20px; flex-shrink: 0; }
.flow .card { flex: 1; }
.flow .step-k { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-bottom: 12px; }

/* ---------- Honesty box / CTA band ---------- */
.honesty { border: 1px solid var(--edge-strong); border-radius: var(--radius); padding: 32px; background: var(--panel); }
.honesty-head { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.honesty-head svg { stroke: #8a6215; }
.honesty p { font-size: 14px; line-height: 1.7; color: var(--ink-muted); margin-top: 14px; max-width: 900px; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--edge); border-radius: var(--radius); padding: 36px 40px; background: var(--panel-hover); }
.cta-band h3 { font-size: 26px; }
.cta-band p { font-size: 14px; color: var(--ink-muted); margin-top: 6px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--edge); background: var(--panel); padding: 56px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 26px; width: auto; }
.footer-brand span { font-weight: 700; font-size: 15px; color: var(--ink); }
.footer-tag { font-size: 13px; line-height: 1.6; color: var(--ink-faint); max-width: 320px; margin-top: 10px; }
.footer-col h4 { font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.footer-col a { display: block; font-size: 13px; color: var(--ink-muted); margin-bottom: 8px; }
.footer-col a:hover { color: var(--accent); }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--edge); font-size: 12px; line-height: 1.7; color: var(--ink-faint); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .card:hover, .btn:hover, .booking-card:hover { transform: none; }
}

/* ---------- Legal / long-form pages ---------- */
.page-wrap { max-width: 780px; margin: 0 auto; padding: 56px 32px 88px; }
.legal-body h1 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); margin-top: 12px; }
.legal-body h2 { font-family: var(--font-sans); font-size: 17px; font-weight: 600; margin: 28px 0 8px; }
.legal-body p { font-size: 15px; line-height: 1.75; color: var(--ink-muted); margin-bottom: 12px; }
.legal-body ul, .legal-body ol { margin: 0 0 12px 20px; color: var(--ink-muted); font-size: 15px; line-height: 1.75; }
.legal-body .article-meta { font-size: 13px; color: var(--ink-faint); margin-bottom: 20px; }
.legal-body code { font-family: var(--font-mono); font-size: 13px; background: var(--panel-hover); padding: 1px 6px; border-radius: 6px; }
.legal-body strong { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 56px 0 64px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { flex-direction: column; }
  .flow-arrow { justify-content: center; transform: rotate(90deg); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .container { padding: 0 20px; }
  .grid-2, .grid-4, .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--panel); border-bottom: 1px solid var(--edge); flex-direction: column; align-items: flex-start; padding: 16px 20px; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .coverage-row { grid-template-columns: 1fr; gap: 6px; }
}
