/* ============================================================
   Digital Blaize — Shared Design System (main.css)
   Flame identity · dark canvas · warm gradient accent
   Single source of truth: PROJECT_SPEC.md §3
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces & lines */
  --bg:          #08070b;
  --bg-2:        #0c0b11;
  --surface:     #121017;
  --surface-2:   #17151f;
  --line:        rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);

  /* Text */
  --text:  #f6f4f8;
  --muted: #9c99a8;
  --dim:   #6c6979;

  /* Flame palette */
  --amber:      #ffb23e;
  --orange:     #ff6a3d;
  --pink:       #ff2e7e;
  --flame:      linear-gradient(115deg, #ffb23e 0%, #ff6a3d 46%, #ff2e7e 100%);
  --flame-soft: linear-gradient(115deg, rgba(255,178,62,.16), rgba(255,46,126,.16));

  /* Fonts */
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1200px;
  --r:    18px;
  --nav-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

button { font-family: inherit; cursor: pointer; }

::selection {
  background: rgba(255, 106, 61, .35);
  color: #fff;
}

/* ---------- Background atmosphere ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 85% 8%,  rgba(255, 178, 62, .14), transparent 70%),
    radial-gradient(50% 45% at 8% 42%,  rgba(255, 46, 126, .12), transparent 70%),
    radial-gradient(70% 60% at 50% 100%, rgba(255, 106, 61, .07), transparent 70%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 .4em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; }

p { margin: 0 0 1rem; color: var(--muted); }

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--orange);
  margin: 0 0 1rem;
  display: inline-block;
}

.flame-text {
  background: var(--flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { font-size: 1.18rem; color: var(--muted); max-width: 58ch; }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: 110px 0; }

.sec-head { max-width: 64ch; margin-bottom: 56px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head p { font-size: 1.08rem; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(8, 7, 11, .72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -.02em;
  color: var(--text);
}
.brand .mark { width: 28px; height: 28px; flex: 0 0 auto; }

.navlinks {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navlinks > li { position: relative; }
.navlinks a {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .25s ease, background .25s ease;
}
.navlinks a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.navlinks a.active { color: var(--text); }
.navlinks a.active::after { color: var(--orange); }

/* Use-case rows */
.usecase { padding: 24px; }
.usecase h3 { font-size: 1.12rem; margin-bottom: .4em; }
.usecase p { margin: 0; font-size: .94rem; }
.usecase .uc-tag { font-family: var(--mono); font-size: .72rem; color: var(--orange); letter-spacing: .08em; text-transform: uppercase; display: block; margin-bottom: 10px; }

/* Differentiator rows */
.diff-row { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.diff-row:last-child { border-bottom: none; }
.diff-row .ico {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: var(--flame-soft); border: 1px solid var(--line); color: var(--amber);
}
.diff-row .ico svg { width: 22px; height: 22px; }
.diff-row h3 { font-size: 1.08rem; margin-bottom: .25em; }
.diff-row p { margin: 0; font-size: .94rem; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Solutions dropdown (desktop) */
.has-dropdown > a::after {
  content: "▾";
  font-size: .7em;
  margin-left: 6px;
  color: var(--dim);
}
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 320px;
  background: rgba(18, 16, 23, .96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.dropdown.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 11px;
  color: var(--text);
  background: transparent;
}
.dropdown a:hover { background: var(--flame-soft); }
.dropdown a .di {
  width: 20px; height: 20px; flex: 0 0 auto;
  color: var(--orange);
}
.dropdown a span small {
  display: block;
  font-size: .76rem;
  color: var(--dim);
  font-weight: 400;
}

/* Hamburger */
.menu-btn {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.menu-btn svg { width: 20px; height: 20px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--body);
  font-weight: 600;
  font-size: .96rem;
  line-height: 1;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--flame);
  color: #1a0d05;
  box-shadow: 0 8px 28px rgba(255, 106, 61, .28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(255, 106, 61, .42);
}

.btn-ghost {
  background: rgba(255,255,255,.03);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.06);
}

.nav-cta { padding: 10px 18px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  position: relative;
  background: rgba(255,255,255,.018);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  transition: transform .25s ease, border-color .25s ease;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--flame);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.card:hover::after { opacity: .9; }

.card .ico {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--flame-soft);
  border: 1px solid var(--line);
  color: var(--amber);
  margin-bottom: 18px;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .5em; }
.card p { font-size: .96rem; margin-bottom: 1.1rem; }

/* Capability list with flame dots */
.cap-list { list-style: none; margin: 0 0 18px; padding: 0; }
.cap-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: .92rem;
  color: var(--muted);
}
.cap-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--flame);
}

