/* =========================================================
   Moonlight Home Services — moonlightfix.com
   Brand colors: change these 3 lines to match the logo.
   ========================================================= */
:root {
  /* Brand — from the Moonlight logo */
  --green: #1d5a35;        /* buttons, links */
  --green-dark: #0f3d21;   /* logo green: hover, dark sections */
  --green-soft: #e9f1eb;   /* light tint */
  --gold: #b99a54;         /* logo gold: decorative */
  --gold-text: #8a6d2f;    /* gold readable on light */

  --navy: #0f3d21;         /* dark surfaces now use logo green */
  --navy-2: #174a2c;
  --ink: #1b2620;
  --muted: #5c665f;
  --line: #e8e2d6;
  --bg: #ffffff;
  --tint: #fbf7f0;         /* logo cream */

  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 61, 33, .09);
  --font-head: 'Marcellus', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--navy); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -.005em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-text); margin-bottom: .6em;
}
.slogan {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font: italic 400 1.2rem/1.2 var(--font-head); letter-spacing: .04em; color: var(--gold-text);
}
.slogan::before { content: ''; width: 32px; height: 1px; background: var(--gold); }
.brand-slogan { font: italic 400 .82rem/1 var(--font-head); letter-spacing: .03em; text-transform: none; color: var(--gold-text); margin-top: 2px; }
.slogan-footer { color: var(--gold); font-size: 1.05rem; margin-bottom: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .75em 1.25em; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .95em 1.6em; font-size: 1.05rem; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--green-soft); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.7); background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); }
.btn svg { width: 18px; height: 18px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { width: 58px; height: auto; }
.brand-text { font: 400 1.35rem/1 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--green-dark); display: flex; flex-direction: column; gap: 4px; }
.brand-text small { font: 500 .66rem/1 var(--font-body); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--green); }

/* ---------- Hero ---------- */
.hero { background: var(--tint); padding: 56px 0 72px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z' fill='%231d5a35'/%3E%3C/svg%3E") center/12px no-repeat;
}
.hero-media { margin: 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tint { background: var(--tint); }
.step-num { border: 2px solid var(--gold); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--muted); }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; font-family: var(--font-body); color: var(--ink); line-height: 1.55; }
.card-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.card-more { color: var(--green); font-weight: 600; font-size: .95rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.steps p { color: var(--muted); margin: 0; }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff; font: 400 1.2rem var(--font-head); margin-bottom: 16px;
}

/* ---------- Before / after ---------- */
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.split-copy p { color: var(--muted); }
.compare { --pos: 50%; position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3/2; user-select: none; }
.compare > img, .compare-before img { width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-50%); pointer-events: none;
}
.compare-handle::after {
  content: '‹ ›'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--navy);
  display: grid; place-items: center; font: 700 1rem var(--font-body); box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.compare-tag {
  position: absolute; top: 14px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: rgba(15,61,33,.8); color: #fff; pointer-events: none;
}
.tag-before { left: 14px; }
.tag-after { right: 14px; }

/* ---------- Area + hours ---------- */
.area-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.area-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 24px 0; }
.area-cols p { color: var(--muted); font-size: .95rem; margin: 0; }
.hours-card { background: var(--navy); color: #fff; border-radius: 18px; padding: 30px; }
.hours-card h3 { color: #fff; }
.hours-card dl { margin: 0 0 20px; }
.hours-card dl div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.hours-card dt { color: rgba(255,255,255,.7); }
.hours-card dd { margin: 0; font-weight: 600; }
.hours-phone { display: block; font: 400 1.7rem var(--font-head); color: #fff; text-decoration: none; margin-bottom: 6px; }
.hours-card .muted { color: rgba(255,255,255,.65); margin: 0; }

/* ---------- FAQ ---------- */
details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 22px; margin-bottom: 12px; }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--green); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { color: var(--muted); padding-bottom: 6px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; padding: 64px 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .2em; }
.cta-band p { color: rgba(255,255,255,.75); margin: 0; }
.cta-band .cta-row { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #0a2b17; color: rgba(255,255,255,.7); padding: 40px 0; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.brand-footer { display: block; margin-bottom: 14px; }
.brand-footer img { width: 170px; }
.footer-meta { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.footer-meta a { color: #fff; text-decoration: none; font-weight: 600; }

/* ---------- Modal ---------- */
.modal {
  width: min(560px, 100% - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0;
  border-radius: 20px; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.35);
  background: #fff; color: var(--ink); color-scheme: light;
}
.modal::backdrop { background: rgba(10,43,23,.6); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.modal-body { padding: 24px 26px 26px; }
.modal-body > p:not(.eyebrow) { color: var(--muted); }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: var(--navy); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.modal-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.modal-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.modal-list li::before {
  content: ''; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; flex: none;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z' fill='%231d5a35'/%3E%3C/svg%3E") center/12px no-repeat;
}
.modal-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.modal-actions .btn { padding: .8em .6em; font-size: .95rem; }
.modal-form { display: grid; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-form[hidden] { display: none; }
.modal-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--navy); }
.modal-form input, .modal-form textarea {
  font: 400 1rem var(--font-body); padding: .7em .85em; border: 1px solid #cfd6df; border-radius: 10px; width: 100%;
  background: #fff; color: var(--ink);
}
.modal-form input:focus, .modal-form textarea:focus { outline: 2px solid var(--green); border-color: transparent; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-size: .92rem; color: var(--green-dark); min-height: 1.2em; }

/* ---------- Mobile bar ---------- */
.mobile-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .hero-grid, .split, .area-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 0 56px; }
  .hero-media { order: -1; aspect-ratio: 16/10; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .area-cols { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .brand-mark { width: 42px; }
  .brand-text { font-size: 1.15rem; }
  .brand-slogan { font-size: .74rem; }
  .section { padding: 60px 0; }
  .cards, .steps { grid-template-columns: 1fr; }
  .header-call span { display: none; }
  .header-call { padding: .7em; }
  .cta-row .btn { flex: 1 1 100%; }
  .modal-actions { grid-template-columns: 1fr 1fr; }
  .modal-actions .btn-dark { grid-column: 1 / -1; }
  .footer-meta { text-align: left; }
  body { padding-bottom: 64px; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    box-shadow: 0 -4px 20px rgba(0,0,0,.12);
  }
  .mobile-bar a { padding: 18px; text-align: center; font-weight: 700; text-decoration: none; color: #fff; }
  .mb-call { background: var(--green); }
  .mb-text { background: var(--navy); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
