/* =========================================================
   DarkGuard — Design System
   Owner: DARKDATA, S.L.
   ========================================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.brand {
  font-family: "Calibri", "Carlito", "Segoe UI", sans-serif;
  font-weight: 700;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--body-mesh-a), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 10%, var(--body-mesh-b), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02", "cv11";
}

img, video {
  max-width: 100%;
  display: block;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Background system */
  --bg: #07070a;
  --bg-1: #0c0c11;
  --bg-2: #131319;
  --bg-3: #1a1a22;
  --bg-elevated: #1d1d26;

  /* Body background mesh (radial accents painted on body) */
  --body-mesh-a: rgba(59, 130, 246, 0.10);
  --body-mesh-b: rgba(99, 102, 241, 0.05);

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-bright: rgba(255, 255, 255, 0.18);

  /* Text */
  --text: #ececf1;
  --text-2: #b4b4c1;
  --text-3: #7a7a8c;
  --text-muted: #525266;

  /* Accents */
  --blue: #3b82f6;
  --blue-hover: #4f8ef6;
  --blue-soft: rgba(59, 130, 246, 0.15);
  --blue-glow: rgba(59, 130, 246, 0.35);

  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.13);

  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.13);

  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.13);

  /* Composite surfaces that don't map cleanly to bg-1..3 */
  --header-bg:           rgba(7, 7, 10, 0.6);
  --header-bg-scrolled:  rgba(7, 7, 10, 0.85);
  --nav-open-bg:         rgba(7, 7, 10, 0.97);
  --grid-line:           rgba(255, 255, 255, 0.025);
  --accent-grad-from:    #ffffff;
  --accent-grad-to:      #888a99;
  --cookie-banner-bg:    rgba(13, 13, 18, 0.95);
  --feature-fade:        rgba(7, 7, 10, 0.4);
  --popup-backdrop:      rgba(3, 3, 6, 0.86);
  --section-divider:     rgba(255, 255, 255, 0.14);
  --section-divider-soft:rgba(255, 255, 255, 0.05);
  --on-blue:             #ffffff;

  /* Typography */
  --font-display: "Bricolage Grotesque", "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  /* Spacing */
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 40px);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 60px rgba(59, 130, 246, 0.18);
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  color-scheme: light;

  --bg:           #ffffff;
  --bg-1:         #f6f7fa;
  --bg-2:         #eef0f5;
  --bg-3:         #e3e6ee;
  --bg-elevated:  #ffffff;

  --body-mesh-a:  rgba(59, 130, 246, 0.06);
  --body-mesh-b:  rgba(99, 102, 241, 0.04);

  --border:         rgba(15, 23, 42, 0.08);
  --border-strong:  rgba(15, 23, 42, 0.14);
  --border-bright:  rgba(15, 23, 42, 0.22);

  --text:        #0b0c12;
  --text-2:      #3a3c48;
  --text-3:      #65687a;
  --text-muted:  #9498a8;

  --blue:        #2563eb;
  --blue-hover:  #1d4ed8;
  --blue-soft:   rgba(37, 99, 235, 0.10);
  --blue-glow:   rgba(37, 99, 235, 0.22);

  --red:         #dc2626;
  --red-soft:    rgba(220, 38, 38, 0.08);

  --amber:       #b45309;
  --amber-soft:  rgba(180, 83, 9, 0.10);

  --green:       #15803d;
  --green-soft:  rgba(21, 128, 61, 0.08);

  --header-bg:           rgba(255, 255, 255, 0.70);
  --header-bg-scrolled:  rgba(255, 255, 255, 0.92);
  --nav-open-bg:         rgba(255, 255, 255, 0.97);
  --grid-line:           rgba(15, 23, 42, 0.045);
  --accent-grad-from:    #0b0c12;
  --accent-grad-to:      #65687a;
  --cookie-banner-bg:    rgba(255, 255, 255, 0.95);
  --feature-fade:        rgba(255, 255, 255, 0.35);
  --popup-backdrop:      rgba(245, 247, 252, 0.86);
  --section-divider:     rgba(15, 23, 42, 0.14);
  --section-divider-soft:rgba(15, 23, 42, 0.05);

  --shadow-sm:   0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md:   0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg:   0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 60px rgba(37, 99, 235, 0.14);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h4 {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.7;
}

p.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-2);
  line-height: 1.6;
  max-width: 60ch;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "zero", "ss01";
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-3);
  font-weight: 500;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue-glow);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: clamp(70px, 10vw, 130px) 0;
  position: relative;
}

