/* Miller's Painting & Home Repair
   Colors and type from the yard sign. Layout kept simple on purpose. */
:root {
  --green-900: #2f3a29;
  --green-800: #3d4934;
  --green-700: #4d5a3c;
  --green-200: #d9dcc8;
  --forest: #2f3d32;
  --cream: #f6f4ec;
  --white: #fffefa;
  --clay: #c27c52;
  --clay-dark: #9c5530;
  --ink: #26261f;
  --ink-soft: #55554c;
  --line: #dcd8c8;
  --focus: #b5591f;

  --f-display: "Young Serif", Georgia, serif;
  --f-label: "League Spartan", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 32px);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.7 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { max-width: 1140px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.center { text-align: center; }

/* ---------- Type ---------- */
h2 { font: 400 clamp(1.9rem, 1.4rem + 2vw, 2.75rem)/1.12 var(--f-display); color: var(--green-900); letter-spacing: -0.01em; }
.eyebrow { font: 700 1rem/1.2 var(--f-label); letter-spacing: .04em; color: var(--green-700); margin-bottom: 10px; }
.intro { margin-top: 14px; font-size: 1.125rem; color: var(--ink-soft); max-width: 46em; }
.intro.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 10px; border: 2px solid var(--green-800);
  background: var(--green-800); color: var(--white); text-decoration: none; cursor: pointer;
  font: 700 1.0625rem/1 var(--f-label); letter-spacing: .03em; transition: background-color .2s, color .2s;
}
.btn:hover { background: var(--green-900); border-color: var(--green-900); }
.btn--outline { background: transparent; color: var(--green-800); }
.btn--outline:hover { background: var(--green-800); color: var(--white); }
.btn--clay { background: var(--clay-dark); border-color: var(--clay-dark); color: var(--white); }
.btn--clay:hover { background: #84452a; border-color: #84452a; }
.btn--cream { background: var(--white); border-color: var(--white); color: var(--ink); text-transform: uppercase; letter-spacing: .08em; }
.btn--cream:hover { background: var(--cream); border-color: var(--cream); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.btn--block { width: 100%; }

/* ---------- Header & logo ---------- */
.header { position: sticky; top: 0; z-index: 41; background: var(--cream); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.logo { display: inline-flex; flex-direction: column; color: var(--green-800); text-decoration: none; line-height: 1; }
.logo__name { font: 400 2rem/.9 var(--f-display); }
.logo__sub { margin-top: 6px; padding-top: 6px; border-top: 2px solid var(--green-700); font: 800 .75rem/1 var(--f-label); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.logo__sub em { font-style: normal; font-weight: 600; letter-spacing: .12em; color: var(--ink-soft); }
.logo--center { align-items: center; }
.logo--light { color: var(--white); }
.logo--light .logo__sub { color: var(--white); border-color: var(--green-200); }
.logo--light .logo__sub em { color: var(--green-200); }

.nav { display: flex; align-items: center; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a:not(.btn) { display: block; padding: 10px 14px; text-decoration: none; font: 700 1rem/1 var(--f-label); color: var(--green-800); }
.nav__links a:not(.btn):hover { color: var(--clay); }
.nav__links .btn { margin-left: 8px; }
/* Menu button: two thin lines that morph into an X.
   Open: lines slide together, then rotate. Close: un-rotate, then slide apart. */
.menu-btn { display: none; position: relative; width: 48px; height: 48px; margin-right: -10px; border: 0; background: none; cursor: pointer; color: var(--green-800); -webkit-tap-highlight-color: transparent; }
.menu-btn__line { position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; margin-top: -1px; transition: transform .2s cubic-bezier(.4,0,.2,1) .2s; }
.menu-btn__line span { display: block; height: 100%; border-radius: 2px; background: currentColor; transition: transform .2s cubic-bezier(.4,0,.2,1) 0s; }
.menu-btn__line--top { transform: translateY(-4px); }
.menu-btn__line--bottom { transform: translateY(4px); }
.menu-open .menu-btn__line { transform: none; transition-delay: 0s; }
.menu-open .menu-btn__line span { transition-delay: .2s; }
.menu-open .menu-btn__line--top span { transform: rotate(45deg); }
.menu-open .menu-btn__line--bottom span { transform: rotate(-45deg); }
@media (max-width: 860px) { .nav__links { display: none; } .menu-btn { display: grid; } }

/* Drop-down menu (mobile): opens from under the header, links fade in one by one */
.menu {
  position: fixed; left: 0; right: 0; top: var(--header-h, 77px); bottom: 0; z-index: 39;
  background-color: var(--cream);
  background-image: url("assets/limewash-cream.jpg");
  background-image: image-set(url("assets/limewash-cream.webp") type("image/webp"), url("assets/limewash-cream.jpg") type("image/jpeg"));
  background-size: cover; background-position: center top;
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; clip-path: inset(0 0 100% 0);
  transition: clip-path .4s cubic-bezier(.4,0,.2,1) .1s, visibility 0s .5s;
}
.menu-open .menu { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .45s cubic-bezier(.4,0,.2,1), visibility 0s; }
.menu__inner { padding: 20px 32px 40px; }
.menu__links a { display: block; padding: 10px 0; text-decoration: none; font: 400 2rem/1.15 var(--f-display); color: var(--green-900); }
.menu__links a:hover { color: var(--clay-dark); }
.menu__links li, .menu__call { opacity: 0; transform: translateY(-8px); transition: opacity .15s ease, transform .15s ease; }
.menu-open .menu__links li, .menu-open .menu__call { opacity: 1; transform: none; transition: opacity .3s ease, transform .3s ease; transition-delay: calc(.12s + var(--i) * .04s); }
.menu__call { margin-top: 28px; width: 100%; }
@media (min-width: 861px) { .menu { display: none; } }
@media (prefers-reduced-motion: reduce) { .menu, .menu-open .menu { clip-path: none; } }

/* ---------- Hero ---------- */
.hero {
  display: grid; place-items: center;
  min-height: min(84svh, 760px);
  padding: 56px var(--gutter);
  /* Deep forest green, matched to the reference wallpaper */
  background-color: var(--forest);
  /* Original limewash texture (assets/limewash*.webp), deepened to match */
  background-image:
    var(--hero-img, linear-gradient(transparent, transparent)),
    radial-gradient(ellipse 70% 60% at 22% 18%, rgba(70,98,80,.22), transparent 70%),
    linear-gradient(rgba(18,28,20,.28), rgba(18,28,20,.38)),
    url("assets/limewash.jpg");
  background-image:
    var(--hero-img, linear-gradient(transparent, transparent)),
    radial-gradient(ellipse 70% 60% at 22% 18%, rgba(70,98,80,.22), transparent 70%),
    linear-gradient(rgba(18,28,20,.28), rgba(18,28,20,.38)),
    image-set(url("assets/limewash.webp") type("image/webp"), url("assets/limewash.jpg") type("image/jpeg"));
  background-size: cover; background-position: center;
}
@media (max-width: 700px) {
  .hero { background-image:
    var(--hero-img, linear-gradient(transparent, transparent)),
    linear-gradient(rgba(18,28,20,.28), rgba(18,28,20,.38)),
    image-set(url("assets/limewash-sm.webp") type("image/webp"), url("assets/limewash.jpg") type("image/jpeg")); }
}
/* Phones: hero fills the screen below the header, no stray strip */
@media (max-width: 760px) { .hero { min-height: calc(100svh - 77px); } }
.hero__card {
  width: 100%; max-width: 680px; text-align: center;
  background: var(--white); border-radius: 14px; padding: clamp(32px, 6vw, 56px) clamp(22px, 5vw, 56px);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.45);
}
.hero__kicker { font: 700 .875rem/1.4 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--green-700); }
.hero__kicker span { white-space: nowrap; }
@media (max-width: 560px) { .hero__kicker span:not(.hero__dot) { display: block; } .hero__dot { display: none; } }
.hero h1 { margin: 22px auto 0; max-width: 13em; font: 400 clamp(2.3rem, 1.5rem + 3.4vw, 3.8rem)/1.05 var(--f-display); color: var(--green-900); letter-spacing: -0.015em; text-wrap: balance; }
.hero__text { margin: 22px auto 0; max-width: 30em; color: var(--ink-soft); }
.hero__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 32px; }
.hero__actions .btn { width: min(100%, 280px); }
@media (min-width: 620px) { .hero__actions { flex-direction: row; justify-content: center; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 104px) 0; }
.section--tight { padding-top: clamp(56px, 8vw, 88px); }
main > .section:last-child { padding-bottom: clamp(64px, 9vw, 104px); }

/* Services: paint-chip strip, then title and text. Photos live in "Recent projects". */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; margin-top: 36px; }
.card { display: flex; flex-direction: column; }
.card__media { min-height: 112px; border-radius: 10px; background: var(--c); display: flex; align-items: flex-end; padding: 16px 18px; color: var(--white); }
.card[data-light] .card__media { color: var(--green-900); }
.card__media span { font: 400 1.1875rem/1.2 var(--f-display); }
.card__body { padding-top: 16px; }
.card h3 { font: 700 1.1875rem/1.2 var(--f-label); color: var(--ink); }
.card p { margin-top: 8px; color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 1020px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; row-gap: 48px; } .card__media { min-height: 96px; } }

