/* ===========================================================
   CVN Technologies — Corporate Portal
   Design tokens + shared styles
   =========================================================== */

:root {
  /* Brand (theme-invariant) */
  --brand-blue: #2F6BFF;
  --brand-blue-bright: #3D7BFF;
  --brand-navy: #0A1F4D;
  --brand-navy-deep: #061638;
  --brand-cyan: #00C2FF;

  /* Neutrals — light */
  --ink: #0B1530;
  --ink-2: #243049;
  --muted: #5B6B89;
  --muted-2: #8A98B5;
  --hairline: #E4E9F2;
  --hairline-2: #EEF1F7;
  --surface: #FFFFFF;
  --surface-2: #F6F8FC;
  --surface-3: #EEF3FB;
  --canvas: #FAFBFD;

  /* Semantic role tokens (resolve per-theme) */
  --nav-bg: rgba(255,255,255,.78);
  --nav-border: rgba(228,233,242,.6);
  --invert-bg: var(--ink);          /* dark panel bg (CTA band, primary btn) */
  --invert-fg: #ffffff;
  --btn-primary-bg: var(--ink);
  --btn-primary-bg-hover: var(--brand-navy);
  --page-hero-grad-from: #F2F5FC;
  --field-bg: #ffffff;
  --logo-invert: 0;                 /* set to 1 to invert dark logos in dark mode */

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(11,21,48,.04), 0 1px 3px rgba(11,21,48,.06);
  --shadow-md: 0 8px 24px -8px rgba(11,21,48,.12), 0 2px 6px rgba(11,21,48,.06);
  --shadow-lg: 0 30px 60px -20px rgba(11,21,48,.25), 0 12px 24px -12px rgba(11,21,48,.12);
  --shadow-glow: 0 20px 60px -20px rgba(47,107,255,.45);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --max-w: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(72px, 9vw, 128px);
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --ink: #ECF0FA;
  --ink-2: #B8C2DC;
  --muted: #8493B3;
  --muted-2: #5E6B89;
  --hairline: #1F2C50;
  --hairline-2: #182343;
  --surface: #101B36;
  --surface-2: #16223F;
  --surface-3: #1C294B;
  --canvas: #080F22;

  --nav-bg: rgba(16,27,54,.78);
  --nav-border: rgba(31,44,80,.6);
  --invert-bg: #1C294B;
  --invert-fg: #ffffff;
  --btn-primary-bg: var(--brand-blue);
  --btn-primary-bg-hover: var(--brand-blue-bright);
  --page-hero-grad-from: #131E3B;
  --field-bg: #16223F;
  --logo-invert: 1;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px -8px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4);
  --shadow-lg: 0 30px 60px -20px rgba(0,0,0,.7), 0 12px 24px -12px rgba(0,0,0,.5);
  --shadow-glow: 0 20px 60px -20px rgba(47,107,255,.55);
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--brand-blue); color: #fff; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section-y) 0; }
.section-tight { padding: clamp(56px, 7vw, 88px) 0; }
.grid { display: grid; gap: 24px; }
.flex { display: flex; gap: 16px; }
.center { display: flex; align-items: center; justify-content: center; }
.stack-sm { display: grid; gap: 8px; }
.stack-md { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-blue);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px; background: var(--brand-blue);
}
.eyebrow.light { color: rgba(255,255,255,.85); }
.eyebrow.light::before { background: rgba(255,255,255,.7); }

/* ---------- Typography scale ---------- */
.h-display { font-size: clamp(40px, 6.4vw, 86px); line-height: 0.98; letter-spacing: -0.035em; }
.h-1 { font-size: clamp(36px, 4.6vw, 60px); }
.h-2 { font-size: clamp(28px, 3.4vw, 44px); }
.h-3 { font-size: clamp(22px, 2.4vw, 30px); }
.h-4 { font-size: 19px; font-weight: 600; }
.lede { font-size: clamp(17px, 1.5vw, 21px); color: var(--ink-2); line-height: 1.55; max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border-radius: var(--r-pill);
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--invert-fg);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--btn-primary-bg-hover); transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink); }
.btn-light {
  background: #fff; color: #0B1530;
}
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-outline-light {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.btn-outline-light:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); }
.btn-sm { padding: 10px 16px; font-size: 13.5px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--nav-border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { height: 38px; width: auto; }
.nav-brand .brand-text {
  display: flex; flex-direction: column; line-height: 1.05;
}
.nav-brand .brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  letter-spacing: -0.01em; color: var(--ink);
}
.nav-brand .brand-sub {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 10px 16px;
  font-size: 14.5px; font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--brand-blue); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  align-items: center; justify-content: center;
  border: 1px solid var(--hairline);
}
.nav-toggle span { width: 18px; height: 1.6px; background: var(--ink); display: block; position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.6px; background: var(--ink);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink-2);
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-2); transform: rotate(-12deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Logos: optionally invert dark-printed logos in dark mode */
.nav-brand img { transition: filter .2s; }
[data-theme="dark"] .invert-on-dark { filter: brightness(0) invert(1); }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 76px; left: var(--gutter); right: var(--gutter);
    background: var(--surface); padding: 12px; border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--hairline);
  }
  .nav-links.is-open a { padding: 14px 16px; border-radius: 10px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 32px;
}
.card-hover { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D9E1F0; }

