/* =============================================================================
   QuaeroLex — marketing site
   Palette + tokens adapted from the product app (app/static/css/base.css).
   ============================================================================= */
:root {
  --bg: #0a0c10;
  --bg-2: #0c0e12;
  --surface-1: #14171d;
  --surface-2: #1c2028;
  --surface-3: #232830;
  --surface-4: #2b313b;

  --line: #20252e;
  --line-strong: #303642;

  --text: #e9ecef;
  --text-dim: #9aa4b2;
  --text-faint: #6f7988;

  --accent: #6f93e0;
  --accent-bright: #8da9ea;
  --accent-strong: #5277c9;
  --accent-dim: rgba(111, 147, 224, 0.14);
  --navy: #2c4a78;
  --navy-deep: #1c3050;
  --on-accent: #0a1220;
  --cream: #d8d2c4;

  --warn: #f0b94e;
  --ok: #5fb985;

  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --r-4: 22px;
  --r-pill: 999px;

  --content: 1180px;
  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.55);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Iowan Old Style", "Times New Roman", serif;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.65 var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--accent-bright); }
img { max-width: 100%; display: block; }
::selection { background: rgba(111, 147, 224, 0.32); }

.container {
  width: 100%; max-width: var(--content); margin: 0 auto;
  /* max() keeps the 24px gutter but grows it to clear a notch in landscape. */
  padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right));
}
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ----------------------------- Typography ----------------------------- */
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-family: var(--sans); font-weight: 600; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-bright);
}
.eyebrow.center { display: flex; justify-content: center; }

.grad {
  background: linear-gradient(100deg, var(--accent-bright), var(--accent) 55%, var(--navy));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.section-lede { color: var(--text-dim); font-size: 1.12rem; line-height: 1.7; }

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px; border-radius: var(--r-pill);
  font: 600 0.95rem/1 var(--sans);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), color 0.15s var(--ease);
}
.btn svg { flex: none; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 6px 20px rgba(111, 147, 224, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { color: var(--on-accent); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(111, 147, 224, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-ghost { background: rgba(255, 255, 255, 0.02); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }

/* ============================ NAV ============================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), backdrop-filter 0.25s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 12, 16, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav-menu { display: contents; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { height: 34px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.brand-name { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-name .lex { color: var(--accent); }
.nav-links { display: flex; gap: 28px; margin-left: 12px; }
.nav-links a, .nav-links button { color: var(--text-dim); font-size: 0.94rem; font-weight: 500; }
.nav-links button { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; text-align: left; }
.nav-links a:hover, .nav-links button:hover { color: var(--text); }
.nav-cta { margin-left: auto; }
.nav-toggle { display: none; margin-left: auto; background: none; border: none; color: var(--text); padding: 6px; cursor: pointer; }

/* ============================ HERO ============================ */
.hero { position: relative; padding: 150px 0 60px; overflow: hidden; }
.hero-glow {
  position: absolute; top: -240px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 720px; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(111, 147, 224, 0.22), transparent 70%),
    radial-gradient(closest-side, rgba(44, 74, 120, 0.30), transparent 72%);
  filter: blur(8px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image:
    linear-gradient(rgba(111,147,224,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111,147,224,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero-grid {
  position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
}
.hero-copy h1 { margin: 18px 0 22px; }
.lede { color: var(--text-dim); font-size: 1.18rem; line-height: 1.72; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 26px; }
.hero-bullets { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-bullets li { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 0.95rem; }
.chk { width: 17px; height: 17px; color: var(--accent); flex: none; }

/* --- credibility band (security posture, under the hero) --- */
.cred { border-top: 1px solid var(--line); background: var(--bg-2); }
.cred-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 0; text-align: center; }
.cred-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cred-chips li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--r-pill);
  background: var(--surface-1); border: 1px solid var(--line);
  font-size: 0.84rem; color: var(--text-dim);
}
.cred-chips svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.cred-link { font-size: 0.9rem; font-weight: 600; }

/* --- product mock --- */
.hero-mock { perspective: 1600px; }
.mock-window {
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(3deg);
  transform-style: preserve-3d;
}
.mock-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-4); }
.mock-url { margin-left: 12px; font-size: 0.78rem; color: var(--text-faint); font-family: var(--serif); }
.mock-prompt-label { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-bright); font-weight: 600; }

/* status pill on the window bar */
.mock-status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; color: var(--text-dim); }
.mock-status svg { width: 12px; height: 12px; }
.mock-status .spin { width: 11px; height: 11px; border: 2px solid var(--accent-strong); border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.mock-status.done { color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }

/* the research feed — a scrolling activity log */
.mock-feed {
  height: 432px; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 11px;
  scrollbar-width: none;
}
.mock-feed::-webkit-scrollbar { width: 0; height: 0; }
/* No animation → no auto-scroll, so let the panel grow to show the whole feed. */
@media (prefers-reduced-motion: reduce) { .mock-feed { height: auto; } }
.feed-item { flex: none; animation: feedIn 0.45s var(--ease) both; }
@keyframes feedIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.feed-q { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-2); padding: 11px 13px; }
.feed-q p { margin-top: 4px; color: var(--text); font-size: 0.92rem; line-height: 1.5; }

.feed-step { display: flex; align-items: center; gap: 9px; font-size: 0.8rem; color: var(--text-dim); }
.feed-step .step-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--accent-dim); border: 1px solid var(--accent-strong); color: var(--accent-bright); }
.feed-step .step-ic svg { width: 14px; height: 14px; }
.feed-step .step-q { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, monospace; font-size: 0.75rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }

