/* ==========================================================================
   RoofMax USA — site stylesheet
   Brand: #0F97FF (blue) / #FFFF66 (pale yellow, dark-bg only) / #0B1520 (ink)
   Fonts: Oswald (headings, condensed to echo the wordmark) + Source Sans 3 (body)
   ========================================================================== */

:root {
  --brand:        #0F97FF;
  --brand-rgb:    15, 151, 255;
  --brand-dark:   #0B6FBF;
  --brand-dark-rgb: 11, 111, 191;
  --brand-deep:   #08527F;
  --brand-tint:   #E8F4FF;

  /* The logo yellow is pale by design — it only has contrast on dark grounds.
     --accent-ink is the darkened variant for yellow-on-light situations. */
  --accent:       #FFFF66;
  --accent-ink:   #8A7400;

  --ink:          #0B1520;
  --ink-2:        #13232f;
  --ink-3:        #1d3242;

  --text:         #1c2b36;
  --muted:        #5a6b78;
  --line:         #dde5ea;
  --bg:           #ffffff;
  --bg-alt:       #f5f8fa;

  --wrap:         1200px;
  --radius:       10px;
  --shadow:       0 2px 8px rgba(11,21,32,.08);
  --shadow-lg:    0 12px 34px rgba(11,21,32,.16);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
body.nav-locked { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: Oswald, system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.14;
  color: var(--ink);
  margin: 0 0 .55em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { margin: 0 0 1.1em; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand-deep); text-decoration: underline; }
/* WCAG 1.4.1: a link sitting inside a block of text may not be distinguished by
   colour alone unless it clears 3:1 against the surrounding copy. The in-copy
   phone links measured 2.78, so they need the underline. Scoped to <p> inside
   <main> so nav, cards, footer columns and buttons keep their own treatment. */
main p a:not(.btn) { text-decoration: underline; }

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

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

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ----------
   Fills use --brand-dark, not --brand: white on #0F97FF is 3.05:1, which fails
   AA for the 15px bold button text. #0B6FBF gives 5.07:1. --brand stays for
   icons, borders and accents, where contrast rules do not bite. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 50px; padding: .85rem 1.65rem;
  font-family: Oswald, sans-serif; font-weight: 600; font-size: 1.02rem;
  letter-spacing: .035em; text-transform: uppercase;
  border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; text-align: center;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 44px; padding: .6rem 1.15rem; font-size: .95rem; }

.btn-primary { background: var(--brand-dark); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }

