/* =========================================================
   Cherryl Systems — styles
   1. Fonts  2. Tokens  3. Base  4. Layout helpers
   5. Components (buttons, header, flow)  6. Sections
   7. Form  8. Footer  9. Motion
   ========================================================= */

/* 1. Fonts (self-hosted, SIL Open Font License) */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens */
:root {
  /* Brand palette */
  --ivory: #F7F5EF;
  --ink: #172A2A;
  --forest: #255C50;
  --forest-deep: #1C4A40;
  --terracotta: #B56C52;      /* lines, dots, accents only (3.7:1 on ivory) */
  --terracotta-text: #9A5640; /* terracotta for text (5.1:1 on ivory) */
  --sage: #E5ECE5;

  /* Supporting */
  --paper: #FFFFFF;
  --muted: #4B5D5A;           /* 6.4:1 on ivory, 5.8:1 on sage */
  --line: #D6DBD3;
  --line-strong: #6B7B77;     /* form borders, 3:1+ */
  --on-dark: #F7F5EF;
  --on-dark-muted: #B9C8C2;   /* 8.6:1 on ink */
  --accent-on-dark: #E7A68C;  /* 7.3:1 on ink */
  --error: #A3352B;
  --focus: var(--forest);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.375rem, 1.1rem + 0.9vw, 1.625rem);
  --step-3: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
  --step-4: clamp(2.375rem, 1.4rem + 4vw, 4.25rem);

  /* Space & shape */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 8vw, 7.5rem);
  --radius: 6px;
  --radius-lg: 10px;
  --wrap: 76rem;
  --header-h: 4.25rem;
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3 { margin: 0; font-weight: 500; }
h1, h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 0.2em; }
em { font-style: italic; }

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

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--on-dark);
  padding: 0.75rem 1rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* 4. Layout helpers */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

.kicker {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta-text);
  margin-bottom: 1rem;
}
.kicker--light { color: var(--accent-on-dark); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-intro { margin-top: 1.25rem; color: var(--muted); font-size: var(--step-1); line-height: 1.5; max-width: 38rem; }
.section-head--split { max-width: none; display: grid; gap: 1.25rem; }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 4rem; }
  .section-head--split .section-intro { margin-top: 0; font-size: var(--step-0); }
}

.fine-print { font-size: var(--step--1); color: var(--muted); }

/* 5. Components ----------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-deep); }
.btn-quiet { background: transparent; color: var(--ink); border-color: rgba(23, 42, 42, 0.35); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-sm { min-height: 2.75rem; padding: 0.55rem 1rem; font-size: 0.9375rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 239, 0.96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: rgba(247, 245, 239, 0.9); backdrop-filter: blur(8px); }
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 1rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
  min-height: 2.75rem;
}
/* Two linked nodes: the brand mark */
.wordmark-mark {
  position: relative; width: 1.6rem; height: 0.7rem; flex: none;
}
.wordmark-mark::before, .wordmark-mark::after {
  content: ""; position: absolute; top: 0; width: 0.7rem; height: 0.7rem; border-radius: 2px;
}
.wordmark-mark::before { left: 0; background: var(--forest); }
.wordmark-mark::after { right: 0; background: var(--terracotta); border-radius: 50%; }
.wordmark-mark { background: linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat; }

.nav-toggle {
  display: none;
  align-items: center; gap: 0.6rem;
  min-height: 2.75rem; padding: 0.5rem 0.9rem;
  background: transparent; color: var(--ink);
  border: 1.5px solid rgba(23, 42, 42, 0.35); border-radius: var(--radius);
  font: 600 0.9375rem var(--font-body); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 1.1rem; height: 2px; background: currentColor; border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.nav-list { display: flex; list-style: none; gap: 0.25rem; }
.nav-list a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.65rem;
  text-decoration: none; color: var(--muted); font-size: 0.9375rem; font-weight: 500;
}
.nav-list a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--terracotta); text-decoration-thickness: 2px; }

@media (max-width: 1023px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 0.75rem var(--gutter) 1.5rem;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px -16px rgba(23, 42, 42, 0.25);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list a { display: flex; min-height: 3rem; padding-inline: 0; font-size: 1.0625rem; color: var(--ink); border-bottom: 1px solid var(--line); }
  .js .site-nav .btn { width: 100%; min-height: 3rem; }
  /* Without JS: links wrap below the wordmark */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 0.5rem; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: 0.5rem; }
  html:not(.js) .nav-list { flex-wrap: wrap; }
}

