/* WhiteCap Home Improvement Services: styles */
:root {
  --teal: #3fa5aa;          /* sampled from logo */
  --teal-light: #59c6c9;
  --teal-dark: #1f7a7f;     /* accessible on white (AA) */
  --teal-darker: #155a5e;
  --ink: #1f2628;
  --charcoal: #2b3133;
  --slate: #4b5557;
  --muted: #5d6769;
  --line: #e2e7e8;
  --bg: #ffffff;
  --bg-alt: #f3f7f7;
  --silver: #d9dddc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,26,.06), 0 8px 24px rgba(16,24,26,.08);
  --header-h: 72px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
a:hover { color: var(--teal-darker); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; color: #fff; }
.center { text-align: center; margin-top: 2.5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.25rem; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; line-height: 1.2; font-family: inherit; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--teal-dark); color: #fff; }
.btn-primary:hover { background: var(--teal-darker); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.75); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { border-color: var(--teal-dark); color: var(--teal-dark); background: #fff; }
.btn-outline:hover { background: var(--teal-dark); color: #fff; }
.btn-call { background: var(--teal-dark); color: #fff; padding: .6rem 1.1rem; white-space: nowrap; }
.btn-call:hover { background: var(--teal-darker); color: #fff; }
.call-short { display: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand-logo { border-radius: 10px; width: 48px; height: 48px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: .01em; }
.brand-sub { font-size: .78rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.site-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--slate); text-decoration: none; font-weight: 600; font-size: .98rem; }
.site-nav a:hover { color: var(--teal-dark); }

/* Hero */
.hero { position: relative; color: #fff; background: var(--charcoal) url("../img/hero-1920.webp") center 40% / cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20,28,30,.88) 0%, rgba(20,28,30,.72) 45%, rgba(20,28,30,.25) 100%); }
.hero-inner { padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem); max-width: 1160px; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.5vw, 4rem); max-width: 14ch; margin-bottom: .4em; }
.hero-lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); max-width: 40rem; color: #e8eeee; }
.hero-lead strong { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--teal-dark); margin-bottom: .75rem; }
.hero .eyebrow, .eyebrow-light { color: var(--teal-light); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.6rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; color: #f0f5f5; font-weight: 600; font-size: .98rem; }
.hero-points li { display: flex; align-items: center; gap: .5rem; }
.hero-points li::before { content: ""; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6L21 7.5l-1.4-1.4z'/%3E%3C/svg%3E") center / 75% no-repeat; flex: none; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--charcoal); color: #e6ecec; }
.section-dark h2 { color: #fff; }
.section-head { text-align: center; max-width: 42rem; margin: 0 auto 2.75rem; }
.section-head p:last-child { color: var(--muted); }

/* Services */
.services-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.4rem; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,24,26,.06), 0 14px 30px rgba(16,24,26,.12); }
.service-card p { color: var(--muted); font-size: .97rem; margin: 0; }
.icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #e3f4f4; margin-bottom: 1rem; }
.icon svg { width: 26px; height: 26px; fill: var(--teal-dark); }

/* Before / after */
.ba-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.ba-item { margin: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ba { --pos: 50%; position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #ccd; user-select: none; touch-action: pan-y; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); pointer-events: none; }
.ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%,-50%); border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231f7a7f' d='M9 6 3 12l6 6V6zm6 0v12l6-6-6-6z'/%3E%3C/svg%3E") center / 26px no-repeat; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent; }
.ba:focus-within .ba-handle::after { box-shadow: 0 0 0 4px var(--teal-light), 0 2px 10px rgba(0,0,0,.3); }
.ba-label { position: absolute; top: .9rem; padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.ba-label-before { left: .9rem; background: rgba(20,28,30,.8); color: #fff; }
.ba-label-after { right: .9rem; background: var(--teal-dark); color: #fff; }
.ba-item figcaption, .photo-grid figcaption { padding: 1rem 1.2rem 1.2rem; color: var(--muted); font-size: .97rem; }
.ba-item figcaption strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: .15rem; }
.sub-title { text-align: center; font-family: var(--font-display); font-size: 1.6rem; margin: 3.5rem 0 1.5rem; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.photo-grid figure { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* About */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-media img { border-radius: 24px; box-shadow: var(--shadow); width: 100%; max-width: 440px; margin-inline: auto; }
.about-quote { margin: 0 0 1.4rem; padding: 1.2rem 1.4rem; border-left: 4px solid var(--teal); background: var(--bg-alt); border-radius: 0 12px 12px 0; font-family: var(--font-display); font-size: 1.2rem; font-style: italic; color: var(--charcoal); }
.about-quote p { margin: 0; }
.signoff { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; color: var(--teal-dark); }
.about-ctas { margin-top: 1.5rem; }

/* Area */
.area { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; }
.area p { color: #cdd6d6; max-width: 36rem; }
.area-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.area-list li { display: flex; align-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: .9rem 1rem .9rem 2.6rem; font-weight: 600; color: #fff; position: relative; }
.area-list li::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2359c6c9' d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-info > p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: 1rem; align-items: center; }
.ci-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #e3f4f4; flex: none; }
.ci-icon svg { width: 22px; height: 22px; fill: var(--teal-dark); }
.ci-label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.contact-list a { font-weight: 700; font-size: 1.1rem; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; }
.estimate-form { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.estimate-form h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1.2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; }
.field label { font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.field label span { color: #b3261e; }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; padding: .75rem .85rem; border: 1.5px solid #c5cfd0; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(63,165,170,.25); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { font-size: .88rem; color: var(--muted); margin: .9rem 0 0; text-align: center; }
.form-status { margin: .6rem 0 0; font-weight: 600; text-align: center; }
.form-status.error { color: #b3261e; }
.form-status.ok { color: var(--teal-dark); }

/* Footer */
.site-footer { background: #1a2022; color: #b9c3c4; padding: 2.5rem 0 2rem; font-size: .95rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.2rem 2rem; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand img { border-radius: 8px; }
.footer-brand strong { display: block; color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--teal-light); text-decoration: underline; }
.copyright { grid-column: 1 / -1; margin: .5rem 0 0; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }

/* Sticky mobile call bar */
.mobile-cta { display: none; }

/* Responsive */
@media (max-width: 1080px) {
  .site-nav { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .ba-grid, .photo-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .ba-grid { max-width: 560px; margin-inline: auto; }
  .photo-grid { max-width: 560px; margin-inline: auto; }
  .about, .area, .contact { grid-template-columns: 1fr; }
  .about-media img { max-width: 220px; }
  .about-media { order: -1; }
}
@media (max-width: 600px) {
  :root { --header-h: 64px; }
  body { font-size: 1rem; padding-bottom: 68px; }
  .container { width: min(1160px, 100% - 2rem); }
  .brand-logo { width: 42px; height: 42px; }
  .brand-name { font-size: 1.2rem; }
  .brand-sub { font-size: .68rem; }
  .call-long { display: none; }
  .call-short { display: inline; }
  .hero { background-image: url("../img/hero-1000.webp"); background-position: 60% center; }
  .hero::before { background: linear-gradient(180deg, rgba(20,28,30,.82) 0%, rgba(20,28,30,.75) 100%); }
  .hero-ctas .btn { width: 100%; }
  .services-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .area-list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; align-items: center; justify-content: center; gap: .5rem; padding: .95rem 1rem calc(.95rem + env(safe-area-inset-bottom)); background: var(--teal-dark); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 -4px 16px rgba(0,0,0,.18); }
  .mobile-cta:hover { color: #fff; background: var(--teal-darker); }
}
@media (max-width: 360px) {
  .brand-sub { display: none; }
}

/* Refinements */
a[href^="tel:"] { white-space: nowrap; }
@media (max-width: 600px) {
  .mobile-cta { transform: translateY(110%); transition: transform .25s ease; }
  .mobile-cta.is-visible { transform: none; }
}
@media (max-width: 600px) {
  .hero-eyebrow span { display: block; }
  .hero-eyebrow .sep { display: none; }
}
/* Painting is a secondary service: keep the exterior photos smaller */
.photo-grid { max-width: 760px; margin-inline: auto; gap: 1.25rem; }
.sub-title { font-size: 1.3rem; margin-top: 3rem; }
