/* J & M Roofing Contractor LLC — hand-rolled stylesheet.
   Palette is brand-derived: the company mark is navy lettering with a deep
   red rule, so navy carries structure and red carries action. Light ground
   follows the genre (12/12 surveyed roofing sites use one); the slab display
   face is the differentiation lane, since serif is essentially absent from
   the field. All text pairs clear WCAG AA on their own ground. */

:root {
  --bg: #ffffff;
  --surface: #f4f6f9;
  --surface-2: #e9edf3;
  --text: #14202e;
  --muted: #556273;
  --border: #d8dee7;
  --navy: #1b3a5c;
  --accent: #9e1b1b;
  --accent-2: #7d1414;
  --on-accent: #ffffff;
  --urgent-bg: #fdf3f3;
  --radius: 12px;
  --max: 1120px;
  --shadow: 0 12px 32px -18px rgba(20, 32, 46, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.consent-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }

h1, h2, h3 {
  font-family: 'Roboto Slab', Georgia, serif;
  line-height: 1.18;
  margin: 0 0 .5em;
  letter-spacing: -.005em;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 4.8vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 68ch; }

.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 .75rem;
}
.eyebrow a { color: inherit; }

.note {
  background: var(--surface);
  border-left: 3px solid var(--muted);
  padding: .85rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-size: .95rem;
  max-width: 62ch;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .7rem 1rem;
  border-radius: 0 0 var(--radius) 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex; align-items: center; gap: 1rem;
  min-height: 68px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand-mark {
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 700;
  background: var(--navy); color: #fff;
  padding: .3rem .5rem; border-radius: 6px; font-size: .95rem;
  border-bottom: 3px solid var(--accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; color: var(--navy); font-size: 1.02rem; }
.brand-sub { font-size: .76rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: .5rem; }
.nav-toggle-label span {
  display: block; width: 22px; height: 2px; background: var(--navy); margin: 4px 0;
}

.site-nav { display: flex; align-items: center; gap: 1.35rem; }
.site-nav a { color: var(--navy); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--accent); text-decoration: underline; }
.site-nav .nav-call {
  background: var(--accent); color: var(--on-accent);
  padding: .55rem .95rem; border-radius: 999px; font-weight: 600; white-space: nowrap;
}
.site-nav .nav-call:hover { background: var(--accent-2); color: var(--on-accent); text-decoration: none; }

@media (max-width: 860px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    display: none; width: 100%; flex-direction: column;
    align-items: flex-start; gap: .9rem; padding: .75rem 0 1.1rem;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:focus-visible ~ .nav-toggle-label { outline: 3px solid var(--accent); }
}

/* ---------- hero + triage ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 12% -12%, #e8eef6 0%, rgba(232, 238, 246, 0) 62%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  padding: clamp(2.75rem, 7vw, 4.75rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
}
.hero h1 { max-width: 20ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }

.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 2px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-2); color: var(--on-accent); }
.btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }

.triage-heading { font-size: 1.05rem; margin: 2.5rem 0 .9rem; color: var(--muted); font-family: inherit; font-weight: 600; }
.triage { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.triage-card {
  display: flex; flex-direction: column; gap: .2rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; text-decoration: none; height: 100%;
  box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease;
}
.triage-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.triage-label { font-weight: 700; color: var(--navy); }
.triage-note { font-size: .88rem; color: var(--muted); }
.triage-card--urgent { border-left: 4px solid var(--accent); background: var(--urgent-bg); }

/* ---------- credentials ---------- */
.credentials { background: var(--navy); color: #fff; padding: 1.6rem 0; }
.credential-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.credential { display: flex; flex-direction: column; gap: .15rem; }
.credential-value { font-family: 'Roboto Slab', Georgia, serif; font-size: 1.15rem; font-weight: 700; }
.credential-label { font-size: .85rem; color: #c6d3e2; }
.credential-label a { color: #fff; }

/* ---------- sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.page-head { background: var(--surface); padding: clamp(2rem, 5vw, 3rem) 0; border-bottom: 1px solid var(--border); }
.page-head--urgent { background: var(--urgent-bg); border-bottom-color: var(--accent); }

.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem; box-shadow: var(--shadow);
}
.card h2, .card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.card h2 a, .card h3 a { text-decoration: none; color: var(--navy); }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card p { color: var(--muted); margin-bottom: .6rem; font-size: .95rem; }
.card--urgent { border-left: 4px solid var(--accent); }
.card-link { font-size: .9rem; font-weight: 600; }

.process { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.process li { counter-increment: step; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem; }
.process li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: .9rem; margin-bottom: .65rem;
}
.process h3 { margin-bottom: .35rem; }
.process p { color: var(--muted); font-size: .95rem; margin: 0; }

.axes { margin: 0 0 1.25rem; padding-left: 1.15rem; max-width: 62ch; }
.axes li { margin-bottom: .5rem; color: var(--muted); }
.axes strong { color: var(--text); }

.review-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.review { background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 1.2rem; }
.review p { color: var(--text); font-size: .96rem; }
.review cite { color: var(--muted); font-size: .86rem; font-style: normal; font-weight: 600; }
.attribution { font-size: .88rem; color: var(--muted); }

.cta { background: var(--navy); color: #fff; padding: clamp(2.5rem, 6vw, 3.5rem) 0; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #c6d3e2; }
.cta .hero-actions { justify-content: center; }
.cta .btn-ghost { border-color: #fff; color: #fff; }
.cta .btn-ghost:hover { background: #fff; color: var(--navy); }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-aside { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; }
.contact-aside h3 { font-size: 1rem; margin-top: 1.25rem; }

.intake { display: flex; flex-direction: column; gap: .3rem; max-width: 34rem; }
.intake label { font-weight: 600; font-size: .92rem; margin-top: .85rem; color: var(--navy); }
.intake input, .intake textarea {
  font: inherit; padding: .7rem .85rem; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--text); width: 100%;
}
.intake input:focus-visible, .intake textarea:focus-visible { border-color: var(--accent); }
.intake .btn { margin-top: 1.25rem; align-self: flex-start; cursor: pointer; }
.form-note { margin-top: .85rem; color: var(--accent-2); font-weight: 600; font-size: .92rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); padding: 2.5rem 0 1.25rem; margin-top: 0; }
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h3 { font-size: 1.05rem; }
.site-footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .6rem; font-family: inherit; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; font-size: .93rem; }
.site-footer a { color: var(--navy); }
.site-footer a:hover { color: var(--accent); }
.footer-nap { font-size: .95rem; color: var(--muted); }
.hours { font-size: .92rem; color: var(--muted); }

.license-bar { border-top: 1px solid var(--border); margin-top: 1.75rem; padding-top: 1rem; }
.license-bar p { font-size: .88rem; color: var(--muted); margin: 0; }
.license-bar strong { color: var(--text); letter-spacing: .04em; }

.footer-bottom { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; padding-top: .85rem; }
.footer-bottom small { color: var(--muted); font-size: .84rem; }

/* ---------- consent gate ---------- */
.consent-gate {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 32, 46, .72);
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
  overflow-y: auto;
}
:root.consent-given .consent-gate { display: none; }
.consent-card { background: #fff; border-radius: var(--radius); max-width: 620px; padding: 1.75rem; box-shadow: var(--shadow); }
.consent-title { margin-top: 0; font-size: 1.3rem; }
.consent-body { font-size: .93rem; color: var(--muted); max-height: 52vh; overflow-y: auto; }
.consent-body strong { color: var(--text); }
.consent-leave { font-weight: 600; color: var(--text); }
.consent-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.25rem; }
.consent-btn { font: inherit; font-weight: 600; padding: .7rem 1.2rem; border-radius: 999px; border: 2px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; }
.consent-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.consent-btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

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