/* Ayers & Sons Foundations LLC
   White page, black text, Old Glory red for calling, the logo blue for structure. Square corners. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-wght.woff2?v=2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* White page, black text, red/white/blue accents */
  --page: #ffffff;
  --panel: #f3f4f6;                  /* service panels, form card */
  --panel-2: #e8eaee;                /* call bar Text button */
  --navy: #012a6b;                   /* footer background: deep shade of the logo blue */
  --line: #d5d8dd;                   /* inner dividers */
  --line-2: #8a9099;                 /* input and chip borders: 3.2:1 on white */
  --rule: 2px solid var(--ink);      /* the one section separator, used on every page */

  /* Text */
  --ink: #111318;                    /* headings, primary text */
  --ink-soft: #353a42;               /* body */
  --muted: #5b616a;                  /* captions, help: 6.2:1 on white */

  /* Blue = structure (top edges, underlines, focus, map); red = calling */
  --blue: #03439d;                   /* the logo blue, 9.1:1 on white */
  --red: #b22234;                    /* Old Glory red: button fills (6.6:1 with white text) and red text */
  --red-press: #8f1b2a;
  --red-on-dark: #ff8f99;            /* phone number over the hero photo */
  --on-red: #ffffff;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 44px);
  --header-h: 84px;
  /* Motion tokens */
  --duration-quick: 150ms;           /* hover, press, close */
  --duration-fast: 250ms;            /* menu open, call bar in */
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);   /* hover-out settle */
  --distance-micro: 4px;
  --distance-base: 8px;
  --scale-press: 0.97;

  --text-hero: clamp(3.1rem, 7.6vw, 6rem);
  --text-h2: clamp(2.3rem, 5vw, 4rem);
  --text-h3: clamp(1.6rem, 2.6vw, 2.1rem);

}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--panel-2) var(--navy);
  accent-color: var(--blue);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  caret-color: var(--blue);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body > * { position: relative; z-index: 1; }

::selection { background: var(--red); color: var(--on-red); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); line-height: 1; }
h1 { letter-spacing: -0.012em; line-height: 1; } /* room for the comma's tail between lines */
h2 { letter-spacing: -0.006em; }
p { margin: 0 0 1em; max-width: 64ch; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
img, svg { display: block; max-width: 100%; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; left: 8px; top: -60px; z-index: 100; /* fixed, so it shows wherever the page is scrolled */
  background: var(--red); color: var(--on-red);
  padding: 12px 18px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 8px; }
main:focus { outline: none; } /* the skip link's landing spot, not a control */

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
a[href^="tel:"] { white-space: nowrap; } /* a phone number never splits across lines */
.btn[href^="tel:"] { white-space: normal; } /* a button label may wrap between words; its number stays whole */
.sprite { position: absolute; }

/* a soft blue flash when links and buttons are tapped on phones */
a, button, summary { -webkit-tap-highlight-color: rgba(3, 67, 157, 0.14); }
@media (pointer: fine) { html { overscroll-behavior: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 56px; padding: 0 1.5em;
  font-family: var(--body); font-weight: 800; font-size: min(1.05rem, 5.6vw); letter-spacing: 0.01em;
  text-decoration: none; text-align: center; text-wrap: balance;
  border: 2px solid transparent; border-radius: 0; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: transform var(--duration-quick) var(--ease-smooth-out), background-color var(--duration-quick) var(--ease-smooth-out), color var(--duration-quick) var(--ease-smooth-out), border-color var(--duration-quick) var(--ease-smooth-out);
}
.btn:active { transform: scale(var(--scale-press)); }
.btn-call { background: var(--red); color: var(--on-red); }
.btn-line { border-color: var(--line-2); color: var(--ink); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn-call:hover { background: var(--red-press); }
  .btn-line:hover { border-color: var(--ink); }
}
.btn[disabled] { opacity: 0.6; cursor: progress; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-weight: 700; color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--blue); padding-bottom: 2px;
}
.text-link .icon { transition: transform var(--duration-quick) var(--ease-smooth-out); }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover .icon { transform: translateX(3px); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--page);
  border-bottom: var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-logo { display: block; height: 64px; width: auto; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 0;
  font-weight: 700; font-size: 1rem; color: var(--ink-soft); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--duration-quick) var(--ease-smooth-out), border-color var(--duration-quick) var(--ease-smooth-out);
}
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--ink); } }
.nav-phone {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: 0.02em;
  color: var(--red); text-decoration: none; touch-action: manipulation;
}
.nav-phone .icon { width: 20px; height: 20px; }

