:root {
  --navy: #14202e;
  --ink: #1d232a;
  --muted: #56606b;
  --rust: #b23c0d;
  --rust-dark: #8f300a;
  --paper: #fbfaf7;
  --rule: #d9d3c8;
  /* Wide layout: content runs close to the screen edges (like apple.com/store), with a
     gutter that grows with the screen. Text blocks keep their own max-width so lines stay readable. */
  --wrap: 100rem;
  --gutter: clamp(1.25rem, 4.5vw, 5rem);
  /* One spacing scale (4px steps at the small end, then bigger jumps). Use these, not one-off values. */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem;
  --section: clamp(3rem, 8vw, 5.5rem);
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Big screens: scale everything up a little so the wider layout doesn't look sparse */
@media (min-width: 100rem) { html { font-size: 106.25%; } }
@media (min-width: 120rem) { html { font-size: 112.5%; } }
body {
  margin: 0; font: 1.0625rem/1.6 var(--sans); color: var(--ink); background: var(--paper);
  border-top: 5px solid var(--rust);
}
img { display: block; max-width: 100%; height: auto; }
svg { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; }
a { color: var(--rust-dark); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--rust); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
b, strong { font-weight: 600; }

h1, h2, h3 { color: var(--navy); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.9rem); line-height: 1.12; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.25rem); color: var(--ink); max-width: 38rem; }
.muted { color: var(--muted); }
.note { font-size: .93rem; color: var(--muted); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; }

/* Header: wordmark left, plain text links right, navy rule underneath (like the letterhead) */
.site-header { background: var(--paper); }
.header-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding: 1.2rem 0 .9rem; border-bottom: 1px solid var(--navy); }
.brand { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 1.45rem; letter-spacing: -.01em; line-height: 1; }
.brand:hover { color: var(--navy); }
/* Taller tap area for the header wordmark without moving it */
.site-header .brand { padding: .6rem 0; margin: -.6rem 0; }
.brand span { color: var(--rust); font-weight: 400; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: 1rem; padding: .6rem 0; display: inline-block; }
.nav a:hover { color: var(--rust); }
.nav a[aria-current="page"] { color: var(--rust-dark); text-decoration: underline; text-underline-offset: .35em; }
.nav .nav-phone { color: var(--navy); font-weight: 600; }
@media (max-width: 34rem) { .nav .nav-phone-item { display: none; } }

/* Buttons: one solid style, one outline; small radius, no pills */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .7rem 1.25rem;
  border-radius: 3px; border: 1px solid var(--navy); font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; background: var(--navy); color: #fff;
}
.btn:hover { background: var(--rust-dark); border-color: var(--rust-dark); color: #fff; }
.btn--line { background: transparent; color: var(--navy); }
.btn--line:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1.75rem; }
.actions .or { color: var(--muted); }
/* Closing call to action: words left, button right; stacks on phones */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5) var(--s7); }
.cta p { margin: 0; max-width: 34rem; font-size: 1.125rem; }

/* Sections are separated by hairlines, not by alternating coloured bands.
   The hairline sits inside the content width, lined up with the header and footer rules. */
.section { padding: var(--section) 0; position: relative; }
.section + .section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(100% - 2 * var(--gutter), var(--wrap)); border-top: 1px solid var(--rule);
}
.page-head { padding: clamp(2.25rem, 6vw, 3.75rem) 0 clamp(1.25rem, 3vw, 2rem); }
.page-head h1 { max-width: 20ch; }
/* A section straight under the page heading needs no top padding */
.section--flush { padding-top: 0; }

