/* =========================================================
   Mountain Standard Roofing — Site Styles
   Fonts: Oswald (display) + Libre Franklin (body)
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --navy: #374151;          /* primary dark (buttons, dark sections) */
  --navy-dark: #1f2937;     /* hover / deeper */
  --ink: #0a0a0a;           /* headings */
  --body: #374151;          /* body text */
  --body-soft: #4b5563;     /* paragraph text */
  --muted: #6b7280;         /* eyebrows / secondary */
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --border: #e5e7eb;
  --brand-blue: #1d4ed8;    /* logo accent */
  --radius: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --maxw: 1200px;
  --font-display: "Oswald", system-ui, sans-serif;
  --font-body: "Libre Franklin", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.1; margin: 0 0 .5em; }
p { margin: 0 0 1rem; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--navy); color: #e5e7eb; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.center { text-align: center; }
.eyebrow {
  font-size: 15px; font-weight: 500; color: var(--muted);
  margin: 0 0 14px; letter-spacing: .01em;
}
.section--dark .eyebrow { color: #9ca3af; }
.lead { font-size: 1.06rem; color: var(--body-soft); max-width: 620px; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  color: var(--ink);
  font-size: clamp(2.4rem, 5.2vw, 3.85rem);
  line-height: 1.02;
}
h2.title, .title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  letter-spacing: -0.5px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--navy); color: #fff;
  padding: 14px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; border: 1px solid var(--navy);
  transition: background .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--outline:hover { background: #f3f4f6; }
.section--dark .btn { background: #fff; color: var(--navy-dark); border-color: #fff; }
.section--dark .btn:hover { background: #e5e7eb; }
.btn--ghost { background: transparent; color: var(--ink); border-color: transparent; padding-left: 0; }
.btn-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink); }
.btn-link .arrow { transition: transform .18s ease; }
.btn-link:hover .arrow { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 20px; }
.nav__logo img { height: 52px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: 34px; }
.nav__links { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav__links > li { position: relative; }
.nav__links a, .nav__dropdown-toggle {
  font-weight: 500; color: #111827; font-size: 1rem;
  background: none; border: none; padding: 8px 0; display: inline-flex; align-items: center; gap: 6px;
}
.nav__links a:hover, .nav__dropdown-toggle:hover { color: var(--navy); }
.nav__dropdown-toggle .chev { transition: transform .2s ease; }
.nav__item--dropdown[aria-expanded="true"] .chev,
.nav__dropdown-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.nav__dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(6px);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); min-width: 300px; padding: 10px;
  opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease;
}
.nav__item--dropdown:hover .nav__dropdown,
.nav__item--dropdown:focus-within .nav__dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav__dropdown a { display: block; padding: 11px 14px; border-radius: 8px; font-weight: 500; }
.nav__dropdown a:hover { background: var(--bg-alt); }

.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav__phone {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 16px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-sm);
}
.nav__phone:hover { background: var(--bg-alt); }
.nav__phone svg { color: var(--navy); }

.nav__toggle { display: none; background: none; border: none; padding: 8px; color: var(--ink); }

/* Mobile nav — hidden at all widths unless opened on mobile */
.site-nav-mobile { display: none; }

/* Mobile nav */
@media (max-width: 980px) {
  .nav__menu, .nav__actions .nav__phone-text { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__actions .btn { display: none; }
  .site-nav-mobile {
    position: fixed; inset: 78px 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    padding: 18px 24px 28px; display: none; z-index: 99;
    max-height: calc(100vh - 78px); overflow-y: auto;
  }
  .site-nav-mobile.open { display: block; }
  .site-nav-mobile a, .site-nav-mobile .m-group-title { display: block; padding: 12px 0; font-size: 1.08rem; font-weight: 500; border-bottom: 1px solid var(--border); }
  .site-nav-mobile .m-sub a { padding-left: 16px; font-size: 1rem; color: var(--body-soft); }
  .site-nav-mobile .m-cta { margin-top: 18px; display: grid; gap: 12px; }
  .site-nav-mobile .m-cta .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.88) 38%, rgba(255,255,255,.35) 66%, rgba(255,255,255,0) 100%);
}
.hero__inner { position: relative; z-index: 1; padding: 96px 0 104px; }
.hero__content { max-width: 620px; }
.hero__content .eyebrow { color: #374151; font-weight: 600; }
.hero__content p.sub { font-size: 1.18rem; color: #1f2937; margin: 1.2rem 0 2rem; }
.hero__cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero__note { color: var(--muted); font-size: .95rem; margin-top: 14px; }
@media (max-width: 700px) {
  .hero__bg::after { background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.86) 60%, rgba(255,255,255,.7) 100%); }
  .hero__inner { padding: 60px 0 64px; }
}