.menu-toggle {
  display: none; width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: none; border: 2px solid var(--line-2); color: var(--ink); cursor: pointer; border-radius: 0;
  touch-action: manipulation;
}
.menu-toggle .icon { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
    background: var(--page); border-top: 1px solid var(--line);
    overscroll-behavior: contain; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(calc(-1 * var(--distance-base)));
    transition: opacity var(--duration-quick) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out), visibility 0s linear var(--duration-quick);
  }
  .nav.is-open {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out), visibility 0s;
  }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a {
    font-family: var(--display); font-weight: 800; font-size: 2.6rem; text-transform: uppercase;
    color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .nav-phone { margin-top: 28px; font-size: min(2.4rem, 12vw); }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 420px) {
  :root { --header-h: 76px; }
  .brand-logo { height: 56px; }
}

/* ---------- Hero: headline left, estimate form right ---------- */
.hero { border-bottom: var(--rule); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(32px, 5vw, 80px);
  align-items: center;
  min-height: min(calc(100svh - var(--header-h)), 820px);
  padding-block: clamp(40px, 6vw, 72px);
}
.hero h1 { font-size: clamp(2.9rem, 5.2vw, 4.8rem); max-width: 12ch; }
.hero-lede { font-size: clamp(1.15rem, 1.5vw, 1.3rem); color: var(--ink-soft); max-width: 34ch; margin: 22px 0 14px; }
.hero-call { font-weight: 700; font-size: 1.15rem; color: var(--ink); margin: 0; }
.hero-call a {
  font-family: var(--display); font-weight: 900; font-size: min(2.2rem, 11vw); letter-spacing: 0.01em;
  color: var(--red); text-decoration: none; white-space: nowrap; touch-action: manipulation; margin-left: 6px;
}
@media (hover: hover) and (pointer: fine) { .hero-call a:hover { color: var(--red-press); } }

