@import './brand/tokens.css';
@import './brand/fonts.css';

/* ---- Brochure-local tokens (kept out of brand/tokens.css, which is a
   verbatim copy of the portal's) ---- */
:root {
  --display-hero: clamp(2.75rem, 1.2rem + 6.2vw, 4.75rem);
  --display-section: clamp(2rem, 1.1rem + 3.6vw, 3.25rem);
  --display-stat: clamp(2.5rem, 1.4rem + 4.2vw, 3.75rem);
  --measure: 62ch;
  --shell: 1140px;
  --nav-shell: 880px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --chip-tint: rgba(58, 81, 147, 0.12);
  --chip-tint-accent: rgba(255, 138, 41, 0.14);
  --hairline: var(--surface-border);
  --grid-line: rgba(128, 138, 170, 0.12);
  --nav-shadow: 0 10px 30px rgba(26, 36, 66, 0.08);
  --mock-bg: rgba(255, 255, 255, 0.5);
  --code-text: var(--neutral-700);
  --code-keyword: #a3407c;
  --code-string: #3a7a4f;
  --code-flag: #9a5a12;
}

:root[data-scheme='dark'] {
  --chip-tint: rgba(138, 158, 224, 0.14);
  --chip-tint-accent: rgba(255, 138, 41, 0.16);
  --grid-line: rgba(178, 190, 224, 0.09);
  --nav-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --mock-bg: rgba(12, 18, 36, 0.55);
  --code-text: var(--neutral-200);
  --code-keyword: #f0a6d0;
  --code-string: #a5d6a7;
  --code-flag: var(--brand-gold);
}

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

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

body {
  font-family: var(--font-brand);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  background-image: var(--page-glow);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

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

h1,
h2,
h3,
h4,
h5 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

code {
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--chip-tint);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

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

.section {
  padding: 5.5rem 0;
  position: relative;
}

.section--tight {
  padding: 4rem 0;
}

.section--hairline {
  border-top: 1px solid var(--hairline);
}

.section-head {
  max-width: 46rem;
  margin: 0 auto 3.25rem;
  text-align: center;
}

.section-head h2 {
  font-size: var(--display-section);
  line-height: 1.08;
  letter-spacing: var(--ls-h2);
  margin-bottom: 0.85rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

/* ---- Nav (floating pill) ---- */
.nav {
  position: sticky;
  top: 0.9rem;
  z-index: 100;
  width: 100%;
  max-width: var(--nav-shell);
  margin: 0 auto;
  padding: 0 0.6rem 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  background: var(--popup-bg);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  color: var(--text);
}
.nav-logo:hover {
  text-decoration: none;
  color: var(--text);
}
.nav-logo img {
  height: 30px;
  width: auto;
}
.nav-logo span {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition:
    color 0.15s,
    background 0.15s;
}
.nav-link:hover {
  color: var(--text);
  background: var(--chip-tint);
  text-decoration: none;
}
.nav-link[aria-current='page'] {
  color: var(--text);
  background: var(--chip-tint);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.scheme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.scheme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.scheme-toggle svg {
  width: 18px;
  height: 18px;
}
.scheme-toggle .icon-sun {
  display: none;
}
.scheme-toggle .icon-moon {
  display: block;
}
.scheme-toggle[data-scheme='light'] .icon-sun {
  display: block;
}
.scheme-toggle[data-scheme='light'] .icon-moon {
  display: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    background 0.15s,
    transform 0.15s;
}
.nav-cta:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s,
    transform 0.18s var(--ease);
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 24px rgba(58, 81, 147, 0.25);
}
.btn--primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.btn--ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ---- Eyebrow pill ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--chip-tint);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-gradient);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  text-align: center;
  padding: 6rem 0 3.5rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -10% 0 auto 0;
  height: 46rem;
  background-image: radial-gradient(var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* Keep hero content above the dot grid without a negative z-index (which would
   paint behind the body background and vanish). */
.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: var(--display-hero);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 1.5rem 0 0;
}

.hero-lede {
  margin: 1.5rem auto 0;
  max-width: 40rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 2.25rem;
}