.card-link {
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .25s ease;
}
.card-link:hover { gap: 11px; }

/* Pill badge */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .04em;
  color: var(--muted);
}
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255,106,61,.6);
  animation: pulse 2s infinite;
}

/* ============================================================
   Form launcher + modal
   ============================================================ */
.form-launch {
  position: fixed;
  bottom: 26px; right: 26px;
  z-index: 200;
  width: 60px; height: 60px;
  border: none;
  border-radius: 50%;
  background: var(--flame);
  color: #1a0d05;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 34px rgba(255, 106, 61, .45);
  transition: transform .25s ease;
}
.form-launch svg { width: 26px; height: 26px; transition: transform .25s ease; }
.form-launch:hover { transform: scale(1.06); }
.form-launch::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 106, 61, .55);
  animation: pulse-ring 2.4s ease-out infinite;
  pointer-events: none;
}
.form-launch .ic-close { display: none; }
.form-launch.open .ic-open { display: none; }
.form-launch.open .ic-close { display: block; }
.form-launch.open::before { display: none; }

.form-launch .tip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .82rem;
  padding: 7px 12px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.form-launch:hover .tip { opacity: 1; }
.form-launch.open .tip { display: none; }

/* Overlay */
.form-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(4, 3, 7, .6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.form-overlay.open { opacity: 1; visibility: visible; }

/* Slide-over panel */
.form-panel {
  position: fixed;
  top: 0; right: 0;
  z-index: 200;
  height: 100%;
  width: min(480px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-radius: 20px 0 0 20px;
  box-shadow: -20px 0 60px rgba(0,0,0,.5);
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s ease, visibility .35s;
  display: flex;
  flex-direction: column;
}
.form-panel.open { transform: translateX(0); opacity: 1; visibility: visible; }

.form-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 26px 28px 0;
}
.form-panel-head h3 { font-size: 1.4rem; margin-bottom: .2em; }
.form-panel-head p { font-size: .9rem; margin: 0; }
.form-close {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: color .25s, border-color .25s;
}
.form-close:hover { color: var(--text); border-color: var(--line-strong); }
.form-close svg { width: 18px; height: 18px; }

.form-body { flex: 1; overflow-y: auto; padding: 22px 28px 28px; }

/* Embedded mode (contact page) */
.form-embed {
  background: rgba(255,255,255,.018);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px;
}

/* ---------- Progress ---------- */
.form-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}
.form-progress .bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  position: relative;
}
.form-progress .bar.active::after,
.form-progress .bar.done::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--flame);
}
.form-step-label {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}

/* ---------- Steps ---------- */
.form-step { display: none; }
.form-step.active { display: block; animation: fadeUp .4s ease both; }
.form-step h4 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.field-group { margin-bottom: 18px; }
.field-group label {
  display: block;
  font-size: .86rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 7px;
}
.field-group label .req { color: var(--orange); margin-left: 2px; }
.field-group .hint { font-size: .78rem; color: var(--dim); }

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  font-family: var(--body);
  font-size: .95rem;
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field-group textarea { resize: vertical; min-height: 96px; }
.field-group select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239c99a8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--dim); }
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, .2);
}
.field-group.invalid input,
.field-group.invalid select,
.field-group.invalid textarea {
  border-color: var(--pink);
}
.field-error {
  display: none;
  font-size: .78rem;
  color: var(--pink);
  margin-top: 6px;
}
.field-group.invalid .field-error { display: block; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Multi-select pills */
.pill-select { display: flex; flex-wrap: wrap; gap: 9px; }
.pill-opt {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-size: .86rem;
  font-weight: 500;
  transition: all .2s ease;
}
.pill-opt:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.pill-opt.selected {
  background: var(--flame-soft);
  border-color: var(--orange);
  color: var(--text);
}

/* Checkbox rows */
.check-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: .88rem;
  color: var(--muted);
}
.check-row input[type="checkbox"] {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--orange);
  cursor: pointer;
}
.check-row a { color: var(--orange); text-decoration: underline; }

/* Step nav */
.form-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 26px;
}
.form-nav .btn { flex: 1; }
.form-nav .btn-back { flex: 0 0 auto; }