/* Flow illustration (hero) */
.flow {
  margin: 0;
  container-type: inline-size;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 1px 0 rgba(23, 42, 42, 0.04), 0 24px 48px -32px rgba(23, 42, 42, 0.25);
}
.flow-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  padding-bottom: 1rem; margin-bottom: 1.5rem;
  border-bottom: 1px dashed var(--line);
}
.flow-tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--forest); background: var(--sage);
  padding: 0.3rem 0.6rem; border-radius: 3px;
}
.flow-note { font-size: 0.8125rem; color: var(--muted); }

.flow-steps { list-style: none; position: relative; }
.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  column-gap: 0.875rem;
  padding-bottom: 1.25rem;
}
.flow-step:last-child { padding-bottom: 0; }
/* Vertical connector between steps */
.flow-step:not(:last-child)::before {
  content: ""; position: absolute;
  left: calc(0.75rem - 1px); top: 1.4rem; bottom: -0.1rem;
  width: 2px; background: var(--forest); opacity: 0.35;
}
.flow-dot {
  grid-column: 1; grid-row: 1;
  position: relative; z-index: 1;
  width: 1.5rem; height: 1.5rem; margin-top: 0.6rem;
  border-radius: 50%; background: var(--paper);
  border: 2px solid var(--forest);
}
.flow-dot::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--forest);
}
.flow-node {
  grid-column: 2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  padding: 0.7rem 0.9rem 0.75rem;
}
.flow-kind {
  display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.15rem;
}
.flow-title { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.flow-meta { font-size: 0.875rem; color: var(--muted); line-height: 1.4; margin-top: 0.15rem; }
.flow-node--done { background: var(--sage); border-color: rgba(37, 92, 80, 0.35); }

/* Exception branch: stacked by default (narrow), beside the step when there's room */
.flow-branch {
  grid-column: 2;
  position: relative;
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  border-left: 2px dashed var(--terracotta);
}
.flow-cond {
  font-size: 0.8125rem; font-weight: 600; color: var(--terracotta-text);
  margin-bottom: 0.4rem;
}
.flow-cond::before { content: "↳ "; }
.flow-node--exception {
  background: var(--paper);
  border: 1.5px dashed var(--terracotta);
}
.flow-node--exception .flow-kind { color: var(--terracotta-text); }
.flow-caption {
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--line);
  font-family: var(--font-display); font-style: italic; font-size: 1.0625rem; color: var(--ink);
}

@container (min-width: 32rem) {
  .flow-step--branch { grid-template-columns: 1.5rem minmax(0, 1fr) minmax(0, 0.95fr); }
  .flow-branch {
    grid-column: 3; grid-row: 1;
    margin-top: 0; margin-left: 1.25rem;
    padding-left: 0; border-left: 0;
    align-self: center;
  }
  /* Dashed horizontal link from the step to its exception */
  .flow-branch::before {
    content: ""; position: absolute;
    left: -1.25rem; top: calc(50% + 0.6rem); width: 1.25rem;
    border-top: 2px dashed var(--terracotta);
  }
  .flow-cond::before { content: ""; }
}

/* 6. Sections ------------------------------------------- */

/* Hero */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(4rem, 8vw, 7rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}
.eyebrow {
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.04em;
  color: var(--forest); margin-bottom: 1.25rem;
}
.eyebrow span { color: var(--terracotta); margin-inline: 0.35em; }
.hero h1 { font-size: var(--step-4); max-width: 14ch; }
.hero h1 em { color: var(--forest); font-weight: 400; }
.lede { margin-top: 1.5rem; font-size: var(--step-1); line-height: 1.55; color: var(--muted); max-width: 34rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 2rem; }
.hero .flow { max-width: 38rem; width: 100%; justify-self: center; }
@media (min-width: 1000px) { .hero .flow { justify-self: end; } }

