/* ───────────────────────────────────────────────────────────────
   The Adirondacker — Woodcut style.

   Every value here comes from the Claude Design style guide
   ("The Adirondacker Style Guide", boards 01–04). The :root block is
   Guide 02 §2.4 verbatim; change a token there, not a rule here.

   House rules the CSS enforces (Guide 01–03):
   - Radius 0 everywhere. Borders 3px, section rules 4px.
   - Hard shadow (no blur) only on things you can click.
   - Rust is the one accent: one primary button per screen.
   - Rust never sits on Ink (2.6:1). Kraft or white on Ink instead.
   - Big Shoulders is always uppercase and never below 20px.
   ─────────────────────────────────────────────────────────────── */

:root {
  /* color */
  --ink: #141414;      --kraft: #E8DFCC;    --paper: #FAF7F0;
  --rust: #9A3A20;     --rust-dark: #6E2914; --ash: #4F4A42;
  --kraft-dark: #CFC4AC; --pine: #2F5A3A;

  /* type */
  --font-display: "Big Shoulders Display", Impact, "Arial Narrow Bold", sans-serif;
  --font-body: "Archivo", system-ui, "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(3.5rem, 7vw, 5.75rem);  --fs-h1: clamp(2.75rem, 5vw, 4rem);
  --fs-h2: clamp(2.125rem, 3.6vw, 3rem);      --fs-h3: clamp(1.5rem, 2.2vw, 1.75rem);
  --fs-lead: 1.3125rem;  --fs-body: 1.125rem;  --fs-small: .9375rem;  --fs-stamp: .8125rem;

  /* space */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --section-y: clamp(56px, 8vw, 96px);
  --container: 1200px;   --gutter: clamp(16px, 2vw, 24px);

  /* edges */
  --border: 3px solid var(--ink);  --rule: 4px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);  --shadow-lift: 9px 9px 0 var(--ink);
  --radius: 0;  --focus: 3px solid var(--rust);  --ease: 120ms ease-out;

  /* layout: page margin per breakpoint (Guide 02 §2.2) */
  --margin: 20px;
  --header-h: 60px;
  --action-bar-h: 56px;
}

@media (min-width: 640px) {
  :root { --margin: 32px; }
}

@media (min-width: 1024px) {
  :root { --margin: 56px; --header-h: 72px; }
}

/* ─── Base ─── */

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  /* In-page jumps (#estimate, :target) land below the sticky header. */
  scroll-padding-top: calc(var(--header-h) + var(--s4));
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--kraft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

@media (min-width: 640px) {
  body { font-size: var(--fs-body); }
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, p, ul, ol, blockquote, figure { margin: 0; }

a { color: var(--rust); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--rust-dark); text-decoration-thickness: 3px; }

:focus-visible { outline: var(--focus); outline-offset: 4px; }

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 100;
  background: var(--paper);
  color: var(--ink);
  border: var(--border);
  padding: var(--s3) var(--s4);
  font-weight: 700;
}
.skip-link:focus { top: var(--s4); }

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

/* ─── Type (Guide 01 §1.3) ─── */

.display, .h1, .h2, .h3,
.cta-band__title, .wordmark, .btn, .job-card__name, .service-card__name {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
}

.display { font-size: var(--fs-display); line-height: 0.9; }
.h1 { font-size: var(--fs-h1); line-height: 0.95; }
.h2 { font-size: var(--fs-h2); line-height: 1; }
.h3 { font-size: var(--fs-h3); line-height: 1.1; font-weight: 800; }
.h4 { font-size: 1.1875rem; line-height: 1.3; font-weight: 700; }

@media (min-width: 640px) {
  .h4 { font-size: 1.25rem; }
}

.lead { font-size: 1.1875rem; line-height: 1.5; }

@media (min-width: 640px) {
  .lead { font-size: var(--fs-lead); }
}

.small { font-size: var(--fs-small); line-height: 1.5; color: var(--ash); }

