:root {
  --bg: #e6dbc7;
  --surface: #ddd0b9;
  --surface-deep: #d2c2a7;
  --ink: #062b8a;
  --muted: #1e3f91;
  --accent: #062b8a;
  --accent-ink: #e6dbc7;

  --font-display: 'Bodoni Moda', Georgia, serif;
  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;

  /* 5 clean type sizes on the whole page */
  --step-small: 15px;
  --step-body: 19px;
  --step-lead: 26px;
  --step-head: clamp(32px, 3.6vw, 56px);
  --step-hero: clamp(48px, 11vw, 156px);

  --gutter: clamp(18px, 3vw, 44px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-hover: 220ms;
  --t-reveal: 800ms;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Corner header inside first screen (never collides with scrolled copy) */
.site-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--gutter);
  color: var(--ink);
}

.site-bar a {
  text-decoration: none;
}

.wordmark {
  font-family: var(--font-body);
  font-size: var(--step-small);
  font-weight: 500;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: var(--step-small);
  font-weight: 500;
}

.top-nav a {
  padding: 6px 2px;
  transition: opacity var(--t-hover) ease;
}

.top-nav a:hover {
  opacity: 0.65;
}

/* HERO: Colour field + Paper Shaders live Bayer dithering canvas + two-ink statement */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px var(--gutter) 44px;
  background: var(--bg);
  overflow: hidden;
}

.hero-shader {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-shader canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100svh - 140px);
}

.hero-statement {
  margin: 4vh 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-hero);
  line-height: 0.9;
  letter-spacing: -0.03em;
  max-width: 13ch;
  text-wrap: balance;
}

.hero-line-soft {
  display: block;
  color: var(--muted);
}

.hero-line-dark {
  display: block;
  color: var(--ink);
}

.hero-foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: end;
  margin-top: 48px;
}

.hero-copy {
  grid-column: 1 / span 5;
  margin: 0;
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--ink);
  max-width: 44ch;
}

.hero-action-wrap {
  grid-column: 7 / span 6;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-size: var(--step-body);
  font-weight: 500;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.btn-primary:hover {
  background: var(--muted);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step-body);
  font-weight: 500;
  border: 0;
  border-radius: 0;
  transition: background-color var(--t-hover) ease;
}

.btn-ghost:hover {
  background: var(--surface-deep);
}

/* CHAPTER 1: Intro — Lead line over four columns + Contra Costa ground photograph */
.chapter-intro {
  background: var(--surface);
  padding: 128px var(--gutter);
}

.intro-head {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  max-width: 18ch;
}

.intro-lead {
  font-size: var(--step-lead);
  line-height: 1.3;
  margin: 0 0 64px;
  max-width: 54ch;
  color: var(--ink);
}

.four-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 84px;
}

.four-cols p {
  margin: 0;
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--ink);
}

.four-cols strong {
  font-weight: 500;
}

.photo-band {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: end;
}

.photo-wide {
  grid-column: 1 / span 8;
  margin: 0;
}

.photo-wide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.photo-note {
  grid-column: 9 / span 4;
}

.photo-note p {
  margin: 0;
  font-size: var(--step-body);
  color: var(--ink);
  max-width: 38ch;
}

.caption {
  margin: 10px 0 0;
  font-size: var(--step-small);
  color: var(--muted);
}

/* CHAPTER 2: Capabilities as a printed menu sheet (table) */
.chapter-menu {
  background: var(--ink);
  color: var(--accent-ink);
  padding: 136px var(--gutter);
}

.menu-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.menu-aside {
  grid-column: 1 / span 4;
}

.menu-aside h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--accent-ink);
}

.menu-aside p {
  margin: 0 0 36px;
  color: var(--bg);
  max-width: 36ch;
}

.aside-photo {
  margin: 0;
}

.aside-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

.aside-photo .caption {
  color: var(--surface);
}

.menu-sheet {
  grid-column: 6 / span 7;
  background: var(--bg);
  color: var(--ink);
  padding: 52px 44px;
  clip-path: polygon(
    0% 10px, 4% 0%, 8% 10px, 12% 0%, 16% 10px, 20% 0%, 24% 10px, 28% 0%, 32% 10px, 36% 0%, 40% 10px, 44% 0%, 48% 10px, 52% 0%, 56% 10px, 60% 0%, 64% 10px, 68% 0%, 72% 10px, 76% 0%, 80% 10px, 84% 0%, 88% 10px, 92% 0%, 96% 10px, 100% 0%,
    100% calc(100% - 10px), 96% 100%, 92% calc(100% - 10px), 88% 100%, 84% calc(100% - 10px), 80% 100%, 76% calc(100% - 10px), 72% 100%, 68% calc(100% - 10px), 64% 100%, 60% calc(100% - 10px), 56% 100%, 52% calc(100% - 10px), 48% 100%, 44% calc(100% - 10px), 40% 100%, 36% calc(100% - 10px), 32% 100%, 28% calc(100% - 10px), 24% 100%, 20% calc(100% - 10px), 16% 100%, 12% calc(100% - 10px), 8% 100%, 4% calc(100% - 10px), 0% 100%
  );
}