/* Two-column "label | content" rows, like a letter or a CV */
.row { display: grid; gap: .75rem 3rem; }
@media (min-width: 52rem) { .row { grid-template-columns: 17rem 1fr; } }
@media (min-width: 80rem) { .row { grid-template-columns: minmax(17rem, 1fr) 2.6fr; column-gap: var(--s8); } }
@media (min-width: 52rem) { .row > :first-child h2 { margin-top: .1em; } }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero-grid { display: grid; gap: 2.5rem 4rem; }
@media (min-width: 58rem) { .hero-grid { grid-template-columns: 1.35fr 1fr; align-items: start; } }
@media (min-width: 80rem) { .hero-grid { grid-template-columns: 1.5fr 1fr; column-gap: 6rem; } }
@media (min-width: 80rem) { .work-list a { grid-template-columns: 9rem 1fr; gap: var(--s5); } .hero h1 { max-width: 19ch; } }
.hero h1 { max-width: 17ch; }
.hero-side { border-top: 1px solid var(--navy); padding-top: 1rem; }
.hero-side .note { margin: var(--s2) 0 0; }
.hero-side h2 { font-size: 1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-bottom: .75rem; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li + li { border-top: 1px solid var(--rule); }
.work-list a { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: center; padding: .8rem 0; text-decoration: none; color: var(--ink); }
.work-list img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.work-list b { display: block; color: var(--navy); }
.work-list span { font-size: .93rem; color: var(--muted); line-height: 1.4; display: block; }
.work-list a:hover b { color: var(--rust-dark); text-decoration: underline; }

/* Numbered lists with rust numerals (same as the audit letter) */
.numbered { list-style: none; counter-reset: n; margin: 0; padding: 0; }
.numbered > li { counter-increment: n; position: relative; padding: 0 0 1.25rem 2.25rem; }
.numbered > li::before { content: counter(n) "."; position: absolute; left: 0; top: 0; color: var(--rust); font-weight: 600; }
.numbered > li:last-child { padding-bottom: 0; }
.numbered h3 { margin: 0 0 .2em; }
.numbered p { margin: 0; }
@media (min-width: 44rem) { .numbered--2 { columns: 2; column-gap: 3rem; } .numbered--2 > li { break-inside: avoid; } }
/* Wide screens: lists spread across the row, but every column keeps ~35+ characters a line
   (see Website Best Practices §3/§5). Laptops: 2 columns. 4 across only on very wide screens. */
@media (min-width: 80rem) {
  .numbered--3 { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: var(--s6); }
  .numbered--3 > li { padding-bottom: 0; }
}
@media (min-width: 112rem) {
  .row { grid-template-columns: 17rem 1fr; }
  .numbered--2 { columns: 4; column-gap: var(--s6); }
  .included { grid-template-columns: repeat(4, 1fr); column-gap: var(--s6); }
}

/* Plain two-column list of what's included */
.included { margin: 0; display: grid; gap: 0 3rem; }
@media (min-width: 44rem) { .included { grid-template-columns: 1fr 1fr; } }
.included div { padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.included dt { font-weight: 600; color: var(--navy); }
.included dd { margin: 0; color: var(--muted); }

/* Founding-client note: a ruled block, no badge or tinted card */
.offer { border-top: 2px solid var(--rust); padding: var(--s5) 0 0; display: grid; gap: 1rem 3rem; align-items: center; }
@media (min-width: 52rem) { .offer { grid-template-columns: 1fr auto; } }
.offer h2 { margin-bottom: var(--s2); }
/* The offer's rust rule replaces the grey section hairline above it */
.section:has(> .wrap > .offer:first-child)::before { display: none; }
.offer p { margin: 0; max-width: 42rem; }

/* Pricing table (stacks on phones) */
.prices { width: 100%; border-collapse: collapse; }
.prices th, .prices td { text-align: left; vertical-align: top; padding: 1.25rem 1.5rem 1.25rem 0; border-bottom: 1px solid var(--rule); }
.prices thead th { font-size: .93rem; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--navy); padding-top: 0; padding-bottom: .5rem; }
.prices tbody th { width: 30%; }
.prices tbody th b { display: block; font-size: 1.25rem; color: var(--navy); margin-bottom: var(--s1); }
.prices tbody th span { display: block; line-height: 1.5; }
.prices tbody th span { font-weight: 400; color: var(--muted); font-size: .95rem; }
.prices ul { margin: 0; padding-left: 1.1rem; }
.prices li { margin-bottom: var(--s1); }
.prices tbody tr:last-child th, .prices tbody tr:last-child td { border-bottom: 0; }
.prices .amt { white-space: nowrap; font-size: 1.25rem; font-weight: 600; color: var(--navy); }
.prices .amt small { display: block; font-size: .9rem; font-weight: 400; color: var(--muted); white-space: normal; }
.prices .amt small { margin-top: var(--s1); }
.prices .amt a { display: block; width: fit-content; margin-top: var(--s1); padding: .65rem 0; font-size: .95rem; font-weight: 500; }
@media (max-width: 44rem) {
  .prices thead { display: none; }
  .prices, .prices tbody, .prices tr, .prices th, .prices td { display: block; width: auto; }
  .prices tr { border-bottom: 1px solid var(--rule); padding: var(--s5) 0; }
  .prices tbody tr:first-child { padding-top: 0; }
  .prices tbody tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .prices th, .prices td { border: 0; padding: 0 0 var(--s4); }
  .prices td:last-child { padding-bottom: 0; }
  .prices tbody th { width: auto; }
}

/* FAQ */
.faq { max-width: 46rem; border-top: 1px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 1rem 2rem 1rem 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: .9rem; color: var(--rust); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink); max-width: 40rem; }