/* Recognition */
.recognition { background: var(--sage); }
.recognition-grid { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.recognition-intro h2 { max-width: 18ch; }
.problem-list { list-style: none; display: grid; gap: 0; }
.problem-list li {
  display: grid; grid-template-columns: 2.75rem 1fr; column-gap: 0.75rem;
  padding-block: 1.25rem; border-top: 1px solid rgba(23, 42, 42, 0.18);
}
.problem-num { grid-row: span 2; font-family: var(--font-display); font-size: 1.125rem; color: var(--terracotta-text); padding-top: 0.1rem; }
.problem-list h3 { font-size: var(--step-1); }
.problem-list p { color: var(--muted); margin-top: 0.3rem; }
.symptoms {
  border-left: 3px solid var(--terracotta);
  padding-left: 1.25rem;
}
.symptoms-label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.symptoms-list { list-style: none; display: grid; gap: 0.5rem; }
.symptoms-list li { font-family: var(--font-display); font-style: italic; font-size: 1.125rem; line-height: 1.45; }
.recognition-close {
  font-family: var(--font-display); font-size: var(--step-2); line-height: 1.35; max-width: 34ch;
}
@media (min-width: 900px) {
  .recognition-grid { grid-template-columns: 5fr 7fr; column-gap: 4rem; row-gap: 3.5rem; }
  .recognition-intro { grid-row: auto; }
  .recognition-intro h2 { position: sticky; top: calc(var(--header-h) + 2rem); }
  .problem-list { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .recognition-close { grid-column: 1 / -1; padding-top: 2.5rem; border-top: 1px solid rgba(23, 42, 42, 0.18); }
}

/* Services */
.service-list { list-style: none; border-top: 1px solid var(--ink); }
.service {
  display: grid; gap: 1.5rem;
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  border-bottom: 1px solid var(--line);
}
.service-title { display: grid; grid-template-columns: 2.75rem 1fr; column-gap: 0.75rem; align-content: start; }
.service-num { grid-row: span 2; font-family: var(--font-display); font-size: 1.25rem; color: var(--terracotta-text); padding-top: 0.15rem; }
.service-title h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--step-2); letter-spacing: -0.01em; line-height: 1.2; }
.service-scope { margin-top: 0.6rem; font-size: var(--step--1); color: var(--muted); line-height: 1.55; }
.service-detail { display: grid; gap: 1.25rem; margin: 0; }
.service-detail dt {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--forest); margin-bottom: 0.35rem;
}
.service-detail dd { margin: 0; }
.service-detail div:last-child dd { font-weight: 600; }
@media (min-width: 700px) {
  .service-detail { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .service-title { padding-right: 2rem; }
}
@media (min-width: 1100px) {
  .service { grid-template-columns: 0.85fr 2fr; gap: 3rem; }
}

/* Selected work */
.work { background: var(--paper); border-block: 1px solid var(--line); }
.project-list { display: grid; gap: 0; }
.project {
  display: grid; gap: 1.5rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--ink);
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project-head { display: flex; gap: 1rem; align-items: baseline; }
.project-num { font-family: var(--font-display); font-size: 1.25rem; color: var(--terracotta-text); }
.project-head h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.01em; }
.project-body { margin: 0; display: grid; gap: 1.25rem; }
.project-row { display: grid; gap: 0.35rem; }
.project-row dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--forest); }
.project-row dd { margin: 0; }
.work-items { list-style: none; display: grid; gap: 0.35rem; }
.work-items li { position: relative; padding-left: 1.1rem; }
.work-items li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 0.45rem; height: 0.45rem; border-radius: 50%; border: 1.5px solid var(--terracotta);
}
@media (min-width: 700px) {
  .project-row { grid-template-columns: 10rem 1fr; gap: 1.5rem; }
  .work-items { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
}
@media (min-width: 1100px) {
  .project { grid-template-columns: 0.85fr 2fr; gap: 3rem; }
}

/* Real estate */
.realestate { background: var(--ink); color: var(--on-dark); --focus: var(--accent-on-dark); }
.re-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.re-copy h2 { max-width: 16ch; }
.re-copy > p:not(.kicker) { margin-top: 1.5rem; color: var(--on-dark-muted); font-size: var(--step-1); line-height: 1.55; max-width: 34rem; }
.re-list { list-style: none; margin-top: 1.75rem; display: grid; gap: 0; max-width: 34rem; }
.re-list li {
  padding: 0.7rem 0 0.7rem 1.5rem; position: relative;
  border-top: 1px solid rgba(247, 245, 239, 0.16);
}
.re-list li:last-child { border-bottom: 1px solid rgba(247, 245, 239, 0.16); }
.re-list li::before {
  content: ""; position: absolute; left: 0.1rem; top: 1.25rem;
  width: 0.6rem; height: 2px; background: var(--accent-on-dark);
}
@media (min-width: 1000px) {
  .re-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}

.re-flow {
  margin: 0;
  background: #1E3534;
  border: 1px solid rgba(247, 245, 239, 0.14);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  container-type: inline-size;
}
.flow-head--dark { border-bottom-color: rgba(247, 245, 239, 0.18); }
.flow-tag--dark { background: rgba(229, 236, 229, 0.12); color: var(--sage); }
.re-flow .flow-note { color: var(--on-dark-muted); }
.re-flow-title { font-family: var(--font-display); font-size: var(--step-2); margin-bottom: 1rem; }

.re-steps { list-style: none; counter-reset: re; display: grid; gap: 0.75rem; }
.re-steps li {
  counter-increment: re;
  position: relative;
  border: 1px solid rgba(247, 245, 239, 0.2);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem 0.8rem 2.75rem;
}
.re-steps li::before {
  content: counter(re);
  position: absolute; left: 0.85rem; top: 0.8rem;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 600;
  background: var(--sage); color: var(--ink);
}
.re-step-title { font-weight: 600; line-height: 1.3; }
.re-step-meta { font-size: 0.875rem; color: var(--on-dark-muted); line-height: 1.4; margin-top: 0.2rem; }
.re-then { margin: 1.5rem 0 0.75rem; font-size: 0.875rem; font-weight: 600; color: var(--on-dark-muted); }
.re-outcomes { list-style: none; display: grid; gap: 0.75rem; }
.re-outcomes li {
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem 0.8rem;
  background: rgba(229, 236, 229, 0.08);
  border: 1px solid rgba(229, 236, 229, 0.2);
  font-size: 0.9375rem; line-height: 1.45;
}
.re-outcomes li p:not(.re-cond) { color: var(--on-dark-muted); }
.re-cond { font-weight: 600; color: var(--on-dark); margin-bottom: 0.25rem; }
.re-outcome--exception { border: 1.5px dashed var(--terracotta) !important; background: transparent !important; }
.re-outcome--exception .re-cond { color: var(--accent-on-dark); }
.re-caption {
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed rgba(247, 245, 239, 0.18);
  font-family: var(--font-display); font-style: italic; font-size: 1.0625rem;
}
.re-disclaimer { margin-top: 2rem; font-size: var(--step--1); color: var(--on-dark-muted); }

@container (min-width: 36rem) {
  .re-steps { grid-template-columns: repeat(2, 1fr); }
  .re-outcomes { grid-template-columns: repeat(3, 1fr); }
}

/* How I work */
.steps { list-style: none; display: grid; gap: 0; counter-reset: none; }
.step {
  position: relative;
  display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem;
  padding-bottom: 2rem;
}
.step:not(:last-child)::before {
  content: ""; position: absolute; left: calc(1.25rem - 1px); top: 2.75rem; bottom: 0.5rem;
  width: 2px; background: var(--line);
}
.step-num {
  grid-row: span 2;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.125rem;
  border: 1.5px solid var(--forest); color: var(--forest); background: var(--ivory);
}
.step h3 { padding-top: 0.45rem; }
.step p { margin-top: 0.5rem; color: var(--muted); max-width: 30rem; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .step { grid-template-columns: 1fr; padding-bottom: 0; }
  .step-num { grid-row: auto; margin-bottom: 1.25rem; }
  .step:not(:last-child)::before {
    left: 3.25rem; right: -1.25rem; top: calc(1.25rem - 1px); bottom: auto;
    width: auto; height: 2px;
  }
  .step h3 { padding-top: 0; }
}
.start-small {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid; gap: 0.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line); border-left: 4px solid var(--terracotta);
  border-radius: var(--radius);
  background: var(--paper);
  max-width: 52rem;
}
.start-small-title { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.25; }
.start-small p:not(.start-small-title) { color: var(--muted); }