.feed-hit { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: start; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-2); padding: 9px 11px; }
.feed-hit .hit-ic { color: var(--accent-bright); margin-top: 1px; }
.feed-hit .hit-ic svg { width: 15px; height: 15px; }
.hit-file { font-size: 0.78rem; color: var(--text); font-weight: 600; }
.hit-file span { color: var(--text-faint); font-weight: 400; }
.hit-snip { font-size: 0.74rem; color: var(--text-dim); font-style: italic; margin-top: 3px; line-height: 1.45; }
.hit-rel { text-align: right; }
.hit-rel b { font-size: 0.72rem; color: var(--accent-bright); }
.hit-bar { width: 44px; height: 4px; border-radius: 3px; background: var(--surface-4); margin-top: 5px; overflow: hidden; }
.hit-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); transition: width 0.7s var(--ease); }

.feed-reason { border-left: 2px solid var(--accent-strong); padding: 3px 0 3px 13px; display: flex; flex-direction: column; gap: 7px; }
.feed-reason .reason-head { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.reason-line { font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; }
.reason-line::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--accent); vertical-align: middle; }

.feed-answer { background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 13px; }
.feed-answer .ans-label { display: flex; align-items: center; gap: 5px; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ok); font-weight: 600; margin-bottom: 7px; }
.feed-answer .ans-label svg { width: 13px; height: 13px; }
.feed-answer p { font-size: 0.9rem; line-height: 1.65; color: var(--text); }
.feed-answer strong { color: var(--accent-bright); font-weight: 600; }

.feed-audit { display: flex; align-items: center; gap: 7px; color: var(--ok); font-size: 0.76rem; font-weight: 600; }
.feed-audit svg { width: 13px; height: 13px; flex: none; }

.cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px; margin: 0 1px;
  border-radius: 5px; background: var(--accent-dim); border: 1px solid var(--accent-strong);
  color: var(--accent-bright); font-size: 0.7rem; font-weight: 700; vertical-align: 1px;
}
.cite.pop { animation: citePop 0.42s var(--ease); }
@keyframes citePop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); opacity: 1; }
}

html.js .caret::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em;
  background: var(--accent); margin-left: 2px; vertical-align: -3px;
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* ============================ SECTIONS ============================ */
.section { padding: 96px 0; position: relative; }
.section.alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { margin: 16px 0 16px; }
.section-head .section-lede { margin: 0 auto; }