.section-head {
  max-width: 720px;
  margin-bottom: 60px;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { margin-bottom: 18px; }
.section-head p { font-size: 1.1rem; color: var(--text-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--r-md);
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--blue);
  color: var(--on-blue);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 4px 14px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 8px 24px rgba(59, 130, 246, 0.45);
}

.btn-ghost {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-3);
  border-color: var(--border-bright);
}

.btn-link {
  background: transparent;
  color: var(--text-2);
  padding: 13px 0;
}
.btn-link:hover { color: var(--text); }

.btn .arrow {
  transition: transform 0.18s ease;
}
.btn:hover .arrow {
  transform: translateX(2px);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.logo .logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.logo .logo-mark svg { width: 16px; height: 16px; color: #fff; }
.logo .logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text .by { font-size: 0.62rem; color: var(--text-muted); margin-top: 3px; letter-spacing: 0.1em; font-weight: 400; }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--text-2);
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--bg-2);
}

.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; color: var(--text); }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-link { display: none; }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 70px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--nav-open-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 14px var(--gutter);
    gap: 2px;
  }
  .nav-links.open a {
    padding: 14px 16px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(140px, 18vw, 200px);
  padding-bottom: clamp(60px, 10vw, 100px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.hero-brand {
  display: block;
  text-align: center;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 22px;
}

.hero h1 {
  margin: 24px 0 26px;
}
.hero h1 .accent {
  background: linear-gradient(180deg, var(--accent-grad-from) 0%, var(--accent-grad-to) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 400;
}
.hero h1 .highlight {
  position: relative;
  display: inline-block;
  color: var(--blue);
}

.hero p.lead {
  margin: 0 auto 36px;
  text-align: center;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text-2);
  max-width: 660px;
}

.hero-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.hero-pills .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.hero-pills .pill svg { width: 12px; height: 12px; color: var(--blue); }

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

/* Hero terminal demo */
.hero-demo {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 960px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 90px rgba(59, 130, 246, 0.12);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.window-bar .dots { display: flex; gap: 6px; }
.window-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #2a2a35; }
.window-bar .dot.r { background: #ed6a5e; }
.window-bar .dot.y { background: #f5bf4f; }
.window-bar .dot.g { background: #62c554; }
.window-bar .label {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.terminal {
  padding: 28px 32px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.7;
  min-height: 460px;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2)),
    var(--bg-1);
}
.terminal .line { display: flex; gap: 10px; align-items: baseline; opacity: 0; max-height: 0; overflow: hidden; transform: translateY(4px); animation: linein 0.32s forwards; }
.terminal .line .prompt { color: var(--blue); user-select: none; }
.terminal .line .cmd { color: var(--text); }
.terminal .line .out { color: var(--text-3); padding-left: 24px; }
.terminal .line.deny { color: var(--red); padding-left: 24px; }
.terminal .line.ask { color: var(--amber); padding-left: 24px; }
.terminal .line.allow { color: var(--green); padding-left: 24px; }

/* Typewriter base (used by both "claude" and the user prompt) */
.terminal .line .cmd.typing {
  display: inline-block;
  box-sizing: content-box;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  border-right: 2px solid var(--text);
}
/* "claude" — 6 chars, types right after the $ prompt appears */
.terminal .line .cmd.typing-claude {
  animation:
    type-claude 0.45s steps(6, end) 0.30s forwards,
    caret-stop 0s 0.80s forwards;
}
/* User prompt — 36 chars, types after the welcome banner */
.terminal .line .cmd.typing-user {
  animation:
    type-user 2.0s steps(36, end) 1.85s forwards,
    caret-stop 0s 3.90s forwards;
}

/* Claude Code welcome banner */
.terminal .line.welcome { color: var(--text-2); padding-left: 24px; }
.terminal .line .cc-mark { color: #a78bfa; margin-right: 6px; }
.terminal .line .cc-brand { color: var(--text); font-weight: 600; }
.terminal .line .cc-meta { color: var(--text-muted); }

/* Operator typing a prompt */
.terminal .line.user-prompt { color: var(--text); }
.terminal .line .user-arrow { color: var(--blue); font-weight: 600; user-select: none; }

/* Claude assistant message + tool call (● bullet at column 0) */
.terminal .line.cc-msg,
.terminal .line.tool-call { padding-left: 0; color: var(--text-2); }
.terminal .line.cc-msg .bullet,
.terminal .line.tool-call .bullet { color: #d97757; user-select: none; }
.terminal .line.tool-call { color: var(--text); }
.terminal .line .cc-cmd { color: var(--text); }

/* Tool output (⎿ corner at column 1) */
.terminal .line.tool-out { padding-left: 16px; }
.terminal .line.tool-out .corner { color: currentColor; opacity: 0.55; user-select: none; }
/* Re-color the line via verdict classes — .ask/.deny/.allow already set color */
.terminal .line.tool-out.ask,
.terminal .line.tool-out.deny,
.terminal .line.tool-out.allow { padding-left: 16px; }

/* git status streaming output */
.terminal .line.tool-out.git-out { color: var(--text-2); }
.terminal .line.tool-out.git-out .git-branch { color: var(--green); margin-left: 4px; }
.terminal .line.git-cont { padding-left: 38px; color: var(--text-3); }
.terminal .line.git-cont.indent { padding-left: 60px; }
.terminal .line.git-cont .git-mod { color: var(--red); }
.terminal .line.git-cont .git-file { color: var(--text-2); margin-left: 12px; }

/* Animation timing — each line fades in at the moment it would "happen" */
.terminal .line.delay-welcome { animation-delay: 0.95s; }
.terminal .line.delay-prompt  { animation-delay: 1.55s; }
.terminal .line.delay-response{ animation-delay: 4.10s; }
.terminal .line.delay-1 { animation-delay: 4.55s; }
.terminal .line.delay-2 { animation-delay: 4.95s; }
.terminal .line.delay-3 { animation-delay: 5.50s; }
.terminal .line.delay-4 { animation-delay: 5.90s; }
.terminal .line.delay-5 { animation-delay: 6.45s; }
.terminal .line.delay-6 { animation-delay: 6.85s; }
.terminal .line.delay-g1 { animation-delay: 7.15s; }
.terminal .line.delay-g2 { animation-delay: 7.40s; }
.terminal .line.delay-g3 { animation-delay: 7.65s; }
.terminal .line.delay-g4 { animation-delay: 7.90s; }
.terminal .line.delay-7 { animation-delay: 8.55s; }

.terminal .cursor {
  display: inline-block;
  width: 8px; height: 1.1em;
  background: var(--text);
  vertical-align: -2px;
  margin-left: 2px;
  opacity: 0;
  animation: cursor-on 0s 8.80s forwards, blink 1s 8.80s step-end infinite;
}

@keyframes linein { to { opacity: 1; max-height: 2.5em; transform: translateY(0); } }
@keyframes blink { 50% { background: transparent; } }
@keyframes type-claude { to { width: 6ch; } }
@keyframes type-user   { to { width: 36ch; } }
@keyframes caret-stop { to { border-right-color: transparent; } }
@keyframes cursor-on { to { opacity: 1; } }

/* ---------- Trust strip ---------- */
.trust {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.trust-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.trust-tags {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.trust-tags span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-3);
}

/* ---------- Problem grid (4 gaps) ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (max-width: 780px) {
  .problem-grid { grid-template-columns: 1fr; }
}

.problem-card {
  padding: 40px;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: background 0.2s ease;
}
.problem-card:hover { background: var(--bg-2); }
.problem-card .num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue);
  letter-spacing: 0.08em;
}
.problem-card h3 { color: var(--text); }
.problem-card p { color: var(--text-2); font-size: 0.97rem; }

/* ---------- Solution / feature blocks ---------- */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  margin-bottom: clamp(80px, 10vw, 130px);
}
.feature-block:last-child { margin-bottom: 0; }
.feature-block.reverse {
  grid-template-columns: 1.15fr 1fr;
}
.feature-block.reverse .feature-text { order: 2; }

@media (max-width: 880px) {
  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr;
  }
  .feature-block.reverse .feature-text { order: 0; }
}

.feature-text .eyebrow { margin-bottom: 18px; }
.feature-text h2 { margin-bottom: 18px; }
.feature-text p { margin-bottom: 16px; max-width: 50ch; }
.feature-text ul { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.feature-text li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-2);
  font-size: 0.97rem;
}
.feature-text li::before {
  content: "";
  margin-top: 9px;
  width: 12px;
  height: 1px;
  background: var(--blue);
  flex-shrink: 0;
}

.feature-visual {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-1);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}
.feature-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, var(--feature-fade));
  pointer-events: none;
}
.feature-visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Capability grid ---------- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 880px) {
  .cap-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .cap-grid { grid-template-columns: 1fr; }
}

