/* Homekeep Hiring: site styles. Black and white plus one green accent (see DESIGN.md). */

@font-face {
  font-family: "Bitter";
  src: url("/assets/fonts/bitter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --graphite: #3b3b3b;
  --slate: #666666;
  --fog: #f3f3f1;
  --rule: #d9d9d6;
  --green: #1f4d3a;       /* front-door green, the one accent */
  --green-tint: #e6eee9;  /* light green band */
  --green-rule: #c9d8cf;

  --serif: "Bitter", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --max: 1200px;
  --space-section: clamp(72px, 11vw, 144px);
  --header-h: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --header-h: 80px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--paper); }

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

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.band-ink :focus-visible, .band-green :focus-visible, .site-footer :focus-visible { outline-color: var(--paper); }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--graphite); max-width: 34em; }
.small { font-size: 0.8125rem; color: var(--slate); line-height: 1.5; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 26px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; border: 2px solid var(--ink); border-radius: 2px;
  cursor: pointer; transition: background-color 160ms ease-out, color 160ms ease-out;
  touch-action: manipulation;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-outline { background: transparent; color: var(--ink); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--paper); color: var(--ink); }
  .btn-outline:hover { background: var(--ink); color: var(--paper); }
}
.btn { transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.band-ink .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (hover: hover) { .band-ink .btn-primary:hover { background: var(--ink); color: var(--paper); } }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* "Coming soon" fallback for booking and form links */
.soon {
  border: 2px solid var(--ink); padding: 18px 20px; max-width: 30em;
  font-size: 1rem; line-height: 1.5; color: var(--ink);
}
.soon strong { font-weight: 600; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: block; flex: none; }
.brand img { height: 32px; width: auto; }
@media (min-width: 768px) { .brand img { height: 40px; } }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.nav-list a {
  font-size: 0.9375rem; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
@media (hover: hover) { .nav-list a:hover { border-bottom-color: var(--rule); } }
.nav-list a[aria-current="page"] { border-bottom-color: var(--ink); }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 14px; margin-right: -14px;
  background: none; border: 0; border-radius: 2px; cursor: pointer;
  font: 600 0.9375rem/1 var(--sans); color: var(--ink);
}
.nav-toggle-bars { position: relative; width: 20px; height: 12px; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink);
  transition: transform 200ms ease-out, top 200ms ease-out;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 5px; transform: rotate(-45deg); }

@media (max-width: 767px) {
  /* Without JavaScript the links simply wrap under the logo. */
  html:not(.js) .header-inner { height: auto; flex-wrap: wrap; padding-top: 14px; padding-bottom: 10px; }
  html:not(.js) .nav-list { flex-wrap: wrap; gap: 4px 20px; }

  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 24px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 180ms ease-out, transform 180ms ease-out, visibility 0s linear 180ms;
  }
  .js .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list li + li { border-top: 1px solid var(--rule); }
  .js .nav-list a { display: block; padding: 16px 0; font-size: 1.125rem; border-bottom: 0; }
  .js .nav-list a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
}

/* ---------- Hero and roofline ---------- */

.hero {
  overflow: clip;
  padding: clamp(24px, 3.5vw, 40px) 0 clamp(40px, 5vw, 64px);
  /* Width of the "house": the photo that sits under the gable.
     On phones it's the full content width; on desktop it's the right column,
     capped by screen height so the whole house fits in the first screen. */
  --content-w: min(calc(100vw - var(--gutter) * 2), var(--max));
  --house-w: calc(var(--content-w) * 0.88);
  --overhang: calc(var(--house-w) * 0.05);
  --roof-stroke: max(14px, calc(var(--house-w) * 0.045));
  /* left edge of the gable, measured from the left of the screen */
  --house-x: calc(max(var(--gutter), (100vw - var(--max)) / 2) + (var(--content-w) - var(--house-w)) / 2);
}
@media (min-width: 1000px) {
  .hero {
    --house-w: min(calc(var(--content-w) * 0.4), 500px, calc((100svh - var(--header-h) - 96px) / 1.48));
    --house-x: calc(max(var(--gutter), (100vw - var(--max)) / 2) + var(--content-w) - var(--house-w));
  }
}

