/* ============================================================
   VPRONIX — Voice Biometrics for Sovereign Systems
   Shared design system
   ============================================================ */

/* ---- Tokens ---- */
:root {
  /* Surfaces — cool near-black */
  --bg:        oklch(0.16 0.012 230);
  --bg-deep:   oklch(0.13 0.012 230);
  --surface:   oklch(0.20 0.014 232);
  --surface-2: oklch(0.24 0.016 232);
  --line:      oklch(0.92 0.02 220 / 0.10);
  --line-soft: oklch(0.92 0.02 220 / 0.06);

  /* Text */
  --text:      oklch(0.95 0.008 220);
  --text-dim:  oklch(0.74 0.015 220);
  --text-mute: oklch(0.58 0.018 222);

  /* Accent — teal / cyan (single accent) */
  --accent:    oklch(0.82 0.135 188);
  --accent-bright: oklch(0.88 0.14 190);
  --accent-deep:   oklch(0.62 0.11 195);
  --accent-glow:   oklch(0.82 0.135 188 / 0.18);

  /* Type */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 14px;
  --radius-lg: 22px;
}

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

/* overscroll-behavior-y: none disables the elastic "rubber-band" bounce at the top/bottom.
   Without it, pulling up past the top lets the page content (incl. the absolutely-positioned
   hero sonar) rubber-band down while the fixed header sonar stays put — visibly splitting the
   sweep line at the header/hero seam. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body { overscroll-behavior-y: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent-glow); color: var(--accent-bright); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- Background field: faint grid + vignette ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 70% -10%, oklch(0.82 0.135 188 / 0.07), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, oklch(0.62 0.11 195 / 0.05), transparent 55%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 80%);
          mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.5;
  pointer-events: none;
}

/* ---- Shell ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
section { position: relative; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  border-radius: 0;
}
/* the hero eyebrow keeps the original diamond markers */
.eyebrow--gem::before,
.eyebrow--gem::after {
  width: 7px; height: 7px;
  box-shadow: 0 0 12px var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }

.h-xxl { font-size: clamp(40px, 7vw, 82px); }
.h-xl  { font-size: clamp(32px, 4.6vw, 56px); }
.h-lg  { font-size: clamp(26px, 3vw, 38px); }

.lede { font-size: clamp(17px, 1.5vw, 21px); color: var(--text-dim); max-width: 56ch; line-height: 1.55; }

.muted { color: var(--text-mute); }
.accent { color: var(--accent); }

/* ---- Buttons ---- */
.btn {
  --pad: 14px 22px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px; letter-spacing: 0.005em;
  padding: var(--pad);
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), background .25s, border-color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary {
  background: var(--accent);
  color: oklch(0.18 0.02 220);
  font-weight: 600;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 10px 40px -8px var(--accent-glow); transform: translateY(-2px); }
.btn-ghost {
  background: oklch(1 0 0 / 0.02);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); transform: translateY(-2px); }

/* Header CTA: outlined teal pill */
.nav-cta .btn-primary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  box-shadow: none;
  padding: 10px 18px;
  font-size: 13px;
}
.nav-cta .btn-primary:hover { background: var(--accent-glow); border-color: var(--accent-bright); box-shadow: none; transform: translateY(-2px); }

/* ---- Nav (Aceternity-style resizable navbar) ---- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: transparent;
  transition: padding .55s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
  border: 1px solid transparent; border-radius: 18px;
  will-change: max-width, height, padding;
  /* one easing + duration for every layout-affecting property → smooth contraction;
     backdrop-filter is intentionally NOT transitioned (browsers animate it poorly) */
  transition: max-width .55s cubic-bezier(0.22, 1, 0.36, 1),
              height .55s cubic-bezier(0.22, 1, 0.36, 1),
              padding .55s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius .55s cubic-bezier(0.22, 1, 0.36, 1),
              background .4s ease, border-color .4s ease, box-shadow .5s ease;
}
/* On scroll the bar contracts into a centred floating glass pill */
.nav.scrolled { padding-top: 12px; }
.nav.scrolled .nav-inner {
  max-width: 880px; height: 56px;
  padding-inline: clamp(14px, 3vw, 22px);
  background: oklch(0.21 0.014 232 / 0.92);
  /* lighter blur = far cheaper to recompute each frame over the animating hero canvas */
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-color: oklch(0.82 0.135 188 / 0.2); border-radius: 999px;
  box-shadow: 0 14px 40px -18px oklch(0 0 0 / 0.6);
}
/* Hide the Request-a-briefing CTA once the header has contracted */
.nav.scrolled .nav-cta .btn-primary {
  opacity: 0; transform: scale(.92);
  width: 0; padding-inline: 0; margin-left: -10px;
  border-width: 0; overflow: hidden; pointer-events: none; white-space: nowrap;
  transition: opacity .25s, transform .25s, width .3s, padding .3s, margin .3s;
}
/* When the header contracts, swap the Request-a-briefing button for a compact Contact icon */
.nav-contact-icon { display: none; }
.nav.scrolled .nav-contact-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent); background: var(--accent-glow);
  transition: background .2s, color .2s, border-color .2s;
}
.nav-contact-icon svg { width: 18px; height: 18px; }
.nav.scrolled .nav-contact-icon:hover { background: var(--accent); color: var(--bg-deep); }
@media (max-width: 980px) { .nav-contact-icon { display: none !important; } }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  border: 2px solid oklch(0.82 0.135 188 / 0.6);
  background: oklch(0.82 0.135 188 / 0.1);
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.brand .mark span {
  position: static; width: 3px; border-radius: 3px; background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.brand .wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  letter-spacing: 0.02em;
}
.brand .wordmark b { color: var(--accent); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--font-body); font-weight: 500; font-size: 16px; letter-spacing: 0;
  color: var(--text-dim); padding: 9px 14px; border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: oklch(1 0 0 / 0.04); }