.cap-card {
  padding: 28px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s;
}
.cap-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}
.cap-card .icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: grid;
  place-items: center;
}
.cap-card .icon svg { width: 18px; height: 18px; color: var(--blue); }
.cap-card h4 { color: var(--text); }
.cap-card p { font-size: 0.92rem; color: var(--text-2); }

/* ---------- Demo / Video section ---------- */
.demo-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-1);
  box-shadow: var(--shadow-lg), 0 0 100px rgba(59, 130, 246, 0.12);
  aspect-ratio: 16 / 9;
}
.demo-wrap video,
.demo-wrap iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}
.demo-wrap .video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--bg-2), var(--bg-1));
  text-align: center;
  padding: 40px;
}
.demo-wrap .video-placeholder .play {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.18);
}
.demo-wrap .video-placeholder .play svg { width: 22px; height: 22px; color: var(--on-blue); }
.demo-wrap .video-placeholder p { color: var(--text-3); font-size: 0.9rem; max-width: 340px; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 40px;
}
@media (max-width: 880px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .steps { grid-template-columns: 1fr; }
}
.step {
  padding: 28px;
  background: var(--bg-1);
}
.step .num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.step h4 { color: var(--text); margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--text-2); }

/* ---------- Verdict grid (allow / deny / ask) ---------- */
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 880px) {
  .verdict-grid { grid-template-columns: 1fr; }
}
.verdict {
  position: relative;
  padding: 28px 28px 24px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.verdict:hover { transform: translateY(-2px); }
.verdict::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: currentColor;
  opacity: 0.7;
}
.verdict-allow { color: var(--green); border-color: rgba(34, 197, 94, 0.25); }
.verdict-ask   { color: var(--amber); border-color: rgba(245, 158, 11, 0.25); }
.verdict-deny  { color: var(--red);   border-color: rgba(239, 68, 68, 0.25); }
.verdict h4 { color: var(--text); margin-top: 4px; }
.verdict p  { color: var(--text-2); font-size: 0.95rem; }
.vbadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: currentColor;
  align-self: flex-start;
}
.vdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.vcode {
  display: block;
  margin-top: auto;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.78rem;
  color: var(--text-3);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Compliance section ---------- */
.compliance-wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 880px) {
  .compliance-wrap { grid-template-columns: 1fr; }
}