/* ---------- Footer ---------- */
.footer {
  background: var(--brand-navy-deep);
  color: rgba(255,255,255,.78);
  padding: clamp(64px, 7vw, 96px) 0 28px;
  margin-top: clamp(80px, 10vw, 140px);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(47,107,255,.35), transparent 60%),
    radial-gradient(40% 40% at 0% 100%, rgba(0,194,255,.18), transparent 60%);
  pointer-events: none;
}
.footer > * { position: relative; }
.footer-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  align-items: start;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 {
  color: #fff;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 18px;
}
.footer a { color: rgba(255,255,255,.78); transition: color .2s; display: inline-block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { height: 44px; filter: brightness(0) invert(1); }
.footer-tag { color: rgba(255,255,255,.6); font-size: 14px; max-width: 36ch; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: rgba(255,255,255,.55);
}

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0 clamp(60px, 7vw, 100px);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: -10% -5% auto -5%; height: 70%;
  background:
    radial-gradient(45% 60% at 50% 0%, rgba(47,107,255,.16), transparent 70%),
    radial-gradient(35% 45% at 85% 15%, rgba(0,194,255,.10), transparent 70%);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 .accent { color: var(--brand-blue); }
.hero h1 .strike {
  display: inline-block;
  background: linear-gradient(120deg, var(--brand-blue), var(--brand-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero-meta {
  margin-top: 48px;
  display: flex; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap;
}
.hero-meta .stat { display: grid; gap: 4px; }
.hero-meta .stat-num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 3vw, 38px);
  color: var(--ink); letter-spacing: -0.02em; line-height: 1;
}
.hero-meta .stat-label { font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }

/* hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 5/6;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(145deg, #0a1f4d, #2F6BFF 75%, #00C2FF);
  box-shadow: var(--shadow-lg);
}
.hero-visual img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  mix-blend-mode: luminosity; opacity: .55;
}
.hero-visual .grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(70% 70% at 50% 50%, black 50%, transparent 100%);
}
.hero-visual .badge-card {
  position: absolute; bottom: 24px; left: 24px; right: 24px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255,255,255,.95);
  color: #0B1530;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(11,21,48,.25);
  backdrop-filter: blur(12px);
}
.hero-visual .badge-card .left { display: flex; align-items: center; gap: 12px; }
.hero-visual .badge-card .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34,197,94,.18);
}
.hero-visual .badge-card strong { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: inherit; }
.hero-visual .badge-card span { font-size: 12px; color: #5B6B89; display: block; }
.hero-visual .float-card {
  position: absolute; top: 22px; right: 22px;
  background: rgba(255,255,255,.95);
  color: #0B1530;
  padding: 12px 14px; border-radius: 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 36px rgba(11,21,48,.2);
  font-size: 13px; font-weight: 500;
}
.hero-visual .float-card svg { width: 18px; height: 18px; color: var(--brand-blue); }

/* Dark-mode hero cards: dark surface + light text, readable against the gradient panel */
[data-theme="dark"] .hero-visual .badge-card,
[data-theme="dark"] .hero-visual .float-card {
  background: rgba(8,15,34,.85);
  color: #ECF0FA;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
}
[data-theme="dark"] .hero-visual .badge-card span {
  color: rgba(236,240,250,.65);
}
[data-theme="dark"] .hero-visual .float-card svg { color: var(--brand-blue-bright); }

/* ---------- Trust strip ---------- */
.trust-strip {
  padding: 36px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.trust-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px; align-items: center;
}
@media (max-width: 760px) { .trust-grid { grid-template-columns: 1fr; gap: 18px; } }
.trust-label {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  max-width: 12ch;
}
.trust-items {
  display: flex; flex-wrap: wrap; gap: 28px 48px;
  align-items: center;
}
.trust-items .item {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 16px; color: var(--ink-2); letter-spacing: -0.005em;
}
.trust-items .item svg { width: 18px; height: 18px; color: var(--brand-blue); }

/* ---------- Portal (trade companies) ---------- */
.portal-grid {
  display: grid; gap: 28px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 860px) { .portal-grid { grid-template-columns: 1fr; } }
.portal-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--hairline);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  display: flex; flex-direction: column;
  min-height: 540px;
}
.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.portal-card .image-wrap {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
}
.portal-card .image-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s ease;
}
.portal-card:hover .image-wrap img { transform: scale(1.05); }
.portal-card .image-wrap::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11,21,48,.55));
}
.portal-card .image-tag {
  position: absolute; top: 18px; left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.92);
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #0B1530;
  backdrop-filter: blur(8px);
}
.portal-card .image-tag.computers { color: #2F6BFF; }
.portal-card .image-tag.msp { color: #0A1F4D; }
.portal-card .image-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.portal-card .body {
  padding: 32px;
  flex: 1; display: flex; flex-direction: column; gap: 16px;
}
.portal-card h3 { font-size: clamp(24px, 2.4vw, 30px); }
.portal-card .pitch { color: var(--ink-2); }
.portal-card .features {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 4px;
}
.portal-card .features li {
  list-style: none;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2);
  font-size: 12.5px; font-weight: 500;
  font-family: var(--font-display);
}
.portal-card .visit {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 0;
  font-family: var(--font-display); font-weight: 600;
  color: var(--brand-blue);
  border-top: 1px solid var(--hairline);
  font-size: 14.5px;
}
.portal-card .visit svg { width: 16px; height: 16px; transition: transform .25s; }
.portal-card:hover .visit svg { transform: translate(3px, -3px); }

/* ---------- Section header ---------- */
.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { margin-top: 14px; }
.section-head p { margin-top: 16px; color: var(--ink-2); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }

/* ---------- Values / pillars ---------- */
.pillars {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  position: relative; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.pillar:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pillar-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  margin-bottom: 24px;
}
.pillar-icon svg { width: 22px; height: 22px; }
.pillar h3 { font-size: 20px; }
.pillar p { color: var(--muted); margin-top: 10px; font-size: 15px; line-height: 1.6; }

/* ---------- Stats banner ---------- */
.stats-banner {
  background:
    linear-gradient(135deg, var(--brand-navy-deep) 0%, var(--brand-navy) 60%, var(--brand-blue) 130%);
  border-radius: var(--r-xl);
  padding: clamp(40px, 5vw, 64px);
  color: #fff;
  position: relative; overflow: hidden;
  isolation: isolate;
}
.stats-banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(80% 100% at 20% 0%, black 30%, transparent 80%);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
@media (max-width: 760px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
.stats-grid .stat-num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.03em; line-height: 1;
  background: linear-gradient(120deg, #fff, #B8D2FF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats-grid .stat-label {
  font-size: 14px; color: rgba(255,255,255,.7);
  margin-top: 10px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--invert-bg);
  color: var(--invert-fg);
  border-radius: var(--r-xl);
  padding: clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -10%; top: -50%;
  width: 540px; height: 540px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,107,255,.45), transparent 60%);
  pointer-events: none;
}
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.7); margin-top: 16px; font-size: 17px; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-self: end; position: relative; z-index: 1; }
@media (max-width: 800px) { .cta-band .actions { justify-self: start; } }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  position: relative;
  padding: clamp(80px, 9vw, 130px) 0 clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, var(--page-hero-grad-from) 0%, var(--canvas) 100%);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 50% 0%, rgba(47,107,255,.12), transparent 60%);
}
.page-hero > .container { position: relative; }
.page-hero .crumbs {
  display: flex; gap: 8px; align-items: center;
  font-size: 13px; color: var(--muted); margin-bottom: 24px;
  font-family: var(--font-display); font-weight: 500;
}
.page-hero .crumbs a { color: var(--muted); transition: color .2s; }
.page-hero .crumbs a:hover { color: var(--ink); }
.page-hero .crumbs .sep { opacity: .5; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { margin-top: 18px; }

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } }
.about-image {
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.timeline {
  position: relative;
  display: grid; gap: 32px;
  padding-left: 32px;
}
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(180deg, var(--brand-blue), var(--brand-cyan), transparent);
  border-radius: 2px;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -28px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}