/* Big Shoulders at display sizes leaves one-word last lines ("LAST.")
   unless the lines are balanced. Copy just avoids orphans. */
.display, .h1, .h2, .h3, .h4, .cta-band__title { text-wrap: balance; }
p, li { text-wrap: pretty; }
.measure { max-width: 68ch; }

/* Small-caps style labels: 700, 13px, +0.1em. */
.label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-stamp);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.label--rust { color: var(--rust); }

.stamp {
  display: inline-block;
  background: var(--ink);
  color: var(--kraft);
  padding: 5px 9px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-link { font-weight: 700; font-size: 1.0625rem; }

/* ─── Buttons (Guide 03 §3.2) ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 var(--s5);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease);
}

.btn:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }

.btn--primary { background: var(--rust); color: #FFFFFF; }
.btn--primary:hover { background: var(--rust-dark); color: #FFFFFF; }

.btn--secondary { background: var(--paper); color: var(--ink); }
.btn--secondary:hover { background: #FFFFFF; color: var(--ink); }

/* The phone button in the closing band: Ink on Rust, no shadow, so the
   band's one shadowed button stays the estimate. */
.btn--ink { background: var(--ink); color: var(--kraft); box-shadow: none; }
.btn--ink:hover { color: var(--kraft); box-shadow: none; transform: none; }

.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--kraft-dark);
  color: var(--ash);
  border-color: var(--ash);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* Buttons inside forms sit at 48px. */
.btn--form { min-height: 48px; }

@media (max-width: 639px) {
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  /* Drop the lift, keep the shadow change. */
  .btn, .job-card, .service-card { transition: none; }
  .btn:hover, .btn:active, .job-card:hover, .service-card:hover { transform: none; }
}

/* ─── Header (Guide 03 §3.1) ─── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--kraft);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--s2) 0 var(--margin);
  max-width: calc(var(--container) + 2 * var(--margin));
  margin: 0 auto;
}

.wordmark {
  color: var(--kraft);
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.wordmark:hover { color: var(--kraft); }

.site-header :focus-visible,
.site-footer :focus-visible,
.cta-band :focus-visible { outline-color: var(--kraft); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--kraft);
  cursor: pointer;
}
.nav-toggle__close { display: none; }
.site-header.is-open .nav-toggle__open { display: none; }
.site-header.is-open .nav-toggle__close { display: block; }

.site-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--ink);
  border-top: 3px solid var(--kraft);
  padding: var(--s2) var(--margin) var(--s5);
}
.site-header.is-open .site-nav { display: flex; }

/* The menu drops 8px into place on open; closing snaps (allow-discrete keeps
   display in the transition so the open state can animate from hidden). */
@media (prefers-reduced-motion: no-preference) {
  .site-nav {
    translate: 0 -8px;
    opacity: 0;
    transition: translate var(--ease), opacity var(--ease), display var(--ease) allow-discrete;
  }
  .site-header.is-open .site-nav { translate: 0 0; opacity: 1; }
  @starting-style {
    .site-header.is-open .site-nav { translate: 0 -8px; opacity: 0; }
  }
}

.site-nav a {
  color: var(--kraft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--s3) 0;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--kraft);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}

.site-nav .site-nav__phone {
  border: 2px solid var(--kraft);
  padding: var(--s3) var(--s4);
  margin-top: var(--s3);
  justify-content: center;
}

@media (min-width: 1024px) {
  .site-header__bar { padding: 0 var(--margin); }
  .wordmark { font-size: 1.625rem; }
  .nav-toggle { display: none; }
  .site-nav,
  .site-header.is-open .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 0;
    border: 0;
    background: none;
    translate: none;
    opacity: 1;
    transition: none;
  }
  .site-nav a { padding: 0; }
  .site-nav .site-nav__phone { margin-top: 0; padding: 10px 14px; min-height: 0; }
}

/* ─── Sections ─── */