/* Accent button: the pale brand yellow needs dark text to stay legible (Rule 12). */
.btn-accent { background: var(--accent); color: #2b2400; }
.btn-accent:hover { background: #ffef3d; color: #221d00; }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn-outline { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-dark); color: #fff; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--ink-2); color: #cfe0ec; font-size: .88rem; }
.trust-inner { display: flex; align-items: center; gap: 1.75rem; min-height: 40px; flex-wrap: wrap; }
.trust-item { display: inline-flex; align-items: center; gap: .4rem; }
.trust-item svg { width: 15px; height: 15px; fill: var(--brand); flex: none; }
.trust-call { margin-left: auto; color: #fff; font-weight: 600; }
.trust-call:hover { color: var(--accent); text-decoration: none; }
.trust-call svg { fill: var(--accent); }
@media (max-width: 900px) { .trust-bar { display: none; } }

/* ---------- Header ---------- */
#site-header { background: var(--ink); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 78px; }
.logo { flex: none; }
.logo img { height: 52px; width: auto; }

.nav-desktop { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; margin-left: auto; }
.nav-desktop > li { position: relative; }
.nav-desktop > li > a {
  display: block; padding: .7rem .78rem;
  color: #e6eef4; font-family: Oswald, sans-serif; font-weight: 500;
  font-size: .97rem; letter-spacing: .03em; text-transform: uppercase;
  border-radius: 6px; transition: color .16s ease, background-color .16s ease;
}
.nav-desktop > li > a:hover,
.nav-desktop > li > a.is-active { color: #fff; background: rgba(var(--brand-rgb), .22); text-decoration: none; }

.sub-toggle { display: none; }

/* Dropdown + mega menu */
.sub {
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .6rem; margin: 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  border-top: 3px solid var(--brand);
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.sub li a, .mega-col a {
  display: block; padding: .55rem .8rem; color: var(--text); font-size: .97rem; border-radius: 6px;
}
.sub li a:hover, .mega-col a:hover { background: var(--brand-tint); color: var(--brand-deep); text-decoration: none; }

.mega-menu { width: 720px; padding: 1.35rem; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.mega-cat {
  display: block; font-family: Oswald, sans-serif; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin: .3rem 0 .35rem .8rem;
}
.mega-col .mega-cat:not(:first-child) { margin-top: .9rem; }
.mega-all {
  display: inline-block; margin-top: 1rem; padding-left: .8rem;
  font-family: Oswald, sans-serif; text-transform: uppercase; font-size: .87rem;
  letter-spacing: .05em; color: var(--brand-dark);
}

/* These must out-specify `.nav-desktop > li > a` (0,1,2), which would otherwise
   force the near-white nav link color onto the pale yellow call button and leave
   it effectively unreadable. Hence the `.nav-desktop > li >` prefix. */
.nav-desktop > li.nav-cta > a {
  display: inline-flex; align-items: center; gap: .45rem; margin-left: .5rem;
  padding: .68rem 1.15rem; border-radius: 8px;
  font-family: Oswald, sans-serif; font-weight: 600; font-size: .95rem;
  letter-spacing: .04em; text-transform: uppercase;
  transition: background-color .18s ease, color .18s ease;
}
.nav-desktop > li > a.nav-quote { background: var(--brand-dark); color: #fff; }
.nav-desktop > li > a.nav-quote:hover { background: var(--brand-deep); color: #fff; text-decoration: none; }
.nav-desktop > li > a.nav-call { background: var(--accent); color: #2b2400; }
.nav-desktop > li > a.nav-call:hover { background: #ffef3d; color: #221d00; text-decoration: none; }
.nav-call svg { width: 16px; height: 16px; fill: currentColor; }

/* Burger */
.burger {
  display: none; margin-left: auto; width: 46px; height: 46px;
  background: transparent; border: 0; cursor: pointer; padding: 10px;
}
.burger span { display: block; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
  .burger { display: block; }
  .nav-mobile {
    position: fixed; inset: 78px 0 0 0; background: var(--ink);
    overflow-y: auto; padding: 1rem 1.25rem 6rem;
    transform: translateX(100%); transition: transform .24s ease; visibility: hidden;
  }
  .nav-mobile.is-open { transform: translateX(0); visibility: visible; }
  .nav-desktop { flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; }
  .nav-desktop > li { border-bottom: 1px solid rgba(255,255,255,.09); }
  .nav-desktop > li > a { padding: 1rem .25rem; font-size: 1.08rem; }

  .sub-toggle {
    display: block; position: absolute; right: 0; top: 4px;
    width: 48px; height: 48px; background: transparent; border: 0; cursor: pointer;
  }
  .sub-toggle svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; transition: transform .2s ease; }
  .has-sub.sub-open .sub-toggle svg { transform: rotate(180deg); }

  .sub, .mega-menu {
    position: static; width: auto; min-width: 0; opacity: 1; visibility: visible; transform: none;
    background: transparent; box-shadow: none; border-top: 0; padding: 0 0 .6rem;
    display: none;
  }
  .has-sub.sub-open > .sub { display: block; }
  .mega-grid { grid-template-columns: 1fr; gap: .2rem; }
  .sub li a, .mega-col a { color: #b9cbd8; padding: .62rem .9rem; }
  .sub li a:hover, .mega-col a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .mega-cat { color: #6e8798; margin-left: .9rem; }
  .nav-cta a { margin: .7rem 0 0; justify-content: center; }
  .nav-cta { border-bottom: 0 !important; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--ink); }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(11,21,32,.94) 0%, rgba(11,21,32,.80) 45%, rgba(var(--brand-dark-rgb), .55) 100%),
    var(--hero-img, none) center/cover no-repeat;
}
.hero-inner { position: relative; padding: clamp(3rem, 8vw, 6rem) 0; max-width: 760px; }
.hero h1 { color: #fff; }
.hero .eyebrow {
  display: inline-block; font-family: Oswald, sans-serif; text-transform: uppercase;
  letter-spacing: .14em; font-size: .84rem; color: var(--accent); margin-bottom: .9rem;
}
.hero p.lede { font-size: 1.16rem; color: #dbe7f0; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.6rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2rem; padding: 0; list-style: none; }
.hero-points li { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: #cfe0ec; }
.hero-points svg { width: 20px; height: 20px; fill: var(--accent); flex: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 2.4rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow-dark {
  display: block; font-family: Oswald, sans-serif; text-transform: uppercase;
  letter-spacing: .13em; font-size: .82rem; color: var(--brand-dark); margin-bottom: .5rem;
}

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .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(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: rgba(var(--brand-rgb), .45); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 44px; height: 44px; fill: var(--brand); margin-bottom: .9rem; }
.card-link {
  display: inline-block; margin-top: .8rem; font-family: Oswald, sans-serif;
  text-transform: uppercase; letter-spacing: .05em; font-size: .88rem; color: var(--brand-dark);
}

/* Media block (image + copy) */
.media { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.media.reverse .media-img { order: 2; }
@media (max-width: 860px) { .media { grid-template-columns: 1fr; } .media.reverse .media-img { order: 0; } }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 1.5rem; }
.step { position: relative; padding-left: 4rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--brand-dark); color: #fff;
  font-family: Oswald, sans-serif; font-size: 1.28rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* Testimonial */
.testimonial {
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.8rem); border-left: 5px solid var(--brand);
}
.testimonial blockquote { margin: 0 0 1rem; font-size: 1.15rem; line-height: 1.6; color: #e8f1f7; }
.testimonial .stars { color: var(--accent); letter-spacing: .12em; margin-bottom: .7rem; }
.testimonial cite { font-style: normal; font-weight: 600; color: #a8c2d4; font-size: .95rem; }

/* FAQ */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.05rem 1.3rem; margin-bottom: .85rem; background: #fff;
}
.faq details[open] { border-color: rgba(var(--brand-rgb), .5); }
/* min-height 44px: the bare text line measured 29px, below the tap-target floor.
   flex is safe here because the default marker is already suppressed. */
.faq summary {
  cursor: pointer; font-family: Oswald, sans-serif; font-size: 1.08rem;
  font-weight: 500; color: var(--ink); list-style: none; padding-right: 1.8rem; position: relative;
  min-height: 44px; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--brand-dark); line-height: 1;
}
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: .8rem 0 0; }

/* Forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  border: 1px solid #c6d2da; border-radius: 8px; font: inherit; color: var(--text); background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .22);
}
.form-note { font-size: .86rem; color: var(--muted); }
/* Honeypot — display:none with a neutral name so Chrome autofill can't populate it. */
.hp-field { display: none !important; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(100deg, var(--brand-deep) 0%, var(--brand-dark) 60%, var(--brand) 100%); color: #fff; padding: clamp(2.4rem, 5vw, 3.4rem) 0; }
.cta-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta-copy { flex: 1 1 420px; }
.cta-copy h2 { color: #fff; margin-bottom: .4rem; }
.cta-copy p { color: #e0f0ff; margin: 0; max-width: 620px; }
.cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------- Footer ---------- */
#site-footer { background: var(--ink); color: #b7cad8; padding: clamp(2.6rem, 5vw, 4rem) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.15fr; gap: 2.2rem; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 { color: #fff; font-size: 1.06rem; margin-bottom: .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .5rem; }
/* :not(.btn) is load-bearing (build-standards Rule 12). Without it this rule
   (0,2,0) outranks .btn-accent (0,1,0) and repaints the footer's yellow
   "Free Inspection" button #b7cad8 — light grey on #ffff66, contrast 1.58,
   i.e. an invisible label on the highest-intent CTA on the page. Never fix that
   with !important on the button; keep buttons out of broad container rules. */
.footer-col a:not(.btn) { color: #b7cad8; }
.footer-col a:not(.btn):hover { color: #fff; text-decoration: underline; }
.footer-brand img { height: 54px; width: auto; margin-bottom: 1rem; }
.footer-blurb { font-size: .96rem; }
.footer-cred { font-size: .89rem; color: #8fa9bb; }
.footer-google { display: inline-flex; align-items: center; gap: .5rem; margin-top: .4rem; font-weight: 600; color: #fff; }
.footer-google svg { width: 18px; height: 18px; fill: var(--brand); }
.footer-contact li { line-height: 1.5; }
.footer-contact a { color: #fff; font-weight: 600; font-size: 1.1rem; }
.footer-col .btn { margin-top: .9rem; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem;
  margin-top: 2.4rem; padding: 1.2rem 0; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .89rem;
}
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }
/* These inherited the global `a` colour (--brand-dark #0B6FBF) on the near-black
   footer: 3.53:1, under AA. Match the other footer links (~9:1). */
.footer-legal a:not(.btn) { color: #b7cad8; }
.footer-legal a:not(.btn):hover { color: #fff; text-decoration: underline; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta { display: none; }
@media (max-width: 780px) {
  .sticky-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: rgba(11,21,32,.35); box-shadow: 0 -3px 14px rgba(0,0,0,.22);
  }
  .sticky-cta a {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 56px; font-family: Oswald, sans-serif; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; font-size: 1rem;
  }
  .sticky-cta a:hover { text-decoration: none; }
  .sticky-call { background: var(--accent); color: #2b2400; }
  .sticky-call svg { width: 18px; height: 18px; fill: currentColor; }
  .sticky-quote { background: var(--brand-dark); color: #fff; }
  /* Clear the sticky bar so it can never cover the last footer row. */
  #site-footer { padding-bottom: 72px; }
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.lede { font-size: 1.12rem; color: var(--muted); }
.badge-row { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; margin-top: 1.2rem; }
.badge-row img { height: 54px; width: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Tap targets ----------
   Standalone links measured 21-28px tall, under the 44px minimum. Card links and
   footer links get a real hit area; body-copy links inside paragraphs are left
   alone, since padding them would break the line box. */
.card-link, .mega-all, .footer-google {
  display: inline-flex; align-items: center; min-height: 44px;
}
@media (max-width: 900px) {
  .footer-col li a,
  .footer-legal a,
  .footer-contact a {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .footer-col li { margin-bottom: 0; }
  .footer-legal { gap: 1.2rem 1.6rem; flex-wrap: wrap; }
}
/* The homepage "where we work" list renders its cities as links; give them a
   real hit area rather than the 28px line box. */
.hero-points a { display: inline-flex; align-items: center; min-height: 44px; }