/* Tools */
.tools { background: var(--sage); }
.tools-grid { display: grid; gap: 2.5rem; }
.tools-intro h2 { max-width: 14ch; }
.tools-intro p:not(.fine-print) { margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.5; max-width: 30rem; }
.tools-intro .fine-print { margin-top: 1.25rem; max-width: 30rem; }
.tool-groups { display: grid; gap: 2rem; }
.tool-group h3 {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--forest); padding-bottom: 0.75rem; border-bottom: 1px solid rgba(23, 42, 42, 0.25);
}
.tool-group ul { list-style: none; }
.tool-group li {
  font-family: var(--font-display); font-size: 1.375rem; line-height: 1.3;
  padding-block: 0.5rem; border-bottom: 1px solid rgba(23, 42, 42, 0.1);
}
@media (min-width: 700px) { .tool-groups { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .tools-grid { grid-template-columns: 0.8fr 2fr; gap: 4rem; } }

/* About */
.about-grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.name-plate {
  position: relative;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background:
    linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat,
    var(--ivory);
}
.name-plate-name {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(3rem, 2rem + 5vw, 5.25rem); line-height: 0.95; letter-spacing: -0.03em;
}
.name-plate-name em { color: var(--forest); font-weight: 400; }
.name-plate-role { margin-top: 1.5rem; font-weight: 600; }
.name-plate-fields {
  list-style: none; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.name-plate-fields li {
  font-size: 0.875rem; font-weight: 500;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  border: 1px solid rgba(37, 92, 80, 0.4); color: var(--forest);
}
.name-plate-place { margin-top: 1.5rem; font-size: var(--step--1); color: var(--muted); }
.about-copy h2 { max-width: 16ch; margin-bottom: 1.5rem; }
.about-copy p:not(.kicker) { max-width: 36rem; }
.about-copy p + p { margin-top: 1rem; }
@media (min-width: 1000px) {
  .about-grid { grid-template-columns: 0.8fr 1.2fr; }
  .name-plate { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq-grid { display: grid; gap: 2rem; }
.faq-grid h2 { max-width: 12ch; }
.faq-list { border-top: 1px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 3.5rem; padding-block: 1rem;
  font-weight: 600; font-size: var(--step-1); line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 0.65rem; height: 0.65rem;
  border-right: 2px solid var(--forest); border-bottom: 2px solid var(--forest);
  transform: rotate(45deg) translateY(-25%);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(-135deg) translateX(-25%); }
.faq-list summary:hover { color: var(--forest); }
.faq-answer { padding-bottom: 1.25rem; max-width: 40rem; color: var(--muted); }
@media (min-width: 900px) { .faq-grid { grid-template-columns: 0.8fr 1.2fr; gap: 4rem; } }

/* Contact */
.contact { background: var(--ink); color: var(--on-dark); --focus: var(--accent-on-dark); }
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-copy h2 { max-width: 15ch; }
.contact-copy > p:not(.kicker) { margin-top: 1.25rem; color: var(--on-dark-muted); font-size: var(--step-1); line-height: 1.5; max-width: 28rem; }
.contact-copy .contact-call { font-size: var(--step-0); padding-left: 1rem; border-left: 3px solid var(--terracotta); }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; } }

/* 7. Form */
.enquiry-form {
  --focus: var(--forest);
  background: var(--ivory); color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  display: grid; gap: 1.25rem;
}
.form-preview {
  font-size: 0.9375rem; line-height: 1.45;
  padding: 0.75rem 1rem; border-radius: var(--radius);
  background: #F3E6DF; border: 1px dashed var(--terracotta); color: var(--ink);
}
.form-preview[hidden] { display: none; }
.field { display: grid; gap: 0.4rem; min-width: 0; align-content: start; }
.field-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 600; font-size: 0.9375rem; }
.req, .opt { font-weight: 400; color: var(--muted); font-size: 0.875rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  min-height: 3rem;
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--forest); outline-offset: 1px; border-color: var(--forest);
}
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-hint { font-size: 0.875rem; color: var(--muted); }
.field-error { font-size: 0.875rem; font-weight: 600; color: var(--error); }
.field-error::before { content: "! "; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: grid; gap: 0.75rem; justify-items: start; }
.form-actions .btn { min-width: 14rem; }
.form-actions .btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.form-consent { font-size: 0.875rem; color: var(--muted); }
.form-status {
  padding: 0.85rem 1rem; border-radius: var(--radius); font-size: 0.9375rem; line-height: 1.45;
}
.form-status[hidden] { display: none; }
.form-status:focus { outline: none; }
.form-status--success { background: var(--sage); border: 1px solid var(--forest); }
.form-status--error { background: #F8E3DF; border: 1px solid var(--error); }
.form-status--preview { background: #F3E6DF; border: 1px dashed var(--terracotta); }
@media (max-width: 479px) { .form-actions .btn { width: 100%; } }

/* 8. Footer */
.site-footer { background: var(--ink); color: var(--on-dark-muted); border-top: 1px solid rgba(247, 245, 239, 0.12); }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem;
  padding-block: 2.5rem; font-size: 0.9375rem;
}
.footer-brand { font-family: var(--font-display); font-size: 1.25rem; color: var(--on-dark); margin-bottom: 0.25rem; }
.footer-meta { display: grid; gap: 0.25rem; }
@media (min-width: 700px) { .footer-meta { text-align: right; } }

/* 9. Motion: only to show the flow moving, and only when allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .flow-step { opacity: 0; transform: translateY(6px); animation: flow-in 0.5s ease forwards; }
  .js .flow-step:nth-child(1) { animation-delay: 0.15s; }
  .js .flow-step:nth-child(2) { animation-delay: 0.35s; }
  .js .flow-step:nth-child(3) { animation-delay: 0.55s; }
  .js .flow-step:nth-child(4) { animation-delay: 0.95s; }
  .js .flow-branch { opacity: 0; animation: flow-in 0.5s ease 0.75s forwards; }
  @keyframes flow-in { to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Real estate flow: short connectors between steps */
.re-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1.475rem - 1px); top: 100%;
  width: 2px; height: 0.75rem; background: rgba(229, 236, 229, 0.35);
}
@container (min-width: 36rem) {
  .re-steps li:not(:last-child)::after { display: none; }
}