.section { padding: var(--section-y) 0; }
.section--tight { padding-top: var(--s6); }
/* A 4px rule or a change of ground between sections, never both. */
.section--ruled > .container { border-top: var(--rule); padding-top: var(--section-y); }
.section--ruled { padding-top: 0; }

.section__title { margin-bottom: var(--s6); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3) var(--s5);
  margin-bottom: var(--s6);
}

.page-head { padding: var(--s7) 0 var(--s6); }
/* The head already ends with its own space; a full section gap on top of it
   leaves a hole between the filters or lead and the grid they introduce. */
.page-head + .section:not(.section--ruled) { padding-top: var(--s2); }
.page-head .h1 { margin-bottom: var(--s4); }
.page-head .lead { margin-bottom: var(--s5); }

.stack { display: flex; flex-direction: column; gap: var(--s5); }

.prose { max-width: calc(8 / 12 * var(--container)); }
.prose .h3 { margin: var(--s6) 0 var(--s3); }
.prose .h3:first-child { margin-top: 0; }
.prose p + p { margin-top: var(--s4); }
.prose .label { margin: var(--s3) 0 var(--s5); }
.prose .lead + p { margin-top: var(--s5); }

/* ─── Grids (Guide 02 §2.2) ─── */

.grid { display: grid; gap: var(--gutter); }
.grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 640px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Cards carry a 6px shadow, so leave room for it between rows. */
.grid { row-gap: calc(var(--gutter) + 8px); }

.split { display: grid; gap: var(--s7); grid-template-columns: minmax(0, 1fr); }

@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .split--lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ─── Photos (Guide 04 §4.1) ─── */

.photo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  background: var(--kraft-dark) url("../images/hatch.e3668f995070.svg");
  border: var(--border);
  color: var(--ash);
  font-size: var(--fs-small);
  overflow: hidden;
  container-type: inline-size;
}

/* Placeholder only: the deer from the logo, so an empty frame reads as
   on purpose. A real photo covers it (the <picture> below sits on top). */
.photo::before {
  content: "";
  width: clamp(48px, 24cqi, 128px);
  aspect-ratio: 180 / 153;
  background: var(--ash);
  opacity: 0.4;
  -webkit-mask: url("../images/deer.08a4509e7ee0.svg") center / contain no-repeat;
  mask: url("../images/deer.08a4509e7ee0.svg") center / contain no-repeat;
}
@container (max-width: 180px) {
  .photo::before { display: none; }
}

.photo picture,
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo--3-2 { aspect-ratio: 3 / 2; }
.photo--4-3 { aspect-ratio: 4 / 3; }
.photo--1-1 { aspect-ratio: 1 / 1; }
.photo--16-9 { aspect-ratio: 16 / 9; }

.photo__caption { background: var(--paper); padding: 2px var(--s2); margin: 0 var(--s2); text-align: center; }

.photo__stamp { position: absolute; left: 12px; bottom: 12px; z-index: 1; }

/* ─── Cards (Guide 03 §3.4) ─── */

.card {
  background: var(--paper);
  border: var(--border);
  padding: var(--s5);
}

.job-card,
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: var(--border);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease);
}

.job-card:hover,
.service-card:hover {
  color: var(--ink);
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-lift);
}

/* The card's own border frames the photo; only its bottom edge stays. */
.job-card .photo { border: 0; border-bottom: var(--border); }

.job-card__body { display: flex; flex-direction: column; gap: var(--s1); padding: 14px var(--s4) var(--s4); }
.job-card__name { font-size: 1.75rem; line-height: 1; }

.service-card { gap: var(--s3); padding: 20px; }
.service-card__name { font-size: 1.875rem; line-height: 1; }
.service-card__summary { font-size: var(--fs-small); line-height: 1.5; color: var(--ash); }
.service-card__more { margin-top: auto; font-weight: 700; font-size: var(--fs-small); color: var(--rust); }

/* The compact cards on the home grid drop the summary; four across at
   desktop is too narrow for 30px names. */
.grid--4 .service-card__name { font-size: 1.5rem; }

