/* =========================================================
   Goldstone Empire — Public site
   Architecture: Keystone visual baseline, Inter typography,
   high-contrast text, funding-first positioning.
   ========================================================= */

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

:root {
  /* Surfaces */
  --bg:        #07080c;
  --bg-2:      #0d0f15;
  --bg-3:      #14171f;
  --bg-4:      #1c2030;
  --line:      #242838;
  --line-2:    #303548;

  /* Text — high-contrast, accessibility-tuned */
  --text:      #f3f4f6;   /* primary / headings */
  --text-2:    #c9d1d9;   /* body */
  --text-3:    #8b949e;   /* muted / metadata */
  --text-4:    #5b6373;   /* labels */

  /* Accent — single gold, no glow */
  --gold:      #e8b84b;
  --gold-2:    #f5d080;
  --gold-soft: rgba(232,184,75,.12);
  --gold-edge: rgba(232,184,75,.30);

  /* Status */
  --jade:      #34d399;
  --sky:       #60a5fa;
  --rose:      #f87171;

  /* Type */
  --f-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-italic:  'Fraunces', 'Inter', Georgia, serif;
  --f-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  /* Rhythm */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --header-h: 64px;
  --bar-h:    34px;
}

html, body {
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; }

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
section { padding: 96px 0; position: relative; }
section.tight { padding: 64px 0; }
@media (max-width: 760px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 22px; }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  color: var(--text);
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 {
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
h1 em, h2 em, h3 em {
  font-family: var(--f-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--gold-2);
  letter-spacing: -0.02em;
}
h2 { font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.028em; }
h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.02em; line-height: 1.18; }
h4 { font-size: 18px; line-height: 1.3; }
h5 { font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--text); }

p { color: var(--text-2); font-size: 17px; line-height: 1.6; max-width: 64ch; text-wrap: pretty; }
.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 60ch; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--gold-edge);
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { display: none; }
.eyebrow.plain::before { display: none; }

.label {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ---------- Marquee bar ---------- */
.bar {
  height: var(--bar-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  overflow: hidden;
  position: relative;
  z-index: 50;
}
.bar-tag {
  flex-shrink: 0;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  height: 100%;
  display: flex; align-items: center;
  font-size: 10px;
}
.bar-track { flex: 1; overflow: hidden; }
.bar-inner {
  display: flex;
  white-space: nowrap;
  animation: barRoll 60s linear infinite;
  will-change: transform;
}
@keyframes barRoll { to { transform: translateX(-50%); } }
.bar-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  border-right: 1px solid var(--line);
  height: var(--bar-h);
}
.bar-item .k { color: var(--text-4); }
.bar-item .v { color: var(--text); }
.bar-item .pos { color: var(--jade); }
.bar-item .neg { color: var(--rose); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: rgba(7,8,12,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 40;
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark {
  width: 26px; height: 26px;
  background: var(--gold);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--r-sm);
  letter-spacing: 0;
}
.brand em { font-family: var(--f-italic); font-style: italic; font-weight: 400; color: var(--gold-2); margin-left: 4px; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-3); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
@media (max-width: 880px) { .nav-links { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--r-md);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: #0b0a06;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 24px -12px rgba(232,184,75,.6);
}
.btn-gold:hover { background: var(--gold-2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--bg-3); border-color: var(--gold-edge); }
.btn-link {
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
}
.btn-link:hover { color: var(--gold-2); }
.btn-link .arr { transition: transform .18s; }
.btn-link:hover .arr { transform: translateX(3px); }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 80% 0%, rgba(232,184,75,0.07), transparent 70%),
    radial-gradient(40% 60% at 10% 100%, rgba(96,165,250,0.04), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-2);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-2);
  margin-bottom: 28px;
}
.hero-pill .dot {
  width: 18px; height: 18px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-edge);
  border-radius: 100px;
  display: grid; place-items: center;
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 0;
  font-weight: 700;
}
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 24px; max-width: 56ch; font-size: clamp(17px, 1.45vw, 20px); }
.hero-actions { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 36px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--text-3);
  font-size: 13px;
}
.hero-meta .check {
  width: 16px; height: 16px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-edge);
  color: var(--gold);
  border-radius: 100px;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  margin-right: 6px;
}

