/* ═══════════════════════════════════════════════════════════════
   BASE — reset, typography, layout primitives, kickers, buttons
   Note: .btn-primary is navy with a green underline accent on hover.
   This complies with Nexbridge brand rule "one green accent per
   composition — never as a dominant fill".
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--authority); color: var(--white); }

/* ── Layout containers ──────────────────────────────────────── */
.container      { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container-wide { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) {
  .container, .container-wide { padding: 0 20px; }
}

/* ── Top scroll-progress rail ───────────────────────────────── */
.scroll-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
}
.scroll-rail-fill {
  height: 100%;
  width: 0%;
  background: var(--growth);
  transition: width 0.08s linear;
}

/* ── Eyebrow / kicker labels ────────────────────────────────── */
.label-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--trust);
  margin-bottom: 20px;
}
.label-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--trust);
  display: inline-block;
}
.label-kicker.on-dark { color: rgba(255,255,255,0.55); }
.label-kicker.on-dark::before { background: rgba(255,255,255,0.35); }

/* ── Accent rule (the one short green stroke per composition) ─ */
.accent-rule {
  width: 60px;
  height: 3px;
  background: var(--growth);
  border: 0;
  margin: 0 0 24px;
  transform-origin: left;
  animation: drawRule 0.8s var(--ease-out) both;
}
@keyframes drawRule {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Buttons ────────────────────────────────────────────────────
   .btn-primary  → navy fill, green underline accent (on-brand)
   .btn-ghost    → transparent w/ light border (used on dark surfaces)
   .btn-light    → white fill (used on dark surfaces as secondary)
   ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  border-radius: 4px;
  min-height: 44px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out),
              background-color 0.25s var(--ease-out),
              color 0.25s var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}

/* Primary — NAVY fill (was green in v4; corrected per brand book) */
.btn-primary {
  background: var(--authority);
  color: var(--white);
  box-shadow: inset 0 -2px 0 0 rgba(0,0,0,0.18);
}
.btn-primary::after {
  /* The single green accent — a 3px underline that animates on hover */
  content: "";
  position: absolute;
  left: 22px; right: 22px; bottom: 8px;
  height: 2px;
  background: var(--growth);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-out);
}
.btn-primary:hover {
  background: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -16px rgba(11,44,95,0.55), inset 0 -2px 0 0 rgba(0,0,0,0.22);
}
.btn-primary:hover::after { transform: scaleX(1); }

/* Primary on dark surfaces flips to white fill (still navy text + green
   underline accent — preserves brand rule "navy authority, green accent only").
   Without this, navy buttons would be invisible against navy backgrounds. */
.hero .btn-primary,
.section.dark .btn-primary,
.config-output .btn-primary,
.cta-band .btn-primary {
  background: var(--white);
  color: var(--authority);
  box-shadow: inset 0 -2px 0 0 rgba(11,44,95,0.10);
}
.hero .btn-primary:hover,
.section.dark .btn-primary:hover,
.config-output .btn-primary:hover,
.cta-band .btn-primary:hover {
  background: var(--cloud);
  color: var(--authority);
  box-shadow: 0 14px 32px -16px rgba(0,0,0,0.45), inset 0 -2px 0 0 rgba(11,44,95,0.18);
}

/* Ghost — used on dark surfaces */
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.30);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--white);
}

/* Light — white-fill secondary on dark surfaces */
.btn-light {
  background: var(--white);
  color: var(--authority);
  box-shadow: inset 0 -2px 0 0 rgba(11,44,95,0.10);
}
.btn-light:hover {
  background: var(--cloud);
  transform: translateY(-1px);
}

/* Outline — quiet secondary on light surfaces */
.btn-outline {
  background: transparent;
  color: var(--authority);
  border: 1px solid var(--mist);
}
.btn-outline:hover {
  border-color: var(--authority);
  background: var(--surface);
}

.btn .arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Reveal-on-scroll utility (driven by reveal.js) ─────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal.delay-1.visible { transition-delay: 0.08s; }
.reveal.delay-2.visible { transition-delay: 0.16s; }
.reveal.delay-3.visible { transition-delay: 0.24s; }

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