/* ============================================================
   Naperville Hardwood Floor Refinishing — styles.css
   Vanilla CSS, mobile-first. No framework.
   ============================================================ */

:root {
  --cream:      #FAF6F0;   /* page background */
  --surface:    #FFFFFF;   /* cards */
  --surface-2:  #F3ECE2;   /* alt section bg */
  --espresso:   #2B2018;   /* headings, footer, dark text */
  --walnut:     #A6692E;   /* wood accent (rules, eyebrows, icons) */
  --text:       #34291F;   /* body text */
  --muted:      #6B5D4F;   /* secondary text */
  --border:     #E5D9C9;
  --cta:        #C25E2A;   /* primary button (warm copper) */
  --cta-hover:  #A44E20;
  --gold:       #D4A843;   /* review stars */
  --shadow:     0 10px 30px rgba(43,32,24,.10);
  --radius:     12px;

  --maxw: 1180px;
  --header-h: 68px;
}

/* ----------------------------- Reset / base ----------------------------- */
*, *::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;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--walnut); }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  color: var(--espresso);
  line-height: 1.12;
  margin: 0 0 .5em;
  font-weight: 700;
}
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }

/* Visually-hidden honeypot */
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ----------------------------- Icons ----------------------------- */
.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: middle; }
.btn .icon,
.header-phone .icon,
.header-call-icon .icon,
.mobile-bar__btn .icon { fill: currentColor; stroke: none; }
.trust-chip .icon { width: 1rem; height: 1rem; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trust-chip:not(:first-child) .icon { stroke: var(--walnut); }

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: "Inter", sans-serif;
  font-weight: 600; font-size: 1rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 10px; border: 2px solid transparent;
  min-height: 48px;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn--cta { background: var(--cta); color: #fff; }
.btn--cta:hover { background: var(--cta-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(194,94,42,.35); }
.btn--ghost { background: transparent; color: var(--espresso); border-color: var(--espresso); }
.btn--ghost:hover { background: var(--espresso); color: #fff; }
.btn--ghost-light { color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost-light:hover { background: #fff; color: var(--espresso); border-color: #fff; }
.btn--lg { padding: 16px 28px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,240,.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid transparent;
  transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease, padding .2s ease;
}
.site-header.scrolled { background: rgba(250,246,240,.98); box-shadow: 0 2px 14px rgba(43,32,24,.08); border-bottom-color: var(--border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 12px; }

.wordmark { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; }
.wordmark__main { font-family: "Fraunces", serif; font-weight: 700; color: var(--espresso); font-size: 1.18rem; letter-spacing: .01em; }
.wordmark__sub { font-family: "Inter", sans-serif; font-weight: 600; color: var(--walnut); font-size: .62rem; letter-spacing: .22em; margin-top: 3px; text-transform: uppercase; }

.site-header__actions { display: flex; align-items: center; gap: 12px; }
.header-phone { display: none; align-items: center; gap: 7px; font-weight: 600; color: var(--espresso); text-decoration: none; }
.header-phone:hover { color: var(--walnut); }
.header-cta { display: none; }
.header-call-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--cta); color: #fff;
}
.header-call-icon .icon { width: 22px; height: 22px; }

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative;
  background-color: var(--espresso);
  background-image: url('images/naperville-hardwood-floor-refinishing-hero.jpg');
  background-size: cover; background-position: center;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(43,32,24,.78) 0%, rgba(43,32,24,.55) 45%, rgba(43,32,24,.72) 100%);
}
.hero__inner { position: relative; z-index: 1; display: grid; gap: 28px; padding: 38px 20px 44px; }
.hero__copy { color: #fff; }
.eyebrow {
  font-family: "Inter", sans-serif; font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; font-size: .78rem; color: var(--gold); margin: 0 0 .8rem;
}
.hero__title { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4.25rem); line-height: 1.05; margin-bottom: .35em; }
.hero__sub { color: rgba(255,255,255,.92); font-size: 1.125rem; max-width: 38ch; }

.trust-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0; margin: 1.4rem 0 1.6rem; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-size: .82rem; font-weight: 500;
  padding: 6px 11px; border-radius: 999px; backdrop-filter: blur(2px);
}
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__btns .btn--ghost { color: #fff; border-color: rgba(255,255,255,.8); }
.hero__btns .btn--ghost:hover { background: #fff; color: var(--espresso); border-color: #fff; }

/* ----------------------------- Lead form ----------------------------- */
.lead-form__card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 20px 20px;
  border: 1px solid var(--border);
}
.lead-form__title { font-size: 1.6rem; margin-bottom: .2rem; }
.lead-form__sub { color: var(--muted); font-size: .95rem; margin-bottom: 1.1rem; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .9rem; font-weight: 600; color: var(--espresso); margin-bottom: 5px; }
.req { color: var(--cta); }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 12px 13px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; min-height: 48px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: auto; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--walnut); box-shadow: 0 0 0 3px rgba(166,105,46,.18);
}
.field[data-invalid] input, .field[data-invalid] select, .field[data-invalid] textarea {
  border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192,57,43,.14);
}
.field[data-invalid]::after {
  content: attr(data-error); display: block; color: #C0392B; font-size: .8rem; margin-top: 4px;
}
.lead-form__form .btn--block { margin-top: 6px; }
.consent { font-size: .76rem; color: var(--muted); line-height: 1.5; margin: 12px 0 0; }
.consent a { color: var(--walnut); }