/* --- security / trust --- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust-item {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: 24px 22px; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.trust-item:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.trust-ic {
  width: 42px; height: 42px; border-radius: var(--r-2); display: grid; place-items: center;
  margin-bottom: 14px; color: var(--accent-bright);
  background: var(--accent-dim); border: 1px solid var(--accent-strong);
}
.trust-ic svg { width: 21px; height: 21px; }
.trust-item h3 { font-size: 1.1rem; margin-bottom: 7px; }
.trust-item p { color: var(--text-dim); font-size: 0.94rem; line-height: 1.6; }
.trust-foot { text-align: center; color: var(--text-faint); font-size: 0.96rem; margin-top: 36px; }
.trust-foot a { font-weight: 600; }

/* Honeypot field — visually hidden, off the tab order, hidden from a11y tree. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- features --- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-3);
  padding: 30px 28px; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.feature:hover { border-color: var(--accent-strong); transform: translateY(-4px); box-shadow: var(--shadow-2); }
.feature-icon {
  width: 50px; height: 50px; border-radius: var(--r-2); display: grid; place-items: center;
  margin-bottom: 18px; color: var(--accent-bright);
  background: var(--accent-dim); border: 1px solid var(--accent-strong);
}
.feature-icon svg { width: 25px; height: 25px; }
.feature h3 { font-size: 1.24rem; margin-bottom: 9px; }
.feature p { color: var(--text-dim); font-size: 0.98rem; }

/* --- steps --- */
.steps { max-width: 780px; margin: 0 auto; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 22px; }
.step-rail { display: flex; flex-direction: column; align-items: center; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.25rem;
  color: var(--accent-bright); background: var(--surface-1); border: 1px solid var(--accent-strong);
  box-shadow: 0 0 0 5px rgba(111, 147, 224, 0.07);
}
.step-rail::after { content: ""; flex: 1; width: 2px; background: linear-gradient(var(--accent-strong), var(--line)); margin: 6px 0; min-height: 26px; }
.step-rail.last::after { display: none; }
.step-body { padding-bottom: 44px; }
.step-body h3 { font-size: 1.4rem; margin-bottom: 8px; }
.step-body p { color: var(--text-dim); }
.step:last-child .step-body { padding-bottom: 0; }