.score-card {
  padding: 36px 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.score-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(34, 197, 94, 0.08), transparent 60%);
  pointer-events: none;
}
.score-card > * { position: relative; z-index: 1; }

.score-ring {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 14px;
}
.score-ring svg { width: 100%; height: 100%; }
.score-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1;
}
.score-num strong {
  font-size: 3.4rem;
  font-weight: 500;
  color: var(--text);
}
.score-num span {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-3);
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.score-tier {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 22px;
}
.score-checklist {
  width: 100%;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: left;
}
.score-checklist li {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-2);
}
.score-checklist .ok {
  color: var(--green);
  font-weight: 600;
  width: 14px;
  flex-shrink: 0;
}
.score-checklist .warn {
  color: var(--amber);
  font-weight: 600;
  width: 14px;
  flex-shrink: 0;
}
.compliance-frameworks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.framework {
  padding: 22px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.2s;
}
.framework:hover { border-color: var(--border-bright); }
.framework .name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.framework .desc {
  font-size: 0.84rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* ---------- Why now metrics ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 880px) { .why-grid { grid-template-columns: 1fr; } }

.why-card {
  padding: 36px 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.why-card .stat {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
}
.why-card .stat .unit {
  font-size: 0.5em;
  color: var(--text-3);
  font-weight: 400;
  margin-left: 4px;
}
.why-card h4 { margin-bottom: 8px; }
.why-card p { font-size: 0.92rem; }

/* ---------- Integration list ---------- */
.integration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
@media (max-width: 780px) { .integration-grid { grid-template-columns: 1fr; } }

.integration-card {
  padding: 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.integration-card h3 { margin-bottom: 16px; }
.integration-card p { margin-bottom: 18px; font-size: 0.95rem; }
.integration-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.integration-card .tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
}
.integration-card .tag-soon {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(59, 130, 246, 0.25);
  font-style: italic;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.faq-item {
  background: var(--bg-1);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 26px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text);
  transition: background 0.15s;
}
.faq-item summary:hover { background: var(--bg-2); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 12px; height: 12px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-body {
  padding: 0 30px 28px;
  color: var(--text-2);
  font-size: 0.97rem;
  line-height: 1.7;
  max-width: 70ch;
}

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(50px, 8vw, 80px);
  background:
    radial-gradient(ellipse at top, rgba(59, 130, 246, 0.18), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  text-align: center;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
  pointer-events: none;
}
.final-cta > * { position: relative; z-index: 1; }
.final-cta h2 { margin-bottom: 18px; }
.final-cta p { color: var(--text-2); max-width: 560px; margin: 0 auto 32px; font-size: 1.1rem; }
.final-cta .btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Contact form ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 880px) {
  .contact-wrap { grid-template-columns: 1fr; }
}
.contact-info h2 { margin-bottom: 16px; }
.contact-info p { color: var(--text-2); margin-bottom: 30px; max-width: 40ch; }
.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.contact-meta .row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-meta .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}
.contact-meta .value {
  color: var(--text);
  font-size: 0.97rem;
}
.contact-meta .value a { color: var(--text); }
.contact-meta .value a:hover { color: var(--blue); }

