/* Delgado's Quality Painting Services - Goleta - spec build #47
   ---------------------------------------------------------------------------
   PHOTO-LED, AND THE BEFORE/AFTERS ARE THE PAGE. Zero Google reviews, so
   there is no testimonial section and never will be. What he does have is
   two before/after pairs he posted himself, which is the most persuasive
   object a painter can show. They get a full-width dark band, large.

   Structure, deliberately unlike the last ten:
     #37 text beside a photo   #38 text above a full-bleed photo
     #39 text over a photo     #40 a triptych
     #41 a review spine        #42 one thesis photo beside its caption
     #43 bands by licence class    #44 a numbered four-stage sequence
     #45 bands by job state        #46 type-led, reviews grouped by room
     #47 SPLIT HERO WITH THE PHOTO BLEEDING OFF THE RIGHT EDGE, then a dark
         before/after band, and the licence record on a LIGHT panel (the
         inverse of #46's dark record band). No eyebrows anywhere.

   ⭐⭐ THE PALETTE IS SAMPLED OFF THE LETTERING ON HIS TRUCK (photo p09).
   Crop 110x60 at 625,420, white-balanced against the silver door (95th pct
   of low-saturation pixels), ink found by hue clustering, not coordinates.
   Dominant ink: #486379, hue ~206, sat 0.41 - a steel blue.
   The neutrals come from the same frame: the truck is silver, so the paper
   is a cool silver-grey rather than #46's warm stone.

   ⚠ COLLISION, ACCEPTED: hue 206 sits near #42's navy (211) and #37's blue
   (212). The brand wins over separation, per the locked rule. It is kept
   apart by VALUE and SATURATION (a greyed steel against a saturated navy)
   and by the layout, which shares nothing with either.

   ⚠ THE LIGHT-GROUNDS-ONLY TRAP, CHECKED BEFORE CHOOSING: the sampled steel
   is 6.29 on white and only 2.61 on the ink, so dark bands use a lightened
   steel and never the sampled one.

   ⚠ EVERY RATIO BELOW WAS COMPUTED, NOT ESTIMATED.
     #17202A ink      on white 16.45 | on paper 14.50
     #486379 steel    on white  6.29 | on paper  5.55 | on ink 2.61 (NO)
     #384F61 steel-h  white on it 8.54
     #A9C0D3 steel-l  on ink  8.75 | on white 1.88   DARK GROUNDS ONLY
     #4F5A64 muted    on white  7.05 | on paper  6.21
     #CBD6DF body-d   on ink 11.14
     #8D9DAB dim-d    on ink  5.91
   --------------------------------------------------------------------------- */