/* Hero product preview */
.hero-preview {
  margin-top: 64px;
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.03) inset;
  overflow: hidden;
}
.hero-preview::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--gold-edge), transparent 30%);
  opacity: .4;
  pointer-events: none;
  mask: linear-gradient(#000, transparent 30%);
}
.preview-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.preview-bar-tabs { display: flex; gap: 6px; }
.preview-bar-tabs span { width: 10px; height: 10px; border-radius: 100px; background: var(--bg-4); }
.preview-bar-title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-3);
  text-transform: uppercase;
}
.preview-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  min-height: 420px;
}
@media (max-width: 880px) { .preview-grid { grid-template-columns: 1fr; } }

.match-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
}
.match-card .hd {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.match-card .hd h5 { font-size: 13px; color: var(--text); }
.match-card .hd .meta {
  font-family: var(--f-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.14em;
}
.match-row {
  display: grid;
  grid-template-columns: 90px 1fr 56px 22px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.match-row:last-child { border-bottom: 0; }
.match-row .amt {
  font-family: var(--f-display); font-weight: 600; font-size: 17px; color: var(--text);
  letter-spacing: -0.02em;
}
.match-row .name {
  font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px;
}
.match-row .sub {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em;
  color: var(--text-3);
}
.match-row .pct {
  font-family: var(--f-mono); font-weight: 600; font-size: 14px;
  color: var(--gold); text-align: right;
}
.match-row .pct.mid { color: var(--text-2); }
.match-row .arr { color: var(--text-3); text-align: right; }
.match-row.feat { background: var(--gold-soft); border: 1px solid var(--gold-edge); border-radius: var(--r-md); padding: 12px 14px; margin: -1px 0; }
.match-row.feat .pct { color: var(--gold); }

.assist-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.assist-card .hd { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.assist-card .hd h5 { font-size: 13px; color: var(--text); }
.assist-card .hd .pulse {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10px; color: var(--jade); letter-spacing: 0.14em; text-transform: uppercase;
}
.assist-card .hd .pulse::before {
  content:''; width: 6px; height: 6px; border-radius: 100px; background: var(--jade);
  box-shadow: 0 0 0 0 rgba(52,211,153,.5);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.4);} 100%{box-shadow:0 0 0 8px rgba(52,211,153,0);} }
.doc-line { height: 8px; border-radius: 2px; background: var(--line); margin-bottom: 8px; }
.doc-line.full { background: var(--line-2); }
.doc-line.gold { background: var(--gold-edge); }
.doc-h { color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.doc-cur {
  display: inline-block; width: 7px; height: 14px; background: var(--gold); margin-left: 2px; vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.assist-card .foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--bg-4);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.06em;
}
.chip.gold { color: var(--gold); border-color: var(--gold-edge); background: var(--gold-soft); }

/* ---------- Logo strip ---------- */
.logo-strip {
  padding: 36px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.logo-strip-label {
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.logo-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: center;
}
@media (max-width: 760px) { .logo-row { grid-template-columns: repeat(3, 1fr); } }
.logo-cell {
  text-align: center;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-3);
  letter-spacing: -0.01em;
  padding: 14px 0;
  opacity: 0.8;
  transition: opacity .2s, color .2s;
}
.logo-cell:hover { color: var(--text); opacity: 1; }
.logo-cell .sub { display: block; font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em; color: var(--text-4); margin-top: 4px; }

/* ---------- Section heads ---------- */
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 + p { margin-top: 18px; font-size: 18px; color: var(--text-2); }

/* ---------- Problem grid ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 880px) { .problem-grid { grid-template-columns: 1fr; } }
.surface {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
}
.surface.before { border-color: var(--line); }
.surface.after { border-color: var(--gold-edge); background: linear-gradient(180deg, var(--bg-2), rgba(232,184,75,0.03)); }
.surface .surface-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}
.surface.after .surface-tag { color: var(--gold); }
.surface h3 { margin-bottom: 18px; }
.surface ul { list-style: none; padding: 0; margin: 0; }
.surface li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.45;
}
.surface li:last-child { border-bottom: 0; }
.surface li::before {
  content: '';
  width: 14px; height: 14px;
  margin-top: 4px;
  flex-shrink: 0;
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  border-radius: 100px;
}
.surface.after li::before {
  background: var(--gold-soft);
  border-color: var(--gold-edge);
  position: relative;
}
.surface.after li::after {
  content: '';
  position: absolute;
  width: 6px; height: 3px;
  border-left: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg);
  margin-left: -10px;
  margin-top: 8px;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.step {
  display: grid;
  grid-template-columns: 80px 1fr 1.1fr;
  gap: 32px;
  padding: 32px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  align-items: start;
  transition: border-color .2s;
}
.step:hover { border-color: var(--line-2); }
@media (max-width: 880px) { .step { grid-template-columns: 1fr; gap: 18px; padding: 24px; } }
.step-num {
  font-family: var(--f-italic);
  font-style: italic;
  font-weight: 300;
  font-size: 56px;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.04em;
}
.step-text h3 { margin-bottom: 12px; }
.step-text p { color: var(--text-2); font-size: 15.5px; }
.step-vis {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  font-family: var(--f-mono);
  font-size: 12px;
}
.step-vis .head {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.step-vis .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font-size: 11.5px;
}
.step-vis .row:last-child { border-bottom: 0; }
.step-vis .row .v { color: var(--text); font-weight: 500; }
.step-vis .row .v.gold { color: var(--gold); }
.step-vis .row .v.jade { color: var(--jade); }

/* ---------- Feature grid ---------- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 880px) { .feat-grid { grid-template-columns: 1fr; } }
.feat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feat:hover { border-color: var(--gold-edge); transform: translateY(-2px); }
.feat-icon {
  width: 38px; height: 38px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-edge);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--gold);
  margin-bottom: 22px;
}
.feat h4 { color: var(--text); margin-bottom: 8px; }
.feat p { font-size: 14.5px; color: var(--text-2); }
.feat .label { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: block; }

/* ---------- Split feature ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.split.flip { grid-template-columns: 1.1fr 1fr; }
.split.flip .split-text { order: 2; }
.split.flip .split-vis  { order: 1; }
@media (max-width: 880px) {
  .split, .split.flip { grid-template-columns: 1fr; gap: 32px; }
  .split.flip .split-text { order: 1; }
  .split.flip .split-vis  { order: 2; }
}
.split-text h3 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 18px; letter-spacing: -0.025em; }
.split-text p { margin-bottom: 14px; }
.split-bullets { list-style: none; padding: 0; margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.split-bullets li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.split-bullets li:last-child { border-bottom: 1px solid var(--line); }
.split-bullets li b { color: var(--text); font-weight: 600; display: block; margin-bottom: 4px; }
.split-bullets li p { color: var(--text-3); font-size: 14px; margin: 0; }
.split-bullets li .n {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.1em;
  padding-top: 2px;
}

.split-vis {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.split-vis::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--gold-soft), transparent 70%);
  pointer-events: none;
}

/* Vault visualization */
.vault-mock {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.vault-row {
  display: grid;
  grid-template-columns: 130px 1fr 80px;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.vault-row:last-child { border-bottom: 0; }
.vault-row .k {
  font-family: var(--f-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
}
.vault-row .v { color: var(--text); font-size: 14px; }
.vault-row .v.muted { color: var(--text-3); font-style: italic; }
.vault-row .src {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: right;
}

/* Engine — investor + grant cards */
.engine-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.engine-cards.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .engine-cards, .engine-cards.three { grid-template-columns: 1fr; } }
.ec {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  transition: border-color .15s;
}
.ec:hover { border-color: var(--gold-edge); }
.ec .ec-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.ec .ec-amt {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.025em;
}
.ec .ec-amt.eq { color: var(--sky); }
.ec .ec-amt.grant { color: var(--gold); }
.ec .ec-pct {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-edge);
  padding: 3px 8px;
  border-radius: 100px;
  font-weight: 600;
}
.ec .ec-name { color: var(--text); font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.ec .ec-meta { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Workflow timeline ---------- */
.timeline {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 80px 28px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-row:last-child { border-bottom: 0; }
.timeline-row .t { font-family: var(--f-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.08em; }
.timeline-row .d {
  width: 10px; height: 10px;
  border-radius: 100px;
  background: var(--bg);
  border: 1.5px solid var(--gold);
  margin: 0 auto;
}
.timeline-row .d.done { background: var(--gold); }
.timeline-row .d.idle { border-color: var(--line-2); background: var(--bg); }
.timeline-row .desc { color: var(--text); font-size: 14.5px; }
.timeline-row .desc small { color: var(--text-3); font-size: 12px; display: block; margin-top: 2px; font-family: var(--f-mono); letter-spacing: 0.06em; }
.timeline-row .by { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0.1em; text-transform: uppercase; }
.timeline-row .by.gold { color: var(--gold); }

/* ---------- Stats / outcomes ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
}
@media (max-width: 880px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
@media (max-width: 880px) {
  .stat { border-right: 0; }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
}
.stat-num {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(36px, 4vw, 52px);
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-num em { font-family: var(--f-italic); font-style: italic; font-weight: 400; color: var(--gold-2); }
.stat-num .unit { font-size: 0.5em; color: var(--gold); margin-left: 4px; vertical-align: 0.4em; font-family: var(--f-display); font-style: normal; font-weight: 600; letter-spacing: -0.01em; }
.stat-label {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
}

/* ---------- Security ---------- */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 880px) { .sec-grid { grid-template-columns: 1fr 1fr; } }
.sec-cell {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
}
.sec-cell svg { color: var(--gold); margin-bottom: 14px; }
.sec-cell h5 { margin-bottom: 6px; font-size: 14px; }
.sec-cell p { font-size: 13px; color: var(--text-3); margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 880px) { .faq { grid-template-columns: 1fr; gap: 28px; } }
.faq-list { display: flex; flex-direction: column; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%;
  text-align: left;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0;
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  letter-spacing: -0.01em;
}
.faq-q .ico {
  width: 28px; height: 28px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 16px; color: var(--text-3);
  transition: transform .2s, border-color .2s, color .2s;
  flex-shrink: 0;
}
.faq-item.open .faq-q .ico { transform: rotate(45deg); color: var(--gold); border-color: var(--gold-edge); background: var(--gold-soft); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease, padding-bottom .25s ease;
}
.faq-item.open .faq-a { max-height: 320px; padding-bottom: 24px; }
.faq-a p { color: var(--text-2); font-size: 15px; max-width: 60ch; }
.faq-a p + p { margin-top: 10px; }

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--bg-2);
  border: 1px solid var(--gold-edge);
  border-radius: var(--r-lg);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, rgba(232,184,75,0.08), transparent 60%);
  pointer-events: none;
}
.final-cta h2 { position: relative; max-width: 18ch; margin: 0 auto; }
.final-cta p { position: relative; margin: 18px auto 0; font-size: 18px; max-width: 52ch; }
.final-cta-actions {
  position: relative;
  display: flex; justify-content: center; gap: 14px;
  margin-top: 32px; flex-wrap: wrap;
}
.final-cta .micro {
  margin-top: 18px;
  font-family: var(--f-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.15em; text-transform: uppercase;
}

/* ---------- Footer ---------- */
footer.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 64px 0 28px;
  margin-top: 96px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.foot-grid .brand-block p { font-size: 13.5px; color: var(--text-3); margin-top: 14px; max-width: 30ch; }
.foot-col h6 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.foot-col a {
  display: block;
  font-size: 14px;
  color: var(--text-2);
  padding: 5px 0;
  transition: color .15s;
}
.foot-col a:hover { color: var(--gold); }
.foot-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-family: var(--f-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase;
}

/* ---------- Sub-page hero ---------- */
.page-hero { padding: 56px 0 40px; position: relative; }
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 80% 0%, rgba(232,184,75,0.05), transparent 70%);
  pointer-events: none;
}
.page-hero h1 { max-width: 18ch; font-size: clamp(40px, 5vw, 64px); }
.page-hero .lede { margin-top: 20px; max-width: 56ch; }

/* ---------- Active nav state ---------- */
.nav-links a.active { color: var(--text); background: var(--bg-3); }
.nav-links a.active::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--gold);
  margin-top: -1px;
}

