/* ==========================================================================
   STAT Renovations — site styles
   Brand colors live in :root. The gold (--accent) is an unconfirmed eyeball
   sample — change it in ONE place here once the real brand color is confirmed.
   ========================================================================== */

:root {
  --navy:   #1B2230;   /* primary background */
  --navy-2: #232B3B;   /* raised surfaces / cards */
  --navy-3: #2C3548;   /* borders / hovers */
  --accent: #E6B83E;   /* brand gold — PLACEHOLDER, confirm against card */
  --accent-2: #CC9F2E;  /* deeper gold for hovers */
  --text:   #F4F6FA;   /* primary light text */
  --muted:  #A9B0BE;   /* secondary text */
  --maxw:   1120px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--alt { background: var(--navy-2); }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: .8rem; margin: 0 0 .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1rem;
  padding: .85rem 1.4rem; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer; transition: .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--navy); }
.btn--primary:hover { background: var(--accent-2); color: var(--navy); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--navy-3); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 1rem 1.8rem; font-size: 1.1rem; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27,34,48,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--navy-3);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font-size: 1.05rem; letter-spacing: .5px; }
.brand small { display: block; font-size: .68rem; color: var(--muted); font-weight: 500; letter-spacing: 1px; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a.navlink { color: var(--text); font-weight: 600; font-size: .98rem; }
.nav a.navlink:hover, .nav a.navlink[aria-current="page"] { color: var(--accent); text-decoration: none; }
.nav .btn { padding: .6rem 1rem; }

.nav-toggle {
  display: none; background: none; border: 0; color: var(--text);
  cursor: pointer; padding: .4rem; border-radius: 6px;
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-2); border-bottom: 1px solid var(--navy-3);
    padding: .5rem 20px 1.25rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a.navlink { padding: .85rem 0; border-bottom: 1px solid var(--navy-3); }
  .nav .btn { margin-top: .9rem; justify-content: center; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(64px, 12vw, 132px) 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(230,184,62,.16), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hero h1 { max-width: 16ch; }
.hero .tagline { color: var(--accent); }
.hero .lead { font-size: 1.25rem; margin-bottom: 2rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* On narrow screens, stack CTA buttons full-width so nothing clips */
@media (max-width: 480px) {
  .hero .cta-row, .cta-band .cta-row { flex-direction: column; align-items: stretch; width: 100%; }
  .hero .cta-row .btn, .cta-band .cta-row .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Services
   ========================================================================== */
.grid { display: grid; gap: 1.25rem; }
.services-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2.5rem; }
.card {
  background: var(--navy-2); border: 1px solid var(--navy-3);
  border-radius: var(--radius); padding: 1.6rem;
}
.card .icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 1rem;
  background: rgba(230,184,62,.14); color: var(--accent);
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ==========================================================================
   Featured before/after (home) + work gallery
   ========================================================================== */
.featured-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 2.5rem; }
.featured-grid figure { margin: 0; }
.featured-grid img { border-radius: var(--radius); border: 1px solid var(--navy-3); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.featured-grid figcaption { color: var(--muted); margin-top: .6rem; font-size: .95rem; }

.work-grid { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 2.5rem; margin-top: 2.5rem; }
.work-grid figure { margin: 0; }
.work-grid figcaption { color: var(--muted); margin-top: .85rem; font-size: 1rem; }
.work-grid figcaption strong { color: var(--text); }

/* Before/after slider component */
.ba {
  position: relative; width: 100%; aspect-ratio: 4/3;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--navy-3);
  user-select: none; touch-action: pan-y; background: var(--navy-2);
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba .ba-after-wrap {
  position: absolute; inset: 0;
  /* reveal the AFTER image from the left edge up to the handle position */
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}
.ba .ba-label {
  position: absolute; top: 12px; font-size: .7rem; font-weight: 700; letter-spacing: 2px;
  padding: .3rem .6rem; border-radius: 4px; pointer-events: none;
}
.ba .ba-label.before { right: 12px; background: rgba(17,22,31,.85); color: var(--muted); }
.ba .ba-label.after  { left: 12px;  background: var(--accent); color: var(--navy); }
.ba .ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%);
  width: 3px; background: var(--accent); transform: translateX(-50%);
  cursor: ew-resize;
}
.ba .ba-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px; transform: translate(-50%, -50%);
  background: var(--accent); border-radius: 50%; box-shadow: var(--shadow);
}
.ba .ba-handle::before {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -52%); z-index: 1;
  color: var(--navy); font-weight: 700; font-size: 1rem; letter-spacing: 1px;
}
.ba .ba-range { /* visually-hidden accessible slider that drives --pos */
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize;
}

