/* ===== Design tokens ===== */
:root {
  --navy: #0A2A4D;
  --navy-deep: #061B33;
  --orange: #E8580C;
  --orange-light: #F47521;
  --paper: #FBFAF7;
  --sand: #F0EDE5;
  --ink: #181818;
  --ink-soft: #6B6B63;
  --line: #DEDAD0;
  --line-dark: rgba(255,255,255,0.14);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { height: 30px; width: auto; }

.nav-cta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  padding: 8px 18px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--navy); color: var(--paper); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 4px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--orange);
  color: var(--paper);
}
.btn-primary:hover { background: #C94A09; transform: translateY(-1px); }

.btn-ghost {
  border: 1.5px solid var(--navy);
  color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--paper); }

.section-dark .btn-ghost,
.section-dark a.btn-ghost {
  border-color: rgba(255,255,255,0.5);
  color: var(--paper);
}
.section-dark .btn-ghost:hover { background: var(--paper); color: var(--navy); }

.btn-large { font-size: 17px; padding: 16px 36px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
}

.control-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  color: var(--line);
  z-index: 0;
  pointer-events: none;
}

.control-line-svg { width: 100%; height: 4px; display: block; }

.hero-inner { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--orange);
  margin: 0 0 20px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  color: var(--navy);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
  max-width: 880px;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 0 36px;
}

.hero-actions { display: none; }

/* ===== Sections (general) ===== */
.section { padding: 96px 0; }

.section-dark {
  background: var(--navy);
  color: var(--paper);
}

.section-sand { background: var(--sand); }

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orange);
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.22;
  margin: 0 0 18px;
  max-width: 760px;
  letter-spacing: -0.01em;
}

.section-dark .section-title { color: var(--paper); }
.section:not(.section-dark) .section-title { color: var(--navy); }

.section-intro {
  font-size: 17px;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 0 56px;
}

.section:not(.section-dark) .section-intro { color: var(--ink-soft); }
.section-dark .section-intro { color: rgba(255,255,255,0.72); }

/* ===== Problem grid ===== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.problem-card {
  background: var(--navy);
  padding: 36px 32px;
}

.problem-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange-light);
  display: block;
  margin-bottom: 14px;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--paper);
}

.problem-card p {
  font-size: 15px;
  color: rgba(255,255,255,0.68);
  margin: 0;
  line-height: 1.6;
}

/* ===== Flow diagram ===== */
.flow { margin-bottom: 64px; }

.flow-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
}

.flow-node {
  flex: 1;
  min-width: 180px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 22px 20px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.flow-node i { font-size: 22px; color: var(--navy); margin-bottom: 6px; }

.flow-node span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
}

.flow-node small {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.flow-node-auto { border-color: var(--orange); background: #FFF6EF; }
.flow-node-auto i { color: var(--orange); }

.flow-node-decision {
  border-style: dashed;
  background: var(--sand);
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--ink-soft);
  font-size: 20px;
  flex-shrink: 0;
}

.flow-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px dashed var(--line);
}

.flow-branch { display: flex; flex-direction: column; gap: 10px; }

.flow-branch-line {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.flow-branch-yes::before { content: "Yes \2014 within defined rules"; }
.flow-branch-no::before { content: "No \2014 outside defined rules"; color: var(--orange); }
.flow-branch-no { color: var(--orange); }

.flow-node-end { border-color: #639922; }
.flow-node-end i { color: #639922; }

.flow-node-human { border-color: var(--orange); background: #FFF6EF; }
.flow-node-human i { color: var(--orange); }

.how-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}

.how-note h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 10px;
}

.how-note p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

/* ===== Proof ===== */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.proof-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 36px;
}

.proof-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.proof-head i { font-size: 26px; color: var(--orange); }

.proof-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
}

.proof-card p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0 0 14px;
}

.proof-detail {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-bottom: 0 !important;
}

/* ===== Comparison ===== */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.compare-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 32px 28px;
  position: relative;
}

.compare-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--paper);
  margin: 0 0 8px;
}

.compare-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin: 0 0 22px;
}

.compare-card ul { list-style: none; margin: 0; padding: 0; }

.compare-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: rgba(255,255,255,0.78);
  margin-bottom: 14px;
  line-height: 1.5;
}

.compare-card li i { font-size: 16px; margin-top: 2px; flex-shrink: 0; }
.compare-card li i.ti-x { color: rgba(255,255,255,0.4); }
.compare-card li i.ti-check { color: var(--orange-light); }

.compare-card-featured {
  background: var(--orange);
  border-color: var(--orange);
}

.compare-card-featured h3,
.compare-card-featured .compare-sub { color: var(--paper); }
.compare-card-featured .compare-sub { color: rgba(255,255,255,0.85); }
.compare-card-featured li { color: rgba(255,255,255,0.92); }
.compare-card-featured li i.ti-check { color: var(--paper); }

.compare-badge {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
}

/* ===== ROI ===== */
.roi-sub {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 28px;
}

.roi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.roi-item i { font-size: 22px; color: var(--orange); margin-bottom: 12px; display: block; }

.roi-item h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 8px;
}

.roi-item p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

.reality-check {
  background: var(--sand);
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  padding: 36px 40px;
}

.reality-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orange);
  margin: 0 0 12px;
}

.reality-check h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 16px;
  line-height: 1.3;
}

.reality-check p {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 14px;
}

.reality-check p:last-child { margin-bottom: 0; }

/* ===== Contact ===== */
.section-contact { background: var(--navy); text-align: center; }
.section-contact .section-label { color: var(--orange-light); }
.section-contact .section-title { color: var(--paper); }
.section-contact .section-intro { color: rgba(255,255,255,0.72); margin-left: auto; margin-right: auto; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }

/* ===== Footer ===== */
.footer {
  background: var(--navy-deep);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo { height: 22px; filter: brightness(0) invert(1); opacity: 0.85; }

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.footer-link {
  color: rgba(255,255,255,0.65);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.footer-link:hover { color: var(--paper); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .problem-grid,
  .proof-grid,
  .compare-grid,
  .how-notes,
  .roi-grid {
    grid-template-columns: 1fr;
  }

  .flow-row { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); padding: 8px 0; }
  .flow-branches { grid-template-columns: 1fr; }

  .hero { padding: 80px 0 64px; }
  .section { padding: 64px 0; }

  .wrap { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; }

  .reality-check { padding: 28px 24px; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; }
  .btn { text-align: center; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