.roof {
  position: relative;
  /* full-bleed, so the eave line can run off both edges of the screen */
  width: 100vw; margin-left: calc(50% - 50vw);
  /* gable height is half its width at a 45 degree pitch, plus room for the peak's miter */
  height: calc((var(--house-w) + var(--overhang) * 2) / 2 + var(--roof-stroke) * 0.75);
}
.roof svg {
  position: absolute; bottom: calc(var(--roof-stroke) / 2);
  left: calc(var(--house-x) - var(--overhang));
  width: calc(var(--house-w) + var(--overhang) * 2);
  height: auto; aspect-ratio: 2 / 1;
  overflow: visible;
}
.roof path {
  fill: none; stroke: var(--ink); stroke-width: var(--roof-stroke);
  stroke-linejoin: miter; stroke-miterlimit: 4;
  vector-effect: non-scaling-stroke;
}

/* Draws once on load, left to right, like a pen across the page. */
.roof-draw { clip-path: inset(-50% 0 -50% 0); }
.motion .roof-draw { animation: roof-draw 1100ms var(--ease-out) 120ms both; }
@keyframes roof-draw {
  from { clip-path: inset(-50% 100% -50% 0); }
  to   { clip-path: inset(-50% 0 -50% 0); }
}

/* The house: photo directly under the eave, walls narrower than the roof */
.hero-body { display: grid; gap: 28px; margin-top: calc(var(--roof-stroke) / 2 + 6px); }
.house-wall { margin: 0 auto; width: var(--house-w); aspect-ratio: 16 / 10; overflow: hidden; background: var(--green-tint); border-radius: clamp(12px, 1.6vw, 20px); }
.house-wall img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.motion .house-wall img { animation: wall-in 700ms var(--ease-out) 200ms both; }
@keyframes wall-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

