/* Consumer identity retained from this site's existing stylesheet: navy/orange,
   system body type and serif headings. Existing 20px gutters, 720/1080px
   containers, 720px breakpoint and 10–64px spacing rhythm remain the baseline.
   Layout changes follow working/getaroofer-landing-page/replacement-lead-plan.md §12. */
:root {
  --ink: #17262f;
  --muted: #55646e;
  --navy: #12283f;
  --navy-2: #1d4468;
  --primary: #16324f;       /* headings */
  --cta: #c2410c;           /* call button; white text on it is 5.2:1 */
  --cta-hover: #9a3412;
  --sun: #f4a259;           /* small accents on dark backgrounds */
  --ok: #1f7a4d;
  --mist: #f3f6f8;
  --paper: #fbfaf7;
  --border: #d3dce2;
  --white: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1080px; }

/* header */
.site-header { border-bottom: 1px solid var(--border); background: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary); }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand-tld { font-weight: 400; color: var(--muted); }
.header-note { font-size: 14px; color: var(--muted); }

/* type */
h1, h2 { font-family: var(--serif); font-weight: 700; color: var(--primary); text-wrap: balance; }
h1 { margin: 0 0 14px; font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; }
h2 { margin: 0 0 10px; font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; }
.lead { margin: 0 0 20px; font-size: 19px; }
.muted { color: var(--muted); margin-top: 0; }
.small { font-size: 15px; }
.fineprint { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.fineprint a { color: inherit; }

/* buttons */
.btn {
  display: block;
  width: 100%;
  padding: 18px 20px;
  background: var(--cta);
  color: var(--white);
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--cta-hover); }
.btn:active { transform: translateY(1px); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--mist); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--navy-2); outline-offset: 3px; }
.band :focus-visible, .guide-hero :focus-visible { outline-color: var(--sun); }

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  padding: 34px 0 64px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hero h1 { color: var(--white); }
.hero-grid { display: grid; gap: 28px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sun); }
.hero .lead { color: #e3ebf2; }
.ticks { list-style: none; margin: 0; padding: 0; display: none; }
.ticks li { position: relative; padding: 4px 0 4px 32px; color: #e3ebf2; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--sun);
  border-bottom: 3px solid var(--sun);
  transform: rotate(-45deg);
}
/* Keep every peak within the SVG viewport. A minimum drawing width shows a
   few full-size roofs on phones; the hero clips only the drawing's sides. */
.roofline { position: absolute; left: 50%; bottom: -1px; width: 100%; min-width: 720px; height: 40px; transform: translateX(-50%); fill: var(--white); display: block; }

/* the two-question card */
.card {
  background: var(--white);
  color: var(--ink);
  border-radius: 18px;
  padding: 24px 20px 18px;
  box-shadow: 0 18px 40px rgba(6, 18, 32, 0.35);
}
.card-title { margin: 0 0 12px; font-size: 25px; line-height: 1.2; outline: none; }
.card-text { margin: 0 0 18px; }
.card-foot { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); text-align: center; }
.step { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.step-ok { color: var(--ok); }

.choices { display: grid; gap: 10px; }
.choice {
  display: block;
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--cta); background: #fff8f4; }
.choice-main { display: block; font-weight: 700; font-size: 18px; color: var(--primary); }
.choice-sub { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); line-height: 1.35; }
.back { margin: 14px 0 0; padding: 4px 0; font: inherit; font-size: 15px; color: var(--muted); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.back:hover { color: var(--primary); }

/* Fail closed: without JS (including a failed script load), only the explanation
   appears. Phone links start without href and are wired after qualification. */
.panel { display: none; }
.nojs { display: block; }
.js .nojs { display: none; }
.js body[data-state="intro"] [data-panel="intro"],
.js body[data-state="q1"] [data-panel="q1"],
.js body[data-state="q2"] [data-panel="q2"],
.js body[data-state="yes"] [data-panel="yes"],
.js body[data-state="repair"] [data-panel="repair"],
.js body[data-state="renter"] [data-panel="renter"],
.js body[data-state="research"] [data-panel="research"],
.js body[data-state="unavailable"] [data-panel="unavailable"] { display: block; }

/* Elements that depend on the answers (the page bottom and the sticky bar). */
[data-show] { display: none; }
.js body[data-phase="intro"] [data-show="intro"],
.js body[data-phase="ask"] [data-show="ask"],
.js body[data-phase="yes"] [data-show="yes"],
.js body[data-phase="review"] [data-show="review"] { display: block; }

/* sections */
.section { padding: 44px 0; }
.section.alt { background: var(--mist); }

.steps { list-style: none; margin: 18px 0 14px; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; }
.note { margin-top: 18px; }
.num {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--white);
  background: var(--navy-2);
  border-radius: 50%;
}

