/* ==========================================================================
   BRIGHTWARD SECURITY — "Threat Vector" theme
   Obsidian black / Charcoal grey / Digital violet / Cyber lime / Ice white
   Wordmark: Syncopate — Body: Space Grotesk / Inter
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --obsidian: #0b0c10;
  --charcoal: #1f2833;
  --panel: #14161d;
  --violet: #c5a3ff;
  --violet-dim: #6a4fa0;
  --violet-glow: rgba(197, 163, 255, 0.25);
  --lime: #39ff14;
  --lime-dim: rgba(57, 255, 20, 0.12);
  --ice: #f5f6f9;
  --mist: #9aa1ad;
  --mist-dim: #5c636e;
  --line: #262b35;
  --danger: #ff5c72;

  --wordmark: 'Syncopate', sans-serif;
  --heading: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;

  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--obsidian);
  color: var(--ice);
  font-family: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(197,163,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197,163,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, black 0%, transparent 70%);
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--lime); display: inline-block; }

h1, h2, h3, h4 { font-family: var(--heading); font-weight: 700; letter-spacing: -0.01em; color: var(--ice); }
h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.08; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.15; }
h3 { font-size: 22px; line-height: 1.35; }

p { color: var(--mist); font-size: 16px; }
.lede { font-size: 18px; color: var(--mist); max-width: 620px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--violet);
  color: #0b0c10;
  box-shadow: 0 0 0 1px rgba(197,163,255,0.4), 0 10px 28px -10px var(--violet-glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px var(--violet), 0 14px 34px -8px rgba(197,163,255,0.55); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ice); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }
.btn-lime { background: transparent; color: var(--lime); border-color: rgba(57,255,20,0.4); }
.btn-lime:hover { background: var(--lime-dim); border-color: var(--lime); }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--line);
}
/* backdrop-filter on the nav itself would trap any position:fixed
   descendant (like the mobile menu) inside the navbar's own box instead
   of the full viewport — so the blur lives on a separate layer instead. */
.nav::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(11,12,16,0.85);
  backdrop-filter: blur(14px);
  z-index: -1;
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand-word { font-family: var(--wordmark); font-weight: 700; font-size: 16px; letter-spacing: 0.12em; color: var(--ice); }
.brand-word span { color: var(--violet); }
.brand-tag { font-family: var(--body); font-size: 9px; letter-spacing: 0.18em; color: var(--mist-dim); display: block; margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: 38px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--mist); position: relative; padding: 6px 0; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--ice); }
.nav-links a.active { color: var(--ice); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--lime));
}
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; flex-shrink: 0; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ice); }
.nav-mobile-cta { display: none; }

/* ---------------- Footer ---------------- */
footer { border-top: 1px solid var(--line); padding: 60px 0 28px; margin-top: 130px; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 44px; padding-bottom: 44px; }
.footer-brand p { margin-top: 16px; font-size: 14px; max-width: 280px; }
.footer-col h4 { font-family: var(--body); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet); font-weight: 600; margin-bottom: 16px; }
.footer-col a, .footer-col li { font-size: 14px; color: var(--mist); margin-bottom: 11px; display: block; }
.footer-col a:hover { color: var(--ice); }

.footer-socials { display: flex; gap: 14px; margin-top: 18px; }
.footer-socials a {
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-socials a:hover { border-color: var(--violet); color: var(--violet); }
.footer-socials svg { width: 16px; height: 16px; }

.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--mist-dim); flex-wrap: wrap; gap: 12px;
  font-family: var(--body); letter-spacing: 0.02em;
}

/* ---------------- Sections ---------------- */
.section { padding: 110px 0; position: relative; z-index: 1; }
.section-head { max-width: 620px; margin-bottom: 60px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { margin-top: 16px; }
.section-head p { margin-top: 16px; }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--violet-dim), transparent); opacity: 0.6; max-width: var(--container); margin: 0 auto; }

/* ---------------- Cards ---------------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--obsidian));
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 32px;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.card:hover { border-color: var(--violet-dim); transform: translateY(-3px); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--body); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 20px; border: 1px solid;
}
.badge-live { color: var(--lime); border-color: rgba(57,255,20,0.35); background: var(--lime-dim); }
.badge-live::before { content:""; width:6px; height:6px; border-radius:50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.badge-soon { color: var(--violet); border-color: rgba(197,163,255,0.4); background: var(--violet-glow); }

.cert-badge {
  display: inline-flex; align-items: center;
  font-family: var(--body); font-size: 12px; font-weight: 500;
  color: var(--mist); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 20px;
}

/* ---------------- Page transitions ----------------
   Cross-document View Transitions for real page-to-page navigation in
   supporting browsers (Chrome/Edge). Everywhere else this degrades
   gracefully to the plain fade-in below — both are pure CSS, no JS,
   so they work the same on a static multi-page site with no router. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: bw-page-out 0.22s ease forwards;
}
::view-transition-new(root) {
  animation: bw-page-in 0.32s ease forwards;
}
@keyframes bw-page-out { to { opacity: 0; } }
@keyframes bw-page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Fallback / first-load fade, works with JS off and in every browser */
body { animation: bw-page-in 0.5s ease; }

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------------- Reveal ----------------
   Progressive enhancement: content is visible by default (works with JS off,
   slow JS, or static rendering). The hidden/animated state only applies once
   JS confirms it's ready, via body.reveal-ready — see script.js. */
[data-reveal] { opacity: 1; transform: none; }
body.reveal-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
body.reveal-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { body.reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------------- Mobile nav ---------------- */
@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 76px 0; }

  body.nav-open .nav-links {
    display: flex; position: fixed; top: 80px; left: 0; right: 0;
    /* Explicit viewport-relative height instead of bottom:0 — .nav uses
       backdrop-filter, which makes it (not the viewport) the containing
       block for this fixed element, so a bottom offset would resolve
       against the 80px-tall nav bar instead of the screen. */
    height: calc(100vh - 80px);
    height: calc(100dvh - 80px);
    background: var(--obsidian); flex-direction: column; padding: 40px 32px; gap: 28px;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--line); z-index: 99;
  }
  body.nav-open .nav-links a { font-size: 20px; }
}
/* Below this width the brand lockup + a full CTA button + hamburger no
   longer reliably fit on one line, so the CTA moves into the mobile
   drawer instead of sitting in the top bar. */
@media (max-width: 600px) {
  .nav-cta { display: none; }
  body.nav-open .nav-mobile-cta {
    display: block; width: 100%; margin-top: 4px;
  }
  body.nav-open .nav-mobile-cta .btn { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .brand-tag { display: none; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 20px; }
}
/* Long unbroken strings (emails) in the 2-column tablet footer layout
   would otherwise overflow their column. */
.footer-col a { overflow-wrap: anywhere; }