/* Confirmation screen */
.form-done { display: none; text-align: center; padding: 30px 10px; }
.form-done.active { display: block; animation: fadeUp .4s ease both; }
.form-done .check {
  width: 72px; height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--flame-soft);
  border: 1px solid var(--orange);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber);
}
.form-done .check svg { width: 34px; height: 34px; }
.form-done h4 { font-size: 1.5rem; margin-bottom: .4em; }
.form-done a { color: var(--orange); }

/* Form-level error */
.form-alert {
  display: none;
  background: rgba(255, 46, 126, .1);
  border: 1px solid rgba(255, 46, 126, .4);
  color: var(--text);
  border-radius: 11px;
  padding: 12px 14px;
  font-size: .86rem;
  margin-bottom: 16px;
}
.form-alert.show { display: block; }
.form-alert a { color: var(--orange); }

/* ============================================================
   Cookie banner
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 210;
  display: none;
  background: rgba(12, 11, 17, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.cookie-banner.show { display: block; }
.cookie-banner .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: .88rem; flex: 1; min-width: 240px; }
.cookie-banner a { color: var(--orange); text-decoration: underline; }
.cookie-banner .cookie-actions { display: flex; gap: 10px; }
.cookie-banner .btn { padding: 10px 18px; font-size: .9rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 72px 0 36px;
  margin-top: 40px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.foot-col h5 {
  font-family: var(--mono);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--dim);
  margin: 0 0 18px;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 10px; }
.foot-col a, .foot-col li { font-size: .92rem; color: var(--muted); }
.foot-col a:hover { color: var(--text); }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { font-size: .92rem; max-width: 34ch; }
.foot-brand .mail { color: var(--orange); font-size: .92rem; }

.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: color .25s, border-color .25s;
}
.socials a:hover { color: var(--text); border-color: var(--line-strong); }
.socials svg { width: 18px; height: 18px; }

.foot-bottom {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .84rem;
  color: var(--dim);
}

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* Load stagger via --d */
.fade-up { animation: fadeUp .7s ease both; animation-delay: var(--d, 0s); }

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,106,61,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(255,106,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,106,61,0); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes ring {
  0%   { transform: scale(.6); opacity: .8; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .navlinks {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: rgba(12, 11, 17, .98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 14px 28px 22px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .navlinks.show { transform: none; opacity: 1; visibility: visible; }
  .navlinks a { padding: 13px 14px; font-size: 1rem; }
  .has-dropdown > a::after { display: none; }
  .dropdown { display: none !important; }
  .menu-btn { display: flex; }
  .nav-cta { display: none; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }

  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 80px 0; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .foot-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .btn-row .btn { width: 100%; }
  .form-panel { width: 100vw; border-radius: 0; }
}

/* ============================================================
   Page sections (shared across pages)
   ============================================================ */

/* ---- Hero ---- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy .pill { margin-bottom: 22px; }
.hero-note {
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--dim);
  margin-top: 22px;
}

/* ---- Faux operations console ---- */
.console {
  background: rgba(18,16,23,.7);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.cdot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.cdot:first-child { background: var(--orange); }
.ctitle {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--dim);
  margin-left: 8px;
}
.console-body { display: grid; grid-template-columns: 120px 1fr; min-height: 250px; }
.console-side { border-right: 1px solid var(--line); padding: 16px; }
.cs-label {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--dim);
  margin-bottom: 14px;
}
.console-side ul { list-style: none; margin: 0; padding: 0; }
.console-side li {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--muted);
  padding: 6px 0;
}
.console-side li.on { color: var(--text); position: relative; padding-left: 12px; }
.console-side li.on::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--flame);
}
.console-main { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.ctiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.ctile {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
}
.ct-num { display: block; font-family: var(--display); font-weight: 800; font-size: 1.4rem; }
.ct-lab { font-family: var(--mono); font-size: .64rem; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.cchart { display: flex; align-items: flex-end; gap: 8px; height: 86px; }
.cchart span { flex: 1; border-radius: 5px 5px 0 0; background: var(--flame); opacity: .8; }
.cstatus {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.blink-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: blink 1.6s infinite; }

/* ---- Trust band ---- */
.trust-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 48px;
  justify-content: space-between;
  padding: 22px 0;
  font-size: .92rem;
  color: var(--muted);
}
.trust-row strong { color: var(--text); font-family: var(--display); font-weight: 800; }

/* ---- Step cards ---- */
.step-card .step-num {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--orange);
  letter-spacing: .1em;
  display: block;
  margin-bottom: 14px;
}

