/* LA Southern Painting, the "paint chip wall" demo.
   Order: tokens -> base -> nav -> rail -> chapters and word openers -> chip wall hero -> home blocks -> service cards
   -> before and after slider -> gallery and lightbox -> wizard -> forms -> contact -> footer -> 404 -> max-width 1179 -> max-width 939
   -> prefers-reduced-motion (standalone) -> ONE append-only mobile block (max-width 760px) at the end.
   Signature: paint chip cards (a color block over a cream label strip) that turn into the job photos as you scroll. Three typefaces:
   Alfa Slab One for the words, Hanken Grotesk for text, Kaushan Script for the brush accent. Lime is for actions and the accent only. */

/* ---------- tokens ---------- */
:root {
  --paper: #FAF6EC;
  --paper-2: #F1EAD9;
  --ground: #1E3526;
  --ground-2: #27432F;
  --deep: #152619;
  --lime: #B5D334;
  --lime-hi: #C9E24E;
  --lime-ink: #4F6A0B;
  --ink: #15191A;
  --ink-2: #3E4A40;
  --muted: #5A6559;
  --mist: #B9C2B4;
  --error: #8A2E1C;
  --line-d: rgba(250, 246, 236, .16);
  --line-p: rgba(21, 25, 26, .16);
  --slab: "Alfa Slab One", "Rockwell Extra Bold", "Arial Black", serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --script: "Kaushan Script", "Brush Script MT", cursive;
  --nav-h: 4.5rem;
  --rail-w: 15rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 38rem;
  --radius: .375rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 1rem); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--ground); color: var(--paper); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 2px; }
[data-theme="paper"] :focus-visible { outline-color: var(--lime-ink); }
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, h4 { font-family: var(--slab); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--lime); color: var(--ink); padding: .6rem 1rem; border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.skip:focus { top: 1rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .7rem 1.35rem; border-radius: 999px; border: 1px solid var(--line-d); background: transparent; color: inherit; font: 600 .95rem/1 var(--sans); text-decoration: none; letter-spacing: .01em; transition: background-color .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--lime); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.lime:hover { background: var(--lime-hi); border-color: var(--lime-hi); }
.btn.small { min-height: 2.4rem; padding: .5rem 1rem; font-size: .88rem; }
[data-theme="paper"] .btn { border-color: var(--line-p); }
[data-theme="paper"] .btn:hover { border-color: var(--lime-ink); }
[data-theme="paper"] .btn.lime { border-color: var(--lime); }
.btn[disabled] { opacity: .5; cursor: default; }
.link { color: inherit; text-decoration: underline; text-decoration-color: var(--lime); }
[data-theme="paper"] .link { text-decoration-color: var(--lime-ink); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; background: rgba(21, 38, 25, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-d); }
.nav-in { height: var(--nav-h); display: flex; align-items: center; gap: 2rem; padding: 0 var(--gutter) 0 1.75rem; }
.brand { display: inline-flex; align-items: baseline; gap: .45rem; text-decoration: none; color: var(--paper); white-space: nowrap; }
.brand .b1 { font: 400 1.35rem/1 var(--slab); letter-spacing: -.01em; }
.brand .b2 { font: 400 1.5rem/1 var(--script); color: var(--lime); }
.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a, .strip a { text-decoration: none; font-size: .95rem; color: var(--mist); padding: .35rem 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav-links a:hover, .strip a:hover { color: var(--paper); }
.nav-links a[aria-current="page"], .strip a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--lime); }
.nav-phone { text-decoration: none; font-variant-numeric: tabular-nums; color: var(--paper); font-size: .95rem; white-space: nowrap; }
.nav .btn[aria-current="page"] { background: transparent; color: var(--lime); }
.strip { display: none; }