.hero-note {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.page-hero {
  position: relative;
  text-align: center;
  padding: 5rem 0 2.5rem;
}
.page-hero h1 {
  font-size: var(--display-section);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-top: 1.5rem;
}
.page-hero p {
  margin: 1.1rem auto 0;
  max-width: 38rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---- App UI mock (browser frame) ---- */
.mock-window {
  margin: 3.5rem auto 0;
  max-width: 62rem;
  background: var(--mock-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
  text-align: left;
}

.mock-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--chip-tint);
}
.mock-dots {
  display: flex;
  gap: 0.4rem;
}
.mock-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--neutral-400);
  opacity: 0.5;
}
.mock-url {
  flex: 1;
  margin: 0 0.5rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-body {
  padding: 1.5rem;
}

.mock-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.mock-toolbar h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.mock-crumb {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.mock-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.mock-table {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mock-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
}
.mock-row + .mock-row {
  border-top: 1px solid var(--hairline);
}
.mock-name {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.mock-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mock-value {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mock-actions {
  display: flex;
  gap: 0.4rem;
}
.mock-icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--text-muted);
}
.mock-icon-btn svg {
  width: 15px;
  height: 15px;
}

.mock-chip {
  flex-shrink: 0;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--chip-tint);
  border: 1px solid var(--hairline);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mock-chip--accent {
  background: var(--chip-tint-accent);
  border-color: transparent;
  color: var(--brand-orange);
}

/* ---- Rule tree mock ---- */
.mock-rules {
  margin-top: 1.1rem;
  padding: 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.mock-rules--flush {
  margin-top: 0;
}
.mock-rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.mock-rules-head strong {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-caption);
  color: var(--text-muted);
}
.rule-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--mock-bg);
  font-size: 0.82rem;
}
.rule-row + .rule-row {
  margin-top: 0.5rem;
}
.rule-row .arrow {
  color: var(--brand-orange);
  font-weight: 700;
}
.rule-key {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 600;
  color: var(--code-keyword);
}
.rule-val {
  color: var(--text-muted);
}
.rule-action {
  margin-left: auto;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #3b2503;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---- Terminal mock ---- */
.mock-terminal {
  background: #0b1120;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--surface-shadow);
}
:root[data-scheme='dark'] .mock-terminal {
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.term-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.term-chrome .mock-dots i {
  background: #64748b;
  opacity: 0.8;
}
.term-title {
  margin-left: 0.35rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
.term-body {
  padding: 1.1rem 1.25rem;
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.85;
  color: #e2e8f0;
  overflow-x: auto;
}
.term-line {
  display: block;
  white-space: pre;
}
.term-prompt {
  color: var(--brand-gold);
}
.term-cmd {
  color: #f8fafc;
}
.term-flag {
  color: var(--brand-gold);
}
.term-key {
  color: #c4b5fd;
}
.term-str {
  color: #86efac;
}
.term-dim {
  color: #64748b;
}
.term-ok {
  color: #4ade80;
}
.term-redact {
  background: rgba(255, 138, 41, 0.22);
  border-radius: 3px;
  padding: 0 0.3rem;
  color: var(--brand-gold);
}

/* ---- Card grid ---- */
.card-grid,
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.card,
.principle {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition:
    transform 0.22s var(--ease),
    border-color 0.22s,
    box-shadow 0.22s;
}
.card:hover,
.principle:hover {
  transform: translateY(-3px);
  border-color: var(--neutral-400);
  box-shadow: var(--surface-shadow);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--chip-tint);
  color: var(--primary);
  margin-bottom: 1.15rem;
}
.card-icon--accent {
  background: var(--chip-tint-accent);
  color: var(--brand-orange);
}
.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3,
.principle h3 {
  font-size: var(--text-h5);
  letter-spacing: -0.01em;
  margin-bottom: 0.55rem;
}
.card p,
.principle p {
  color: var(--text-muted);
  line-height: 1.68;
}

/* Single-column variant for side panels next to a feature row */
.principles--stacked {
  grid-template-columns: 1fr;
}
.principles--stacked .principle:first-child {
  margin-top: 1.25rem;
}

/* ---- Stats band ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: 2.25rem 1.5rem;
  text-align: center;
  transition: background 0.2s;
}
.stat:hover {
  background: var(--surface);
}
.stat-value {
  font-size: var(--display-stat);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-label {
  margin-top: 0.7rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---- Actionset strip ---- */
.actionset-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.actionset-card {
  padding: 1.35rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s;
}
.actionset-card:hover {
  transform: translateY(-2px);
  border-color: var(--neutral-400);
}
.actionset-card .mock-chip {
  display: inline-block;
  margin-bottom: 0.7rem;
}
.actionset-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- Steps (how it works) ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  counter-reset: step;
  position: relative;
}
.step {
  text-align: center;
  position: relative;
  counter-increment: step;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #3b2503;
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 10px 24px rgba(255, 138, 41, 0.25);
}
.step h3 {
  font-size: var(--text-h5);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.step p {
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 26rem;
  margin: 0 auto;
}

/* ---- Feature rows ---- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3.5rem 0;
}
.feature-row + .feature-row {
  border-top: 1px solid var(--hairline);
}
.feature-row:nth-child(even) .feature-content {
  order: 2;
}
.feature-content .eyebrow {
  margin-bottom: 1.1rem;
}
.feature-content h3 {
  font-size: var(--text-h3);
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.feature-content > p {
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  line-height: 1.72;
}
.feature-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-gradient);
}

/* ---- Architecture diagram ---- */
.arch {
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
.arch-tier {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}
.arch-tier--db {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.arch-node {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--mock-bg);
  text-align: center;
}
.arch-node strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}
.arch-node span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: block;
}
.arch-node--primary {
  border-color: transparent;
  background: var(--primary);
  color: var(--on-primary);
}
.arch-node--primary span {
  color: rgba(255, 255, 255, 0.8);
}
.arch-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: var(--ls-caption);
  text-transform: uppercase;
}
.arch-divider::before,
.arch-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
}
.arch-divider svg {
  width: 14px;
  height: 14px;
  color: var(--brand-orange);
  transform: rotate(90deg);
}