/* --- faq (native <details> accordion) --- */
.faq { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-2);
  overflow: hidden; transition: border-color 0.2s var(--ease);
}
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 18px 20px; font-weight: 600; font-size: 1.02rem; color: var(--text);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-bright); }
.faq-chevron { margin-left: auto; flex: none; width: 18px; height: 18px; color: var(--text-faint); transition: transform 0.2s var(--ease); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-body { padding: 0 20px 18px; }
.faq-body p { color: var(--text-dim); font-size: 0.96rem; line-height: 1.65; }


/* --- reports: a large panel that drafts a cited advice (js/report.js) --- */
.report-panel {
  max-width: 940px; margin: 56px auto 0;
  background: var(--surface-1); border: 1px solid var(--line-strong);
  border-radius: var(--r-3); box-shadow: var(--shadow-3); overflow: hidden;
}
.report-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.report-app { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--text); }
.report-app img { height: 18px; width: auto; }
.report-matter { font-family: var(--serif); font-size: 0.82rem; color: var(--text-faint); padding-left: 12px; border-left: 1px solid var(--line-strong); }
.report-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.report-status svg { width: 13px; height: 13px; }
.report-status .spin { width: 11px; height: 11px; border: 2px solid var(--accent-strong); border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.report-status.done { color: var(--ok); }

.report-page {
  height: 560px; overflow-y: auto; scrollbar-width: none;
  padding: 46px 56px 60px;
  background: linear-gradient(180deg, #fbfaf7, #f4f2ec);
  color: #1a1f29; font-family: var(--serif);
}
.report-page::-webkit-scrollbar { width: 0; height: 0; }
@media (prefers-reduced-motion: reduce) { .report-page { height: auto; } }
.report-doc-title { text-align: center; font-weight: 700; font-size: 1.18rem; letter-spacing: 0.06em; color: #1a1f29; }
.report-doc-parties { text-align: center; font-family: var(--serif); font-weight: 600; font-size: 1rem; color: #1a1f29; margin-top: 6px; }
.report-doc-sub { text-align: center; font-family: var(--sans); font-size: 0.78rem; color: #6b7280; margin-top: 6px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1.5px solid #d8d4cb; }
.rsec { margin-bottom: 20px; }
.rhead { font-family: var(--serif); font-weight: 700; font-size: 0.98rem; color: var(--navy-deep); margin-bottom: 10px; text-decoration: underline; text-underline-offset: 3px; }
.rpara { display: grid; grid-template-columns: 30px 1fr; margin-bottom: 13px; }
.rnum { font-family: var(--serif); font-weight: 600; color: #1a1f29; }
.rpara p { font-family: var(--serif); font-size: 0.96rem; line-height: 1.8; color: #232a36; text-align: justify; }
.rpara p strong { color: var(--navy); font-weight: 700; }
.rsign { margin-top: 28px; text-align: right; font-family: var(--serif); }
.rsign-rule { width: 180px; height: 1px; background: #b9b3a5; margin: 0 0 7px auto; }
.rsign b { font-weight: 700; letter-spacing: 0.06em; color: #1a1f29; }
.rsign span { display: block; font-family: var(--sans); font-size: 0.74rem; font-style: italic; color: #6b7280; margin-top: 4px; }
.report-caret::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em;
  background: var(--accent-strong); margin-left: 2px; vertical-align: -3px;
  animation: caretBlink 1s steps(1) infinite;
}
/* citation chips read on the cream page */
.report-page .cite {
  background: rgba(58, 96, 176, 0.12); border: 1px solid #3a60b0; color: #2c4d96;
}

/* --- demo --- */
.demo { position: relative; overflow: hidden; border-top: 1px solid var(--line); background: var(--bg-2); }
.demo-glow { position: absolute; bottom: -300px; left: 50%; transform: translateX(-50%); width: 1100px; height: 600px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(111, 147, 224, 0.16), transparent 70%); }
.demo-grid { position: relative; display: grid; grid-template-columns: 1fr 0.92fr; gap: 56px; align-items: center; }
.demo-copy h2 { margin-bottom: 18px; }
.demo-assure { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.demo-assure li { display: flex; align-items: center; gap: 11px; color: var(--text-dim); }
.demo-form {
  background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--r-4);
  padding: 30px; box-shadow: var(--shadow-2);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.field label .opt { color: var(--text-faint); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-1);
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  /* 16px (not rem) so iOS Safari doesn't zoom in when the field is focused. */
  font: 400 16px var(--sans); outline: none; resize: vertical;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface-3); box-shadow: 0 0 0 3px var(--accent-dim); }
.demo-form .btn { margin-top: 8px; }
.form-note { margin-top: 14px; font-size: 0.9rem; min-height: 1.2em; text-align: center; }
.form-note.ok { color: var(--ok); }
.form-note.err { color: var(--warn); }

/* ============================ DEMO VIDEO MODAL ============================ */
/* A styled lightbox for the product demo video. Shares the app's surfaces,
   borders and shadows so it reads as part of the same product UI. */
.vmodal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}
.vmodal[hidden] { display: none; }
.vmodal-backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 8, 12, 0.74);
  backdrop-filter: blur(7px) saturate(120%);
  -webkit-backdrop-filter: blur(7px) saturate(120%);
  animation: vmodalFade 0.22s var(--ease);
}
/* The dialog shrink-wraps the video; the border frames the clip. */
.vmodal-dialog {
  position: relative; line-height: 0; max-width: 100%;
  background: #000; border: 1px solid var(--line-strong);
  border-radius: var(--r-3); box-shadow: var(--shadow-3);
  overflow: hidden; animation: vmodalRise 0.28s var(--ease);
}
.vmodal-dialog:focus { outline: none; }
/* Video scales to 75% of the viewport, capped so it never overflows. */
.vmodal-video {
  display: block; width: 75vw; height: auto;
  max-width: 100%; max-height: 75vh; background: #000;
}
.vmodal-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  background: rgba(12, 14, 18, 0.7); border: 1px solid var(--line-strong); color: var(--text);
  cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.vmodal-close:hover { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }
@keyframes vmodalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vmodalRise { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vmodal-backdrop, .vmodal-dialog { animation: none; } }

/* ============================ FOOTER ============================ */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 30px 40px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-brand { max-width: 340px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-tagline { color: var(--text-dim); font-size: 0.92rem; line-height: 1.6; }
.footer-contact { margin-top: 12px; font-size: 0.92rem; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.footer-h { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; margin-bottom: 3px; }
.footer-col a, .footer-col button { color: var(--text-dim); font-size: 0.93rem; }
.footer-col button { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; text-align: left; }
.footer-col a:hover, .footer-col button:hover { color: var(--accent-bright); }
.footer-base { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 24px; color: var(--text-faint); font-size: 0.86rem; }
.footer-latin { font-family: var(--serif); font-style: italic; }

/* ============================ LEGAL PAGES ============================ */
.legal-bar { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.legal-bar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.legal-back { color: var(--text-dim); font-size: 0.92rem; font-weight: 500; }
.legal-back:hover { color: var(--text); }
.legal { padding: 60px 0 80px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.legal-meta { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 26px; }
.legal-note {
  background: var(--surface-1); border: 1px solid var(--line-strong); border-left: 3px solid var(--warn);
  border-radius: var(--r-2); padding: 14px 16px; color: var(--text-dim); font-size: 0.9rem;
  line-height: 1.6; margin-bottom: 34px;
}
.legal h2 { font-family: var(--sans); font-weight: 600; font-size: 1.35rem; margin: 32px 0 10px; }
.legal p { color: var(--text-dim); line-height: 1.75; margin-bottom: 14px; }
.legal ul { padding-left: 20px; list-style: disc; margin-bottom: 14px; }
.legal li { color: var(--text-dim); line-height: 1.75; margin-bottom: 6px; }

/* ============================ REVEAL ANIMATION ============================ */
/* Progressive enhancement: content is visible by default. Only when JS is
   present (html.js) do we hide-then-reveal on scroll, so a no-JS visitor still
   sees everything. */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .mock-window { transform: none; }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 960px) {
  .hero-grid, .demo-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-mock { max-width: 460px; margin: 0 auto; }
  .mock-window { transform: none; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  /* Shrink the overall type on phones (~20%). Root drives every rem-based
     size; form inputs keep their own 16px so iOS doesn't zoom in on focus. */
  html { font-size: 12.8px; }
  body { font-size: 1rem; }
  .nav-menu {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 14px;
    background: rgba(10, 12, 16, 0.98); backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
    padding: 16px 24px 22px;
  }
  .nav.open .nav-menu { display: flex; }
  .nav-links { flex-direction: column; gap: 2px; margin: 0; }
  .nav-links a, .nav-links button { padding: 10px 0; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
  .nav-cta { margin: 0; }
  .nav-cta .btn { width: 100%; }
  .nav-toggle { display: inline-flex; }
  .features-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
  .section { padding: 72px 0; }
  .hero { padding: 124px 0 40px; }
  .vmodal-video { width: 92vw; max-height: 70vh; }
}
@media (max-width: 600px) {
  .report-matter { display: none; }
  .report-page { padding: 30px 22px 40px; height: 460px; }
  .rpara { grid-template-columns: 24px 1fr; }
  .rpara p { text-align: left; }
  /* hero.js keeps the static card on phones — let it size to its content
     instead of a tall, half-empty fixed panel. */
  .mock-feed { height: auto; }
}
@media (max-width: 480px) {
  .container { padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right)); }
}