.contact-form {
  padding: 36px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.form-row.full { grid-template-columns: 1fr; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--bg-3);
}
.field textarea { resize: vertical; min-height: 110px; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 18px;
  font-size: 0.84rem;
  color: var(--text-3);
}
.consent input { margin-top: 4px; accent-color: var(--blue); }
.consent a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.consent a:hover { color: var(--blue); }

.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok  { background: var(--green-soft); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); }
.form-status.err { background: var(--red-soft);   color: var(--red);   border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }

.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-3);
  max-width: 36ch;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom .legal-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  max-width: 580px;
  margin: 0 auto;
  padding: 18px 22px;
  background: var(--cookie-banner-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 12px;
}
.cookie-banner p a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner .cookie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cookie-banner .btn {
  padding: 9px 16px;
  font-size: 0.85rem;
}

/* ---------- Legal page styles ---------- */
.legal-hero {
  padding-top: 140px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.legal-hero .eyebrow { margin-bottom: 16px; }
.legal-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.legal-hero p { color: var(--text-3); font-size: 0.95rem; }

.legal-content {
  padding: 60px 0 100px;
  max-width: 820px;
  margin: 0 auto;
}
.legal-content h2 {
  font-size: 1.6rem;
  margin-top: 50px;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 1.15rem;
  margin-top: 32px;
  margin-bottom: 12px;
}
.legal-content p {
  font-size: 0.97rem;
  margin-bottom: 16px;
  color: var(--text-2);
}
.legal-content ul {
  margin: 16px 0 24px 22px;
  color: var(--text-2);
}
.legal-content li { margin-bottom: 8px; font-size: 0.95rem; }
.legal-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}
.legal-content th, .legal-content td {
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.legal-content th {
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.legal-content .id-card {
  margin: 20px 0 30px;
  padding: 20px 24px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.8;
}
.legal-content .id-card strong { color: var(--text); font-weight: 500; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Utilities ---------- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ---------- Theme toggle ----------
   Lives inside .nav-cta so it stays anchored top-right of the page,
   visible at every breakpoint. Renders both a sun and moon glyph;
   the inactive glyph is hidden based on the document data-theme attr. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover {
  background: var(--bg-3);
  border-color: var(--border-bright);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.2s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  grid-area: 1 / 1;
}
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
.theme-toggle .icon-sun  { opacity: 0; transform: rotate(-90deg) scale(0.6); }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
:root[data-theme="light"] .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0) scale(1); }

/* ---------- Terminal mock — always dark ----------
   The hero terminal is a stylised CLI; it should read as a terminal in
   either page theme. Re-import the dark token values within its subtree
   only when the page is in light mode. */
:root[data-theme="light"] .hero-demo {
  --bg-1:          #0c0c11;
  --bg-2:          #131319;
  --border:        rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text:          #ececf1;
  --text-2:        #b4b4c1;
  --text-3:        #7a7a8c;
  --text-muted:    #525266;
  --blue:          #3b82f6;
  --red:           #ef4444;
  --amber:         #f59e0b;
  --green:         #22c55e;
  --shadow-lg:     0 30px 80px rgba(0, 0, 0, 0.6);
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 540px) {
  .hero-pills { display: none; }
  .nav-cta .btn-ghost { display: none; }
}
