/* HighFord Construction — public site styles */

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin-opsz-wght.woff2") format("woff2-variations"),
       url("/fonts/dm-sans-latin-opsz-wght.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette (from the identity board) */
  --charcoal: #1A1A1A;
  --sand: #B7A28A;      /* decorative, or text on charcoal only (7.1:1). Never text on ivory (2.3:1). */
  --ivory: #FAF8F4;
  /* Supporting tones derived for legibility */
  --sand-ink: #6E5B47;  /* sand-family text on ivory, 6.1:1 */
  --ink-soft: #55534F;  /* secondary text on ivory, 7.2:1 */
  --rule: #DDD5C9;      /* hairlines (decorative only) */
  --field: #8A8177;     /* form control borders, ≥3:1 on white */
  --paper: #FFFFFF;
  --on-dark-soft: #B5ADA3; /* secondary text on charcoal, ≥7:1 */
  --error: #A23B2A;     /* 6.2:1 on ivory */

  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(4.5rem, 10vw, 8.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; left: 0; top: 0;
}
.estimate-form, .field { position: relative; } /* keeps screen-reader-only text inside the form box */

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--charcoal); color: var(--ivory); padding: 0.75rem 1rem;
}
.skip-link:focus { top: 1rem; }

.small { font-size: 0.9375rem; color: var(--ink-soft); }

/* Preview notice — remove for production */
.preview-bar {
  background: var(--charcoal); color: var(--sand);
  font-size: 0.875rem; text-align: center; padding: 0.5rem var(--gutter);
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.4rem;
  border: 1px solid var(--charcoal); border-radius: 2px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; text-align: center;
}
.button--dark { background: var(--charcoal); color: var(--ivory); }
.button--dark:hover { background: #333230; }
.button--outline { background: transparent; color: var(--charcoal); }
.button--outline:hover { background: var(--charcoal); color: var(--ivory); }
.button--block { width: 100%; }
.button[disabled] { opacity: 0.6; cursor: progress; }

.text-link { color: var(--sand-ink); font-weight: 500; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header__inner {
  display: flex; align-items: center; gap: 2rem;
  min-height: 92px; padding-block: 0.75rem;
}
.brand { flex: none; display: block; }
.brand img {
  height: 72px; width: auto; /* the crop's ground (#F9F8F4) matches the ivory page */
}
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: 0.975rem; white-space: nowrap; }
.site-nav a:hover { text-decoration: underline; }
.site-header__actions { display: flex; align-items: center; gap: 1.25rem; }
.header-phone { font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-phone:hover { text-decoration: underline; }

@media (max-width: 1240px) {
  .site-nav { display: none; }
  .site-header__actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .site-header__inner { min-height: 72px; gap: 1rem; }
  .brand img { height: 50px; }
  .header-phone { display: none; }
  .site-header__actions .button { min-height: 44px; padding: 0.6rem 0.9rem; font-size: 0.9375rem; }
}

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section); }
.hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 1.04; letter-spacing: -0.022em; max-width: 12ch;
  font-variation-settings: "opsz" 40;
}
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-soft); max-width: 34rem; margin-top: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero__note { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--sand-ink); }
.hero__guide { display: inline-block; align-self: flex-start; padding-block: 0.6rem; margin-top: 0.5rem; font-weight: 600; color: var(--charcoal); text-underline-offset: 4px; }
.hero__media img { width: 100%; aspect-ratio: 973 / 730; object-fit: cover; }
figcaption { font-size: 0.875rem; color: var(--ink-soft); margin-top: 0.75rem; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__media { order: -1; margin-inline: calc(var(--gutter) * -1); }
  .hero__media img { aspect-ratio: 16 / 9; object-position: 50% 50%; }
  .hero__media figcaption { padding-inline: var(--gutter); }
}
/* Phones: photo, headline and the estimate button fit on the first screen; the lead follows. */
@media (max-width: 640px) {
  .hero { padding-top: 0; }
  .hero__grid { gap: 1.25rem; }
  .hero__media figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero__text { display: flex; flex-direction: column; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
  .hero__actions { order: 1; margin-top: 1rem; }
  .hero__guide { order: 1; } /* right under the buttons on phones */
  .lead { order: 2; margin-top: 1.5rem; }
  .hero__note { order: 3; }
}

/* Section heads */
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head p { color: var(--ink-soft); max-width: 32rem; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-variation-settings: "opsz" 40; }
@media (max-width: 760px) {
  .section-head { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

/* Services */
.services { padding-block: 0 var(--section); }
.services__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 5vw, 4.5rem); }
.services__intro p { color: var(--ink-soft); margin-top: 1.25rem; max-width: 26rem; }
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--charcoal); }
.service { padding-block: 1.75rem 2rem; border-bottom: 1px solid var(--rule); }
.service h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); margin-bottom: 0.75rem; }
.service p { color: var(--ink-soft); max-width: 36rem; }
@media (min-width: 861px) {
  .services__intro { position: sticky; top: 2rem; align-self: start; }
}
@media (max-width: 860px) {
  .services__grid { grid-template-columns: minmax(0, 1fr); }
}
/* Starting prices */
.pricing { grid-column: 2; padding: 1.75rem 0 0; }
.pricing__title { font-size: 1.25rem; margin-bottom: 0.75rem; }
.pricing__list { list-style: none; margin: 0; padding: 0; }
.pricing__list li { padding-block: 0.6rem; border-bottom: 1px solid var(--rule); font-size: 1.0625rem; }
.pricing__note { color: var(--ink-soft); margin: 1rem 0 1.25rem; max-width: 36rem; font-size: 0.9375rem; }
@media (max-width: 860px) { .pricing { grid-column: 1; } }
/* Link to the 5K / 6K guide (a separate page; no 3D code loads on the home page) */
.guide-teaser {
  grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem; background: var(--paper); border: 1px solid var(--rule);
}
.guide-teaser h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.guide-teaser p { color: var(--ink-soft); max-width: 32rem; }
.guide-teaser .button { flex-shrink: 0; }
.guide-teaser__materials { display: inline-block; margin-top: 0.75rem; padding-block: 0.5rem; }
@media (max-width: 860px) { .guide-teaser { grid-column: 1; } }
@media (max-width: 560px) { .guide-teaser { flex-direction: column; align-items: flex-start; } }

