/* ════════════════════════════════════════════════════════
   SecuQR · Trust-forward institutional design system
   Dark default. Restrained color. Editorial gravitas.
   ════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ── 6 P-principle accents (kept, harmonised for institutional feel) ── */
:root {
  --p-privacy:    #a78bfa;  /* violet — sovereign trust */
  --p-provenance: #2dd4bf;  /* teal — verified origin */
  --p-proactive:  #fb923c;  /* amber — vigilance */
  --p-preventive: #f87171;  /* coral — alert */
  --p-protective: #60a5fa;  /* sky — guardian */
  --p-predictive: #4ade80;  /* emerald — forward */

  /* ── Product brand colors (single source of truth) ── */
  --secuqr-brand: #22c55e;  /* green — SecuQR product identity, deep enough for white text */
  --uvchat-brand: #f59e0b;  /* amber — UVChat product identity, deep enough for white text */
  --ishield-brand: #06b6d4;  /* cyan — iShield product identity, device protection signals */
}

/* ── DARK (default) — deep institutional graphite, faintly cool ── */
.theme-dark {
  --font-sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --bg-0: #08090c;          /* page */
  --bg-1: #0d0f14;          /* cards */
  --bg-2: #14171f;          /* raised */
  --bg-3: #1c2030;          /* hover/highlight */

  --border:        #1e2230;
  --border-strong: #2c3142;
  --hairline:      #16191f; /* very subtle dividers */

  --fg-0: #f7f8fb;          /* primary ink */
  --fg-1: #d1d4de;          /* secondary — boosted for readability */
  --fg-2: #9094a4;          /* tertiary / labels — boosted */
  --fg-3: #5a5e70;          /* faint */

  --pos:  #34d399;
  --neg:  #f87171;
  --warn: #fbbf24;
  --info: #60a5fa;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);

  /* Aliases used by older pages */
  --bg: var(--bg-0); --surface: var(--bg-1);
  --text: var(--fg-0); --text-dim: var(--fg-1); --text-muted: var(--fg-2);
  --font-display: var(--font-sans);
}

/* ── LIGHT — cool institutional whites, never cream ── */
.theme-light {
  --font-sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --bg-0: #f6f7f9;
  --bg-1: #ffffff;
  --bg-2: #eef0f4;
  --bg-3: #e2e5ec;

  --border:        #e1e4ec;
  --border-strong: #c8ccd8;
  --hairline:      #ecedf2;

  --fg-0: #0b0d12;
  --fg-1: #3b414f;
  --fg-2: #6b7184;
  --fg-3: #a3a8b6;

  --pos: #059669; --neg: #dc2626; --warn: #d97706; --info: #2563eb;

  --shadow-sm: 0 1px 2px rgba(15,18,30,0.06);
  --shadow-md: 0 8px 24px rgba(15,18,30,0.08), 0 2px 6px rgba(15,18,30,0.04);
  --shadow-lg: 0 30px 70px rgba(15,18,30,0.14);

  --bg: var(--bg-0); --surface: var(--bg-1);
  --text: var(--fg-0); --text-dim: var(--fg-1); --text-muted: var(--fg-2);
  --font-display: var(--font-sans);
}