:root {
  --ground:  #FFFFFF;
  --paper:   #EEF1F3;   /* silver, from the truck body */
  --ink:     #17202A;
  --steel:   #486379;   /* SAMPLED off the truck lettering */
  --steel-h: #384F61;
  --steel-l: #A9C0D3;   /* DARK GROUNDS ONLY - 1.88 on white */
  --muted:   #4F5A64;
  --rule:    #D8DEE3;

  --rule-d:  #2C3845;
  --body-d:  #CBD6DF;
  --dim-d:   #8D9DAB;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --wide: 1180px;
  --s-md: 16px; --s-lg: 26px; --s-xl: 36px; --s-2xl: 60px;
  --sect: clamp(64px, 9vw, 108px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Browser surfaces. The parts you did not draw still carry the design, and
   this is the cheapest signal that a page was built rather than assembled. */
::selection      { background: var(--steel-l); color: var(--ink); }
:root            { caret-color: var(--steel); accent-color: var(--steel); }
:focus-visible   { outline: 2px solid var(--steel); outline-offset: 3px; }
a                { color: var(--steel); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tabular, time, dd { font-variant-numeric: tabular-nums; }
@supports (scrollbar-color: auto) {
  html { scrollbar-color: var(--steel) var(--paper); scrollbar-width: thin; }
}

img { max-width: 100%; height: auto; display: block; }
.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: 24px; }
.muted { color: var(--muted); }

/* ── Utility bar ──────────────────────────────────────────────────────── */
.util { background: var(--ink); color: var(--body-d); font-size: 13.5px; }
.util .wrap { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-block: 8px; }
.util span + span::before { content: "\00B7"; margin-right: 22px; color: var(--dim-d); }
@media (max-width: 560px) {
  .util span:last-child { display: none; }
}

/* ── Masthead: the truck sets the name in bold caps over a small line ─── */
.mast { border-bottom: 1px solid var(--rule); }
.mast .wrap {
  display: flex; flex-wrap: wrap; gap: 12px 26px;
  align-items: center; justify-content: space-between; padding-block: 16px;
}
.mast .mark {
  margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -0.01em;
  text-transform: uppercase; color: var(--steel); line-height: 1.1;
}
.mast .mark span {
  display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  text-transform: none; color: var(--muted); margin-top: 3px;
}
.mast .tel {
  background: var(--steel); color: #fff; font-size: 17px; font-weight: 700;   /* 6.29 */
  text-decoration: none; white-space: nowrap; border-radius: 7px; padding: 10px 18px;
}
.mast .tel:hover { background: var(--steel-h); }

/* ── Hero: text on silver, the truck photo bleeding off the right edge ── */
/* ⚠ padding-block 0 is load-bearing: a hero must not inherit section padding */
section { padding-block: var(--sect); }
.hero {
  padding-block: 0; background: var(--paper);
  display: grid; align-items: center;
}
.hero-text { padding: clamp(44px, 7vw, 88px) 24px; }
.hero h1 {
  margin: 0 0 var(--s-md); max-width: 17ch;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04; letter-spacing: -0.034em; font-weight: 800;
}
.hero h1 em { font-style: normal; color: var(--steel); }   /* 5.55 on paper */
.hero .lede { margin: 0 0 var(--s-xl); color: var(--muted); font-size: 19px; max-width: 46ch; }
.hero-photo { margin: 0; height: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 834 / 619;
  object-position: 85% 50%; }   /* keep the lettered truck in frame */
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-text {
    padding-inline-start: max(24px, calc((100vw - var(--wide)) / 2 + 24px));
    padding-inline-end: 48px;
  }
  .hero-photo img { aspect-ratio: auto; min-height: 460px; }
}

.btn {
  display: inline-block; background: var(--steel); color: #fff;
  font-size: 16.5px; font-weight: 700; padding: 14px 26px;
  border-radius: 7px; text-decoration: none;
}
.btn:hover { background: var(--steel-h); }

h2 {
  margin: 0 0 var(--s-md);
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; max-width: 22ch;
}
p { margin: 0 0 var(--s-md); }
p:last-child { margin-bottom: 0; }
.intro { font-size: 19px; max-width: 60ch; color: var(--muted); }

/* ── Before and after: the dark band ──────────────────────────────────── */
.ba { background: var(--ink); color: var(--body-d); }
.ba h2 { color: #fff; }
.ba .intro { color: var(--body-d); }
.ba-grid { display: grid; gap: var(--s-2xl) var(--s-xl); margin-top: var(--s-2xl); }
@media (min-width: 860px) { .ba-grid { grid-template-columns: 1fr 1fr; } }
.ba figure { margin: 0; }
.ba img { width: 100%; border-radius: 8px; outline: 1px solid oklch(1 0 0 / 0.1); outline-offset: -1px; }
.ba figcaption { margin-top: 14px; font-size: 16px; max-width: 52ch; color: var(--body-d); }
.ba figcaption b { color: #fff; }

/* ── More from the listing: two frames at different heights ───────────── */
.more-grid { display: grid; gap: var(--s-lg); margin-top: var(--s-xl); align-items: end; }
@media (min-width: 760px) { .more-grid { grid-template-columns: 1.35fr 1fr; } }
.more figure { margin: 0; }
.more img { width: 100%; border-radius: 8px; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; }
.more-grid figure:last-child img { max-height: 560px; object-fit: cover; }
.more figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ── The license, on a light panel ────────────────────────────────────── */
.license { background: var(--paper); }
.license .wrap { display: grid; gap: var(--s-xl); }
@media (min-width: 900px) {
  .license .wrap { grid-template-columns: 1fr 1.25fr; align-items: start; }
}
.record { margin: 0; border-top: 2px solid var(--steel); background: var(--ground); border-radius: 0 0 8px 8px; }
.record div {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding: 13px 18px; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 14.5px;
}
.record div:last-child { border-bottom: 0; }
.record dt { margin: 0; color: var(--muted); }
.record dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.record .hi dd { color: var(--steel); font-weight: 700; }   /* 6.29 on white */

/* ── Hours and where ──────────────────────────────────────────────────── */
.reach-grid { display: grid; gap: var(--s-2xl); margin-top: var(--s-xl); align-items: start; }
@media (min-width: 860px) { .reach-grid { grid-template-columns: 1fr 1fr; } }
.hours { margin: 0; max-width: 420px; border-top: 1px solid var(--rule); }
.hours div {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 11px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 14.5px;
}
.hours dt { margin: 0; color: var(--muted); }
.hours dd { margin: 0; color: var(--ink); font-weight: 600; }
.hours .shut dd { color: var(--muted); font-weight: 400; }
.where p { margin-bottom: var(--s-md); }

/* ── Letter ───────────────────────────────────────────────────────────── */
.letter { background: var(--paper); }
.letter .wrap { max-width: 820px; }
.letter p { color: var(--muted); max-width: 68ch; }
.letter strong { color: var(--ink); }
.letter .sign { margin-top: var(--s-lg); color: var(--ink); font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer { background: var(--ink); color: var(--body-d); padding-block: var(--s-2xl) var(--s-xl); }
footer .wrap { display: grid; gap: var(--s-lg); }
@media (min-width: 700px) { footer .wrap { grid-template-columns: 1.3fr 1fr 1fr; } }
footer h4 { margin: 0 0 10px; color: #fff; font-size: 15px; font-weight: 700; }
footer p { margin: 0 0 4px; font-size: 15px; }
footer a { color: var(--steel-l); text-decoration: none; }   /* 8.75 on ink */
footer a:hover { text-decoration: underline; }
/* grid-column is load-bearing - #41's bug */
.legal {
  grid-column: 1 / -1;
  margin-top: var(--s-xl); padding-top: var(--s-md);
  border-top: 1px solid var(--rule-d); font-size: 12.5px; color: var(--dim-d);
}

/* ── Sticky call button, phones only ──────────────────────────────────── */
.callbar { display: none; }
@media (max-width: 700px) {
  .callbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--steel); padding: 13px 16px; text-align: center;
  }
  .callbar a { color: #fff; font-weight: 700; text-decoration: none; font-size: 17px; }
  body { padding-bottom: 62px; }
  /* the callbar carries the number on phones; a third button in the mast is noise */
  .mast .tel { display: none; }
}