/* Detail band — the sealed corners */
.detail { background: var(--charcoal); color: var(--ivory); padding-block: var(--section); }
.detail :focus-visible { outline-color: var(--sand); }
.detail__grid {
  display: grid; gap: clamp(1.25rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr);
  align-items: start;
}
.detail__text { align-self: center; padding-right: clamp(0px, 2vw, 2rem); }
.detail h2 { color: var(--ivory); margin-bottom: 1.5rem; }
.detail p { color: #E6E1D9; }
.detail__source { font-size: 0.9375rem; color: var(--sand) !important; margin-top: 1.5rem; }
.detail__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.detail__photo--b { margin-top: clamp(2rem, 8vw, 6rem); }
@media (max-width: 860px) {
  .detail__grid { grid-template-columns: 1fr 1fr; }
  .detail__text { grid-column: 1 / -1; padding-right: 0; margin-bottom: 1rem; }
  .detail__photo--b { margin-top: 2.5rem; }
}

/* Work */
.work { padding-block: var(--section); }
.work__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: end; }
.work__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.work__item:not(.work__item--wide) img { aspect-ratio: 4 / 5; }
@media (max-width: 760px) {
  .work__grid { grid-template-columns: minmax(0, 1fr); }
  .work__item:not(.work__item--wide) img { aspect-ratio: 4 / 3; }
}

/* Process */
.process { padding-block: var(--section); border-top: 1px solid var(--rule); }
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem);
}
.steps li { counter-increment: step; border-top: 1px solid var(--charcoal); padding-top: 1.25rem; }
.steps li::before {
  content: counter(step); display: block;
  font-size: 2.75rem; font-weight: 300; line-height: 1; color: var(--sand-ink);
  margin-bottom: 1.25rem; font-variation-settings: "opsz" 40;
}
.steps h3 { font-size: 1.25rem; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.steps p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Service area */
.area { padding-block: var(--section); background: #F2EEE7; }
.area__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.area__grid p { color: var(--ink-soft); margin-top: 1.25rem; max-width: 26rem; }
.area__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--charcoal); }
.area__list li {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.15;
  padding-block: 0.9rem; border-bottom: 1px solid var(--rule);
  font-variation-settings: "opsz" 40;
}
@media (max-width: 860px) { .area__grid { grid-template-columns: minmax(0, 1fr); } }