.timeline-year {
  font-family: var(--font-display); font-weight: 600;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-blue); margin-bottom: 6px;
}
.timeline-item h3 { font-size: 20px; margin-bottom: 8px; }
.timeline-item p { color: var(--muted); font-size: 15px; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 5vw, 72px);
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-display); font-weight: 500;
  font-size: 13.5px; color: var(--ink-2);
  letter-spacing: 0.01em;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  font: inherit; font-size: 15px;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }
.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid; gap: 22px;
}
.contact-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px; align-items: start;
}
.contact-row .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-3); color: var(--brand-blue);
  display: flex; align-items: center; justify-content: center;
}
.contact-row .icon svg { width: 20px; height: 20px; }
.contact-row .label {
  font-family: var(--font-display); font-weight: 600;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.contact-row .value { color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.contact-row .value a { color: var(--brand-blue); }

.entities {
  display: grid; gap: 18px;
  grid-template-columns: 1fr 1fr;
  margin-top: 24px;
}
@media (max-width: 540px) { .entities { grid-template-columns: 1fr; } }
.entity {
  padding: 22px; border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid transparent;
}
.entity h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.entity p { font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.entity a { color: var(--brand-blue); font-size: 13.5px; font-family: var(--font-display); font-weight: 600; }

/* ---------- Policies page ---------- */
.policies-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) { .policies-layout { grid-template-columns: 1fr; gap: 24px; } }
.policy-nav {
  position: sticky; top: 100px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 14px;
  display: grid; gap: 2px;
}
@media (max-width: 900px) { .policy-nav { position: relative; top: 0; } }
.policy-nav a {
  display: block; padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px; color: var(--ink-2);
  transition: background .2s, color .2s;
  font-family: var(--font-display); font-weight: 500;
}
.policy-nav a:hover { background: var(--surface-2); }
.policy-nav a.active {
  background: var(--surface-3); color: var(--brand-blue);
}
.policy-content { display: grid; gap: 64px; }
.policy-section { scroll-margin-top: 96px; }
.policy-section h2 {
  font-size: clamp(28px, 3vw, 38px);
  margin-bottom: 12px;
}
.policy-section .updated {
  display: inline-block;
  font-family: var(--font-display); font-weight: 500;
  font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
  padding: 4px 12px; background: var(--surface-2); border-radius: 999px;
}
.policy-section h3 { font-size: 19px; margin-top: 28px; margin-bottom: 8px; }
.policy-section p, .policy-section li { color: var(--ink-2); line-height: 1.7; font-size: 15.5px; }
.policy-section ul { padding-left: 20px; margin: 8px 0 12px; }
.policy-section ul li { margin-bottom: 6px; }
.policy-section p + p { margin-top: 12px; }

/* ---------- Misc utilities ---------- */
.divider {
  height: 1px; background: var(--hairline);
  margin: 0 auto;
}
.canada-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font-display); font-weight: 500;
  font-size: 13px; color: var(--ink-2);
}
.canada-pill .flag {
  width: 16px; height: 12px; border-radius: 2px;
  background:
    linear-gradient(90deg,
      #FF4D4D 0%, #FF4D4D 25%,
      #fff 25%, #fff 75%,
      #FF4D4D 75%, #FF4D4D 100%);
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  :root { --section-y: clamp(56px, 10vw, 96px); }
  .nav-inner { height: 64px; }
  .nav-brand img { height: 32px; }
  .nav-brand .brand-name { font-size: 15px; }
  .nav-brand .brand-sub { font-size: 10px; letter-spacing: 0.12em; }
  .nav-cta .btn { padding: 9px 14px; font-size: 13px; }
  .nav-links.is-open { top: 64px; }

  .hero { padding: 56px 0 40px; }
  .hero-meta { gap: 28px 24px; margin-top: 32px; }
  .hero-meta .stat-num { font-size: 26px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-visual { aspect-ratio: 4/5; }

  .portal-card { min-height: 0; }
  .portal-card .body { padding: 24px; }

  .stats-banner { padding: 32px 24px; }
  .stats-grid .stat-num { font-size: 32px; }

  .cta-band { padding: 36px 28px; }
  .cta-band .actions .btn { width: 100%; justify-content: center; }

  .page-hero { padding: 56px 0 32px; }

  .footer { padding: 56px 0 24px; }
  .footer-grid { gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }

  .timeline { padding-left: 28px; gap: 24px; }
  .about-image { aspect-ratio: 5/4; }

  .policy-section h2 { font-size: 26px; }
  .policy-section h3 { font-size: 17px; }
  .policy-section p, .policy-section li { font-size: 15px; }

  .field input, .field textarea, .field select { font-size: 16px; } /* prevent iOS zoom on focus */
  .contact-info-card { padding: 22px; }
}

/* Prevent any rogue child from forcing horizontal scroll */
img, svg, iframe { max-width: 100%; }
.policy-section a, .footer a { word-break: break-word; }