.faq { margin-top: 18px; display: grid; gap: 10px; }
.faq details { background: var(--white); border: 1px solid var(--border); border-radius: 12px; }
.faq summary { position: relative; padding: 16px 48px 16px 18px; font-weight: 700; color: var(--primary); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0; padding: 0 18px 18px; color: #33434d; }
.faq a { color: var(--primary); }

.signs { list-style: none; margin: 16px 0 12px; padding: 0; }
.signs li { position: relative; padding: 12px 0 12px 36px; border-bottom: 1px solid var(--border); }
.signs li:last-child { border-bottom: 0; }
.signs li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--cta);
  border-bottom: 3px solid var(--cta);
  transform: rotate(-45deg);
}

.band { padding: 44px 0 48px; text-align: center; color: var(--white); background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); }
.band h2 { color: var(--white); }
.band [data-show] { max-width: 420px; margin: 18px auto 0; }
.fineprint-light { color: #cfdbe6; }

/* footer */
.site-footer { padding: 28px 0 40px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--border); }
.site-footer p { margin: 0 0 12px; }
.site-footer a { color: var(--primary); }

/* sticky call bar on phones */
.sticky { display: none; }

@media (max-width: 719px) {
  .js body { padding-bottom: 84px; }
  .js body[data-phase="yes"] { padding-bottom: 180px; }
  .sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: none;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 18px rgba(6, 18, 32, 0.12);
  }
  .js .sticky { display: block; transform: translateY(110%); transition: transform 0.2s; }
  .js body.past-hero .sticky { transform: none; }
  .sticky .btn { padding: 14px 16px; font-size: 18px; }
  .sticky .fineprint { margin-top: 4px; font-size: 12px; line-height: 1.35; text-align: center; }
  .sticky-phone { margin: 4px 0 0; font-size: 14px; font-weight: 700; text-align: center; }
}

