/* ============================================================
   Millennium Adjustment Group — light marketing site
   Plain CSS, no framework. Mobile-first. All colors are AA-verified.
   ============================================================ */

:root {
  /* Light palette */
  --bg:        #ffffff;   /* page base */
  --bg-alt:    #eef3fa;   /* alternating sections (soft blue-gray) */
  --surface:   #ffffff;   /* cards */
  --surface-2: #f2f6fc;   /* card hover / inputs */
  --border:    #dce4f0;
  --text:      #16223c;   /* headings / primary (deep navy) */
  --muted:     #47566f;   /* body */
  --muted-2:   #5a6982;   /* placeholders / footnotes (AA-safe on white) */

  /* Warm accent — RESERVED for action/CTA button fills so they stay the obvious "click here" */
  --accent:      #f0a94b;
  --accent-hover:#e2952f;
  --accent-ink:  #1a1205; /* dark text on amber */

  /* Brand navy-blue — links & interactive/focus states (readable on white) */
  --brand:       #2b5aa8;
  --brand-hover: #1c4a92;

  /* Supporting accents (non-action) */
  --verify: #18794a;  /* green: "verified" trust checkmarks */
  --cool:   #2f62b0;  /* cool blue: informational / process steps */

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --shadow: 0 12px 30px rgba(22, 43, 84, 0.10);

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 68px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--text);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

em { color: var(--text); font-style: italic; }

.accent {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* Placeholder marker — visible slots for content still to be supplied */
.placeholder {
  color: var(--muted-2);
  border-bottom: 1px dashed var(--muted-2);
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; padding: .7em 1.25em; border-radius: 999px;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .12s ease, background .2s ease, border-color .2s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .85em 1.6em; font-size: 1.05rem; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-logo { height: 34px; width: auto; flex: none; display: block; }
.brand-name { font-family: var(--font-serif); font-size: 1.05rem; }

.site-nav { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; white-space: nowrap; }
.site-nav a { color: var(--muted); font-weight: 500; font-size: .92rem; }
.site-nav a:hover { color: var(--text); }
.site-nav a.tel { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-variant-numeric: tabular-nums; }
.tel-ico { flex: none; }
.site-nav a.header-cta {
  color: var(--accent-ink);
  /* compact pill that sits with breathing room inside the 68px bar */
  padding: .5em 1em;
  font-size: .875rem;
  line-height: 1.1;
}

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px;
  background: var(--text); transform: translate(-50%, -50%); transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar::before { transform: translate(-50%, -8px); }
.nav-toggle-bar::after  { transform: translate(-50%, 6px); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.82) 55%, rgba(255, 255, 255, 0.68) 100%),
    url("img/hero-bg.jpg") center / cover no-repeat,
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  grid-template-areas: "eyebrow aside" "top aside" "bottom aside";
  gap: 10px 48px; align-items: start;
  padding-block: clamp(44px, 7vw, 88px);
}
.hero-top { grid-area: top; }
.hero-aside { grid-area: aside; align-self: center; }
.hero-bottom { grid-area: bottom; max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6rem; }
.btn-ico { flex: none; }