/* On a phone the home grid is a compact list (wireframe 1i): icon and name
   on one row, so eight services don't cost eight screens of scroll. The
   switch keys off the grid's own width, so it holds wherever the grid sits. */
.grid--compact { container-type: inline-size; }
@container (max-width: 560px) {
  .grid--compact .service-card { flex-direction: row; align-items: center; gap: var(--s4); padding: 14px var(--s4); }
  .grid--compact .service-card svg { width: 32px; height: 32px; flex: none; }
  .grid--compact .service-card__more { display: none; }
}

.review {
  background: var(--ink);
  color: var(--kraft);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.review p { font-size: 1.125rem; line-height: 1.5; }

/* Topo lines on the Ink panels: Kraft at 7%, behind the text. A
   pseudo-element because a background image can't take an opacity. */
.review,
.site-footer { position: relative; }
.hero__panel,
.review,
.site-footer { isolation: isolate; }
.hero__panel::before,
.review::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/contour.96382d68f52c.svg") 0 0 / 480px;
  opacity: 0.07;
  pointer-events: none;
}
.review:nth-child(2)::before { background-position: -160px -220px; }
.review:nth-child(3)::before { background-position: -310px -90px; }
.site-footer::before { background-position: -120px -300px; }
.review__mark { font-family: var(--font-display); font-weight: 900; font-size: 4rem; line-height: 0.5; padding-top: var(--s4); }

/* ─── Home hero (direction 1a) ─── */

.hero__inner {
  display: grid;
  gap: var(--s6);
  padding-top: var(--s6);
  padding-bottom: var(--section-y);
}

.hero__media { display: flex; flex-direction: column; gap: var(--s5); }

.hero__panel {
  position: relative;
  background: var(--ink);
  color: var(--kraft);
  padding: var(--s6) var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.hero__logo { width: min(100%, 280px); margin-bottom: var(--s2); }

.hero__form .h3 { margin-bottom: var(--s4); }
.hero__form .small { margin-top: var(--s4); }

@media (min-width: 1024px) {
  /* Photo and form side by side and the same height, so neither column
     ends in empty ground. The headline panel sits over the photo's
     top-left corner (wireframe 1a); the stamp stays clear at bottom-left. */
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) 460px;
    align-items: stretch;
    gap: var(--s6);
    padding-top: var(--s7);
  }
  .hero__media { position: relative; display: block; min-height: 560px; }
  .hero__media > .photo {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    align-items: flex-end;
    justify-content: flex-end;
    padding: var(--s5);
  }
  .hero__panel {
    position: absolute;
    top: var(--s6);
    left: var(--s6);
    right: var(--s6);
    max-width: 520px;
    padding: var(--s6);
  }
  .hero__form { box-shadow: var(--shadow); }
  /* Two fields to a row: the card is wide enough, and it keeps the form
     about as tall as the photo beside it. */
  .hero__form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__form .field--wide { grid-column: 1 / -1; }
  .hero__form textarea { min-height: 96px; }
}

.crew-teaser {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--s4) var(--s5);
  align-items: center;
}
.crew-teaser .h3 { margin-bottom: var(--s2); }
.crew-teaser .text-link { grid-column: 1 / -1; }

@media (min-width: 640px) {
  .crew-teaser { grid-template-columns: 120px minmax(0, 1fr) auto; }
  .crew-teaser .text-link { grid-column: auto; }
}

/* ─── Where we work ─── */

.towns { display: flex; flex-direction: column; gap: var(--s5); }
.towns__text { display: flex; flex-direction: column; gap: var(--s3); }
/* Matches .section__title (32px) once the 12px flex gap is added. */
.towns__text .h2 { margin-bottom: 20px; }
.towns__list { font-weight: 500; }

@media (min-width: 1024px) {
  .towns--wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--s7); }
}

/* ─── Interior pages ─── */

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) 10px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.breadcrumb li + li::before { content: "/"; margin-right: 10px; color: var(--ink); }
.breadcrumb [aria-current="page"] { color: var(--ash); }