.menu-sheet h3 {
  font-family: var(--font-display);
  font-size: var(--step-head);
  font-weight: 500;
  line-height: 1.02;
  margin: 0 0 32px;
}

.menu-table {
  width: 100%;
  border-collapse: collapse;
}

.menu-table th {
  text-align: left;
  font-size: var(--step-lead);
  font-weight: 500;
  padding: 28px 0 12px;
  color: var(--ink);
}

.menu-table tr:first-child th {
  padding-top: 0;
}

.menu-table td {
  padding: 10px 0 18px;
  vertical-align: top;
}

.menu-name {
  font-size: var(--step-body);
  font-weight: 500;
  color: var(--ink);
}

.menu-desc {
  display: block;
  margin-top: 4px;
  font-size: var(--step-small);
  font-weight: 400;
  color: var(--muted);
  max-width: 44ch;
}

.menu-price {
  text-align: right;
  white-space: nowrap;
  font-size: var(--step-body);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding-left: 20px;
}

/* CHAPTER 3: How it works — Lines that step across */
.chapter-steps {
  background: var(--bg);
  padding: 136px var(--gutter);
}

.steps-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 64px;
  max-width: 18ch;
}

.step-stair {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  row-gap: 56px;
}

.step-item {
  grid-column: var(--col-start, 1) / span 6;
}

.step-item:nth-child(1) { --col-start: 1; }
.step-item:nth-child(2) { --col-start: 3; }
.step-item:nth-child(3) { --col-start: 5; }
.step-item:nth-child(4) { --col-start: 7; }

.step-line {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-head);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.step-item:last-child .step-line {
  color: var(--muted);
}

.step-item p {
  margin: 0;
  max-width: 40ch;
  color: var(--ink);
}

.step-media {
  margin-top: 84px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.step-video {
  grid-column: 1 / span 6;
  margin: 0;
}

.step-video video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform: scale(1.06);
}

.step-media-crop {
  overflow: hidden;
}

.step-drafting {
  grid-column: 7 / span 6;
  margin: 0;
}

.step-drafting img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform: scale(1.12);
}

/* CHAPTER 4: Proof & Craft */
.chapter-proof {
  background: var(--surface);
  padding: 136px var(--gutter);
}

.proof-top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  margin-bottom: 64px;
}

.proof-top h2 {
  grid-column: 1 / span 5;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.proof-copy {
  grid-column: 7 / span 6;
}

.proof-copy p {
  margin: 0 0 18px;
  max-width: 54ch;
  color: var(--ink);
}

.proof-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 72px;
}

.proof-blueprint {
  grid-column: 1 / span 7;
  margin: 0;
}

.proof-blueprint img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.proof-strait {
  grid-column: 8 / span 5;
  margin: 0;
}

.proof-strait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.proof-contrast {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: baseline;
}

.contrast-col:first-child {
  grid-column: 1 / span 6;
}

.contrast-col:last-child {
  grid-column: 7 / span 6;
}

.contrast-word {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-head);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.contrast-note {
  margin: 0;
  font-size: var(--step-body);
  color: var(--ink);
  max-width: 38ch;
}

/* CHAPTER 5: Packages & Interactive Scope Builder */
.chapter-pricing {
  background: var(--bg);
  padding: 136px var(--gutter);
}

.pricing-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 48px;
  align-items: end;
}

.pricing-head h2 {
  grid-column: 1 / span 6;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.pricing-head p {
  grid-column: 7 / span 6;
  margin: 0;
  max-width: 50ch;
  color: var(--ink);
}

/* Interactive live thing: Scope & Engagement Estimator */
.estimator {
  background: var(--surface);
  padding: 36px;
  margin-bottom: 64px;
}

.estimator-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}

.estimator-top h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 500;
}

.estimator-sub {
  margin: 0;
  font-size: var(--step-small);
  color: var(--muted);
}

.estimator-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.scope-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  padding: 18px 16px;
  min-height: 112px;
  background: var(--bg);
  color: var(--ink);
  border: 0;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform 140ms var(--ease-out);
}

.scope-toggle:hover {
  background: var(--surface-deep);
}

.scope-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--accent-ink);
}

.scope-toggle[aria-pressed="true"] .scope-tag {
  color: var(--surface);
}

.scope-name {
  font-weight: 500;
  font-size: var(--step-body);
  line-height: 1.25;
}

.scope-tag {
  margin-top: 12px;
  font-size: var(--step-small);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.estimator-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
}