/* Google review carousel (hero) */
.rev-carousel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px 20px; }
.rev-slides { position: relative; min-height: 275px; }
.rev-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease; }
.rev-slide.is-active { opacity: 1; visibility: visible; }
.rev-slide .stars { color: var(--accent); letter-spacing: .12em; margin: 0 0 .7rem; }
.rev-text { color: var(--text); font-size: 1.02rem; line-height: 1.55; margin: 0 0 1rem;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.rev-by { color: var(--muted-2); font-size: .9rem; }
.rev-by .review-name { color: var(--muted); font-weight: 600; }
.rev-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.rev-dot { width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%; background: var(--border); cursor: pointer; transition: background .2s ease; }
.rev-dot.is-active { background: var(--brand); }
.rev-dot:hover { background: var(--muted-2); }

.hero-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.hero-form-title { font-size: 1.5rem; margin-bottom: .15em; }
.hero-form-sub { margin-bottom: 1.2rem; font-size: .95rem; color: var(--muted); }
.eyebrow {
  grid-area: eyebrow;
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 600;
  color: var(--brand); margin-bottom: 0;
}
.lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 640px; margin-top: 1.2rem; }
/* Big peril display headline (Fire/Flood/Mold); the value-prop line below is demoted to a subhead */
.peril-headline {
  display: flex; flex-direction: column; gap: 10px; margin: 0 0 1rem;
  font-family: var(--font-serif); font-weight: 600; line-height: 1; letter-spacing: -0.01em;
}
.peril-headline span { font-size: clamp(3.4rem, 11.7vw, 5.7rem); }
.ph-fire  { color: #d0342a; }
.ph-flood { color: #2765c9; }
.ph-mold  { color: #1a8551; }
#hero-title { font-size: clamp(1.45rem, 3.2vw, 2rem); }
.hero-note { margin-top: 1.1rem; font-size: .92rem; color: var(--muted-2); }
.hero-phone { margin-top: .9rem; margin-bottom: 0; font-size: .98rem; color: var(--muted); }
.hero-phone a { font-weight: 600; }

/* ---------------- Sections ---------------- */
.section { padding-block: clamp(56px, 8vw, 92px); }
.section-alt { background: var(--bg-alt); }
.section-lede { max-width: 640px; color: var(--muted); font-size: 1.08rem; margin-bottom: 2.4rem; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(137, 174, 224, 0.14); color: var(--cool);
  font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; margin-bottom: 16px;
}
.step h3 { margin-bottom: .35em; }
.step p { margin: 0; }

/* Cards (services + reviews) */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; transition: transform .15s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--surface-2); }
/* Service (peril) cards: full-bleed photo on top, text below */
.perils .card { padding: 0; overflow: hidden; }
.card-photo { width: 100%; height: 152px; object-fit: cover; display: block; background: var(--surface-2); }
.card-body { padding: 20px 22px 24px; }
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; font-size: .97rem; }

/* Reviews */
.reviews { grid-template-columns: repeat(3, 1fr); }
.review .stars { color: var(--accent); letter-spacing: .12em; margin: 0 0 .6rem; }
.review blockquote { margin: 0 0 1rem; color: var(--text); font-size: 1.02rem; line-height: 1.55; }
.review-by { margin: 0; font-size: .9rem; color: var(--muted-2); }
.review-name { color: var(--muted); font-weight: 600; }
.review-link { color: var(--brand); font-weight: 600; white-space: nowrap; }
.review-link:hover { color: var(--brand-hover); }
.reviews-more { margin: 26px 0 0; text-align: center; }
.card.is-placeholder { border-style: dashed; }
.card.is-placeholder:hover { transform: none; }

/* Feature list (why us) */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px 40px; grid-template-columns: repeat(2, 1fr); }
.feature-list h3 { margin-bottom: .3em; }
.feature-list p { margin: 0; }