.filters { display: flex; flex-wrap: wrap; gap: var(--s2); }

.filter {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--paper);
  color: var(--ink);
  border: var(--border);
  padding: var(--s2) 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.filter:hover { color: var(--ink); background: #FFFFFF; }
.filter:active { translate: 3px 3px; }
.filter[aria-current="page"] { background: var(--ink); color: var(--kraft); }

/* One job per row on a phone: jobsite photos are unreadable two-up. */
@media (max-width: 639px) {
  .grid--gallery { grid-template-columns: minmax(0, 1fr); }
}

.checklist, .link-list { list-style: none; padding: 0; margin: 0; }
.card > .h3 + .checklist { margin-top: var(--s4); }

.checklist { display: grid; gap: var(--s2) var(--s5); }
@media (min-width: 640px) {
  .checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(-45deg);
}

.link-list { margin-top: var(--s3); }
.link-list li { border-bottom: 1px solid var(--kraft-dark); }
.link-list a { display: block; padding: var(--s3) 0; font-weight: 700; }

/* Job page: photos and the write-up side by side at desktop, so a 3:2
   lead photo is not the full 1200px wide (and 800px tall). */
.job { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
.job__details { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); }
.facts { margin: 0; align-self: stretch; display: grid; gap: var(--s3); }
.facts div { display: flex; justify-content: space-between; gap: var(--s4); border-bottom: 1px solid var(--kraft-dark); padding-bottom: var(--s3); }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dd { margin: 0; text-align: right; }

@media (min-width: 1024px) {
  .job { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7); align-items: start; }
}

.thumbs {
  list-style: none;
  padding: 0;
  margin: var(--s3) 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
}
@media (min-width: 640px) {
  .thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.thumbs .photo { font-size: 0.75rem; }

.crew { list-style: none; padding: 0; margin: 0; }
.crew__card { background: var(--paper); border: var(--border); display: flex; flex-direction: column; }
.crew__card .photo { border: 0; border-bottom: var(--border); }
.crew__body { padding: var(--s4) var(--s5) var(--s5); }
.crew__body .label { margin: var(--s1) 0 var(--s2); }

.about__logo { width: min(100%, 360px); margin-top: var(--s4); }

/* Contact: phone first on a phone (wireframe 1k), form beside the details
   at desktop (1h). */
.contact-layout { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
.contact-layout__more { display: flex; flex-direction: column; gap: var(--s5); }
.contact-layout__form .h3 { margin-bottom: var(--s4); }
.contact-layout .card .label { margin-bottom: var(--s2); }
.contact-layout .card .photo { margin: var(--s2) 0 var(--s3); }
.contact-layout .card .contact-email-label { margin-top: var(--s5); }
.contact-social { margin-top: var(--s4); }

.contact-phone {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-template-areas: "form phone" "form more";
    align-items: start;
    gap: var(--s5) var(--s7);
  }
  .contact-layout__phone { grid-area: phone; }
  .contact-layout__form { grid-area: form; }
  .contact-layout__more { grid-area: more; }
}

/* ─── Forms (Guide 03 §3.3) ─── */

.estimate-form { display: flex; flex-direction: column; gap: var(--s4); }

.form-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }

/* Two-up only where the form has the width for it: the contact page, not
   the hero card. */
@media (min-width: 640px) {
  .contact-layout .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-layout .field--wide { grid-column: 1 / -1; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 0 12px;
  font: 400 1.0625rem var(--font-body);
  letter-spacing: 0;
  text-transform: none;
}

.field textarea { padding: 10px 12px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus { background: #FFFFFF; outline: var(--focus); outline-offset: 2px; }

.field [aria-invalid="true"],
.field :user-invalid { border-color: var(--rust); }

/* The guide's "!" error, client-side: shown once the visitor has left the
   field invalid, never on a fresh form. The server's message replaces it. */
.field:has(:user-invalid):not(:has(.field__error))::after {
  content: "! Check this one";
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rust);
}

/* The message box grows with what's typed, within bounds. */
.field textarea { field-sizing: content; min-height: 120px; max-height: 320px; }

.field__error,
.form-error {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rust);
}

.form-error { border: 3px solid var(--rust); background: var(--paper); padding: var(--s3) var(--s4); }

.form-success {
  border: 3px solid var(--pine);
  background: var(--paper);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--pine);
}
.form-success strong { font-size: 1.0625rem; }