/* Contact: Calendly booking */
.contact-head { max-width: 46rem; }
.contact-head > p:not(.kicker) { margin-top: 1.25rem; color: var(--on-dark-muted); font-size: var(--step-1); line-height: 1.5; max-width: 34rem; }
.booking { margin-top: clamp(2rem, 4vw, 3rem); }
.booking[hidden] { display: none; }
.booking-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}
.booking-head h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--step-2); }
.booking-alt { font-size: 0.9375rem; color: var(--on-dark-muted); }
.booking-alt a { color: var(--on-dark); }
.booking-frame {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
}
.booking-widget { width: 100%; min-width: 0; height: 700px; }
@media (max-width: 699px) { .booking-widget { height: 1000px; } }
.contact-sub { font-family: var(--font-display); font-weight: 500; font-size: var(--step-2); line-height: 1.25; }
.contact-copy > .contact-sub + p { margin-top: 0.75rem; color: var(--on-dark-muted); max-width: 28rem; }
.contact .contact-grid { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid rgba(247, 245, 239, 0.16); }

.contact-grid[hidden] { display: none !important; }

/* Contact: "What happens next" steps beside the form */
.contact-steps {
  list-style: none; counter-reset: step; padding: 0;
  margin-top: 1.25rem; display: grid; gap: 1rem; max-width: 28rem;
  color: var(--on-dark-muted); line-height: 1.5;
}
.contact-steps li { counter-increment: step; position: relative; padding-left: 2.5rem; }
.contact-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--accent-on-dark); color: var(--accent-on-dark);
  font-size: 0.875rem; font-weight: 600;
}
.contact-or { margin-top: 2rem; margin-bottom: 0.75rem; color: var(--on-dark); font-weight: 600; }

