/* ── Design tokens ── */
:root {
  --ivory:    #f7f3ed;
  --ivory-2:  #ede8e0;
  --ink:      #1c1813;
  --ink-2:    #3a332a;
  --ink-3:    #6b6055;
  --sage:     #7a9080;
  --sage-lt:  #c4d3cb;
  --walnut:   #6b4f3a;
  --brass:    #b8923a;
  --brass-lt: #e8d5a3;
  --red-lt:   #f5e0d8;
  --red:      #c0522a;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --max-w: 1080px;
  --radius: 6px;
  --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 237, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ivory-2);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  background: var(--ink) !important;
  color: var(--ivory) !important;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem !important;
}
.nav__cta:hover { background: var(--ink-2) !important; }

/* ── HERO ── */
.hero {
  padding: 96px 24px 80px;
  background: var(--ivory);
}
.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero__badge {
  display: inline-block;
  background: var(--brass-lt);
  color: var(--walnut);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 24px;
}
.hero__headline em {
  font-style: italic;
  color: var(--walnut);
}
.hero__sub {
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero__form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}
.hero__email, .cta__email {
  padding: 12px 18px;
  border: 1.5px solid var(--ivory-2);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--ink);
  width: 300px;
  outline: none;
  transition: border-color 0.15s;
}
.hero__email:focus, .cta__email:focus { border-color: var(--walnut); }
.hero__submit, .cta__submit {
  padding: 12px 24px;
  background: var(--walnut);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.hero__submit:hover, .cta__submit:hover { background: var(--ink-2); }
.hero__note, .cta__note {
  font-size: 0.8rem;
  color: var(--ink-3);
  margin-top: 10px;
}

/* ── Blueprint preview card ── */
.hero__preview {
  margin-top: 60px;
  width: 100%;
  max-width: 580px;
}
.preview-card {
  background: #fff;
  border: 1px solid var(--ivory-2);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  text-align: left;
  box-shadow: 0 4px 24px rgba(28,24,19,0.07);
}
.preview-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.preview-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.preview-card__status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}
.preview-card__status--accepted { background: #d4ede2; color: #1e6645; }
.preview-card__field {
  margin-bottom: 14px;
}
.preview-card__key {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 3px;
}
.preview-card__val {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.5;
}
.preview-card__val--stage {
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot--green { background: #2e9e5e; }
.preview-card__provenance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ivory-2);
}
.prov-chip {
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--ivory-2);
  color: var(--ink-2);
  padding: 3px 10px;
  border-radius: 100px;
}
.prov-chip--gap { background: var(--brass-lt); color: var(--walnut); }

/* ── SECTIONS common ── */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.2;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 560px;
  margin-bottom: 52px;
}

/* ── PROBLEM ── */
.problem {
  padding: 96px 24px;
  background: var(--ivory-2);
  border-top: 1px solid #ddd7cd;
  border-bottom: 1px solid #ddd7cd;
}
.problem__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.problem__item {
  background: var(--ivory);
  border: 1px solid #ddd7cd;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.problem__icon {
  font-size: 1.4rem;
  color: var(--walnut);
  margin-bottom: 14px;
  font-family: var(--font-serif);
}
.problem__item h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}
.problem__item p {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ── HOW IT WORKS ── */
.how { padding: 96px 24px; }
.how__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.how__step {
  display: flex;
  gap: 36px;
  padding: 40px 0;
  border-bottom: 1px solid var(--ivory-2);
}
.how__step:last-child { border-bottom: none; }
.how__step-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--brass-lt);
  line-height: 1;
  min-width: 56px;
  padding-top: 4px;
  letter-spacing: -0.04em;
}
.how__step-body h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
}
.how__step-body p {
  font-size: 0.95rem;
  color: var(--ink-2);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.how__step-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--ivory-2);
  color: var(--ink-3);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ── PIPELINE ── */