@media (prefers-reduced-motion: no-preference) {
  .form-success { animation: stamp-in 160ms ease-out; }
}
@keyframes stamp-in {
  from { scale: 1.04; opacity: 0; }
}
.form-success p { font-size: var(--fs-small); color: var(--ash); margin-top: var(--s1); }

/* ─── Closing band and footer ─── */

.cta-band { background: var(--rust); color: #FFFFFF; border-top: var(--border); }

/* The logo's skyline, Ink mountains and pines, runs straight into the Ink
   footer. That edge is the change of ground, so there is no rule under the
   band. The sky is the Rust band when there is one, the Kraft page when a
   page drops it (contact). */
.skyline {
  height: 48px;
  background:
    url("../images/pines.7db57f8d115c.svg") left -12px bottom / auto 100% no-repeat,
    url("../images/pines.7db57f8d115c.svg") right -40px bottom / auto 70% no-repeat,
    url("../images/ridge.e8874d2bbe49.svg") center bottom / 100% 60% no-repeat;
}
.cta-band + .skyline { background-color: var(--rust); }

@media (min-width: 1024px) {
  .skyline { height: 96px; }
}

.cta-band__inner {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  padding-top: 36px;
  padding-bottom: 36px;
}

.cta-band__title { font-size: clamp(2.25rem, 4.5vw, 3.25rem); line-height: 0.95; margin-bottom: var(--s2); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--s4); }

@media (min-width: 1024px) {
  .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.site-footer { background: var(--ink); color: var(--kraft); padding: var(--s7) 0; }

.site-footer__grid { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }

@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

.site-footer__brand,
.site-footer__col { display: flex; flex-direction: column; gap: var(--s2); font-size: var(--fs-small); line-height: 1.5; }
.site-footer__brand img { width: 260px; margin-bottom: var(--s2); }
.site-footer a { color: var(--kraft); }
.site-footer a:hover { color: #FFFFFF; }

/* ─── Mobile action bar ─── */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: var(--border);
  transition: transform var(--ease);
}

.action-bar.is-hidden { transform: translateY(100%); }

.action-bar a {
  height: var(--action-bar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  text-transform: uppercase;
  text-decoration: none;
}

.action-bar__call { background: var(--ink); color: var(--kraft); }
.action-bar__call:hover { color: var(--kraft); }
.action-bar__estimate { background: var(--rust); color: #FFFFFF; }
.action-bar__estimate:hover { color: #FFFFFF; }
.action-bar :focus-visible { outline-color: var(--kraft); outline-offset: -6px; }

/* Room so the bar never covers the end of the footer. */
body { padding-bottom: var(--action-bar-h); }

@media (min-width: 1024px) {
  .action-bar { display: none; }
  body { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .action-bar { transition: none; }
}

/* ─── Motion ───
   Everything below is progressive: a browser without scroll-driven
   animations or view transitions gets the same page, standing still. */

/* Cards and section titles press into place once as they scroll in. Items
   already on screen at load are past their range and simply sit there. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .job-card,
    .service-card,
    .review,
    .crew__card,
    .section__title {
      animation: press-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
@keyframes press-in {
  from { translate: 0 16px; opacity: 0; }
}

/* Page to page: the header and the action bar hold still and the content
   cross-fades. A job card's photo carries over into the job page's lead
   photo (view-transition-name set per job in _photo.html). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
.action-bar { view-transition-name: action-bar; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 160ms; animation-timing-function: ease-out; }
::view-transition-group(*) { animation-duration: 240ms; animation-timing-function: ease-out; }