/* ── Per-site brand color (dark) — premium dark CTA: deep enough for white text ── */
.theme-dark body[data-site="unified"] { --brand: var(--secuqr-brand); --brand-2: #4ade80; --brand-soft: color-mix(in oklab, var(--brand) 18%, transparent); }
.theme-dark body[data-site="secuqr"]  { --brand: var(--secuqr-brand); --brand-2: #4ade80; --brand-soft: color-mix(in oklab, var(--brand) 18%, transparent); }
.theme-dark body[data-site="uvchat"]  { --brand: var(--uvchat-brand); --brand-2: #fbbf24; --brand-soft: color-mix(in oklab, var(--brand) 18%, transparent); }
.theme-dark body[data-site="ishield"] { --brand: var(--ishield-brand); --brand-2: #22d3ee; --brand-soft: color-mix(in oklab, var(--brand) 18%, transparent); }

/* ── Per-site brand color (light) ── */
.theme-light body[data-site="unified"] { --brand: var(--secuqr-brand); --brand-2: #16a34a; --brand-soft: color-mix(in oklab, var(--brand) 12%, transparent); }
.theme-light body[data-site="secuqr"]  { --brand: var(--secuqr-brand); --brand-2: #16a34a; --brand-soft: color-mix(in oklab, var(--brand) 12%, transparent); }
.theme-light body[data-site="uvchat"]  { --brand: var(--uvchat-brand); --brand-2: #f97316; --brand-soft: color-mix(in oklab, var(--brand) 12%, transparent); }
.theme-light body[data-site="ishield"] { --brand: var(--ishield-brand); --brand-2: #0891b2; --brand-soft: color-mix(in oklab, var(--brand) 12%, transparent); }

/* ════════ RESET / BASE ════════ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--fg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11", "tnum";
  line-height: 1.6;
  letter-spacing: -0.005em;
  font-weight: 400;
  transition: background .25s, color .25s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: color-mix(in oklab, var(--brand) 35%, transparent); color: var(--fg-0); }

/* ════════ LAYOUT HELPERS ════════ */
.wrap     { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-sm  { max-width: 880px;  margin: 0 auto; padding: 0 32px; }

@media (max-width: 680px) {
  .wrap, .wrap-sm { padding: 0 22px; }
}

/* ════════ EYEBROW (institutional small-caps marker) ════════ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg-1);
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }

/* ════════ TYPE — institutional, tight tracking ════════ */
.display {
  font-family: var(--font-sans);
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
  color: var(--fg-0);
}
.display em { font-style: normal; color: var(--brand); }

.h1 {
  font-family: var(--font-sans);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 16px;
  text-wrap: balance;
}
.h2 {
  font-family: var(--font-sans);
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 16px;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.28;
  letter-spacing: -0.008em;
  font-weight: 600;
  margin: 0 0 10px;
  text-wrap: balance;
}
.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--fg-1);
  line-height: 1.55;
  max-width: 640px;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 500;
}

/* ════════ BUTTONS ════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 14.5px; font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary,
.btn-brand {
  background: var(--fg-0);
  color: var(--bg-0);
  font-weight: 600;
}
.btn-primary:hover, .btn-brand:hover {
  box-shadow: 0 12px 28px color-mix(in oklab, var(--fg-0) 12%, transparent);
}
/* Header Contact button — picks up each site's own --brand so it always matches the site theme */
.topnav .btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}
.topnav .btn-primary:hover {
  box-shadow: 0 12px 28px color-mix(in oklab, var(--brand) 30%, transparent);
}
/* Unified (www) Contact — use SecuQR product brand (lime green) for cross-product accent */
body[data-site="unified"] .topnav .btn-primary {
  background: var(--secuqr-brand);
  border-color: var(--secuqr-brand);
}
body[data-site="unified"] .topnav .btn-primary:hover {
  box-shadow: 0 12px 28px color-mix(in oklab, var(--secuqr-brand) 30%, transparent);
}
/* TEMP: theme switching disabled — dark only */
button.theme-toggle { display: none !important; }

.btn-accent {
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
}
.btn-accent:hover {
  background: var(--brand-2);
  box-shadow: 0 12px 28px color-mix(in oklab, var(--brand) 35%, transparent);
}
.btn-ghost,
.btn-outline {
  background: transparent;
  color: var(--fg-0);
  border-color: var(--border-strong);
}
.btn-ghost:hover,
.btn-outline:hover {
  background: var(--bg-2);
  border-color: var(--fg-2);
}
.btn-sm { padding: 7px 14px; font-size: 13px; gap: 6px; }

/* ════════ CARDS ════════ */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color .2s, transform .2s, background .2s;
}
.card:hover { border-color: var(--border-strong); }

.card-feature {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  transition: border-color .2s, transform .2s;
}
.card-feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card-feature .icon-well {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--card-color, var(--brand)) 14%, transparent);
  color: var(--card-color, var(--brand));
  margin-bottom: 22px;
}
.card-feature h3 {
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--fg-0);
}
.card-feature p {
  font-size: 15px; line-height: 1.6;
  color: var(--fg-1);
  margin: 0;
}

/* Full-bleed bold card (used sparingly now) */
.card-bold {
  position: relative;
  border-radius: 18px;
  padding: 32px;
  color: #fff;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
}
.card-bold:hover { border-color: var(--border-strong); }
.card-bold .icon-well {
  width: 40px; height: 40px; border-radius: 10px;
  background: color-mix(in oklab, var(--card-color, var(--brand)) 16%, transparent);
  color: var(--card-color, var(--brand));
  display: grid; place-items: center;
}
.card-bold h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 18px 0 10px; color: var(--fg-0); }
.card-bold p  { font-size: 15px; line-height: 1.6; color: var(--fg-1); margin: 0; }

/* ════════ GRID HELPERS ════════ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 960px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ════════ SECTIONS ════════ */
section {
  padding: clamp(72px, 9vw, 128px) 0;
  background: var(--bg-0);
  position: relative;
}
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.section-head .eyebrow { margin-bottom: 20px; }

.hr { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ════════ HEADER (sticky, hairline, institutional) ════════ */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg-0) 86%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.topnav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0;
  gap: 24px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-stack { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.brand-tag { font-family: var(--font-sans); font-size: 11px; font-weight: 400; color: var(--fg-2); letter-spacing: 0.01em; }
.brand-lockup .brand-mark-img {
  width: 44px; height: 44px;
  border-radius: 9px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}
.brand-lockup .brand-text {
  font-size: 21px; font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-0);
  line-height: 1;
}
.brand-lockup .brand-text sup {
  font-size: 13px;
  font-weight: 700;
  vertical-align: super;
  margin-left: 3px;
  color: var(--fg-0);
  opacity: 1;
}

.nav-links { display: flex; align-items: center; gap: 2px; user-select: none; -webkit-user-select: none; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  font-size: 14px; font-weight: 500;
  color: var(--fg-1);
  transition: background .15s, color .15s;
  letter-spacing: -0.005em;
}
.nav-links a {
  position: relative;
}
.nav-links a:hover { background: var(--bg-2); color: var(--fg-0); }
.nav-links a.active {
  color: var(--brand);
  background: color-mix(in oklab, var(--brand) 12%, transparent);
  font-weight: 600;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), color-mix(in oklab, var(--brand) 60%, var(--p-privacy)));
  box-shadow: 0 0 12px color-mix(in oklab, var(--brand) 50%, transparent);
}
.nav-links a.active:hover {
  background: color-mix(in oklab, var(--brand) 18%, transparent);
}