/* ---------- rail (desktop contents column) ---------- */
.rail { position: fixed; top: var(--nav-h); bottom: 0; left: 0; width: var(--rail-w); z-index: 40; background: var(--deep); border-right: 1px solid var(--line-d); padding: 2.5rem 1.75rem 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.rail-title { font: 400 1.2rem/1.15 var(--slab); color: var(--paper); }
.rail-lede { font-size: .88rem; line-height: 1.5; color: var(--mist); }
.toc { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .1rem; }
.toc a { display: block; text-decoration: none; color: var(--mist); font-size: .93rem; padding: .45rem 0 .45rem .9rem; border-left: 1px solid var(--line-d); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--paper); }
.toc a.on { color: var(--paper); border-left-color: var(--lime); }
.rail-foot { margin-top: auto; display: grid; gap: .75rem; }
.rail-foot a:first-child { text-decoration: none; color: var(--paper); font-variant-numeric: tabular-nums; }
.rail-foot small { color: var(--mist); font-size: .8rem; line-height: 1.45; }

/* ---------- chapters and the word openers ---------- */
.page { margin-left: var(--rail-w); padding-top: var(--nav-h); }
.chapter { position: relative; padding: clamp(4.5rem, 9vw, 8.5rem) var(--gutter); }
.chapter[data-theme="ground"] { background: var(--ground); color: var(--paper); }
.chapter[data-theme="deep"] { background: var(--deep); color: var(--paper); }
.chapter[data-theme="paper"] { background: var(--paper); color: var(--ink); }
.col { max-width: 72rem; margin: 0 auto; }
.opener { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.opener .k { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); margin-bottom: .9rem; }
[data-theme="paper"] .opener .k { color: var(--lime-ink); }
.word { font: 400 clamp(3.4rem, 1rem + 7.5vw, 7.5rem)/.95 var(--slab); letter-spacing: -.01em; margin: 0; text-wrap: nowrap; }
.word.long { font-size: clamp(3rem, 1rem + 5.6vw, 6rem); text-wrap: balance; }
.lede { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.45; max-width: 40rem; color: var(--mist); }
[data-theme="paper"] .lede, [data-theme="paper"] .muted { color: var(--ink-2); }
.dcap { font: 400 1.9em/.8 var(--script); color: var(--lime); margin-right: .04em; }
[data-theme="paper"] .dcap { color: var(--lime-ink); }
.muted { color: var(--mist); }
.fine { font-size: .88rem; color: var(--muted); }
[data-theme="ground"] .fine, [data-theme="deep"] .fine { color: var(--mist); }
.acts { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.section-foot { margin-top: 3rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

/* ---------- the paint chip wall (home hero) ---------- */
/* Eighteen chips pinned behind the lockup, six by three. Each chip is a solid color sampled from its photo, over a cream label strip.
   JS writes --p (0 to 1) on .hero as the first half screen scrolls; each chip carries its own threshold --t, so they turn one by one. */
.hero { display: block; position: relative; min-height: 145svh; padding: 0 var(--gutter); }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: clip; background: var(--deep); }
.chips { position: sticky; top: 0; height: 100svh; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; }
.chip { position: relative; margin: 0; overflow: hidden; background: var(--chip, var(--ground-2)); display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.chip img { width: 100%; height: 100%; object-fit: cover; min-height: 0; opacity: clamp(0, calc((var(--p, 0) - var(--t, 0)) / .14), 1); }
html:not(.js) .chip img { opacity: 1; }
.chip figcaption { background: var(--paper); color: var(--ink); font: 600 .72rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: .55rem .6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-bg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48%; background: linear-gradient(transparent, var(--deep)); pointer-events: none; }
.hero > .col { position: relative; z-index: 1; min-height: 100svh; display: grid; align-content: end; padding: calc(var(--nav-h) + 2rem) 0 4.5rem; }
.hero-copy { max-width: 46rem; display: grid; gap: 1.2rem; }
/* the eyebrow sits on bare chips, above the bottom scrim, so it carries the same plate as .hero-facts to stay legible on a light chip */
.hero-copy .k { justify-self: start; padding: .5rem .8rem; border: 1px solid var(--line-d); background: rgba(21, 38, 25, .78); font: 600 .8rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.hero-copy .k a { color: var(--paper); text-decoration: none; }
.hero-copy .k a:hover { text-decoration: underline; }
.hero-title { font: 400 clamp(3rem, 1.5rem + 5.5vw, 6.5rem)/.95 var(--slab); color: var(--paper); letter-spacing: -.01em; }
.hero-title em { display: block; font: 400 .52em/1.1 var(--script); font-style: normal; color: var(--lime); margin-top: .12em; }
.hero-copy .lede { color: var(--paper); max-width: 36rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .4rem .5rem; }
.hero-facts > span { display: inline-block; padding: .45rem .7rem; border: 1px solid var(--line-d); background: rgba(21, 38, 25, .7); font: 700 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--paper); }
.hero-facts a { text-decoration: none; }
.hero-facts a:hover { text-decoration: underline; text-decoration-color: var(--lime); }

/* ---------- home blocks ---------- */
.since-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.since-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.since-photos figure:last-child { margin-top: 3rem; }
.claims { display: grid; gap: 1.5rem; margin-top: 2rem; }
.claims div { border-top: 1px solid var(--line-d); padding-top: 1.1rem; display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; }
.claims b { font: 400 1.25rem/1.15 var(--slab); }
.claims p { color: var(--mist); }
[data-theme="paper"] .claims div { border-top-color: var(--line-p); }
[data-theme="paper"] .claims p { color: var(--ink-2); }
.side-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.side-grid .btn { margin-top: 1.75rem; }
.svc-list { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; }
.svc-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; padding: .7rem 0; border-top: 1px solid var(--line-p); }
.svc-list li:last-child { border-bottom: 1px solid var(--line-p); }
[data-theme="ground"] .svc-list li, [data-theme="deep"] .svc-list li { border-color: var(--line-d); }
.svc-list a { font: 400 1.15rem/1.2 var(--slab); text-decoration: none; }
.svc-list a:hover { text-decoration: underline; text-decoration-color: var(--lime-ink); }
.svc-list span { font-size: .92rem; color: var(--muted); }
[data-theme="ground"] .svc-list span, [data-theme="deep"] .svc-list span { color: var(--mist); }
.tiles-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.tiles-3 figure:nth-child(2) { margin-top: 2.5rem; }
.tile-img { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); aspect-ratio: 4 / 5; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.badge { margin: 2rem 0; padding: 1.5rem 0; border-top: 1px solid var(--line-d); border-bottom: 1px solid var(--line-d); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .4rem 1.25rem; align-items: center; max-width: 30rem; }
.badge b { font: 400 3.6rem/1 var(--slab); color: var(--lime); grid-row: span 2; }
.badge span { color: var(--mist); }
.badge .btn { justify-self: start; }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.cta-acts { display: grid; gap: .75rem; justify-items: start; }
.cta-acts .btn { min-width: 16rem; }

/* ---------- service cards ---------- */
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.25rem; margin: 0 0 1.75rem; }
.group-head h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.group-head p { max-width: 36rem; font-size: 1.02rem; color: var(--ink-2); }
[data-theme="ground"] .group-head p { color: var(--mist); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.card { display: flex; flex-direction: column; gap: .6rem; color: inherit; }
.card figure { margin: 0 0 .6rem; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--paper-2); position: relative; }
.card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover figure img { transform: scale(1.03); }
.card h3 { font-size: 1.45rem; }
.card p { color: var(--ink-2); font-size: .98rem; }
[data-theme="ground"] .card p, [data-theme="deep"] .card p { color: var(--mist); }
.card .free { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line-p); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; font-size: .92rem; }
[data-theme="ground"] .card .free, [data-theme="deep"] .card .free { border-top-color: var(--line-d); }
.card .free span { font: 400 1.05rem/1.2 var(--slab); }