.pipeline {
  padding: 96px 24px;
  background: var(--ink);
  color: var(--ivory);
}
.pipeline .section-heading { color: var(--ivory); }
.pipeline .section-sub { color: var(--sage-lt); }
.pipeline__track {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  position: relative;
  margin-bottom: 28px;
}
.pipeline__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1 1 80px;
  min-width: 70px;
  position: relative;
}
.pipeline__stage::before {
  content: '';
  position: absolute;
  top: 8px;
  left: calc(50% + 8px);
  right: calc(-50% + 8px);
  height: 2px;
  background: var(--ink-2);
}
.pipeline__stage:last-child::before { display: none; }
.pipeline__stage-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid;
  position: relative;
  z-index: 1;
}
.pipeline__stage-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  color: var(--ink-3);
  line-height: 1.3;
}
.pipeline__stage--active .pipeline__stage-dot {
  background: var(--sage);
  border-color: var(--sage);
}
.pipeline__stage--active .pipeline__stage-label { color: var(--sage-lt); }
.pipeline__stage--active::before { background: var(--sage); }
.pipeline__stage--partial .pipeline__stage-dot {
  background: var(--brass);
  border-color: var(--brass);
}
.pipeline__stage--partial .pipeline__stage-label { color: var(--brass-lt); }
.pipeline__stage--locked .pipeline__stage-dot {
  background: transparent;
  border-color: #3a332a;
}
.pipeline__legend {
  font-size: 0.78rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-dot--active { background: var(--sage); }
.legend-dot--partial { background: var(--brass); }
.legend-dot--locked { background: transparent; border: 2px solid #3a332a; }

/* ── INTEGRITY ── */
.integrity {
  padding: 96px 24px;
  background: var(--ivory);
  border-top: 1px solid #ddd7cd;
}
.integrity__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.integrity__text p {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 16px;
}
.integrity__list {
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.integrity__list li {
  font-size: 0.9rem;
  color: var(--ink-2);
  padding-left: 20px;
  position: relative;
}
.integrity__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 700;
}

/* Integrity log mock */
.log-card {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 20px;
  font-size: 0.8rem;
  font-family: 'Courier New', monospace;
}
.log-card__header {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a231c;
}
.log-entry {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid #2a231c;
}
.log-entry:last-child { border-bottom: none; }
.log-entry__prefix {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  text-align: center;
  line-height: 1.4;
}
.log-entry--wiz .log-entry__prefix { background: #2a3d30; color: #7ec49a; }
.log-entry--blu .log-entry__prefix { background: #1e2e45; color: #6fa8dc; }
.log-entry--prp .log-entry__prefix { background: #3a2a1a; color: #e0a060; }
.log-entry--gap .log-entry__prefix { background: #3a2215; color: #e07050; }
.log-entry--int .log-entry__prefix { background: #2a2a2a; color: #aaaaaa; }
.log-entry__text { color: #c0b8b0; font-size: 0.78rem; line-height: 1.4; }
.log-entry__time { color: #4a4440; font-size: 0.68rem; }

/* ── PROOF ── */
.proof {
  padding: 96px 24px;
  background: var(--ivory-2);
  border-top: 1px solid #ddd7cd;
  border-bottom: 1px solid #ddd7cd;
  text-align: center;
}
.proof__heading { max-width: 640px; margin: 0 auto 20px; }
.proof__body {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 auto 52px;
  line-height: 1.75;
}
.proof__stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}
.proof__stat-num {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--walnut);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.proof__stat-label {
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* ── CTA ── */
.cta {
  padding: 96px 24px;
  background: var(--ivory);
}
.cta__inner { text-align: center; }
.cta__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.cta__sub {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.cta__form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}

/* ── FOOTER ── */
.footer {
  padding: 24px;
  border-top: 1px solid var(--ivory-2);
  background: var(--ivory);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-3);
}
.footer__brand {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
}

/* ensure hidden attribute wins over display rules */
[hidden] { display: none !important; }

/* ── MODAL ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28,24,19,0.5);
  z-index: 200;
}
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 201;
  padding: 24px;
}
.modal__box {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(28,24,19,0.25);
}
.modal__icon {
  font-size: 2.4rem;
  color: var(--sage);
  margin-bottom: 16px;
}
.modal__heading {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.modal__body {
  font-size: 0.95rem;
  color: var(--ink-2);
  margin-bottom: 28px;
}
.modal__close {
  padding: 11px 28px;
  background: var(--ink);
  color: var(--ivory);
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .integrity__inner { grid-template-columns: 1fr; gap: 40px; }
  .how__step { flex-direction: column; gap: 16px; }
  .how__step-num { font-size: 1.8rem; }
  .proof__stats { gap: 36px; }
  .pipeline__stage-label { font-size: 0.62rem; }
}