/* ---------- Compare grid (chaos → system) ---------- */
.compare {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-2);
}
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.compare > div { padding: 36px; }
.compare .arr {
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 22px; color: var(--gold);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
@media (max-width: 760px) {
  .compare .arr { transform: rotate(90deg); border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px; }
}
.compare .after { background: linear-gradient(180deg, var(--bg-2), rgba(232,184,75,0.04)); }
.compare ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 8px; }
.compare ul li { color: var(--text-2); font-size: 15px; padding: 6px 0; }
.compare .before ul li { color: var(--text-3); }

/* ---------- Documents flow ---------- */
.doc-flow {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
}
@media (max-width: 760px) { .doc-flow { grid-template-columns: 1fr; } }
.doc-side { padding: 36px; }
.doc-side h4 { font-size: 22px; margin: 8px 0 16px; }
.doc-side ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0; }
.doc-side ul li {
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12.5px; color: var(--text); letter-spacing: 0.04em;
}
.doc-side ul li:last-child { border-bottom: 0; }
.doc-arrow {
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 22px; color: var(--gold);
}
@media (max-width: 760px) { .doc-arrow { padding: 14px; transform: rotate(90deg); border: 0; } }

/* ---------- Workspace stage ---------- */
.ws-stage {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
}
.ws-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) { .ws-grid { grid-template-columns: 1fr; } }
.ws-pane {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
}
.ws-pane h5 {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.ws-pane .q {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 14px 0 6px;
}
.ws-pane .q:first-of-type { margin-top: 0; }
.ws-pane .a {
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  line-height: 1.5;
}
.ws-pane .a.empty {
  color: var(--text-3);
  font-style: italic;
  border-style: dashed;
}

/* ---------- Contact form ---------- */
.form-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  max-width: 560px;
}
.form-card h2 { margin-bottom: 8px; }
.form-card p { margin-bottom: 24px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.field input, .field select, .field textarea {
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  font-size: 15px;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field textarea { min-height: 120px; resize: vertical; }

/* ---------- Stage flow diagram (features p6) ---------- */
.stage-flow {
  display: grid;
  grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.stage-flow .node {
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-3);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.stage-flow .node.first { border-color: var(--gold-edge); background: var(--gold-soft); color: var(--gold); }
.stage-flow .arr { color: var(--gold); font-family: var(--f-mono); font-size: 14px; }
@media (max-width: 760px) {
  .stage-flow { grid-template-columns: 1fr; }
  .stage-flow .arr { transform: rotate(90deg); }
}

/* ---------- Activity log ---------- */
.activity {
  font-family: var(--f-mono);
  font-size: 12px;
}
.activity .row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  align-items: baseline;
}
.activity .row:last-child { border-bottom: 0; }
.activity .row .t { color: var(--text-4); }
.activity .row b { color: var(--gold); font-weight: 500; font-family: var(--f-sans); }
.activity .row .ok { color: var(--jade); font-weight: 500; font-family: var(--f-sans); }

/* ---------- Trust list (numbered items) ---------- */
.trust-list { display: flex; flex-direction: column; gap: 24px; }
.trust-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  align-items: start;
}
.trust-num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.18em;
  padding-top: 6px;
}
.trust-item h3 { font-size: 22px; margin-bottom: 8px; }
.trust-item p { color: var(--text-2); max-width: 64ch; }
@media (max-width: 760px) {
  .trust-item { grid-template-columns: 1fr; gap: 12px; padding: 22px; }
}