/* ---------- before and after slider ---------- */
.ba-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem 2.5rem; align-items: start; }
.ba { margin: 0; }
.ba.solo { max-width: 34rem; }
.ba-frame { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); user-select: none; -webkit-user-select: none; }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: var(--paper); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: var(--pos, 50%); width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-radius: 50%; background: var(--deep); border: 1px solid var(--lime); color: var(--lime); display: grid; place-items: center; pointer-events: none; transition: transform .2s; }
.ba-knob svg { width: 1.4rem; height: 1.4rem; }
.ba-tag { position: absolute; top: .9rem; padding: .3rem .7rem; border-radius: 999px; background: rgba(21, 38, 25, .8); color: var(--paper); font: 600 .78rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.ba-tag.b { left: .9rem; }
.ba-tag.a { right: .9rem; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; }
.ba-frame:has(.ba-range:focus-visible) { outline: 2px solid var(--lime); outline-offset: 4px; }
[data-theme="paper"] .ba-frame:has(.ba-range:focus-visible) { outline-color: var(--lime-ink); }
.ba-frame:has(.ba-range:focus-visible) .ba-knob { transform: scale(1.12); }
.ba figcaption { margin-top: 1rem; display: grid; gap: .3rem; }
.ba figcaption b { font: 400 1.3rem/1.2 var(--slab); }
.ba figcaption span { color: var(--ink-2); font-size: .97rem; }
[data-theme="ground"] .ba figcaption span, [data-theme="deep"] .ba figcaption span { color: var(--mist); }

/* ---------- gallery and lightbox ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters button { border: 1px solid var(--line-d); background: transparent; border-radius: 999px; padding: .5rem 1rem; font-size: .92rem; color: var(--mist); }
.filters button[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.filters button small { opacity: .75; margin-left: .3rem; font-variant-numeric: tabular-nums; }
.wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 11rem; grid-auto-flow: dense; gap: .9rem; }
.tile { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ground-2); }
.tile.land { grid-column: span 2; grid-row: span 2; }
.tile.port { grid-row: span 2; }
.tile button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.tile button:focus-visible { outline: none; }
.tile:has(button:focus-visible) { outline: 2px solid var(--lime); outline-offset: 3px; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile button:hover img { transform: scale(1.03); }
.lb { border: 0; padding: 0; margin: auto; max-width: min(92vw, 80rem); max-height: 92vh; background: transparent; color: var(--paper); overflow: visible; }
.lb::backdrop { background: rgba(13, 22, 16, .93); }
.lb figure { margin: 0; display: grid; gap: .9rem; justify-items: center; }
.lb img { max-width: min(92vw, 80rem); max-height: 80vh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius); }
.lb figcaption { font-size: 1rem; color: var(--mist); text-align: center; max-width: 44rem; }
.lb-bar { display: flex; justify-content: center; gap: .6rem; margin-top: 1rem; }
.lb-bar .btn { border-color: rgba(250, 246, 236, .3); }

/* ---------- the estimate wizard ---------- */
.existing { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; padding: 1.75rem; border: 1px solid var(--lime-ink); border-radius: var(--radius); margin-bottom: 2.5rem; background: var(--paper-2); }
.existing h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.existing dl { margin: 0; display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .35rem 1rem; font-size: .96rem; }
.existing dt { color: var(--muted); }
.existing dd { margin: 0; }
.ex-acts { display: grid; gap: .6rem; align-content: start; justify-items: stretch; }
.ex-acts .fine { max-width: 16rem; }
.demo-note { font-size: .95rem; line-height: 1.45; color: var(--muted); border-left: 2px solid var(--lime-ink); padding-left: .9rem; max-width: 40rem; margin-bottom: 2rem; }
.wizard { border-top: 1px solid var(--line-p); }
.wsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line-p); }
.wsteps li { padding: 1.1rem 1rem 1.1rem 0; color: var(--muted); display: flex; align-items: baseline; gap: .6rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.wsteps li span { font: 400 1.4rem/1 var(--slab); }
.wsteps li b { font-weight: 600; font-size: .98rem; }
.wsteps li[aria-current="step"] { color: var(--ink); border-bottom-color: var(--lime-ink); }
.wsteps li.done { color: var(--ink); }
.step { border: 0; margin: 0; padding: 2.5rem 0 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.step legend { float: left; width: 100%; padding: 0; margin-bottom: .5rem; font: 400 clamp(1.7rem, 2.8vw, 2.3rem)/1.1 var(--slab); grid-column: 1 / -1; }
.step legend:focus { outline: none; }
.group { display: grid; gap: .7rem; align-content: start; min-width: 0; }
.group.wide { grid-column: 1 / -1; }
.lbl, .group > label { font-weight: 600; font-size: .98rem; }
.lbl small, .group > label small { font-weight: 400; color: var(--muted); margin-left: .35rem; }
.field-in { width: 100%; min-height: 3rem; padding: .7rem .9rem; border: 1px solid rgba(21, 25, 26, .5); border-radius: var(--radius); background: #FFFDF8; color: var(--ink); font-size: 1rem; }
.field-in:focus { border-color: var(--ink); outline: none; }
.field-in:focus-visible { outline: 2px solid var(--lime-ink); outline-offset: 1px; }
.field-in::placeholder { color: var(--muted); opacity: 1; }
textarea.field-in { min-height: 7rem; resize: vertical; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; border: 1px solid rgba(21, 25, 26, .5); background: #FFFDF8; color: var(--ink); border-radius: var(--radius); padding: .65rem .9rem; font-size: .95rem; line-height: 1.25; transition: border-color .15s, background-color .15s; }
.pill small { color: var(--muted); font-size: .8rem; }
.pill:hover { border-color: var(--ink-2); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill[aria-pressed="true"] small { color: var(--mist); }
.pills.svc { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.svc-group + .svc-group { margin-top: 1.5rem; }
.svc-group h3 { font: 400 1.2rem/1.2 var(--slab); margin-bottom: .6rem; }
.asks { grid-column: 1 / -1; display: grid; gap: 1.5rem; }
.ask-set { border-left: 2px solid var(--lime-ink); padding-left: 1.1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 2rem; }
.ask-set > h3 { grid-column: 1 / -1; font: 400 1.15rem/1.2 var(--slab); }
.hint { font-size: .86rem; color: var(--muted); }
.err { display: none; color: var(--error); font-size: .88rem; }
.group.invalid .err { display: block; }
.group.invalid .field-in, .group.invalid .pills .pill { border-color: var(--error); }
.drop { position: relative; display: block; border: 1px dashed var(--ink-2); border-radius: var(--radius); padding: 1.2rem 1.3rem; cursor: pointer; background: var(--paper-2); transition: border-color .15s, background-color .15s; }
.drop:hover, .drop.over { border-color: var(--lime-ink); background: #FFFDF8; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:has(input:focus-visible) { outline: 2px solid var(--lime-ink); outline-offset: 2px; }
.drop-in b { display: block; font-weight: 600; margin-bottom: .2rem; }
.drop-in span { font-size: .88rem; color: var(--muted); }
.files { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.files li { position: relative; width: 5.25rem; }
.files img { width: 5.25rem; height: 5.25rem; object-fit: cover; border-radius: var(--radius); }
.files button { position: absolute; top: -.45rem; right: -.45rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); line-height: 1; font-size: 1rem; }
.cal { grid-column: 1 / -1; }
.cal-head p { font-size: .92rem; color: var(--muted); margin-top: .3rem; }
.days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; }
.day { display: grid; gap: .1rem; justify-items: center; padding: .55rem .2rem; border: 1px solid rgba(21, 25, 26, .5); border-radius: var(--radius); background: #FFFDF8; color: var(--ink); }
.day .d-w { font-size: .72rem; color: var(--muted); }
.day .d-n { font: 400 1.3rem/1.1 var(--slab); }
.day .d-s { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.day.half .d-s { color: var(--lime-ink); }
.day[disabled] { opacity: .6; cursor: not-allowed; text-decoration: line-through; }
.day[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.day[aria-pressed="true"] .d-w, .day[aria-pressed="true"] .d-s { color: var(--mist); }
.blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: 1rem; max-width: 30rem; }
.block { display: grid; gap: .15rem; text-align: left; padding: .7rem .8rem; border: 1px solid rgba(21, 25, 26, .5); border-radius: var(--radius); background: #FFFDF8; color: var(--ink); }
.block strong { font-weight: 600; }
.block span { font-size: .8rem; color: var(--muted); }
.block em { font-style: normal; font-size: .82rem; color: var(--lime-ink); }
.block[disabled] { opacity: .4; cursor: not-allowed; }
.block[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.block[aria-pressed="true"] span, .block[aria-pressed="true"] em { color: var(--mist); }
.wiz-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line-p); }
.wiz-acts .right { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: flex-end; }
.wiz-err { color: var(--error); font-size: .92rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sheet-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem 3rem; align-items: start; }
.sheet { background: #FFFDF8; border: 1px solid var(--line-p); border-radius: var(--radius); padding: 1.75rem; }
.sheet h2 { font-size: 1.7rem; margin-bottom: 1rem; }
.sheet h2:focus { outline: none; }
.sheet pre { margin: 0; white-space: pre-wrap; font: .9rem/1.6 var(--sans); color: var(--ink); }
.sheet-acts { display: grid; gap: .6rem; }
.sheet-acts p { font-size: .92rem; color: var(--muted); }

/* ---------- the short note form (full width, 2-up fields) ---------- */
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; max-width: 52rem; }
.contact-form .field { display: grid; gap: .45rem; min-width: 0; }
.contact-form .field.wide { grid-column: 1 / -1; }
.contact-form label { font-weight: 600; font-size: .95rem; }
.contact-form label small { font-weight: 400; color: var(--muted); }
.contact-form .field.invalid .field-in { border-color: var(--error); }
.contact-form .field .err { display: none; }
.contact-form .field.invalid .err { display: block; }
.contact-form .acts { grid-column: 1 / -1; margin-top: 0; }
.form-ok { grid-column: 1 / -1; display: none; padding: 1.25rem; border-left: 2px solid var(--lime-ink); background: var(--paper-2); border-radius: 0 var(--radius) var(--radius) 0; }
.form-ok.on { display: grid; gap: .5rem; }
.form-ok b { font: 400 1.2rem/1.2 var(--slab); }
.form-ok:focus { outline: none; }
[data-theme="ground"] .contact-form label small, [data-theme="ground"] .hint, [data-theme="ground"] .demo-note { color: var(--mist); }
[data-theme="ground"] .form-ok { background: var(--ground-2); }
[data-theme="ground"] .err, [data-theme="ground"] .wiz-err { color: #F0A58F; }

/* ---------- contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.ways { display: grid; gap: .6rem; margin-top: 1.5rem; justify-items: start; }
.ways .big { font: 400 2.2rem/1.1 var(--slab); text-decoration: none; margin-bottom: .5rem; }
.ways .big:hover { text-decoration: underline; text-decoration-color: var(--lime-ink); }
.ways .row { display: flex; flex-wrap: wrap; gap: .6rem; }
.elsewhere { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-p); }
.elsewhere h3 { font-size: 1.2rem; margin-bottom: .75rem; }
.elsewhere ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.elsewhere li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.elsewhere li span { font-size: .9rem; color: var(--muted); }

/* ---------- footer ---------- */
.footer { margin-left: var(--rail-w); background: var(--deep); color: var(--mist); border-top: 1px solid var(--line-d); padding: 4.5rem var(--gutter) 2rem; }
.footer-in { max-width: 72rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.footer .brand .b1 { font-size: 1.6rem; }
.footer .brand .b2 { font-size: 1.75rem; }
.footer-brand p { margin-top: 1rem; max-width: 22rem; font-size: .93rem; }
.footer h2 { font: 400 1rem/1.3 var(--slab); color: var(--paper); margin-bottom: .9rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .93rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--paper); }
.footer-bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 2rem; margin-top: 1rem; border-top: 1px solid var(--line-d); font-size: .85rem; }

/* ---------- 404 ---------- */
body[data-page="404"] .page, body[data-page="404"] .footer { margin-left: 0; }
.lost { min-height: 70vh; display: grid; align-content: center; gap: 1.5rem; }
.lost h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); max-width: 14ch; line-height: .98; }
.lost p { color: var(--mist); max-width: 32rem; }
.lost .acts { margin-top: 0; }

/* ---------- max-width 1179: the rail folds away, the chips go four across ---------- */
@media (max-width: 1179px) {
  .rail { display: none; }
  .page, .footer { margin-left: 0; }
  .nav-in { padding-left: var(--gutter); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-in { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chip:nth-child(n + 13) { display: none; }
}
@media (max-width: 939px) {
  .nav-in { height: 4.4rem; }
  .nav-links { display: none; }
  .nav-phone { margin-left: auto; }
  .strip { display: flex; gap: 1.5rem; overflow-x: auto; padding: 0 var(--gutter) .6rem; scrollbar-width: none; }
  .strip::-webkit-scrollbar { display: none; }
  :root { --nav-h: 7.35rem; }
}

/* ---------- reduced motion (standalone, never combined with a width query) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .chip img { opacity: 1; }
}

/* ---------- mobile (append-only) ---------- */
@media (max-width: 760px) {
  body { font-size: 1rem; }
  :root { --nav-h: 6.8rem; --gutter: 1.1rem; }
  .nav-in { height: 3.9rem; gap: 1rem; }
  .brand .b1 { font-size: 1.1rem; }
  .brand .b2 { font-size: 1.2rem; }
  .nav-phone { display: none; }
  .nav .nav-in .btn { min-height: 2.4rem; padding: .5rem .9rem; font-size: .85rem; margin-left: auto; }
  .strip { gap: 1.25rem; }
  .strip a { font-size: .9rem; padding: .7rem 0; }
  .chapter { padding-top: 3.75rem; padding-bottom: 3.75rem; }
  .opener { margin-bottom: 1.5rem; }
  .word { font-size: clamp(2.6rem, calc(130vw / var(--word-len, 5)), 5rem); }
  .word.long { font-size: clamp(2.4rem, calc(130vw / var(--word-len, 8)), 4.5rem); }
  .lede { font-size: 1.1rem; }
  .hero { min-height: 125svh; padding: 0; }
  .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; }
  .chip:nth-child(n + 13) { display: none; }
  .chip figcaption { font-size: .6rem; padding: .4rem .45rem; }
  .hero > .col { padding: 50svh var(--gutter) 6rem; min-height: auto; background: linear-gradient(to bottom, rgba(21, 38, 25, 0) 26svh, rgba(21, 38, 25, .92) 44svh, var(--deep) 58svh, var(--deep) calc(100% - 8rem), rgba(21, 38, 25, .85) calc(100% - 4rem), rgba(21, 38, 25, 0) 100%); }
  .hero-copy { gap: 1rem; }
  .hero-copy .k { font-size: .68rem; }
  .hero-title { font-size: clamp(2.6rem, 1.4rem + 8vw, 4rem); }
  .hero-copy .lede { font-size: 1.1rem; }
  .hero-facts > span { font-size: .62rem; padding: .35rem .55rem; }
  .since-grid, .side-grid, .proof-grid, .cta-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .since-photos figure:last-child { margin-top: 2rem; }
  .claims { gap: 1rem; }
  .claims div { grid-template-columns: 1fr; gap: .3rem; }
  .tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .tiles-3 figure:nth-child(2) { margin-top: 0; }
  .tiles-3 figure:nth-child(3) { display: none; }
  .badge { max-width: none; }
  .badge b { font-size: 2.8rem; }
  .cta-acts .btn { min-width: 0; width: 100%; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem .9rem; }
  .card h3 { font-size: 1.1rem; }
  .card p { font-size: .84rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .card .free { font-size: .8rem; }
  .card .free span { font-size: .9rem; }
  .card .free .btn { width: 100%; }
  .ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem .8rem; }
  .ba-knob { width: 2.3rem; height: 2.3rem; margin: -1.15rem 0 0 -1.15rem; }
  .ba-tag { top: .5rem; font-size: .62rem; padding: .25rem .5rem; }
  .ba-tag.b { left: .5rem; }
  .ba-tag.a { right: .5rem; }
  .ba figcaption b { font-size: 1.05rem; }
  .ba figcaption span { font-size: .82rem; }
  .ba.solo { max-width: none; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 7.5rem; gap: .5rem; }
  .filters button { padding: .45rem .8rem; font-size: .85rem; min-height: 2.75rem; }
  .step { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.75rem; }
  .pills.svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pills.svc .pill { font-size: .88rem; padding: .6rem .7rem; }
  .pills:not(.svc) .pill { font-size: .9rem; }
  .ask-set { grid-template-columns: 1fr; gap: 1rem; }
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .wsteps li { flex-direction: column; gap: .15rem; padding-right: .5rem; }
  .wsteps li b { font-size: .85rem; }
  .wiz-acts .right { width: 100%; justify-content: space-between; }
  .existing { grid-template-columns: 1fr; padding: 1.25rem; }
  .existing dl { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .sheet-wrap { grid-template-columns: 1fr; }
  .contact-form { gap: 1rem .8rem; }
  .ways .big { font-size: 1.7rem; }
  .files button { width: 2.25rem; height: 2.25rem; }
  .btn.small { min-height: 2.75rem; }
  .footer { padding-top: 3rem; }
  .footer-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
}