/* Why Miller's: four promises */
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 32px; }
.promises li { padding-top: 18px; border-top: 3px solid var(--green-700); }
.promises h3 { font: 700 1.1875rem/1.25 var(--f-label); color: var(--green-900); }
.promises p { margin-top: 8px; color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 1020px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .promises { grid-template-columns: 1fr; gap: 22px; } }

/* Meet Cris */
.meet { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.meet__photo { margin: 0; }
.meet__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.meet__copy p:not(.eyebrow) { margin-top: 14px; color: var(--ink-soft); font-size: 1.0625rem; }
.meet__copy h2 { margin-bottom: 4px; }
@media (max-width: 760px) { .meet { grid-template-columns: 1fr; } .meet__photo img { aspect-ratio: 4 / 3; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.gallery__item { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--cream); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__item--empty { display: grid; place-items: center; border: 1.5px dashed var(--line); color: var(--ink-soft); font: 600 .9375rem/1.3 var(--f-label); text-align: center; padding: 12px; }
@media (max-width: 560px) { .gallery { gap: 8px; } .gallery__item { border-radius: 12px; } .gallery__item--empty { font-size: .8125rem; } }

/* Sample badge for placeholder content */
.sample { position: absolute; top: 8px; right: 8px; font: 700 .6875rem/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; background: #f4d35e; color: #3a3000; padding: 5px 7px; border-radius: 4px; }

/* Reviews */
.reviews { display: grid; gap: 18px; margin-top: 32px; }
.review { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; background: var(--white); }
.review__who { display: flex; align-items: center; gap: 14px; }
.review__avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--green-700); color: var(--white); font: 400 1.375rem/1 var(--f-display); }
.review__name { font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
.review__date { color: var(--ink-soft); font-size: .9375rem; line-height: 1.3; }
.review p { margin-top: 14px; }
.review__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.stars { color: #e3a81b; font-size: 1.375rem; letter-spacing: 3px; }
.review__src { font: 700 .875rem/1 var(--f-label); color: var(--ink-soft); }
.review .sample { top: 14px; right: 14px; }
.reviews__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.reviews__actions:empty { display: none; }

/* CTA + estimate form */
.cta { background: var(--clay); color: var(--ink); border-radius: var(--radius); padding: clamp(28px, 5vw, 48px); text-align: center; }
.cta__kicker { font-size: 1.125rem; }
.cta h2 { margin-top: 8px; color: var(--ink); }
.cta > p:not(.cta__kicker) { margin: 14px auto 24px; max-width: 34em; font-size: 1.125rem; }
.form, .form__done { margin-top: 24px; background: var(--white); border-radius: 10px; padding: clamp(20px, 4vw, 32px); text-align: left; display: grid; gap: 18px; }
.form__title { font: 700 1.125rem/1.2 var(--f-label); text-align: center; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font: 600 .9375rem/1.2 var(--f-label); padding: 0; }
.field legend { margin-bottom: 8px; }
.opt { font-weight: 500; color: var(--ink-soft); }
.field input, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--cream); border: 1.5px solid var(--line); border-radius: 8px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-700); background: var(--white); box-shadow: 0 0 0 3px rgba(77,90,60,.2); }
.field input[aria-invalid="true"] { border-color: #a23b2a; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--cream); font-weight: 600; font-size: .9375rem; }
.pill input:checked + span { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.form__error { color: #a23b2a; font-weight: 600; }
.hp { position: absolute; left: -9999px; }
.form__done { text-align: center; }
.form__done h3 { font: 400 1.6rem/1.2 var(--f-display); color: var(--green-900); }

/* FAQ */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { font: 700 1.125rem/1.35 var(--f-label); }
.faq__item summary::after { content: "+"; flex: none; font: 400 1.75rem/1 var(--f-body); color: var(--green-700); transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding-bottom: 22px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { background: var(--green-900); color: #e3e5d7; padding: 64px 0 28px; text-align: center; }
.footer__inner { display: flex; flex-direction: column; align-items: center; }
.footer__trust { margin-top: 18px; font-size: 1.125rem; }
.footer__h { margin-top: 40px; font: 700 1.5rem/1.2 var(--f-label); color: var(--white); }
.footer__towns, .footer__contact { margin-top: 10px; display: grid; gap: 4px; font-size: 1.125rem; }
.footer a { color: var(--white); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__copy { margin-top: 48px; font-size: .875rem; color: #b9bea8; }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    transform: translateY(110%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s;
    background: var(--white); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 10px; box-shadow: 0 -6px 18px -12px rgba(0,0,0,.35);
  }
  .callbar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 10px; text-decoration: none; font: 700 1.0625rem/1 var(--f-label); }
  .callbar__call { background: var(--white); color: var(--green-800); border: 2px solid var(--green-800); }
  .callbar__est { background: var(--green-800); color: var(--white); }
  .callbar.is-shown { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
}