/* ---------- Service cards grid ---------- */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: #eee; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { font-size: 1.35rem; font-weight: 700; }
.card__body p { color: var(--body-soft); flex: 1; }
.card__body .btn-link { margin-top: 8px; }

/* Advice / CTA split card */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
}
.split--dark { background: var(--navy); color: #e5e7eb; border: none; }
.split__text { padding: 52px; display: flex; flex-direction: column; justify-content: center; }
.split--dark .split__text h2 { color: #fff; }
.split__media { min-height: 320px; background: #eee; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split__text { padding: 36px; } .split__media { min-height: 240px; } }

/* ---------- Problem / feature list ---------- */
.featlist { display: grid; gap: 22px; }
.featlist .feat { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.feat__icon { width: 44px; height: 44px; border-radius: 10px; background: #eef2ff; color: var(--navy);
  display: grid; place-items: center; flex: none; }
.section--dark .feat__icon { background: rgba(255,255,255,.1); color: #fff; }
.feat h4 { font-size: 1.12rem; margin-bottom: 4px; }
.feat p { color: var(--body-soft); margin: 0; }
.section--dark .feat p { color: #cbd5e1; }
.section--dark .feat h4 { color: #fff; }

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step__num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-family: var(--font-display); margin-bottom: 16px;
}
.section--dark .step__num { background: #fff; color: var(--navy); }
.step h4 { font-size: 1.15rem; }
.step p { color: var(--body-soft); }
.section--dark .step p { color: #cbd5e1; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q {
  width: 100%; text-align: left; background: none; border: none;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 4px; font-size: 1.18rem; font-weight: 600; color: var(--ink);
}
.faq__q .plus { flex: none; transition: transform .25s ease; color: var(--muted); }
.faq__item.open .faq__q .plus { transform: rotate(180deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a p { padding: 0 4px 24px; margin: 0; color: var(--body-soft); }

/* ---------- Lead form ---------- */
.leadform-section { position: relative; }
.leadform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .leadform-grid { grid-template-columns: 1fr; gap: 36px; } }
.hours { margin-top: 26px; }
.hours h4 { font-size: 1.05rem; margin-bottom: 6px; }
.hours p { margin: 0; color: var(--body-soft); }
.contact-line { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; }
.contact-line svg { color: var(--navy); }

.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 34px; }
.form-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.form-progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 18px 0 26px; }
.form-progress__bar { height: 100%; width: 50%; background: var(--navy); border-radius: 999px; transition: width .3s ease; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 7px; color: var(--ink); }
.field label .req { color: #dc2626; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 1rem; background: #f9fafb; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(55,65,81,.12);
}
.field textarea { min-height: 120px; resize: vertical; }
.form-step { display: none; }
.form-step.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }
.form-nav { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 8px; }
.form-nav .btn { min-width: 120px; }
.form-divider { display: flex; align-items: center; gap: 14px; color: var(--muted); margin: 24px 0; font-size: .9rem; }
.form-divider::before, .form-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.form-msg { padding: 14px 16px; border-radius: var(--radius); font-weight: 500; margin-top: 16px; display: none; }
.form-msg.ok { display: block; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-msg.err { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.book-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-top: 22px; text-align: center; }
.book-card h4 { font-size: 1.15rem; margin-bottom: 6px; }
.book-card p { color: var(--body-soft); font-size: .96rem; margin-bottom: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: #0f141b; color: #9ca3af; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer img { height: 56px; margin-bottom: 18px; }
.site-footer h5 { color: #fff; font-size: 1rem; margin: 0 0 16px; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
.footer-contact svg { vertical-align: middle; margin-right: 8px; color: #cbd5e1; }
.footer-bottom { border-top: 1px solid #1f2937; margin-top: 46px; padding-top: 22px; font-size: .9rem; color: #6b7280; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .title { color: #fff; }
.cta-band p { max-width: 640px; margin: 0 auto 26px; color: #cbd5e1; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px; font-size: .9rem; font-weight: 600; color: var(--body); }
.section-head { max-width: 720px; margin: 0 auto 52px; }