.hero-copy { display: grid; gap: 20px; align-content: start; }
.hero h1 {
  font-size: clamp(2.5rem, 10.5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
}
.hero .lede { max-width: 30em; }
.hero .btn-row { margin-top: 4px; }

@media (min-width: 1000px) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr) var(--house-w);
    column-gap: clamp(48px, 6vw, 96px);
    align-items: start;
  }
  .house-wall { grid-column: 2; grid-row: 1; aspect-ratio: 1 / 0.92; margin: 0; }
  .hero-copy { grid-column: 1; grid-row: 1; padding-top: clamp(16px, 2.5vw, 36px); }
  .hero h1 { font-size: clamp(3rem, 4.6vw, 4.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .motion .roof-draw, .motion .house-wall img { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Sections ---------- */

.section { padding: var(--space-section) 0; }
/* two plain white sections in a row share one gap */
.section:not(.band-fog):not(.band-ink):not(.band-green) + .section:not(.band-fog):not(.band-ink):not(.band-green) { padding-top: 0; }
.band-fog { background: var(--green-tint); }
.band-fog .step, .band-fog .faq details, .band-fog .lead-list li { border-color: var(--green-rule); }
.band-green { background: var(--green); color: #dce8e1; }
.band-green h2, .band-green h3, .band-green a { color: var(--paper); }
.band-green .guarantee-num { color: var(--paper); }
.band-ink { background: var(--ink); color: #d6d6d6; }
.band-ink h2, .band-ink h3 { color: var(--paper); }
.band-ink a { color: var(--paper); }

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { max-width: 16ch; }
.section-head.wide h2 { max-width: 22ch; }

/* The problem: three sourced facts, divided by rules */
.facts { list-style: none; margin: 0; padding: 0; display: grid; }
.fact { padding: 28px 0; border-top: 1px solid var(--rule); display: grid; gap: 16px; align-content: start; }
.fact:last-child { border-bottom: 1px solid var(--rule); }
.fact-text {
  font-family: var(--serif); color: var(--ink); font-weight: 700;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.25; letter-spacing: -0.01em;
}
.fact-text b { font-weight: 800; color: var(--green); }
.fact .small a { color: var(--slate); }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .fact { padding: 0 clamp(24px, 3vw, 40px); border-top: 0; border-left: 1px solid var(--rule); }
  .fact:first-child { padding-left: 0; border-left: 0; }
  .fact:last-child { padding-right: 0; border-bottom: 0; }
}

/* How it works: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: 16px;
  padding: 28px 0; border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  content: counter(step);
  font-family: var(--serif); font-weight: 800; color: var(--green);
  font-size: 2.5rem; line-height: 0.9; font-variant-numeric: lining-nums tabular-nums;
}
.step::before { grid-column: 1; grid-row: 1 / span 2; }
.step h3 { grid-column: 2; margin-bottom: 8px; }
.step p { grid-column: 2; max-width: 40em; }
@media (min-width: 768px) {
  .step { grid-template-columns: 6rem minmax(0, 18rem) minmax(0, 1fr); column-gap: clamp(24px, 4vw, 56px); padding: 36px 0; }
  .step::before { font-size: 3.5rem; grid-row: 1; }
  .step h3 { margin-bottom: 0; }
  .step p { grid-column: 3; grid-row: 1; }
}

/* The 90-day guarantee */
.guarantee { display: grid; gap: 24px; align-items: center; }
.guarantee-num {
  font-family: var(--serif); font-weight: 800; color: var(--paper);
  font-size: clamp(9rem, 34vw, 22rem); line-height: 0.78; letter-spacing: -0.05em;
  margin: 0 0 0 -0.04em; font-variant-numeric: lining-nums;
}
.guarantee-copy { max-width: 32em; }
.guarantee-copy h2 { margin-bottom: 20px; }
.guarantee-copy p { font-size: 1.125rem; }
.guarantee-copy .more { margin-top: 28px; font-weight: 600; }
@media (min-width: 900px) {
  .guarantee { grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(48px, 7vw, 112px); }
}

/* Autism and IDD */
.split { display: grid; gap: 32px; }
.split h2 { max-width: 14ch; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(48px, 7vw, 112px); }
}
.ticks { list-style: none; margin: 24px 0; padding: 0; }
.ticks li { position: relative; padding: 12px 0 12px 28px; border-top: 1px solid var(--rule); color: var(--ink); font-weight: 500; }
.ticks li:last-child { border-bottom: 1px solid var(--rule); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: calc(12px + 0.82em - 4px);
  width: 8px; height: 8px; background: var(--green);
}

/* Who we work with */
.who { list-style: none; margin: 0; padding: 0; }
.who li { display: grid; gap: 6px; padding: 24px 0; border-top: 2px solid var(--ink); }
.who li:last-child { border-bottom: 1px solid var(--rule); }
.who li + li { border-top-width: 1px; border-top-color: var(--rule); }
.who h3 { font-size: clamp(1.5rem, 3vw, 2.125rem); font-weight: 800; }
.who p { max-width: 36em; }
@media (min-width: 900px) {
  .who li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(48px, 7vw, 112px); align-items: baseline; padding: 32px 0; }
}

/* Closing call to action */
.closing h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); max-width: 14ch; }
.closing .lede { margin: 24px 0 36px; }
.closing .alt { margin-top: 28px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #bdbdbd; padding: clamp(56px, 8vw, 96px) 0 40px; font-size: 0.9375rem; }
.site-footer a { color: var(--paper); text-decoration: none; }
@media (hover: hover) { .site-footer a:hover { text-decoration: underline; } }
.footer-top { display: grid; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid #333; }
.footer-logo img { height: 32px; width: auto; }
.footer-cols { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (min-width: 900px) { .footer-cols { grid-template-columns: minmax(120px, 1fr) minmax(230px, 1.6fr) minmax(120px, 1fr); } }
.footer-cols h2 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; color: #8f8f8f; letter-spacing: 0; margin-bottom: 12px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-cols li a { display: inline-block; padding: 6px 0; }
.footer-bottom { padding-top: 28px; display: grid; gap: 8px; font-size: 0.8125rem; color: #8f8f8f; }
@media (min-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(48px, 7vw, 112px); }
  .footer-bottom { grid-template-columns: 1fr auto; }
}

/* ---------- Inner pages ---------- */

.page-intro { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.page-intro h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); line-height: 1.02; letter-spacing: -0.025em; max-width: 15ch; }
.page-intro .lede { margin: 24px 0 36px; }
.page-intro.mission h1 { max-width: 20ch; font-size: clamp(2.25rem, 5.4vw, 4.25rem); }
.page-intro.mission .lede { margin-bottom: 0; }

.prose { max-width: 38em; }
.prose p + ul, .prose ul + p { margin-top: 1em; }
.prose h3 { margin: 40px 0 12px; }

.lead-list { list-style: none; margin: 0 0 28px; padding: 0; }
.lead-list li { padding: 16px 0; border-top: 1px solid var(--rule); }
.lead-list li:last-child { border-bottom: 1px solid var(--rule); }
.lead-list strong { color: var(--ink); font-weight: 600; }

.note { margin-top: 28px; padding: 20px 22px; background: var(--paper); border: 1px solid var(--rule); }
.band-fog .note { border-color: var(--rule); }
.note strong { color: var(--ink); }

/* Who does what */
.duties { width: 100%; border-collapse: collapse; }
.duties th, .duties td { text-align: left; vertical-align: top; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); }
.duties thead th { font-family: var(--serif); font-weight: 800; color: var(--ink); font-size: clamp(1.25rem, 2.2vw, 1.625rem); padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.duties td { width: 50%; color: var(--ink); }
.duties td + td, .duties th + th { padding-left: 16px; border-left: 1px solid var(--rule); }
@media (min-width: 768px) {
  .duties th, .duties td { padding: 20px 28px 20px 0; }
  .duties td + td, .duties th + th { padding-left: 28px; }
}

/* Simple bulleted list for exclusions */
.plain-list { margin: 12px 0 0; padding-left: 1.25em; }
.plain-list li { padding: 4px 0; }
.plain-list li::marker { color: var(--ink); }

/* FAQ */
.faq { border-top: 2px solid var(--ink); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 48px 22px 0;
  font-family: var(--serif); font-weight: 700; color: var(--ink);
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 16px; height: 2px; background: var(--ink);
  transition: transform 200ms ease-out;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq .answer { padding: 0 0 24px; max-width: 40em; }

/* Forms and booking slots */
.form-embed { display: block; width: 100%; height: 1500px; border: 0; background: var(--paper); }
.slot-block + .slot-block { margin-top: 36px; }
.form-legal { margin-top: 20px; }

/* Caregiver promise */
.promise {
  border: 2px solid var(--ink); padding: 20px 22px; max-width: 34em; margin: 28px 0 32px;
  font-size: 1.125rem; line-height: 1.5; color: var(--ink);
}
.promise strong { display: block; font-family: var(--serif); font-weight: 800; font-size: 1.375rem; margin-bottom: 4px; }

/* Founder: house-shaped photo frame (the gable, used once more) */
.founder { display: grid; gap: 28px; align-items: end; }
.house-frame { width: min(100%, 300px); }
.house-frame svg { width: 100%; height: auto; }
.house-frame .roofline { fill: none; stroke: var(--ink); stroke-width: 14; stroke-linejoin: miter; }
.house-frame .wall { fill: var(--green-tint); }
.founder-name { font-family: var(--serif); font-weight: 800; color: var(--ink); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.1; }
.founder-role { color: var(--slate); margin-top: 4px; }
.founder p.contact-line { margin-top: 20px; }
@media (min-width: 768px) { .founder { grid-template-columns: 300px minmax(0, 1fr); column-gap: 56px; } }

/* Contact */
.contact-grid { display: grid; gap: 56px; }
.contact-grid h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 20px; }
.contact-grid .email { font-size: 1.125rem; font-weight: 600; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(48px, 7vw, 112px); } }
.contact-aside { padding-top: 28px; border-top: 2px solid var(--ink); }
@media (min-width: 900px) { .contact-aside { padding-top: 0; border-top: 0; padding-left: clamp(28px, 4vw, 48px); border-left: 1px solid var(--rule); } }

/* Spacing helpers (no inline styles, so the CSP can block them) */
.mt-0 { margin-top: 0 !important; } .mt-16 { margin-top: 16px !important; } .mt-20 { margin-top: 20px !important; }
.mt-24 { margin-top: 24px !important; } .mt-28 { margin-top: 28px !important; } .mt-40 { margin-top: 40px !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px !important; } .mb-12 { margin-bottom: 12px !important; }
.pt-0 { padding-top: 0 !important; }
.footer-bottom p + p { margin-top: 0; }

/* Legal pages */
.legal-intro { padding-bottom: clamp(32px, 5vw, 56px); }
.legal > * { max-width: 44rem; }
.legal h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin: 40px 0 10px; }
.legal h2:first-child { margin-top: 0; }
.legal ul { margin: 0; padding-left: 1.25em; }
.legal li { padding: 4px 0; }
.legal li::marker { color: var(--green); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal p + ul, .legal ul + p { margin-top: 12px; }

/* =========================================================
   Agency-only rebuild: header button, photos, line drawings,
   pull lines, timeline and motion
   ========================================================= */

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

/* Header "Book a call" */
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 0.9375rem; }
.nav-list { align-items: center; }
.nav-list .nav-cta a { border-bottom: 2px solid var(--ink); color: var(--paper); padding: 10px 18px; }
@media (hover: hover) and (pointer: fine) { .nav-list .nav-cta a:hover { color: var(--ink); border-bottom-color: var(--ink); } }
@media (min-width: 768px) { .nav-list .nav-cta { margin-left: 4px; } }
@media (max-width: 767px) {
  .js .nav-list .nav-cta { order: -1; padding: 8px 0 16px; border-top: 0; }
  .js .nav-list .nav-cta + li { border-top: 0; }
  .js .nav-list .nav-cta a { display: flex; width: 100%; padding: 14px 18px; font-size: 1rem; text-decoration: none; }
  html:not(.js) .nav-list .nav-cta { width: 100%; }
}