.nav-links a.active { color: var(--accent); }
/* vertical-bar separators between header links (matching the footer), in both the
   default fixed header and the compact/scrolled pill */
.nav-links { gap: 0; }
.nav-links a { position: relative; padding-inline: 13px; }
.nav-links a + a::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 12px; background: var(--accent); opacity: 0.7; }
.nav.scrolled .nav-links a { padding-inline: 12px; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; }

/* ---- Generic section rhythm ---- */
.section-pad { padding-block: clamp(72px, 11vw, 140px); }
.section-head { max-width: 64ch; }
.section-head .eyebrow { margin-bottom: 22px; }
.section-head h2 { margin-bottom: 20px; }

/* ---- Cards ---- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-deep));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .3s, transform .3s, background .3s;
}
.card:hover { border-color: oklch(0.82 0.135 188 / 0.4); transform: translateY(-4px); }

/* ---- Footer ---- */
.footer { border-top: 1px solid oklch(0.92 0.02 220 / 0.18); margin-top: 40px; }
.footer .brand { display: block; text-align: center; width: auto; margin-inline: auto; }
.footer .brand .mark { margin: 0 auto 10px; }
.footer .brand .wordmark { display: inline-block; }
.footer .col { text-align: center; }
.footer .col p { margin-inline: auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
  padding-block: 64px 40px;
}
/* Lift only the brand/tagline column one line up; other columns unchanged */
.footer-grid .col:first-child { margin-top: -28px; }
.footer h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.footer .col a { display: block; color: var(--text-dim); padding: 6px 0; font-size: 15px; transition: color .2s; }
.footer .col a:hover { color: var(--accent); }
.footer-bot {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding-block: 26px; border-top: 1px solid var(--line-soft);
  font-family: var(--font-body); font-size: 13px; color: var(--text-mute); flex-wrap: wrap;
}
.legal-links { display: flex; align-items: center; gap: 8px 0; flex-wrap: wrap; }
.legal-links a { color: var(--text-mute); transition: color .2s; }
.legal-links a:hover { color: var(--accent); }
.legal-links a + a::before, .legal-dock a + a::before { content: ""; display: inline-block; width: 1px; height: 11px; background: var(--accent); vertical-align: middle; margin: 0 16px; opacity: 0.85; }

/* Floating legal dock — a glass pill that reveals the legal links at page bottom.
   JS injects it and hides the static links (so there's no duplication). */