.nav-right { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 9px;
  background: transparent; border: 1px solid var(--border);
  color: var(--fg-1); display: grid; place-items: center;
  transition: background .15s, color .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--bg-2); color: var(--fg-0); border-color: var(--border-strong); }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ════════ FOOTER ════════ */
.footer {
  padding: 80px 0 36px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-0);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 56px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-2);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer a {
  display: block;
  color: var(--fg-1);
  font-size: 14.5px;
  padding: 6px 0;
  letter-spacing: -0.005em;
  transition: color .15s;
  font-weight: 500;
}
.footer a:hover { color: var(--fg-0); }
.footer .muted { color: var(--fg-1); }
.footer .legal {
  margin-top: 64px; padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 16px;
  color: var(--fg-2);
  font-size: 13px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ════════ UTIL ════════ */
.mono   { font-family: var(--font-mono); }
.muted  { color: var(--fg-2); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--bg-2);
  color: var(--fg-1);
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .04em;
  border: 1px solid var(--border);
}
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* fade-in on scroll — only opt-in via .reveal-on (default visible) */
.reveal { opacity: 1; transform: none; }
.reveal-on { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal-on.in { opacity: 1; transform: translateY(0); }

/* ════════ FOCUS (accessibility) ════════ */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Backwards-compat (older pages still reference these) */
.btn-teal, .btn-green {
  background: var(--brand) !important;
  color: var(--bg-0) !important;
  font-weight: 600 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}


/* ─── Shared rainbow gradient (Six Principles palette) ─── */
.grad-rainbow {
  background: linear-gradient(90deg,
    var(--p-privacy) 0%,
    var(--p-provenance) 22%,
    var(--p-proactive) 44%,
    var(--p-preventive) 62%,
    var(--p-protective) 80%,
    var(--p-predictive) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}