/* Photos: rounded like the hero's house wall */
.photo { margin: 0; overflow: hidden; border-radius: clamp(12px, 1.6vw, 20px); background: var(--green-rule); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.split-media { display: grid; gap: 28px; align-content: start; }
.photo-split { margin-top: 4px; }
.intro-grid { display: grid; gap: 36px; align-items: center; }
.intro-grid .lede { max-width: 32em; }
@media (min-width: 900px) {
  .intro-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(48px, 6vw, 96px); }
}
.closing-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .closing-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(48px, 6vw, 96px); }
}

/* Oversized pull lines */
.pull-band { padding: clamp(8px, 2vw, 24px) 0 clamp(72px, 10vw, 128px); }
.pull {
  font-family: var(--serif); font-weight: 800; color: var(--ink);
  font-size: clamp(2rem, 5.2vw, 4.25rem); line-height: 1.05; letter-spacing: -0.025em;
  max-width: 20ch; text-wrap: balance;
}
.pull-accent { color: var(--green); }

/* Line drawings: thick strokes, square ends, the logo's 45 degree angles */
.line-art { width: 64px; height: 64px; flex: none; overflow: visible; }
.line-art path, .line-art rect { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: square; stroke-linejoin: miter; }
.line-art .ic-accent { stroke: var(--green); }
.step .line-art { grid-column: 1; grid-row: 3; width: 40px; height: 40px; margin-top: 14px; }
.step::before { grid-row: 1 / span 2; }
@media (min-width: 1000px) {
  .step { grid-template-columns: 6rem minmax(0, 18rem) minmax(0, 1fr) 64px; }
  .step .line-art { width: 64px; height: 64px; grid-column: 4; grid-row: 1; align-self: start; margin-top: -4px; }
}