/* Home hero: the client's truck behind the headline and form, darkened so white type reads */
.hero-photo { position: relative; isolation: isolate; background: #1a1d22; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 16, 0.84) 0%, rgba(10, 12, 16, 0.7) 50%, rgba(10, 12, 16, 0.42) 100%);
}
.hero-photo h1 { color: #ffffff; }
.hero-photo .hero-lede { color: rgba(255, 255, 255, 0.9); }
.hero-photo .hero-call { color: #ffffff; }
.hero-photo .hero-call a { color: var(--red-on-dark); }
.hero-photo .hero-copy :focus-visible { outline-color: #ffffff; }
@media (hover: hover) and (pointer: fine) { .hero-photo .hero-call a:hover { color: #ffffff; } }
@media (max-width: 900px) {
  /* Stacked: the truck sits behind the headline and the form overlaps its lower edge */
  .hero-bg { bottom: auto; height: min(620px, 100%); -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent); }
  .hero-bg img { object-position: 22% 50%; }
  .hero-bg::after { background: rgba(10, 12, 16, 0.72); }
}

.form-hero .form-intro { margin: 8px 0 20px; }
.form-hero .field { margin-bottom: 6px; }
.form-hero .field textarea { min-height: 88px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 32px; } /* minmax(0,…) lets the column shrink below the unbreakable phone number */
}

/* ---------- Section shell ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: var(--rule); }
.section-title { margin-bottom: clamp(28px, 3vw, 44px); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { color: var(--ink-soft); font-size: 1.15rem; margin-top: 20px; }

/* ---------- What we pour: one slab, cut into panels ---------- */
.panels {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.panel {
  position: relative; z-index: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: clamp(140px, 13vw, 172px);
  padding: clamp(22px, 2.6vw, 34px); background: var(--panel); color: var(--ink); text-decoration: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  /* hover-out: a little slower with a soft settle; z-index waits so the panel lands above its neighbors */
  transition: transform var(--duration-fast) var(--ease-bounce), background-color var(--duration-fast) var(--ease-smooth-out), z-index 0s linear var(--duration-fast);
}
.panel h3 { font-size: clamp(2rem, 3vw, 2.6rem); overflow-wrap: break-word; hyphens: auto; min-width: 0; transition: transform var(--duration-fast) var(--ease-bounce); }
/* blue top edge that draws in from the center, like the form card's */
.panel::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--blue);
  transform: scaleX(0); transition: transform var(--duration-quick) var(--ease-smooth-out);
}
/* the shadow lives on its own layer and only fades, so nothing repaints per frame */
.panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  box-shadow: 0 22px 44px -14px rgba(17, 19, 24, 0.32), 0 6px 14px -6px rgba(17, 19, 24, 0.16);
  transition: opacity var(--duration-fast) var(--ease-smooth-out);
}
.panel-cta {
  position: absolute; left: 0; right: 0; bottom: clamp(16px, 1.8vw, 24px);
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4em; padding-inline: 12px;
  font-weight: 700; font-size: 0.95rem; color: var(--blue);
  opacity: 0; transform: translateY(var(--distance-micro));
  transition: opacity var(--duration-quick) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out);
}
.panel-cta .icon { width: 16px; height: 16px; }
.panel:active { transform: scale(var(--scale-press)); transition-duration: var(--duration-quick); }
@media (hover: hover) and (pointer: fine) {
  .panel:hover { z-index: 2; transform: translateY(-3px) scale(1.05); background: var(--page); transition: transform var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-quick) var(--ease-smooth-out), z-index 0s; }
  .panel:hover h3 { transform: translateY(-10px); transition: transform var(--duration-fast) var(--ease-smooth-out); }
  .panel:hover::before { transform: scaleX(1); }
  .panel:hover::after { opacity: 1; }
  .panel:hover .panel-cta { opacity: 1; transform: none; transition-delay: 40ms; }
  .panel:hover:active { transform: translateY(-3px) scale(1.03); }
}
.panel:focus-visible { outline-offset: 4px; z-index: 2; }
/* five panels: three across the top, two wider ones below */
.panel { grid-column: span 2; }
.panel:nth-child(n + 4) { grid-column: span 3; }
@media (max-width: 980px) {
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel, .panel:nth-child(n + 4) { grid-column: auto; }
  .panel:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .panels { grid-template-columns: minmax(0, 1fr); } .panel:last-child { grid-column: auto; } }

/* ---------- Where we work: Missouri county map from Census data ---------- */
.area-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.area-copy p { color: var(--ink-soft); font-size: 1.15rem; margin-top: 20px; }
.area-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.area-list li {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.area-call { font-weight: 700; color: var(--ink) !important; }
.area-call a { font-family: var(--display); font-weight: 900; font-size: min(1.8rem, 10vw); color: var(--red); text-decoration: none; white-space: nowrap; margin-left: 4px; }
@media (hover: hover) and (pointer: fine) { .area-call a:hover { color: var(--red-press); } }

.area-map { margin: 0; }
.mo-map { width: 100%; height: auto; }
.mo-map .co { fill: var(--panel); stroke: rgba(17, 19, 24, 0.22); stroke-width: 0.8; stroke-linejoin: round; transition: fill var(--duration-quick) var(--ease-smooth-out); }
.mo-map .co.home { fill: var(--blue); stroke: var(--blue); stroke-width: 1.5; }
@media (hover: hover) and (pointer: fine) { .mo-map .co:not(.home):hover { fill: var(--panel-2); } }
.mo-map .ref circle { fill: var(--ink); }
.mo-map .ref-labels text { fill: var(--ink-soft); font-family: var(--body); font-weight: 700; font-size: 19px; }
.mo-map .home-pin circle { fill: var(--red); }
.mo-map .home-pin .ring { fill: none; stroke: var(--red); stroke-width: 2; opacity: 0.6; }
.mo-map .home-label { fill: var(--ink); font-family: var(--display); font-weight: 800; font-size: 26px; text-transform: uppercase; letter-spacing: 0.02em; }
.area-map figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }

@media (max-width: 900px) {
  .area-grid { grid-template-columns: minmax(0, 1fr); }
}
/* the map shrinks on phones, so its lettering scales back up */
@media (max-width: 600px) {
  .mo-map .ref-labels { display: none; } /* the list above names the regions; small labels collide */
  .mo-map .home-label { font-size: 40px; }
}