/* ---------- Use-case rows ---------- */
.case-row {
  display: grid;
  grid-template-columns: 0.85fr 1fr 40px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.case-row:last-child { border-bottom: 0; }
.case-tag {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.case-who h3 { font-size: 26px; line-height: 1.05; }
.case-side h6 { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 8px; }
.case-side h6.b6 { color: var(--rose); }
.case-side h6.a6 { color: var(--gold); }
.case-side p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.case-arrow {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 18px; color: var(--gold);
  padding-top: 22px;
}
@media (max-width: 900px) {
  .case-row { grid-template-columns: 1fr; }
  .case-arrow { padding: 0; transform: rotate(90deg); }
}

/* ---------- CTA strip (reused on subpages) ---------- */
.cta-strip {
  background: linear-gradient(180deg, transparent, rgba(232,184,75,0.025));
  border-top: 1px solid var(--line);
  padding: 80px 0 96px;
  text-align: center;
}
.cta-strip h2 { font-size: clamp(36px, 4vw, 56px); margin: 12px auto 28px; max-width: 22ch; }
.cta-strip-row { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Long-form doc pages (terms, privacy) ---------- */
.doc-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 96px;
  color: var(--text);
}
.doc-page h1 { font-size: clamp(40px, 4.5vw, 56px); margin-bottom: 12px; }
.doc-page .doc-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.doc-page h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 40px 0 12px;
  letter-spacing: -0.005em;
}
.doc-page p {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 64ch;
}
.doc-page ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
}
.doc-page ul li {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.6;
  padding: 8px 0 8px 22px;
  position: relative;
}
.doc-page ul li::before {
  content: '·';
  color: var(--gold);
  font-family: var(--f-mono);
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 18px;
}
.doc-page ul li strong { color: var(--text); font-weight: 600; }
.doc-page a { color: var(--gold); }

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