/* ---- Split layout ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-left h2 { margin-bottom: .5em; }

.feature-rows { display: flex; flex-direction: column; gap: 22px; margin-top: 28px; }
.feat { display: flex; gap: 16px; align-items: flex-start; }
.feat .ico {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: var(--flame-soft);
  border: 1px solid var(--line);
  color: var(--amber);
}
.feat .ico svg { width: 22px; height: 22px; }
.feat h3 { margin-bottom: .25em; font-size: 1.08rem; }
.feat p { margin: 0; font-size: .93rem; }

.impact-panel {
  background: rgba(255,255,255,.018);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
}
.impact-panel .cs-label { margin-bottom: 18px; }
.impact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.impact-row:last-child { border-bottom: none; }
.impact-row span { color: var(--muted); font-size: .94rem; }
.impact-row strong { font-family: var(--display); font-weight: 800; font-size: 1.3rem; }

/* ---- Presence ---- */
.loc-grid {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 12px 36px;
  margin-top: 28px;
}
.loc { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .98rem; }
.pin {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--flame);
  box-shadow: 0 0 0 0 rgba(255,106,61,.6);
  animation: pulse 2.4s infinite;
}

.nodemap {
  position: relative;
  aspect-ratio: 4 / 3.2;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 32px 32px,
    rgba(255,255,255,.012);
  overflow: hidden;
}
.node-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.node-lines line { stroke: rgba(255,106,61,.3); stroke-width: 1; }
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text);
  padding: 5px 9px 5px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12,11,17,.8);
  white-space: nowrap;
}
.node::before {
  content: ""; position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--flame);
  box-shadow: 0 0 8px rgba(255,106,61,.8);
}

/* ---- Numbers band ---- */
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.numbers { text-align: center; }
.num strong { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; }
.num span { font-family: var(--mono); font-size: .82rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }

/* ---- Legal / prose pages ---- */
.legal { max-width: 760px; margin: 0 auto; }
.legal .legal-head { margin-bottom: 48px; }
.legal .legal-head p { font-family: var(--mono); font-size: .82rem; color: var(--dim); letter-spacing: .04em; }
.legal h2 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 44px 0 14px;
  scroll-margin-top: 96px;
}
.legal h2 .num { color: var(--orange); font-family: var(--mono); font-size: .8em; margin-right: 10px; }
.legal h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 1rem; line-height: 1.8; }
.legal ul { padding-left: 22px; margin: 0 0 1rem; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--orange); text-decoration: underline; }
.legal strong { color: var(--text); }

/* ---- 404 ---- */
.notfound {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.notfound .orb {
  width: 160px; height: 160px;
  border-radius: 50%;
  margin-bottom: 36px;
  background: var(--flame);
  filter: blur(8px);
  opacity: .85;
  animation: pulse-ring 3s ease-out infinite;
  position: relative;
}
.notfound .orb svg {
  position: absolute; inset: 0; margin: auto;
  width: 80px; height: 80px; color: #1a0d05; filter: blur(0);
}
.notfound h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .3em; }
.notfound p { max-width: 44ch; margin: 0 auto 28px; }
.notfound .nf-brand { margin-top: 48px; opacity: .8; }

/* ---- Contact layout ---- */
.contact-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: start; }
.contact-info .mail-lg {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--text);
  margin: 6px 0 4px;
  word-break: break-word;
}
.contact-info .mail-lg:hover { color: var(--orange); }
.contact-info .info-block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.contact-info .info-block:last-child { border-bottom: none; }
.contact-info .info-block h4 { font-family: var(--display); font-size: 1.05rem; margin-bottom: .4em; }
.contact-info .info-block p { margin: 0; font-size: .93rem; }
.contact-info .loc-grid { margin-top: 14px; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---- CTA ---- */
.cta-section { text-align: center; }
.cta-box {
  max-width: 720px;
  margin: 0 auto;
  background: var(--flame-soft);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 56px 40px;
}
.cta-box h2 { margin-bottom: .4em; }
.cta-box p { max-width: 50ch; margin: 0 auto 26px; }
.cta-mail { display: inline-block; margin-top: 20px; font-family: var(--mono); font-size: .86rem; color: var(--orange); }

@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .loc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .console-body { grid-template-columns: 1fr; }
  .console-side { border-right: none; border-bottom: 1px solid var(--line); }
  .cta-box { padding: 40px 24px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