/* How it works: track and fill that runs down beside the numbers */
.steps-wrap { position: relative; }
.steps-track { display: none; }
.motion .steps-wrap { padding-left: 28px; }
.motion .steps-track { display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--green-rule); }
.motion .steps-fill { position: absolute; left: -1px; top: 0; width: 4px; height: 100%; background: var(--green); transform-origin: top center; transform: scaleY(0); will-change: transform; }
.motion .step::before { color: var(--green-rule); transition: color 300ms ease; }
.motion .step.is-reached::before { color: var(--green); }
@media (min-width: 768px) { .motion .steps-wrap { padding-left: 40px; } }

/* Timeline: a hire, from job ad to day 90 */
.timeline-wrap { position: relative; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; position: relative; }
.tl-item { position: relative; padding-left: 36px; }
.tl-node { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; background: var(--green); transform: rotate(45deg); }
.tl-when { font-family: var(--serif); font-weight: 800; color: var(--ink); font-size: 1.25rem; line-height: 1.2; }
.tl-what { margin-top: 6px; max-width: 22em; }
.tl-track { position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: var(--green-rule); }
.tl-fill { position: absolute; inset: 0; background: var(--green); transform-origin: top center; }
@media (min-width: 1000px) {
  .timeline { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
  .tl-item { padding-left: 0; padding-top: 40px; }
  .tl-node { top: 4px; left: 0; }
  .tl-track { left: 0; right: 0; top: 10px; bottom: auto; width: auto; height: 2px; }
  .tl-fill { transform-origin: left center; }
}
.motion .will-fill .tl-fill { transform: scaleY(0); transition: transform 1200ms linear; }
@media (min-width: 1000px) { .motion .will-fill .tl-fill { transform: scaleX(0); } }
.motion .will-fill.is-filled .tl-fill { transform: none; }
.motion .will-fill .tl-node { transform: rotate(45deg) scale(0.4); opacity: 0; transition: transform 300ms var(--ease-out), opacity 300ms var(--ease-out); transition-delay: calc(var(--i, 0) * 200ms); }
.motion .will-fill.is-filled .tl-node { transform: rotate(45deg); opacity: 1; }

/* Guarantee on the agencies page (green band, split layout) */
.band-green .lede-on-green { color: var(--paper); }
.band-green .plain-list li::marker { color: var(--paper); }

/* Contact rows */
.contact-row { display: grid; gap: 2px; margin-top: 16px; }
.contact-row .small { color: var(--slate); }
.mb-20 { margin-bottom: 20px !important; }
.book-slot .soon { margin-top: 0; }

/* Count-ups never jitter */
[data-count] { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Motion (only when .motion is set by site.js) ---------- */
.motion .will-reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.motion .will-reveal.is-in { opacity: 1; transform: none; }
/* Photos wipe up into place instead of sliding */
/* The frame stays put (so it can be observed); the image inside wipes up and settles. */
.motion .will-reveal[data-reveal="photo"] { opacity: 1; transform: none; }
.motion .will-reveal[data-reveal="photo"] img { clip-path: inset(100% 0 0 0); transform: scale(1.06); transition: clip-path 700ms var(--ease-out), transform 1200ms var(--ease-out); }
.motion .will-reveal[data-reveal="photo"].is-in img { clip-path: inset(0 0 0 0); transform: none; }
/* Line drawings draw their strokes */
.motion .will-draw path, .motion .will-draw rect { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 700ms var(--ease-out); }
.motion .will-draw.is-drawn path, .motion .will-draw.is-drawn rect { stroke-dashoffset: 0; }

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

/* Agencies intro photo is above the fold: fade it in like the hero photo */
.motion .photo-intro img { animation: wall-in 700ms var(--ease-out) 150ms both; }

/* Large line drawings in empty columns (desktop) */
.big-art { display: none; width: 100%; max-width: 320px; height: auto; overflow: visible; }
.big-art path, .big-art rect { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: square; stroke-linejoin: miter; }
.big-art .ic-accent { stroke: var(--green); }
.pull-grid { display: grid; gap: 32px; align-items: center; }
.contact-intro { display: grid; gap: 32px; align-items: end; }
@media (min-width: 900px) {
  .big-art { display: block; }
  .pull-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: clamp(48px, 6vw, 96px); }
  .pull-grid .big-art { justify-self: end; }
  .split-media .big-art { max-width: 260px; margin-top: 12px; }
  .contact-intro { grid-template-columns: minmax(0, 1fr) 300px; }
}
.motion .will-draw .ic-accent { transition-delay: 300ms; }

/* About founder frame: the roof draws itself once */
.house-frame .will-draw .roofline { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1100ms var(--ease-out); }
.house-frame .will-draw.is-drawn .roofline { stroke-dashoffset: 0; }