/* ---- CTA banner ---- */
.cta-wrap {
  padding: 0 1.5rem 5rem;
}
.cta-banner {
  max-width: var(--shell);
  margin: 0 auto;
  text-align: center;
  padding: 4.5rem 2rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    var(--brand-gradient);
  color: #3b2503;
  box-shadow: 0 30px 70px rgba(255, 138, 41, 0.22);
}
.cta-banner h2 {
  font-size: var(--display-section);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1.75rem;
}
.cta-banner p {
  max-width: 34rem;
  margin: -0.75rem auto 0;
  color: rgba(59, 37, 3, 0.78);
  line-height: 1.65;
}
.cta-banner .btn {
  margin-top: 1.75rem;
  background: #ffffff;
  color: var(--brand-blue);
}
.cta-banner .btn:hover {
  background: #ffffff;
  color: var(--brand-blue);
  transform: translateY(-2px) scale(1.02);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 4rem 0 2.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-brand .nav-logo {
  margin-bottom: 0.85rem;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 22rem;
}
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-caption);
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.footer-col a {
  color: var(--text);
  font-size: 0.92rem;
}
.footer-col a:hover {
  color: var(--primary);
  text-decoration: none;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--hairline);
  padding-top: 1.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

html.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  .card:hover,
  .principle:hover,
  .actionset-card:hover {
    transform: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .feature-row:nth-child(even) .feature-content {
    order: 0;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav {
    top: 0.5rem;
    padding: 0 0.75rem;
  }
  .nav-inner {
    border-radius: var(--radius-xl);
    padding: 0.5rem;
  }
  .nav-links {
    display: none;
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: calc(100% + 0.5rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem;
    background: var(--popup-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--nav-shadow);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link {
    border-radius: var(--radius-md);
    padding: 0.6rem 0.9rem;
  }
  .nav-toggle {
    display: block;
  }
  .nav-logo span {
    display: none;
  }
  .section {
    padding: 4rem 0;
  }
  .hero {
    padding: 4.5rem 0 2.5rem;
  }
  .mock-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .mock-value {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .nav-cta {
    display: none;
  }
  .hero-actions .btn {
    width: 100%;
  }
}