/* Estimate */
.estimate { padding-block: var(--section); }
.estimate__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: auto 1fr; column-gap: clamp(2rem, 5vw, 4.5rem); row-gap: 0; align-items: start;
}
.estimate__intro { grid-column: 1; grid-row: 1; }
.estimate__contact { grid-column: 1; grid-row: 2; }
.estimate__form-wrap { grid-column: 2; grid-row: 1 / span 2; }
.estimate__intro p { color: var(--ink-soft); margin-top: 1.25rem; max-width: 26rem; }
.contact-list { margin: 2rem 0 1rem; display: grid; gap: 1.25rem; }
.contact-list div { border-top: 1px solid var(--rule); padding-top: 1rem; }
.contact-list dt { font-size: 0.875rem; color: var(--sand-ink); font-weight: 500; margin-bottom: 0.25rem; }
.contact-list dd { margin: 0; font-size: 1.0625rem; overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .estimate__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 2rem; }
  .estimate__intro, .estimate__contact, .estimate__form-wrap { grid-column: 1; grid-row: auto; }
  .estimate__form-wrap { order: 1; }
  .estimate__contact { order: 2; }
}

.estimate-form, .form-success {
  background: var(--paper); border: 1px solid var(--rule);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
}
.form-legend-note { font-size: 0.9375rem; color: var(--ink-soft); }
.field { margin: 0 0 1.4rem; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 500; margin-bottom: 0.4rem; padding: 0; }
.req { color: var(--error); }
.optional { font-weight: 400; color: var(--ink-soft); font-size: 0.9375rem; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field textarea {
  width: 100%; min-height: 48px; padding: 0.7rem 0.85rem;
  font: inherit; color: var(--charcoal); background: var(--paper);
  border: 1px solid var(--field); border-radius: 2px;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 1px; border-color: var(--charcoal); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field__hint { font-size: 0.9375rem; color: var(--ink-soft); margin: 0.45rem 0 0; }
.field__error { color: var(--error); font-size: 0.9375rem; font-weight: 500; margin: 0.45rem 0 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; }
.field-row--city { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 520px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .field-row--city { grid-template-columns: minmax(0, 1fr); }
}

.choice__options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.choice__options:not(.choice__options--inline) label { overflow-wrap: anywhere; } /* long words wrap at very large text sizes */
.choice__options--inline { display: flex; flex-wrap: wrap; }
.choice__options--inline label { flex: 1 0 auto; }
.choice__options label {
  display: flex; align-items: center; gap: 0.7rem; margin: 0;
  min-height: 48px; padding: 0.6rem 0.85rem; font-weight: 400;
  border: 1px solid var(--field); border-radius: 2px; cursor: pointer;
}
.choice__options label:has(input:checked) { border-color: var(--charcoal); box-shadow: inset 0 0 0 1px var(--charcoal); background: #F6F3EE; }
.choice__options input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--charcoal); flex: none; }
.choice[aria-invalid="true"] .choice__options label { border-color: var(--error); }

.field input[type="file"] {
  width: 100%; min-width: 0; max-width: 100%; font: inherit; font-size: 0.9375rem; padding: 0.6rem;
  border: 1px dashed var(--field); border-radius: 2px; background: #FCFBF9;
  overflow: hidden; box-sizing: border-box;
}
/* rc6: the photo picker. The native file field cut its own label at large text in Safari, so it is
   kept (focusable, same name and errors) but drawn by a real button-like label that wraps; it
   works without JavaScript too (the label opens the picker). */
.file-pick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.85rem; padding: 0.6rem; border: 1px dashed var(--field); border-radius: 2px; background: #FCFBF9; max-width: 100%; box-sizing: border-box; }
.has-js .field .file-pick__input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.file-pick__button {
  display: inline-block; max-width: 100%; box-sizing: border-box; min-height: 44px; font: inherit; font-weight: 600; font-size: 0.9375rem;
  padding: 0.55rem 0.9rem; border: 1px solid var(--charcoal); border-radius: 2px; background: var(--paper); color: var(--charcoal); cursor: pointer; white-space: normal; overflow-wrap: anywhere;
}
.file-pick__status { font-size: 0.9375rem; color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
.file-pick__input:focus-visible + .file-pick__button { outline: 3px solid var(--charcoal); outline-offset: 2px; }
.file-pick__input:disabled + .file-pick__button { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
html:not(.has-js) .file-pick__button, html:not(.has-js) .file-pick__status { display: none; } /* no JavaScript: the native field shows the chosen files */
html:not(.has-js) .file-pick__input { width: 100%; border: 0; padding: 0; background: none; }
.field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: 0.85rem; padding: 0.55rem 0.9rem;
  border: 1px solid var(--charcoal); border-radius: 2px; background: var(--paper); color: var(--charcoal); cursor: pointer;
}
.photo-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.4rem; container-type: inline-size; }
/* rc7: each photo is a card laid out on a grid, so "Remove" has its own column that the name can
   never take: the name column is minmax(0, 1fr) and shrinks to nothing before the button moves,
   whatever the name (no spaces, 255 characters, emoji, CJK). The name wraps up to two lines, then
   "…"; the size sits under it. When the card is narrow (small iPhone, or large text, since the
   breakpoint is in rem), "Remove" drops to its own row, still inside the card and aligned right.
   Browsers without container queries (iOS 15 and older) keep the three columns: still inside.
   Touch target at least 44 × 44 px. */
.photo-list li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "thumb name remove" "thumb size remove";
  align-items: center; column-gap: 0.75rem; row-gap: 0.1rem; font-size: 0.9375rem;
  padding: 0.5rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper);
  min-width: 0; max-width: 100%; box-sizing: border-box;
}
.photo-list img { grid-area: thumb; align-self: center; width: 44px; height: 44px; object-fit: cover; border-radius: 2px; background: var(--rule); }
.photo-list .name {
  grid-area: name; align-self: end; min-width: 0; overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.photo-list .size { grid-area: size; align-self: start; min-width: 0; color: var(--ink-soft); font-size: 0.875rem; white-space: nowrap; }
.photo-list button {
  grid-area: remove; justify-self: end; white-space: nowrap;
  font: inherit; font-size: 0.875rem; background: none; border: 0; padding: 0.5rem 0.75rem; min-height: 44px; min-width: 44px;
  color: var(--sand-ink); text-decoration: underline; cursor: pointer; touch-action: manipulation;
}
@container (max-width: 21rem) {
  .photo-list li { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "thumb name" "thumb size" "remove remove"; }
}
/* Very narrow for the text size (small iPhone with large text): the thumbnail goes above the name,
   so the name gets the card's full width instead of a few letters. */
@container (max-width: 15rem) {
  .photo-list li { grid-template-columns: minmax(0, 1fr); grid-template-areas: "thumb" "name" "size" "remove"; }
  .photo-list img { justify-self: start; }
}
.photo-list button:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.privacy-note { font-size: 0.9375rem; color: var(--ink-soft); }
.form-status { font-size: 0.9375rem; color: var(--ink-soft); margin-top: 0.75rem; min-height: 1.5em; }
.form-status.is-error { color: var(--error); font-weight: 500; }

.form-errors { border: 2px solid var(--error); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.form-errors h3 { font-size: 1.0625rem; letter-spacing: 0; color: var(--error); margin-bottom: 0.5rem; }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.form-errors a { color: var(--error); }

.form-success h3 { font-size: 1.75rem; margin-bottom: 1rem; }
.form-success:focus { outline: none; }
.form-errors:focus { outline: 3px solid var(--charcoal); outline-offset: 3px; }

/* Footer */
.site-footer { background: var(--charcoal); color: #E6E1D9; padding-block: clamp(3rem, 7vw, 5rem) 2rem; font-size: 0.975rem; }
.site-footer :focus-visible { outline-color: var(--sand); }
.site-footer a { color: var(--ivory); overflow-wrap: anywhere; }
.site-footer__grid { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.site-footer__brand img { width: 96px; height: 96px; mix-blend-mode: lighten; /* JPEG ground blends into the charcoal footer */ }
.footer-title { font-size: 1.125rem; letter-spacing: 0; margin-bottom: 0.6rem; color: var(--ivory); }
.site-footer__legal { grid-column: 1 / -1; border-top: 1px solid #3A3936; padding-top: 1.5rem; margin-top: 1rem; color: var(--on-dark-soft); font-size: 0.875rem; }
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer__brand img { width: 72px; height: 72px; }
}

/* Mobile call / estimate bar */
.mobile-cta { display: none; }
@media (max-width: 760px) {
  /* Shown only once JavaScript is running (estimate-form.js adds .has-js), because only then can it
     hide itself while the opening's buttons or the form are on screen. */
  html:not(.has-js) .mobile-cta { display: none !important; }
  .mobile-cta {
    position: fixed; inset: auto 0 0 0; z-index: 60;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0.5rem; align-items: stretch; /* rc7: wider estimate column, so "estimate" stays whole at 320 px with text 200% */
    /* Clear the iPhone home indicator and rounded corners when the browser reports them. */
    padding: 0.5rem max(var(--gutter), env(safe-area-inset-right, 0px)) max(0.5rem, calc(0.25rem + env(safe-area-inset-bottom, 0px))) max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--ivory); border-top: 1px solid var(--rule);
    box-shadow: 0 -2px 10px rgba(26, 26, 26, 0.08);
    transition: transform 0.2s ease;
  }
  /* Hidden while the form is on screen: slides away, then cannot be focused or tapped. */
  .mobile-cta.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform 0.2s ease, visibility 0s linear 0.2s; }
  /* The estimate button gets the wider column; both stay at least 48 px tall and wrap rather than clip. */
  .mobile-cta .button { min-width: 0; min-height: 48px; padding: 0.45rem 0.4rem; line-height: 1.15; overflow-wrap: break-word; touch-action: manipulation; } /* rc7: break-word, not anywhere: a word is split only if it cannot fit on a line of its own */
  /* Room for the fixed bar is reserved inside the dark footer (not as a light strip under it).
     --mobile-cta-h is the bar's measured height (set by estimate-form.js), so larger text
     sizes never let the bar cover the last footer line. 76px is the fallback without JavaScript. */
  .has-js .site-footer { padding-bottom: calc(2rem + var(--mobile-cta-h, 76px)); }
  /* Keyboard focus and in-page jumps keep the target above the fixed bar (only when the bar exists). */
  html.has-js { scroll-padding-bottom: calc(var(--mobile-cta-h, 76px) + 0.5rem); }
}
@media (prefers-reduced-motion: reduce) { .mobile-cta { transition: none; } }

/* Plain message pages (no-JavaScript form fallback) */
.message-page { padding-block: clamp(3rem, 10vw, 7rem); max-width: 40rem; }
.message-page h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1.5rem; }
.message-page ul { margin: 0 0 1.5rem; padding-left: 1.2rem; }

/* Legal and utility pages (privacy policy, 404) */
.legal-page { padding-block: clamp(2.5rem, 7vw, 5rem) var(--section); max-width: 46rem; }
.legal-page h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); margin-bottom: 0.75rem; }
.legal-page h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.5rem 0 0.75rem; }
.legal-page ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal-page li { margin-bottom: 0.4rem; }
.legal-updated { color: var(--ink-soft); font-size: 0.9375rem; }
.message-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.site-footer--compact { padding-block: 2.5rem 2rem; }
.site-footer--compact .site-footer__legal { border-top: 1px solid #3A3936; padding-top: 1.25rem; margin-top: 1.25rem; }

/* Image fallback: if a photo fails to load, its box keeps its size and a neutral tone (alt text stays readable) */
.hero__media img, .work__item img, .detail__photo img { background-color: #E6E0D6; color: var(--charcoal); }
/* Pages without the main nav (privacy, 404): keep the header actions on the right */
.site-header__inner > .brand + .site-header__actions { margin-left: auto; }
/* Long email addresses wrap instead of widening the page on very narrow screens */
a[href^="mailto:"] { overflow-wrap: anywhere; }
/* rc6: a photo error outlines the visible picker (the native field is hidden when JavaScript runs) */
.file-pick:has(.file-pick__input[aria-invalid="true"]) { border: 2px solid var(--error); }