/* form states */
.lead-form__success {
  text-align: center; padding: 26px 16px;
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.lead-form__success .check {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  background: #2E7D4F; color: #fff; display: grid; place-items: center;
}
.lead-form__success .check svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lead-form__success h3 { font-size: 1.5rem; margin-bottom: .35rem; }
.lead-form__success p { color: var(--muted); margin: 0; }
.lead-form__error {
  margin-top: 12px; padding: 12px 14px; border-radius: 9px;
  background: #FCEDEA; border: 1px solid #E7B7AD; color: #8A2A1A; font-size: .92rem;
}
.lead-form__error a { color: #8A2A1A; font-weight: 700; }

/* ----------------------------- Sections ----------------------------- */
.section { padding: 56px 0; }
.section--alt { background: var(--surface-2); }
.section__head { text-align: center; max-width: 760px; margin: 0 auto 34px; }
.section__head h2 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); }
.section__head h2::after {
  content: ""; display: block; width: 56px; height: 3px; background: var(--walnut);
  margin: 14px auto 0; border-radius: 2px;
}
.section__sub { color: var(--muted); font-size: 1.08rem; margin: 0; }
.section__cta { text-align: center; margin-top: 34px; }

/* ----------------------------- Before/After slider ----------------------------- */
.ba-slider {
  position: relative; max-width: 900px; margin: 0 auto;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  --pos: 50%; user-select: none; touch-action: pan-y; background: var(--surface-2);
}
.ba-slider__img { width: 100%; height: auto; display: block; }
.ba-slider__reveal { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-slider__reveal .ba-slider__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-slider__tag {
  position: absolute; top: 12px; z-index: 3; font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: rgba(43,32,24,.72); padding: 4px 10px; border-radius: 999px;
}
.ba-slider__tag--before { left: 12px; }
.ba-slider__tag--after { right: 12px; }
.ba-slider__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0;
  border-left: 3px solid #fff; transform: translateX(-1.5px); z-index: 4; pointer-events: none;
}
.ba-slider__handle svg {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; padding: 8px; border-radius: 50%;
  background: #fff; color: var(--espresso); box-shadow: 0 2px 8px rgba(0,0,0,.3);
  fill: none; stroke: var(--espresso); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ba-slider__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize; z-index: 5;
}
.ba-slider__range:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ba-slider__range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 44px; height: 100%; background: transparent; cursor: ew-resize; }
.ba-slider__range::-moz-range-thumb { width: 44px; height: 240px; background: transparent; border: 0; cursor: ew-resize; }
.ba-slider__range::-moz-range-track { background: transparent; }

/* static before/after grid */
.ba-grid { display: grid; gap: 24px; margin-top: 34px; }
.ba-pair { margin: 0; }
.ba-pair__imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ba-pair__item { position: relative; border-radius: 10px; overflow: hidden; }
.ba-pair__item img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.ba-pair__label {
  position: absolute; bottom: 8px; left: 8px; font-size: .68rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: rgba(43,32,24,.72); padding: 3px 8px; border-radius: 6px;
}
.ba-pair__label--after { background: var(--walnut); }
.ba-pair figcaption { text-align: center; font-weight: 600; color: var(--espresso); margin-top: 10px; }

/* ----------------------------- Service cards ----------------------------- */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__icon { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; }
.card__icon svg, .reason__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--walnut); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.22rem; margin-bottom: .35rem; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ----------------------------- Why choose us ----------------------------- */
.reasons { display: grid; gap: 22px; grid-template-columns: 1fr; }
.reason { display: flex; gap: 14px; align-items: flex-start; }
.reason__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); flex: 0 0 auto; }
.section--alt .reason__icon { background: #fff; }
.reason h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.reason p { color: var(--muted); margin: 0; font-size: .96rem; }

/* stat band */
.stat-band { background: var(--espresso); color: var(--cream); margin-top: 52px; }
.stat-band__inner { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 36px 20px; text-align: center; }
.stat__num { display: block; font-family: "Fraunces", serif; font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.1rem); color: var(--gold); line-height: 1; }
.stat__label { display: block; margin-top: 6px; font-size: .95rem; letter-spacing: .04em; color: rgba(250,246,240,.85); }

