/* Roof Health Check landing page. Phone-first: one narrow column, brand band on top,
   the working card overlapping it, and a call bar pinned to the bottom on phones.
   --brand and --accent come from config.js (set in each page's <style> by build.mjs). */
:root {
  --brand: #1d2733;
  --accent: #c4552b;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, #ffffff);
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #17202b;
  --muted: #566170;
  --line: #d9dfe6;
  --good: #1d7a4a; --fair: #b26a00; --poor: #c2410c; --urgent: #b3261e;
  --f-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }

.band { background: var(--brand); color: #fff; padding-block: 22px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 560px; margin: 0 auto; }
.biz { display: flex; align-items: center; gap: 10px; min-width: 0; font: 700 14px/1.1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: #fff; text-decoration: none; }
.biz span { line-height: 1.2; }
.biz img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
h1 { font: 800 clamp(32px, 8.5vw, 44px)/1.02 var(--f-display); font-stretch: 112%; margin: 12px 0 8px; text-wrap: balance; }
.sub { margin: 0; color: rgba(255,255,255,.78); }
.trust { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 14px; color: rgba(255,255,255,.88); }
.trust span::before { content: "✓ "; font-weight: 700; color: color-mix(in srgb, var(--accent) 45%, #ffffff); }

main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 32px; }
.card { scroll-margin-top: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15, 30, 45, .12); margin-top: -44px; padding: 22px 20px 24px; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.back { background: none; border: 0; padding: 6px 0; font: 600 15px var(--f-body); color: var(--muted); cursor: pointer; }
.back:hover { color: var(--ink); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s ease; }

h2 { font: 800 26px/1.1 var(--f-display); font-stretch: 108%; margin: 0 0 6px; text-wrap: balance; }
h3 { font: 700 20px/1.15 var(--f-display); margin: 0; }
.hint { margin: 0 0 16px; color: var(--muted); font-size: 16px; }
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 16px; min-height: 58px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); font: 600 17px/1.25 var(--f-body); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.opt small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
.opt:hover { border-color: var(--accent); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt .tick { margin-left: auto; width: 22px; height: 22px; flex: none; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 14px; color: transparent; }
.opt[aria-pressed="true"] .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.opts.three { grid-template-columns: repeat(3, 1fr); }
.opts.three .opt { justify-content: center; text-align: center; min-height: 48px; padding: 10px 6px; font-size: 16px; }
button:focus-visible, input:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.compare figure { margin: 0; }
.compare img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; }
.compare figcaption { margin-top: 6px; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.compare .bad::before, .compare .ok::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.compare .bad::before { background: var(--urgent); } .compare .ok::before { background: var(--good); }
.pic { margin: 0 0 14px; }
.pic img, .pic svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.pic img { aspect-ratio: 4 / 3; object-fit: cover; }
.pic figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.ridge-pic { background: var(--accent-soft); padding: 10px; border-radius: 12px; color: var(--ink); }
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 16px; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 16px var(--f-display); }
.eyebrow { font: 700 13px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.choice { border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px 4px; margin: 0 0 12px; }
.choice.pick { border-color: var(--accent); background: var(--accent-soft); }
.choice .fit { font-size: 15px; color: var(--muted); margin: 0 0 10px; }
.incl { padding-left: 20px; margin: 10px 0 16px; }
.incl li { margin: 4px 0; }
.callout { padding: 14px; border-radius: 10px; background: var(--bg); margin: 14px 0; font-size: 16px; }
.callout.warn { background: var(--accent-soft); border: 2px solid var(--urgent); }
.callout.warn > b:first-child { display: block; font: 700 21px/1.15 var(--f-display); color: var(--urgent); margin-bottom: 4px; }
.left { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 18px; }
.left p { margin: 0 0 12px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field .lbl { font-weight: 600; font-size: 15px; }
.opt-note { font-weight: 400; color: var(--muted); }
input[type=text], input[type=tel], input[type=email] { width: 100%; padding: 14px; font: 400 17px var(--f-body); color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; }
input:focus { border-color: var(--accent); outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.photo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; font-size: 15px; color: var(--muted); }
.photo input { display: none; }
.photo img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.photo b { color: var(--ink); }

.cta { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; padding: 16px; margin-top: 6px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font: 800 18px/1.1 var(--f-display); letter-spacing: .03em; text-transform: uppercase; cursor: pointer; }
.cta[disabled] { opacity: .55; cursor: default; }
.cta.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.stack { display: grid; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.fine a { color: inherit; }
.error { color: var(--urgent); font-weight: 600; font-size: 15px; margin: 4px 0 10px; }

.score { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; margin-bottom: 14px; }
.dial { position: relative; width: 132px; height: 132px; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial .num b { font: 800 44px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.dial .num span { font-size: 13px; color: var(--muted); }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 14px; color: #fff; }
.chip.good { background: var(--good); } .chip.fair { background: var(--fair); } .chip.poor { background: var(--poor); } .chip.urgent { background: var(--urgent); }
.band-note { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.findings { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.findings li { padding: 10px 12px 10px 14px; border-left: 4px solid var(--line); background: var(--bg); border-radius: 0 8px 8px 0; font-size: 16px; }
.findings li.high { border-color: var(--urgent); } .findings li.medium { border-color: var(--fair); }
#lead { border-top: 1px solid var(--line); padding-top: 18px; }

.share { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.share-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.sbtn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 15px var(--f-body); text-decoration: none; cursor: pointer; }
.sbtn:hover { border-color: var(--accent); }
.demo-note { background: #fff4d6; color: #5a4300; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.powered { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.powered a { color: inherit; }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }

.spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade { animation: fade .25s ease; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade, .bar i, .spinner { animation: none; transition: none; } }
@media (max-width: 380px) { .score { grid-template-columns: 1fr; justify-items: start; } .opts.two, .row2 { grid-template-columns: 1fr; } }

/* ── Standalone landing page */
.top { background: var(--brand); color: #fff; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid rgba(255,255,255,.12); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.call-top { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 9px 12px; border-radius: 10px; background: var(--accent); color: #fff; font: 700 15px/1 var(--f-body); text-decoration: none; white-space: nowrap; }
.band { padding-top: 18px; }
.area { margin: 0; font: 700 13px/1.2 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 35%, #ffffff); }
.callout.next { background: var(--accent-soft); border-left: 4px solid var(--accent); }
.how { margin: 26px 4px 0; }
.how h2 { font-size: 22px; margin-bottom: 12px; }
.how .steps li span { padding-top: 3px; }
.foot { background: var(--brand); color: rgba(255,255,255,.82); padding: 26px 16px calc(96px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
.foot p { margin: 0 0 6px; }
.foot a { color: #fff; }
.foot-name { font: 800 18px var(--f-display); color: #fff; }
.foot-links { margin-top: 12px !important; font-size: 13px; }
/* Left-aligned so the "Powered by Netlify" badge (bottom right, free plan) never covers the number */
.call-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 15px 16px calc(15px + env(safe-area-inset-bottom, 0px)); background: var(--accent); color: #fff; font: 800 17px/1 var(--f-display); letter-spacing: .03em; text-transform: uppercase; text-decoration: none; box-shadow: 0 -6px 20px rgba(15,30,45,.18); }
@media (min-width: 760px) { .call-bar { display: none; } .foot { padding-bottom: 32px; } }
.doc { padding-top: 22px; padding-bottom: 24px; }
.doc h1 { color: var(--ink); font-size: 34px; }
.doc h2 { font-size: 21px; margin: 24px 0 6px; }
.doc p, .doc li { font-size: 16px; }
.doc a { color: var(--accent); }
.doc .cta { color: var(--accent-ink); }

/* ── Hero: real job photo under a dark brand wash */
.hero { position: relative; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 55%, transparent) 0%, color-mix(in srgb, var(--brand) 78%, transparent) 55%, var(--brand) 100%), var(--hero) center 35% / cover no-repeat, var(--brand); padding-top: 26px; }
.hero h1 { font-size: clamp(36px, 10vw, 54px); }
.rating { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.12); backdrop-filter: blur(4px); font-size: 14px; color: #fff; }
.rating .dot { opacity: .6; }
.stars { color: #f5b301; letter-spacing: 1px; }
.alt-path { text-align: center; font-size: 15px; color: var(--muted); margin: 14px 8px 0; }
.alt-path a { color: var(--accent); font-weight: 700; }

/* Booking form extras */
.ticks { list-style: none; padding: 0; margin: 4px 0 16px; display: grid; gap: 6px; }
.ticks li { position: relative; padding-left: 28px; font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.mini-review { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 15px; }
.mini-review blockquote { margin: 4px 0; font-style: italic; }
.mini-review figcaption { font-size: 13px; color: var(--muted); }

/* ── Sections below the check */
.wrap.wide { max-width: 980px; }
.sec { padding: 44px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.sec.tint { background: #fff; }
.sec-h { font-size: clamp(26px, 7vw, 34px); margin-bottom: 8px; }
.sec-sub { color: var(--muted); margin: 0 0 14px; }
.sec .cta { max-width: 420px; margin: 22px auto 0; }
.gets { display: grid; gap: 12px; margin-top: 18px; }
@media (min-width: 700px) { .gets { grid-template-columns: repeat(2, 1fr); } }
.get { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 16px rgba(15,30,45,.06); }
.get svg { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.get h3 { margin: 10px 0 4px; font-size: 19px; }
.get p { margin: 0; color: var(--muted); font-size: 16px; }

/* Horizontal swipe rails (gallery, reviews): one-and-a-bit cards visible on phones */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 12px; margin: 0 -16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: center; }
@media (min-width: 700px) { .rail { grid-auto-columns: calc((100% - 24px) / 3); margin: 0; padding: 4px 0 12px; } }
.job { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 16px rgba(15,30,45,.08); }
.tint .job { background: var(--bg); box-shadow: none; }
.job > img, .pair { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pair { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.pair img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 8px; padding: 3px 8px; border-radius: 6px; font: 700 12px var(--f-body); color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.tag.b { left: 8px; background: var(--urgent); } .tag.a { left: calc(50% + 9px); background: var(--good); }
.job figcaption { padding: 12px 14px 14px; font-size: 15px; color: var(--muted); }
.job figcaption b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 2px; }
.review { margin: 0; background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 16px rgba(15,30,45,.08); display: flex; flex-direction: column; gap: 8px; }
.review blockquote { margin: 0; font-size: 16px; flex: 1; }
.review figcaption { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.more { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 700; text-decoration: none; }
.steps.big li { font-size: 17px; }
.faq { display: grid; gap: 10px; margin-top: 14px; }
.faq details { background: var(--bg); border-radius: 12px; padding: 0 16px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font: 400 26px/1 var(--f-body); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Final call to action and call-back form */
.final { background: var(--brand); color: #fff; padding: 44px 16px 40px; }
.final h2 { font-size: clamp(28px, 8vw, 38px); }
.final .why { color: rgba(255,255,255,.8); margin: 8px 0 18px; }
.final .or { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; color: rgba(255,255,255,.7); font-size: 14px; text-transform: uppercase; letter-spacing: .1em; }
.final .or::before, .final .or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.2); }
.final label { color: #fff; }
.final .opt-note { color: rgba(255,255,255,.6); }
.final .fine, .final .fine a { color: rgba(255,255,255,.65); }
.final .error { color: #ffb4a8; }
textarea { width: 100%; padding: 14px; font: 400 17px var(--f-body); color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; resize: vertical; }
.cta.light { background: #fff; color: var(--brand); }
.done { background: rgba(255,255,255,.1); border-radius: var(--radius); padding: 18px; }
.done h3 { color: #fff; margin-bottom: 6px; }
.done p { margin: 0; color: rgba(255,255,255,.8); }
.foot { padding-left: max(16px, env(safe-area-inset-left, 0px)); }
.get { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; align-items: start; }
.get svg { grid-row: span 2; }
.get h3 { margin: 0 0 4px; align-self: center; }