/* Contact: Kit form, matched to the site (Kit's inline styles need !important) */
.kit-form { min-width: 0; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] {
  max-width: none; border: 0; border-radius: var(--radius-lg) !important;
  background: var(--ivory) !important; font-family: var(--font-body); color: var(--ink);
}
.kit-form .formkit-form[data-uid="59dbdb42d8"] [data-style="minimal"] { padding: clamp(1.25rem, 4vw, 2.25rem); }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-header { text-align: left; margin: 0 0 0.5rem; color: var(--ink) !important; font-size: inherit !important; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-header h2 {
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; line-height: 1.25; margin: 0;
}
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-header strong { font-weight: inherit; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-subheader { text-align: left; margin: 0 0 1.5rem; color: var(--muted) !important; font-size: var(--step-0) !important; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-subheader p { margin: 0; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-fields { margin: 0; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field { display: flex; flex-wrap: wrap; align-items: baseline; margin: 0 0 1.25rem; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field::before { order: -2; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.4rem; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field::after { order: -1; font-size: 0.875rem; color: var(--muted); margin: 0 0 0.4rem 0.35rem; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field:has([name="email_address"])::before { content: "Email"; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field:has([name="email_address"])::after { content: "(required)"; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field:has([name="fields[first_name]"])::before { content: "First name"; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field:has([name="fields[first_name]"])::after { content: "(optional)"; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field:has([name="fields[website]"])::before { content: "Website"; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-field:has([name="fields[website]"])::after { content: "(optional)"; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-input {
  flex: 1 1 100%; width: 100%;
  font: inherit; font-size: 1rem; color: var(--ink) !important;
  background: var(--paper); border: 1.5px solid var(--line-strong) !important;
  border-radius: var(--radius) !important; padding: 0.75rem 0.85rem; min-height: 3rem;
}
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-input::placeholder { color: var(--muted); opacity: 1; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-input:focus-visible {
  outline: 3px solid var(--forest); outline-offset: 1px; border-color: var(--forest) !important;
}
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-submit {
  flex: 0 0 auto; min-width: 14rem; margin: 0.25rem 0 0;
  font: inherit; font-weight: 600 !important;
  background-color: var(--forest) !important; border-radius: var(--radius) !important;
}
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-submit:hover { background-color: var(--forest-deep) !important; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-submit:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-submit > span { padding: 0.85rem 1.5rem; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-guarantee { text-align: left; margin: 1rem 0 0; color: var(--muted) !important; font-size: 0.875rem !important; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-alert { text-align: left; }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-alert-success { background: var(--sage); border-color: var(--forest); color: var(--ink); }
.kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-powered-by-convertkit { margin: 0; }
@media (max-width: 479px) { .kit-form .formkit-form[data-uid="59dbdb42d8"] .formkit-submit { width: 100%; } }

/* About: portrait (source is 200px, so keep it at or below that size) */
.name-plate-photo {
  display: block;
  width: clamp(7rem, 20vw, 9rem); height: auto; aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

/* ---- Review round: services scope, project workflows, booking fallback ---- */
.scope-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.scope-list li {
  font-size: 0.875rem; line-height: 1.3;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  background: var(--sage); color: var(--ink);
}

.project-head { display: grid; gap: 1.25rem; align-content: start; }
.project-title { display: flex; gap: 1rem; align-items: baseline; }
.mini-flow {
  margin: 0; max-width: 26rem;
  padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ivory);
}
.mini-flow .flow-tag { display: inline-block; margin-bottom: 0.85rem; }
.mini-steps { list-style: none; display: grid; gap: 0; }
.mini-steps li {
  position: relative; padding: 0 0 0.85rem 1.4rem;
  font-size: 0.9375rem; line-height: 1.4;
}
.mini-steps li::before {
  content: ""; position: absolute; left: 0; top: 0.3em;
  width: 0.65rem; height: 0.65rem; border-radius: 50%;
  border: 2px solid var(--forest); background: var(--paper);
}
.mini-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(0.325rem - 1px); top: calc(0.3em + 0.75rem); bottom: 0.1rem;
  width: 2px; background: rgba(37, 92, 80, 0.35);
}
.mini-steps li:last-child { padding-bottom: 0; }
.mini-steps li:last-child::before { background: var(--forest); }
.mini-exception {
  margin-top: 0.85rem; padding: 0.55rem 0.7rem;
  border: 1.5px dashed var(--terracotta); border-radius: var(--radius);
  font-size: 0.875rem; line-height: 1.4; background: var(--paper);
}
.mini-cond { font-weight: 600; color: var(--terracotta-text); }

.btn-light { background: var(--ivory); color: var(--ink); }
.btn-light:hover { background: #fff; }
.booking-head { align-items: center; }
.booking-frame { position: relative; }
.booking-placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 0.4rem; text-align: center;
  padding: 1.5rem; color: var(--muted);
}
.booking-placeholder p:first-child { font-weight: 600; color: var(--ink); }
.booking-placeholder-hint { font-size: 0.9375rem; max-width: 24rem; }
.booking-widget { position: relative; z-index: 1; }
@media (max-width: 479px) { .booking-head .btn { width: 100%; } }

/* Contact: no calendar above the form any more */
.contact .contact-grid { border-top: 0; padding-top: 0; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.contact-copy .contact-or { margin-top: 2rem; margin-bottom: 0.75rem; font-size: var(--step-0); color: var(--on-dark); font-weight: 600; }