@media (min-width: 720px) {
  body { font-size: 19px; }
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .hero { padding: 64px 0 84px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
  .ticks { display: block; }
  .lead { font-size: 21px; }
  .roofline { height: 64px; }
  .card { padding: 30px 28px 20px; }
  .btn { padding: 18px 40px; }
  .section { padding: 64px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .steps li { flex-direction: column; gap: 12px; padding: 24px; }
  .split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
  .split-head { position: sticky; top: 24px; }
  .signs, .split .faq { margin: 0; }
  .band { padding: 64px 0 68px; }
}

/* Shared article and landing page refinements. The source stylesheet supplies
   all colors, type families, container widths and the spacing rhythm above. */
[hidden] { display: none !important; }
a { color: var(--primary); text-underline-offset: 3px; }
p { margin-top: 0; }
h3 { margin: 0 0 6px; color: var(--primary); font-size: 19px; line-height: 1.35; }
.skip-link { position: absolute; z-index: 20; top: 10px; left: 20px; padding: 10px 16px; color: var(--white); background: var(--navy); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
#start, .guide-body section { scroll-margin-top: 28px; }
.hero-copy, .card, .split > *, .decision-grid > *, .resource-grid > * { min-width: 0; }
.card-title { text-wrap: pretty; }
.card .btn { margin-top: 20px; }
.card .choices + .btn { margin-top: 14px; }
.card a:not(.btn) { font-weight: 600; }
.card .resource-link { margin: 0 0 6px; font-size: 16px; }
.choice { position: relative; padding-right: 34px; }
.choice::after { position: absolute; right: 16px; top: 50%; width: 6px; height: 6px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg); content: ""; }
.choice-main { font-size: 16px; line-height: 1.4; }
.phone-number { margin: 10px 0 0; font-size: 20px; font-weight: 700; text-align: center; letter-spacing: 0.02em; }
.nojs a { color: var(--primary); }
.decision-grid { display: grid; gap: 28px; align-items: center; }
.situations { display: grid; gap: 20px; margin-top: 24px; }
.situations p { margin: 0; color: var(--muted); font-size: 17px; }
.roof-photo { margin: 0; }
.roof-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; }
.roof-photo figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; }
.roof-photo figcaption a { color: inherit; }
.steps h3 { margin-bottom: 10px; }
.steps p { margin: 0; font-size: 17px; color: var(--muted); }
.comparison-note { margin: 20px 0 0; font-size: 17px; color: var(--muted); }
.section-label { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.resource { background: var(--paper); }
.resource-grid { display: grid; gap: 18px; }
.resource-grid p { margin-bottom: 14px; }
.resource h2 { font-size: 28px; }
.text-link { font-size: 17px; font-weight: 700; }
.text-link span { display: inline-block; margin-left: 6px; }
.band > .wrap > p { margin-top: 16px; color: #e3ebf2; }
.band [data-show] { max-width: 520px; }
.band .fineprint a { color: inherit; }
.band .phone-number { color: var(--white); }
.guide-hero { padding: 28px 0 44px; color: var(--white); background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); }
.guide-hero h1 { color: var(--white); font-size: 36px; }
.guide-hero .lead { color: #e3ebf2; }
.breadcrumb { display: inline-block; margin-bottom: 28px; color: #e3ebf2; font-size: 14px; }
.guide-ready { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid #55646e; font-size: 16px; color: #e3ebf2; }
.guide-ready a { color: var(--white); font-weight: 700; }
.guide-body { padding-top: 34px; padding-bottom: 44px; font-size: 18px; line-height: 1.7; }
.guide-body h2 { margin-bottom: 20px; }
.guide-body h3 { margin-top: 28px; margin-bottom: 12px; font-size: 20px; }
.guide-body p { margin-bottom: 20px; }
.guide-body ul { padding-left: 24px; margin: 0 0 24px; }
.guide-body li { padding-left: 4px; margin-bottom: 10px; }
.guide-body section { margin-top: 44px; }
.guide-body .section-label { line-height: 1.4; }
.contents { margin: 0 0 34px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--mist); }
.contents .section-label { margin-bottom: 12px; }
.contents ol { margin: 0; padding-left: 24px; font-size: 16px; }
.contents li:last-child { margin-bottom: 0; }
.guide-check .hero-grid { align-items: start; }
.guide-check .card { box-shadow: 0 10px 28px rgba(6, 18, 32, 0.12); }
@media (max-width: 719px) {
  .header-inner { min-height: 64px; }
  .header-note { display: none; }
  .card .btn { padding-right: 16px; padding-left: 16px; }
}
@media (min-width: 720px) {
  .decision-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
  .decision-grid h2 { max-width: 440px; }
  .roof-photo { align-self: center; }
  .resource-grid { grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
  .resource h2 { margin-bottom: 0; }
  .guide-hero { padding: 34px 0 56px; }
  .guide-hero h1 { font-size: 48px; }
  .guide-body { padding-top: 44px; padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Privacy and terms pages */
.doc { padding: 32px 0 48px; }
.doc h1 { font-size: 32px; }
.doc h2 { margin-top: 28px; font-size: 22px; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.doc a:hover { color: var(--cta-hover); }