.estimator-readout {
  margin: 0;
  font-size: var(--step-lead);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.estimator-meta {
  margin: 4px 0 0;
  font-size: var(--step-small);
  color: var(--muted);
}

/* Comparison table */
.plan-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.plan-table th,
.plan-table td {
  padding: 20px 18px;
  vertical-align: top;
  font-size: var(--step-body);
}

.plan-table thead th {
  font-family: var(--font-body);
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.15;
}

.plan-table tbody tr:nth-child(odd) {
  background: var(--surface);
}

.plan-table .col-featured {
  background: var(--ink);
  color: var(--accent-ink);
}

.plan-table tbody tr:nth-child(odd) .col-featured {
  background: #0b3398;
}

.plan-price-row td {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* CHAPTER 6: FAQ — Answers as continuous reading text */
.chapter-faq {
  background: var(--surface);
  padding: 136px var(--gutter);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.faq-head {
  grid-column: 1 / span 3;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.faq-columns {
  grid-column: 5 / span 8;
  columns: 2;
  column-gap: 56px;
}

.faq-columns p {
  margin: 0 0 22px;
  font-size: var(--step-body);
  line-height: 1.55;
  color: var(--ink);
  max-width: 44ch;
  break-inside: avoid;
}

.faq-columns strong {
  font-weight: 500;
}

/* CHAPTER 7: CTA — One word is the button */
.chapter-cta {
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  padding: 72px var(--gutter) 44px;
  min-height: 46svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 200ms ease, color 200ms ease;
}

.chapter-cta:hover,
.chapter-cta:focus-visible {
  background: var(--ink);
  color: var(--accent-ink);
}

.cta-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cta-top p {
  margin: 0;
  font-size: clamp(19px, 1.8vw, 24px);
  max-width: 34ch;
  line-height: 1.3;
}

.cta-arrow-wrap {
  display: inline-flex;
  align-items: center;
}

.cta-arrow {
  width: 38px;
  height: 38px;
  flex: none;
}

.cta-word {
  margin: 48px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-hero);
  line-height: 0.88;
  letter-spacing: -0.03em;
}

/* CHAPTER 8: Footer — Name first, places under it */
.chapter-footer {
  background: var(--ink);
  color: var(--accent-ink);
  padding: 56px var(--gutter) 44px;
  overflow: hidden;
}

.footer-monument {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 9.6vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--accent-ink);
}

.footer-main {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.footer-places {
  grid-column: 1 / span 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-places a {
  font-size: var(--step-lead);
  text-decoration: none;
  line-height: 1.3;
}

.footer-places a:hover {
  text-decoration: underline;
}

.footer-links {
  grid-column: 8 / span 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li + li {
  margin-top: 10px;
}

.footer-links a {
  text-decoration: none;
  font-size: var(--step-body);
}

.footer-links a:hover {
  text-decoration: underline;
}

.credits {
  margin: 40px 0 0;
  font-size: var(--step-small);
  line-height: 1.5;
  color: var(--surface);
  max-width: 66ch;
}

.footer-bottom {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--step-small);
  color: var(--surface);
}

/* Choreographed entrances */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-reveal) var(--ease-expo), transform var(--t-reveal) var(--ease-expo);
}

.js-ready [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .four-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .menu-aside,
  .menu-sheet,
  .proof-top h2,
  .proof-copy,
  .proof-blueprint,
  .proof-strait,
  .pricing-head h2,
  .pricing-head p,
  .faq-head,
  .faq-columns,
  .photo-wide,
  .photo-note,
  .step-video,
  .step-drafting,
  .footer-places,
  .footer-links {
    grid-column: 1 / -1;
  }
  .estimator-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone */
@media (max-width: 720px) {
  .top-nav a:not(:last-child) {
    display: none;
  }
  .hero {
    padding-top: 84px;
  }
  .hero-foot {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }
  .hero-copy,
  .hero-action-wrap {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .hero-action-wrap {
    flex-wrap: wrap;
  }
  .chapter-intro,
  .chapter-menu,
  .chapter-steps,
  .chapter-proof,
  .chapter-pricing,
  .chapter-faq {
    padding: 80px var(--gutter);
  }
  .four-cols,
  .proof-contrast {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contrast-col:first-child,
  .contrast-col:last-child {
    grid-column: 1 / -1;
  }
  .menu-sheet {
    padding: 32px 20px;
  }
  .step-item:nth-child(n) {
    grid-column: 1 / -1;
  }
  .step-item:nth-child(2) { padding-left: 6vw; }
  .step-item:nth-child(3) { padding-left: 12vw; }
  .step-item:nth-child(4) { padding-left: 18vw; }
  .estimator {
    padding: 24px 20px;
  }
  .estimator-options {
    grid-template-columns: 1fr;
  }
  /* Stack comparison table cleanly on phones with zero horizontal scroll */
  .plan-table,
  .plan-table thead,
  .plan-table tbody,
  .plan-table tr,
  .plan-table th,
  .plan-table td {
    display: block;
    width: 100%;
  }
  .plan-table thead {
    display: none;
  }
  .plan-table tr {
    padding: 12px 0;
  }
  .plan-table td {
    padding: 8px 14px;
  }
  .plan-table td::before {
    content: attr(data-plan);
    display: block;
    font-size: var(--step-small);
    font-weight: 500;
    opacity: 0.78;
    margin-bottom: 2px;
  }
  .plan-table td:first-child::before {
    content: none;
  }
  .plan-table td:first-child {
    font-weight: 500;
  }
  .faq-columns {
    columns: 1;
  }
  .cta-top p,
  .cta-arrow-wrap {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .footer-monument {
    white-space: normal;
  }
}
