/* ---------- Self-hosted fonts (variable, latin subset; no external requests) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/spacegrotesk-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #05070d;
  --bg-alt: #080b14;
  --panel: #0e1320;
  --panel-2: #121829;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eaf0ff;
  --muted: #97a3bd;
  --dim: #7c88a3; /* one shade above the 4.5:1 AA floor on --bg */
  --accent: #00e0b8;
  --accent-2: #0a84ff;
  --accent-3: #7b61ff;
  --maxw: 1120px;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand, .stat-num, .mailto {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }

/* Film grain / vignette overlay */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(0, 224, 184, 0.10), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(123, 97, 255, 0.08), transparent 60%);
}

section, header, footer { position: relative; z-index: 1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 20px; font-weight: 700; display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { color: var(--accent); font-size: 14px; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important; border: 1px solid var(--line);
  padding: 8px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.03);
}
.nav-cta:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; display: flex; align-items: flex-start;
  padding: clamp(150px, 20vh, 240px) clamp(20px, 5vw, 56px) 90px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,224,184,0.16), rgba(10,132,255,0.08) 40%, transparent 70%);
  filter: blur(20px); z-index: 0;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; position: relative; }
.eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 22px;
  padding: 7px 14px; border: 1px solid rgba(0,224,184,0.25); border-radius: 999px;
  background: rgba(0,224,184,0.05);
}
.hero-title {
  font-size: clamp(40px, 7vw, 82px); line-height: 1.02; font-weight: 700;
  margin-bottom: 26px;
}
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 640px; margin-bottom: 38px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 64px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 16px;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #04121a; box-shadow: 0 10px 40px -12px rgba(0,224,184,0.6);
}
.btn-primary:hover { box-shadow: 0 16px 48px -10px rgba(0,224,184,0.75); }
.stats {
  display: grid; grid-template-columns: repeat(3, max-content);
  gap: clamp(24px, 5vw, 64px); align-items: start;
}
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-num { font-size: clamp(30px, 4vw, 46px); font-weight: 700; line-height: 1.05; white-space: nowrap; }
.stat-label { color: var(--dim); font-size: 14px; letter-spacing: 0.02em; }

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(72px, 12vw, 130px) clamp(20px, 5vw, 56px);
}
.section-alt {
  max-width: none;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.section-head { max-width: 760px; margin-bottom: 56px; }
.tag {
  display: inline-block; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(28px, 4.4vw, 48px); line-height: 1.1; font-weight: 700; }
.section-lead { margin-top: 20px; font-size: clamp(16px, 2vw, 19px); color: var(--muted); }

.prose p { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 760px; margin-bottom: 22px; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 46px; }
.pillar {
  padding: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
}
.pillar h3 { font-size: 19px; margin-bottom: 8px; color: var(--text); }
.pillar p { color: var(--muted); font-size: 15px; }

/* ---------- Platform / Risk cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); } /* 2x2 grid for 4-item sections (Risk & Controls) */
.card {
  padding: 30px 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  transition: transform .25s ease, border-color .25s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-4px); border-color: rgba(0,224,184,0.4);
  box-shadow: 0 24px 60px -30px rgba(0,224,184,0.5);
}
.card-ico {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; margin-bottom: 20px;
  background: rgba(0,224,184,0.08); border: 1px solid rgba(0,224,184,0.2); color: var(--accent);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact-inner { max-width: 720px; margin: 0 auto; }
.contact .tag { display: block; }
.contact h2 { font-size: clamp(28px, 4.4vw, 48px); line-height: 1.1; font-weight: 700; }
.mailto {
  display: inline-block; margin-top: 30px; font-size: clamp(24px, 4.5vw, 44px); font-weight: 700;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  border-bottom: 1px solid rgba(0,224,184,0.3); padding-bottom: 4px;
  transition: opacity .2s;
}
.mailto:hover { opacity: 0.85; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px clamp(20px, 5vw, 56px); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer p { color: var(--dim); font-size: 14px; }

/* ---------- Reveal animation (only when JS is active, so content never stays hidden) ----------
   The active class is ".revealed" — keep it distinct from every style class in this file. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.revealed { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pillars, .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; } /* keep only the Contact pill on small screens */
  .pillars, .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .stat-num { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