/* About */
.about-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-facts { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; margin: 0; }
.about-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: var(--radius-sm); }
.about-facts > div + div { border-top: 1px solid var(--border); }
.about-facts dt { color: var(--muted-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.about-facts dd { margin: 0; text-align: right; color: var(--text); }

/* ---------------- Contact ---------------- */
.contact-cta { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.contact-cta-lead p { color: var(--muted); }
.contact-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: .6rem; }
.contact-details { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.contact-details strong { color: var(--muted-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.contact-details a { color: var(--text); }
.contact-details a:hover { color: var(--brand); }

.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
/* In-hero form: the .hero-form-card is the surface, so the form itself is transparent + single-column */
.contact-form--stacked {
  grid-template-columns: 1fr; gap: 14px;
  background: transparent; border: none; padding: 0; box-shadow: none;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 90, 168, 0.18);
}
.field textarea { resize: vertical; min-height: 110px; }
/* Red outline shows only after a submit attempt (JS adds .was-validated) — for empty/invalid required fields */
.contact-form.was-validated .field input:invalid,
.contact-form.was-validated .field select:invalid,
.contact-form.was-validated .field textarea:invalid { border-color: #d9534f; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { margin: 0; font-size: .95rem; font-weight: 500; }
.form-status.is-ok { color: var(--verify); }
.form-status.is-err { color: #c0392b; }
.form-privacy { grid-column: 1 / -1; margin: 0; font-size: .82rem; color: var(--muted-2); }
.field-note { grid-column: 1 / -1; margin: -6px 0 0; font-size: .82rem; color: var(--muted-2); }
.opt { color: var(--muted-2); font-weight: 400; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- Trust / credentials bar ---------------- */
.trust-bar { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.trust-bar-inner { overflow: hidden; }
.trust-track { display: flex; flex-wrap: nowrap; align-items: center; width: max-content; padding-block: 16px; animation: trust-marquee 32s linear infinite; }
.trust-bar-inner:hover .trust-track { animation-play-state: paused; }
@keyframes trust-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.trust-chip { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 500; color: var(--text); flex: none; margin-right: 40px; }
.trust-check {
  display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: rgba(84, 206, 143, 0.16); color: var(--verify); font-size: .72rem; font-weight: 700;
}
.trust-stars { color: var(--accent); letter-spacing: .06em; }
.trust-chip-link { text-decoration: none; }
.trust-chip-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Urgency CTA band ---------------- */
.urgency {
  background: linear-gradient(90deg, rgba(240, 169, 75, 0.16), rgba(240, 169, 75, 0.05)), #fff8ee;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--accent);
}
.urgency-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 34px; }
.urgency-text { max-width: 640px; }
.urgency-text h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .3em; }
.urgency-text p { margin: 0; color: var(--muted); }
.urgency-cta { display: flex; flex-wrap: wrap; gap: 12px; }

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

/* ---------------- Footer ---------------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 40px 24px; }
.footer-logo { height: 66px; width: auto; display: block; margin-bottom: 14px; }
.footer-inner p { margin: 0 0 .3rem; font-size: .92rem; }
.footer-contact a { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted-2); }
.footer-bottom p { margin: 0; }
.footer-social-title { color: var(--muted-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin: 0 0 10px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: color .15s ease, border-color .15s ease, transform .12s ease;
}
.social-link:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.social-link svg { width: 19px; height: 19px; }

/* ============================================================
   Responsive
   ============================================================ */
/* Desktop: phone shown as an outlined (secondary) button beside the amber CTA */
@media (min-width: 1025px) {
  .site-nav a.tel { padding: .5em .85em; border: 1px solid var(--border); border-radius: 999px; line-height: 1.1; }
  .site-nav a.tel:hover { border-color: var(--brand); color: var(--brand); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "eyebrow eyebrow" "top aside" "bottom bottom"; gap: 14px 18px; align-items: center; }
  .steps, .cards, .reviews, .feature-list { grid-template-columns: repeat(2, 1fr); }
  .about-inner, .contact-cta { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: calc(56px + env(safe-area-inset-top, 0px)) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px; white-space: normal;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 16px 20px 24px; transform: translateY(-120%); transition: transform .25s ease;
    max-height: calc(100vh - 56px); overflow-y: auto;
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .site-nav a.header-cta { margin-top: 10px; border-bottom: none; }
}

@media (max-width: 720px) {
  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96); backdrop-filter: saturate(140%) blur(10px);
    border-top: 1px solid var(--border);
  }
  .call-bar-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 14px; border-radius: 10px; font-weight: 600; font-size: 1rem;
  }
  .call-bar-call { background: var(--accent); color: var(--accent-ink); }
  .call-bar-text { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
  .call-bar-btn svg { width: 18px; height: 18px; }
  .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 560px) {
  .steps, .cards, .reviews, .feature-list, .contact-form { grid-template-columns: 1fr; }
  .contact-details { grid-template-columns: 1fr; }
  .brand { min-width: 0; }
  .brand-name { font-size: .9rem; white-space: normal; line-height: 1.12; }
  .contact-cta-lead .btn, .urgency-cta .btn, .hero-cta .btn { width: 100%; }
  .urgency-cta { width: 100%; }
}

/* Testimonials become a swipeable, snap-scrolling carousel on mobile */
@media (max-width: 640px) {
  .reviews {
    display: flex; flex-wrap: nowrap; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin-inline: -20px; padding: 4px 20px 10px;   /* full-bleed to screen edges */
    scrollbar-width: none;
  }
  .reviews::-webkit-scrollbar { display: none; }
  .reviews .review { flex: 0 0 82%; scroll-snap-align: start; }

  /* Hero on mobile: eyebrow full-width one line on top; Fire/Flood/Mold beside the review carousel */
  .hero-grid { padding-top: 20px; }
  .eyebrow { font-size: clamp(.64rem, 2.8vw, .78rem); letter-spacing: .09em; white-space: nowrap; }
  .peril-headline { gap: 18px; }
  .peril-headline span { font-size: clamp(2.3rem, 11vw, 3.6rem); }
  .rev-carousel { padding: 16px 16px 12px; }
  .rev-slides { min-height: 215px; }
  .rev-text { -webkit-line-clamp: 5; font-size: .92rem; line-height: 1.5; }
  .rev-dots { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