/* ---------- Light mode (Tweak) ---------- */
body.theme-light {
  --bg:        #fafaf7;
  --bg-2:      #ffffff;
  --bg-3:      #f5f5f0;
  --bg-4:      #ececea;
  --line:      #e5e5e0;
  --line-2:    #d6d6d0;
  --text:      #0a0a0a;
  --text-2:    #2c2c2c;
  --text-3:    #6b6b6b;
  --text-4:    #999999;
  --gold:      #b88a1b;
  --gold-2:    #8d6810;
  --gold-soft: rgba(184,138,27,.10);
  --gold-edge: rgba(184,138,27,.35);
}
body.theme-light .nav { background: rgba(250,250,247,0.85); }
body.theme-light .btn-gold { color: #fff; }
body.theme-light .doc-cur { background: var(--gold); }

/* ---------- Accent hue (Tweak) ---------- */
body.accent-blue {
  --gold: #4f8df9;
  --gold-2: #82aeff;
  --gold-soft: rgba(79,141,249,0.12);
  --gold-edge: rgba(79,141,249,0.32);
}
body.accent-jade {
  --gold: #34d399;
  --gold-2: #6ee7b7;
  --gold-soft: rgba(52,211,153,0.12);
  --gold-edge: rgba(52,211,153,0.32);
}
body.accent-mono {
  --gold: #f3f4f6;
  --gold-2: #ffffff;
  --gold-soft: rgba(255,255,255,0.06);
  --gold-edge: rgba(255,255,255,0.22);
}
body.theme-light.accent-mono {
  --gold: #0a0a0a;
  --gold-2: #2c2c2c;
  --gold-soft: rgba(10,10,10,0.06);
  --gold-edge: rgba(10,10,10,0.22);
}

/* Font family swap (Tweak) */
body.font-geist  { --f-sans: 'Geist', 'Inter', -apple-system, sans-serif; --f-display: 'Geist', 'Inter', sans-serif; }
body.font-jakarta { --f-sans: 'Plus Jakarta Sans', 'Inter', sans-serif; --f-display: 'Plus Jakarta Sans', 'Inter', sans-serif; }
body.font-plex   { --f-sans: 'IBM Plex Sans', 'Inter', sans-serif; --f-display: 'IBM Plex Sans', 'Inter', sans-serif; }

/* Contrast tweak: even higher */
body.contrast-max {
  --text:   #ffffff;
  --text-2: #e5e7eb;
  --text-3: #b8c0cc;
}
body.theme-light.contrast-max {
  --text:   #000000;
  --text-2: #1a1a1a;
  --text-3: #4b5563;
}