/* ---------- Estimate form ---------- */
.form { background: var(--panel); border-top: 4px solid var(--blue); padding: clamp(24px, 4vw, 44px); }
.form h2 { font-size: clamp(1.9rem, 2.6vw, 2.4rem); }
.form-intro { color: var(--ink-soft); margin: 14px 0 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; min-width: 0; border: 0; padding: 0; }
.field label, .field legend { font-weight: 700; font-size: 1rem; color: var(--ink); padding: 0; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--page); border: 1.5px solid var(--line-2); border-radius: 0;
  padding: 12px 14px;
  transition: border-color var(--duration-quick) var(--ease-smooth-out);
}
.field select { background-color: var(--page); color: var(--ink); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field textarea { min-height: 150px; resize: vertical; }
.field ::placeholder { color: var(--muted); opacity: 1; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.field .help { font-size: 0.95rem; color: var(--muted); }
.field .help:empty { display: none; }
.field .error { font-size: 0.92rem; line-height: 1.4; font-weight: 700; color: var(--red); transition: opacity var(--duration-quick) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out); }
.field .error:empty { display: none; }
/* required fields keep one line free for their message, so nothing below moves when it appears */
.field:has(:required) .error { display: block; min-height: 1.4em; margin-top: -2px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.form .btn-call { width: 100%; margin-top: 6px; }
.form-status { margin-top: 18px; padding: 16px 18px; background: var(--page); border: 1px solid var(--line-2); transition: opacity var(--duration-quick) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out); }
/* errors and the status message ease in instead of popping */
@starting-style {
  .field .error:not(:empty), .form-status:not(:empty) { opacity: 0; transform: translateY(var(--distance-micro)); }
}
.form-status:empty { display: none; }
.form-status p { margin: 0; }
.form-status a { color: var(--red); font-weight: 700; white-space: nowrap; }
.form-privacy { margin: 12px 0 0; font-size: 0.9rem; color: var(--muted); }
.form-privacy a { color: var(--ink); font-weight: 700; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* spam trap: off-screen, out of the tab order, hidden from screen readers */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Our work: 3 x 3 grid; a swipe row on phones ---------- */
.work { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.work-item { display: block; position: relative; overflow: hidden; background: var(--panel); touch-action: manipulation; }
.work-item img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.work-item:focus-visible { outline-offset: -3px; }
.work-item:focus-visible img { outline: 3px solid #ffffff; outline-offset: -6px; }
@media (hover: hover) and (pointer: fine) { .work-item:hover img { transform: scale(1.03); } }
@media (max-width: 640px) {
  .work {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .work::-webkit-scrollbar { display: none; }
  .work li { scroll-snap-align: start; }
}

/* Photo viewer (native <dialog>). The viewer itself appears instantly: iOS Safari
   ignores taps on a dialog while it is still fading in. Only the photo eases in. */
.viewer {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 16px;
  overscroll-behavior: contain;
  border: 0; background: rgba(10, 12, 16, 0.96); color: #ffffff; /* solid here, so it never depends on ::backdrop (Safari) */
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.viewer[open] { display: flex; }
.viewer::backdrop { background: rgba(10, 12, 16, 0.92); }
.viewer-img { display: block; max-width: 100%; max-height: calc(100dvh - 110px); width: auto; height: auto; object-fit: contain; transition: transform var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) var(--ease-smooth-out); }
@starting-style {
  .viewer[open] .viewer-img { transform: scale(var(--scale-press)); opacity: 0; }
}
.viewer-bar { display: flex; align-items: center; gap: 8px; }
.viewer-btn {
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.12); color: #ffffff; border: 0; border-radius: 0; cursor: pointer; touch-action: manipulation;
  transition: background-color var(--duration-quick) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out);
}
.viewer-btn:active { transform: scale(var(--scale-press)); }
.viewer-btn .icon { width: 22px; height: 22px; }
.viewer-btn .flip { transform: scaleX(-1); }
.viewer-close { margin-left: 16px; }
.viewer-count { min-width: 5ch; text-align: center; font-weight: 700; }
.viewer :focus-visible { outline-color: #ffffff; }
@media (hover: hover) and (pointer: fine) { .viewer-btn:hover { background: rgba(255, 255, 255, 0.24); } }

/* ---------- 404 ---------- */
.lost { min-height: 60svh; display: flex; flex-direction: column; justify-content: center; padding-block: 80px; }
.lost h1 { max-width: 16ch; font-size: min(var(--text-hero), 14vw); }
.lost p { color: var(--ink-soft); margin: 22px 0 30px; font-size: 1.2rem; }
/* both buttons share one row, one height, one baseline */
.lost-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.lost-actions .btn { margin: 0; }
@media (max-width: 480px) { .lost-actions { flex-direction: column; } .lost-actions .btn { width: 100%; } }

/* ---------- Privacy ---------- */
.prose { padding-block: clamp(48px, 7vw, 96px); }
.prose > * { max-width: 68ch; }
.prose h1 { font-size: min(var(--text-hero), 16vw); }
.prose-lede { font-size: 1.25rem; color: var(--ink); margin-top: 20px; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 40px 0 10px; }
.prose p { color: var(--ink-soft); }
.prose a { color: var(--red); font-weight: 700; }
.prose-date { margin-top: 40px; font-size: 0.95rem; color: var(--muted) !important; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); padding-block: 56px 32px; font-size: 1rem; color: rgba(255, 255, 255, 0.85); }
.site-footer .brand-logo { height: 84px; }
.site-footer :focus-visible { outline-color: #ffffff; }
/* columns drop to the next row on their own when text is enlarged */
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 36px; }
.site-footer h2 { font-size: 1.3rem; letter-spacing: 0.04em; color: #ffffff; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; }
.footer-base a { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .site-footer a:hover { color: #ffffff; text-decoration: underline; } }
.footer-brand p { margin-top: 16px; max-width: 34ch; }
.footer-phone { font-family: var(--display); font-weight: 800; font-size: min(2rem, 11vw); color: #ffffff; letter-spacing: 0.02em; }
.footer-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: rgba(255, 255, 255, 0.75); font-size: 0.92rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; }
@media (max-width: 760px) {
  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 1px;
    background: var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--line);
  }
  .callbar a {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px;
    font-weight: 800; font-size: min(1.05rem, 4.6vw); text-decoration: none; touch-action: manipulation;
    user-select: none; -webkit-user-select: none;
  }
  .callbar a:active { filter: brightness(0.92); }
  .callbar .cb-call { background: var(--red); color: var(--on-red); }
  .callbar .cb-text { background: var(--panel-2); color: var(--ink); }
  body { padding-bottom: calc(61px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } /* focused form messages stay clear of the call bar */
  .js .callbar { transform: translateY(100%); transition: transform var(--duration-quick) var(--ease-smooth-out); }
  .js .callbar.is-shown { transform: none; transition-duration: var(--duration-fast); }
}

/* hover color changes ease instead of snapping */
.hero-call a, .area-call a, .nav-phone, .site-footer a, .form-status a {
  transition: color var(--duration-quick) var(--ease-smooth-out);
}

/* High-contrast preference: stronger lines, darker secondary text */
@media (prefers-contrast: more) {
  :root { --line: #6b717a; --line-2: #3f444c; --muted: #2b2f35; --ink-soft: #1c1f24; }
  .field input, .field select, .field textarea { border-width: 2px; }
}

/* Reduced motion: drop movement, keep gentle fades and color changes */
@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
  .text-link .icon { transition: none; }
  .work-item img, .viewer-btn { transition: none; }
  .panel, .panel:hover, .panel:active, .panel:hover:active, .panel:hover h3, .panel-cta, .panel:hover .panel-cta { transform: none; }
  .panel::before { transform: none; opacity: 0; transition: opacity var(--duration-quick) linear; }
  .panel:hover::before { opacity: 1; }
  .viewer[open] .viewer-img { transform: none; }
  .nav, .nav.is-open { transform: none; }
  .js .callbar { transform: none; opacity: 0; pointer-events: none; transition: opacity var(--duration-quick) linear; }
  .js .callbar.is-shown { opacity: 1; pointer-events: auto; }
  @starting-style {
    .viewer[open] .viewer-img { transform: none; opacity: 0; }
    .field .error:not(:empty), .form-status:not(:empty) { transform: none; }
  }
}