/* Work page: one demo per row, picture + words */
.demo { display: grid; gap: 1.25rem 3rem; padding: 2rem 0; border-top: 1px solid var(--rule); }
.demo:first-child { border-top: 1px solid var(--navy); }
@media (min-width: 52rem) { .demo { grid-template-columns: 1.1fr 1fr; align-items: center; } }
.demo img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.demo h2 { margin-bottom: .25rem; }
.demo .kind { color: var(--muted); margin-bottom: .9rem; }
.demo ul { padding-left: 1.1rem; margin: 0 0 1.25rem; }

/* About */
.prose { max-width: 40rem; }
.prose h2 { margin-top: 2.25rem; }
.towns { margin: 0; }
.prose .end-action { margin-top: var(--s6); }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem 4rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.form { display: grid; gap: var(--s5); }
.form-row { display: grid; gap: var(--s5) var(--s4); }
@media (min-width: 40rem) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s2); }
.field label { font-weight: 600; color: var(--navy); font-size: .97rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: #fff; width: 100%;
  border: 1px solid #a9a296; border-radius: 2px; padding: .7rem .8rem; min-height: 48px;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--rust); outline-offset: 0; border-color: var(--rust); }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-weight: 600; }
.form-status[data-state="ok"] { color: #1d5e33; }
.form-status[data-state="err"] { color: #a1231b; }
.contact-side { border-top: 1px solid var(--navy); padding-top: 1rem; }
.contact-side dl { margin: 0; }
.contact-side dt { font-size: .93rem; color: var(--muted); margin-top: 1rem; }
.contact-side dt:first-child { margin-top: 0; }
.contact-side dd { margin: .1rem 0 0; }
.contact-side dd a { font-weight: 600; font-size: 1.1rem; color: var(--navy); word-break: break-word; }
.contact-side dd small { display: block; color: var(--muted); font-size: .93rem; }

/* Footer: navy rule like the letterhead, then columns. Every item sits on the same
   row height, so plain text and links line up (no padding on links only). */
.site-footer { padding: 0 0 var(--s6); font-size: .95rem; color: var(--muted); }
.footer-inner { border-top: 1px solid var(--navy); padding-top: var(--s6); }
.footer-grid { display: grid; gap: var(--s6) var(--s5); grid-template-columns: 1fr 1fr; }
.footer-brand, .footer-contact { grid-column: 1 / -1; }
@media (min-width: 44rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.3fr; }
  .footer-contact { grid-column: auto; }
}
@media (min-width: 64rem) {
  .footer-grid { grid-template-columns: 1.6fr 1.2fr 1fr 1.2fr; gap: var(--s6) var(--s7); }
  .footer-brand { grid-column: auto; }
}
.site-footer .brand { font-size: 1.15rem; display: inline-block; margin-bottom: var(--s3); }
.footer-brand p { margin: 0; max-width: 22rem; line-height: 1.5; }
.footer-h { margin: 0 0 var(--s2); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { display: flex; align-items: center; min-height: 2.25rem; line-height: 1.4; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--rust); text-decoration: underline; }
.site-footer li a { display: flex; align-items: center; min-height: 2.25rem; white-space: nowrap; }
/* Phones: footer rows 44px tall so every link is easy to tap */
@media (max-width: 52rem) { .site-footer li, .site-footer li a { min-height: 2.75rem; } }
.footer-legal { margin: var(--s6) 0 0; padding-top: var(--s4); border-top: 1px solid var(--rule); font-size: .85rem; }

/* Mobile call bar: plain, two halves */
.callbar {
  position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--paper); border-top: 1px solid var(--navy); padding-bottom: env(safe-area-inset-bottom);
}
.callbar a { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 52px; font-weight: 600; text-decoration: none; color: var(--navy); }
.callbar a:first-child { background: var(--navy); color: #fff; }
body { padding-bottom: 3.5rem; }
@media (min-width: 52rem) { .callbar { display: none; } body { padding-bottom: 0; } }