/* ----------------------------- Process steps ----------------------------- */
.process__img { display: block; width: 100%; max-width: 760px; margin: 0 auto 32px; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }
.steps { list-style: none; counter-reset: step; display: grid; gap: 22px; grid-template-columns: 1fr; padding: 0; margin: 0; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px 20px; text-align: center; }
.step__num { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--cta); color: #fff; font-family: "Fraunces", serif; font-weight: 700; font-size: 1.3rem; margin-bottom: 12px; }
.step h3 { font-size: 1.12rem; margin-bottom: .3rem; }
.step p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ----------------------------- Reviews ----------------------------- */
.reviews { display: grid; gap: 18px; grid-template-columns: 1fr; }
.review { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.review__stars { color: var(--gold); letter-spacing: 2px; font-size: 1.05rem; margin-bottom: 10px; }
.review p { font-size: 1.02rem; color: var(--text); }
.review cite { display: block; margin-top: 10px; font-style: normal; font-weight: 600; color: var(--espresso); font-size: .92rem; }

/* ----------------------------- Service area chips ----------------------------- */
.area-chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 0; }
.area-chips li { background: var(--surface); border: 1px solid var(--border); color: var(--espresso); font-weight: 500; font-size: .95rem; padding: 8px 16px; border-radius: 999px; }
.section--alt .area-chips li { background: #fff; }

/* ----------------------------- FAQ ----------------------------- */
.faq { display: grid; gap: 12px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq__q { margin: 0; font-family: "Inter", sans-serif; }
.faq__trigger {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: "Inter", sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--espresso);
  padding: 18px 52px 18px 20px; position: relative; line-height: 1.4;
}
.faq__icon { position: absolute; right: 18px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: var(--walnut); border-radius: 2px; }
.faq__icon::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.faq__icon::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); transition: transform .2s ease, opacity .2s ease; }
.faq__trigger[aria-expanded="true"] .faq__icon::after { transform: translateX(-50%) scaleY(0); opacity: 0; }
.faq__trigger:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.faq__a { padding: 0 20px 18px; }
.faq__a p { margin: 0; color: var(--muted); }

/* ----------------------------- Final CTA ----------------------------- */
.final-cta { background: linear-gradient(135deg, #3A2A1E 0%, var(--espresso) 60%, #1F1711 100%); color: #fff; padding: 56px 0; text-align: center; }
.final-cta h2 { color: #fff; font-size: clamp(1.9rem, 3.5vw, 2.75rem); }
.final-cta p { color: rgba(255,255,255,.9); max-width: 52ch; margin: 0 auto 22px; }
.final-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { background: var(--espresso); color: rgba(250,246,240,.82); }
.site-footer__inner { display: grid; gap: 30px; grid-template-columns: 1fr; padding: 46px 20px 34px; }
.site-footer h3 { color: #fff; font-family: "Inter", sans-serif; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.wordmark--footer .wordmark__main { color: #fff; }
.site-footer__brand p { margin-top: 12px; color: rgba(250,246,240,.7); }
.site-footer address { font-style: normal; line-height: 1.9; }
.site-footer a { color: rgba(250,246,240,.9); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer__hours { margin-top: 10px; color: rgba(250,246,240,.7); }
.site-footer__links { list-style: none; padding: 0; margin: 0; line-height: 2.2; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.12); }
.site-footer__legal p { margin: 0; padding: 18px 0; text-align: center; font-size: .85rem; color: rgba(250,246,240,.6); }

/* ----------------------------- Mobile sticky call bar ----------------------------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 0; background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 18px rgba(43,32,24,.12);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bar__btn {
  flex: 1 1 50%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; font-weight: 700; font-size: 1rem; text-decoration: none;
}
.mobile-bar__btn--call { background: var(--espresso); color: #fff; }
.mobile-bar__btn--call .icon { fill: #fff; }
.mobile-bar__btn--quote { background: var(--cta); color: #fff; }
/* Reserve space so the fixed bar never covers the footer (mobile only). */
@media (max-width: 767px) { body { padding-bottom: 60px; } }

/* ----------------------------- Focus visibility ----------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

/* ============================================================
   Responsive
   ============================================================ */

/* anchor offset so sticky header doesn't cover scroll targets */
:target, #quote, [id] { scroll-margin-top: calc(var(--header-h) + 12px); }

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .reasons { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .ba-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-band__inner { grid-template-columns: repeat(3, 1fr); }
  .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 768px) {
  :root { --header-h: 76px; }
  .header-phone { display: inline-flex; }
  .header-cta { display: inline-flex; }
  .header-call-icon { display: none; }
  .mobile-bar { display: none; }

  .hero__inner { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; padding: 64px 20px 72px; }
  .hero__overlay { background: linear-gradient(90deg, rgba(43,32,24,.86) 0%, rgba(43,32,24,.62) 55%, rgba(43,32,24,.42) 100%); }
  .lead-form__card { padding: 26px 26px 24px; }

  .section { padding: 76px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .reasons { grid-template-columns: repeat(2, 1fr); gap: 26px 40px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .reasons { grid-template-columns: repeat(3, 1fr); }
  .hero__inner { padding: 80px 20px 88px; }
}

/* Reduced motion: kill transforms/transitions that imply motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .btn--cta:hover, .card:hover { transform: none; }
}