/* ==========================================================================
   Gallery grid + lightbox
   ========================================================================== */
.gallery-grid {
  display: grid; gap: 12px; margin-top: 2.5rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px)  { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-item {
  padding: 0; border: 1px solid var(--navy-3); background: var(--navy-2);
  border-radius: var(--radius); overflow: hidden; cursor: pointer; display: block;
}
.gallery-item img { width: 100%; height: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform .25s ease, opacity .2s ease; }
.gallery-item:hover img { transform: scale(1.05); opacity: .92; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(8,11,16,.92); backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; box-shadow: var(--shadow); }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; background: rgba(27,34,48,.85); color: var(--text);
  border: 1px solid var(--navy-3); border-radius: 50%; width: 52px; height: 52px;
  font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox .lb-close:hover, .lightbox .lb-prev:hover, .lightbox .lb-next:hover { border-color: var(--accent); color: var(--accent); }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) {
  .lightbox .lb-prev { left: 10px; } .lightbox .lb-next { right: 10px; }
  .lightbox .lb-close { top: 10px; right: 10px; }
}

/* ==========================================================================
   Trust / testimonials
   ========================================================================== */
.testimonials-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 2.5rem; }
.quote { background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: var(--radius); padding: 1.6rem; }
.quote .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: .6rem; }
.quote p { color: var(--text); font-style: italic; }
.quote .who { color: var(--muted); font-size: .9rem; font-style: normal; margin: 0; }
.placeholder-note {
  margin-top: 1.75rem; font-size: .85rem; color: var(--muted);
  border: 1px dashed var(--navy-3); border-radius: 8px; padding: .75rem 1rem;
}

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); color: var(--navy); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band h2 { color: var(--navy); margin: 0; }
.cta-band p { color: rgba(27,34,48,.85); margin: .3rem 0 0; font-weight: 600; }
.cta-band .btn--primary { background: var(--navy); color: #fff; }
.cta-band .btn--primary:hover { background: #11161f; color: #fff; }
.cta-band .btn--ghost { border-color: rgba(27,34,48,.4); color: var(--navy); }
.cta-band .btn--ghost:hover { border-color: var(--navy); color: var(--navy); }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info p { color: var(--muted); }
.contact-info .big-phone { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; color: var(--text); }
.contact-info .big-phone:hover { color: var(--accent); text-decoration: none; }
.contact-info dl { margin: 1.5rem 0 0; }
.contact-info dt { color: var(--accent); font-weight: 700; font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; margin-top: 1.1rem; }
.contact-info dd { margin: .2rem 0 0; }

.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.form-field .req { color: var(--accent); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: .8rem .9rem; font: inherit; color: var(--text);
  background: var(--navy); border: 1px solid var(--navy-3); border-radius: 8px;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); outline: none; }
.form-field .err { color: #ff8f8f; font-size: .85rem; margin: .3rem 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */

.alert { padding: 1rem 1.25rem; border-radius: 8px; margin-bottom: 1.5rem; font-weight: 600; }
.alert--ok { background: rgba(76,175,80,.15); border: 1px solid #4caf50; color: #cdeccd; }
.alert--err { background: rgba(244,67,54,.12); border: 1px solid #e57373; color: #ffd6d2; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #11161F; border-top: 1px solid var(--navy-3); padding: clamp(40px, 6vw, 64px) 0 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.site-footer h4 { color: var(--text); font-size: .8rem; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-phone { font-size: 1.5rem; font-weight: 700; color: var(--text) !important; }
.footer-phone:hover { color: var(--accent) !important; text-decoration: none; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--navy-3); color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.footer-cta { margin-top: .5rem; }

/* utility */
.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; }