.has-legal-dock .footer-bot .legal-links { display: none; }
.legal-dock {
  position: fixed; left: 50%; bottom: 18px; z-index: 55;
  transform: translate(-50%, 160%);
  display: flex; align-items: center; gap: 0;
  padding: 10px 22px;
  border: 1px solid var(--line); border-radius: 999px;
  background: oklch(0.14 0.012 230 / 0.9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px -18px oklch(0 0 0 / 0.6);
  opacity: 0; pointer-events: none; white-space: nowrap;
  transition: transform .55s cubic-bezier(0.22, 1, 0.36, 1), opacity .45s ease;
}
.legal-dock.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.legal-dock a { color: var(--text-mute); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; transition: color .2s; }
.legal-dock a:hover { color: var(--accent); }
@media (max-width: 560px) { .legal-dock { padding: 9px 15px; } .legal-dock a { font-size: 12px; } .legal-links a + a::before, .legal-dock a + a::before { margin: 0 11px; } }

/* ---- Legal document ---- */
.legal-hero { padding-top: clamp(48px,7vw,90px); padding-bottom: clamp(24px,3vw,36px); border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(34px,5vw,52px); margin: 18px 0 16px; }
.legal-hero .updated { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--text-mute); }
.legal-body { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px,5vw,72px); padding-block: clamp(40px,5vw,64px) clamp(64px,9vw,120px); align-items: start; }
.legal-toc { position: sticky; top: 92px; }
.legal-toc .t { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 16px; }
.legal-toc a { display: block; color: var(--text-dim); font-size: 15px; padding: 7px 0 7px 14px; border-left: 1px solid var(--line); transition: color .2s, border-color .2s; }
.legal-toc a:hover { color: var(--accent); border-color: var(--accent); }
.legal-prose { max-width: 70ch; }
.legal-prose .notice { border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 10px; background: oklch(0.82 0.135 188 / 0.05); padding: 18px 20px; font-size: 15.5px; color: var(--text-dim); margin-bottom: 40px; }
.legal-prose section { scroll-margin-top: 92px; margin-bottom: 44px; }
.legal-prose h2 { font-size: clamp(20px,2.2vw,26px); margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.legal-prose h2 .n { flex: none; align-self: center; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-deep); color: #000; font-family: var(--font-body); font-weight: 600; font-size: 22px; letter-spacing: 0; }
.legal-prose h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 24px 0 10px; }
.legal-prose p { color: var(--text-dim); margin-bottom: 14px; font-size: 17px; line-height: 1.68; }
.legal-prose ul { list-style: none; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.legal-prose ul li { position: relative; padding-left: 22px; color: var(--text-dim); font-size: 16.5px; line-height: 1.6; }
.legal-prose ul li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; }
.legal-prose a.inline { color: var(--accent); border-bottom: 1px solid oklch(0.82 0.135 188 / 0.4); }
.legal-prose table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
.legal-prose th, .legal-prose td { text-align: left; padding: 12px 14px; border: 1px solid var(--line); color: var(--text-dim); vertical-align: top; }
.legal-prose th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); background: oklch(1 0 0 / 0.02); }
@media (max-width: 820px) {
  .legal-body { grid-template-columns: 1fr; }
  .legal-toc { position: static; display: none; }
}

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Pill / tag ---- */
.tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; display: inline-flex; align-items: center; gap: 8px;
}
.tag.live::before { content:""; width:6px; height:6px; border-radius:50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---- Placeholder media ---- */
.ph {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, oklch(1 0 0 / 0.025) 0 10px, transparent 10px 20px),
    var(--bg-deep);
  display: grid; place-items: center; color: var(--text-mute);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
}

/* ---- Mobile ---- */
@media (max-width: 880px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-burger { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ---- Cookie consent — floating card + preferences modal ---- */
.cc-card {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  width: min(24rem, calc(100vw - 48px));
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: oklch(0.20 0.014 232 / 0.92);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 24px 60px -22px oklch(0 0 0 / 0.6);
  animation: cc-rise .5s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes cc-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
.cc-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cc-card-head strong { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.cc-ico { display: inline-flex; width: 22px; height: 22px; color: var(--accent); }
.cc-ico svg { width: 22px; height: 22px; }
.cc-card p { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin-bottom: 18px; }
.cc-actions { display: flex; gap: 10px; }
.cc-actions .btn { flex: 1; justify-content: center; }
.cc-link {
  display: block; margin: 14px auto 0;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--text-mute); text-decoration: underline; text-underline-offset: 3px;
  transition: color .2s;
}
.cc-link:hover { color: var(--accent); }

.cc-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 24px;
  background: oklch(0.10 0.012 230 / 0.62);
  backdrop-filter: blur(4px);
  animation: cc-fade .3s ease both;
}
.cc-modal {
  width: min(34rem, 100%); padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: oklch(0.18 0.013 231 / 0.96);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 70px -24px oklch(0 0 0 / 0.65);
  animation: cc-rise .4s cubic-bezier(.2,.7,.3,1) both;
  max-height: calc(100vh - 48px); overflow-y: auto;
}
.cc-modal-head { display: flex; align-items: center; justify-content: space-between; }
.cc-modal-head h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.cc-x {
  background: none; border: none; color: var(--text-mute);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 4px; transition: color .2s;
}
.cc-x:hover { color: var(--accent); }
.cc-intro { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin: 8px 0 20px; }
.cc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line); margin: 0;
}
.cc-row-t { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.cc-row-d { color: var(--text-mute); font-size: 13px; line-height: 1.5; }
.cc-on {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-mute); white-space: nowrap;
}
.cc-toggle {
  flex: none; width: 44px; height: 26px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  cursor: pointer; position: relative; transition: background .3s, border-color .3s;
}
.cc-toggle i {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--text); transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.cc-toggle.on { background: var(--accent); border-color: var(--accent); }
.cc-toggle.on i { transform: translateX(18px); background: oklch(0.18 0.02 220); }
.cc-modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.cc-modal-actions .btn { flex: 1; justify-content: center; }
.cc-policies {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
  margin-top: 18px; font-family: var(--font-mono); font-size: 12px;
}
.cc-policies a { color: var(--text-mute); transition: color .2s; }
.cc-policies a:hover { color: var(--accent); }
.cc-policies span { color: var(--text-mute); }

@media (max-width: 600px) {
  .cc-card { left: 14px; right: 14px; bottom: 14px; width: auto; }
}
