/*
 * RapidRoofing: a demo contractor site with a live instant estimator.
 * A fictional brand, built with RapidDashboard. Deep green #123d2b,
 * mint #7fdcb8, lime #dff478, warm paper. Display type Bebas Neue (OFL),
 * body type Inter (OFL), both self-hosted.
 *
 * Mobile-first. Breakpoints: 720px (tablet), 1040px (desktop).
 */

@font-face {
    font-family: 'Bebas Neue';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/rapid-roofing/fonts/bebas-neue-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/rapid-roofing/fonts/inter-variable.woff2') format('woff2');
}

:root {
    --navy: #123d2b;
    --navy-deep: #0b2a1d;
    --navy-soft: #1d5240;
    --sky: #7fdcb8;
    --cyan: #3fe0b0;
    --lime: #dff478;
    --lime-deep: #c9e24f;
    --cream: #f4f2ed;
    --paper: #fefbf6;
    --ink: #1c1c1c;
    --ink-soft: #4a4f5c;
    --line: #e2ddd3;
    --periwinkle: #8fb8a4;
    --danger: #b3261e;
    --ok: #1f7a4d;

    --display: 'Bebas Neue', 'Oswald', 'Arial Narrow', Impact, sans-serif;
    --body: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(9, 33, 23, .06), 0 8px 24px rgba(9, 33, 23, .08);
    --shadow-lg: 0 24px 60px rgba(9, 33, 23, .22);
    --wrap: 1200px;
    --gutter: 16px;
}

@media (min-width: 720px) { :root { --gutter: 28px; } }

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.site {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 64px; /* the mobile action bar */
}

@media (min-width: 1040px) { body.site { padding-bottom: 0; } }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.site svg { flex-shrink: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--lime); color: var(--navy); padding: 8px 14px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; top: 8px; }

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

/* ── Type ─────────────────────────────────────────────────────────── */

.display, .display-sm {
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: .01em;
    line-height: .95;
    text-transform: uppercase;
    margin: 0 0 .4em;
    color: var(--navy);
}

.display { font-size: clamp(38px, 5.4vw, 64px); }
.display-sm { font-size: clamp(28px, 3.2vw, 38px); }
.display-lg { font-size: clamp(48px, 7.5vw, 96px); }
.display-xl { font-size: clamp(56px, 10vw, 132px); line-height: .88; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #2c7a55;
}

.eyebrow--sky { color: var(--sky); }
.eyebrow--lime { color: var(--lime); }

.prose p { margin: 0 0 1em; }
.prose h3 { font-size: 20px; margin: 1.4em 0 .5em; color: var(--navy); }

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: .02em;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 15px 26px; font-size: 17px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-lime { background: var(--lime); color: var(--navy); box-shadow: 0 6px 18px rgba(201, 226, 79, .35); }
.btn-lime:hover { background: #e8fa8f; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-soft); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-ghost-light { border-color: rgba(255, 255, 255, .5); color: #fff; background: rgba(255, 255, 255, .06); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); }

.link-button { background: none; border: 0; padding: 0; color: var(--sky); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* ── Demo bar, header, nav ────────────────────────────────────────── */

.demo-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px var(--gutter);
    background: #071a12;
    color: #b5c9bb;
    font-size: 12px;
}

.demo-bar a { color: var(--lime); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.demo-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin-right: 4px; box-shadow: 0 0 0 3px rgba(223, 244, 120, .2); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--navy);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.header-row { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand img { width: 132px; height: auto; }

@media (min-width: 720px) { .brand img { width: 158px; } }

.nav { display: none; margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav li { position: relative; }

.nav a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 10px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #fff;
}

.nav a:hover, .nav a.active { color: var(--lime); }
.nav-mobile-only { display: none; }

.menu {
    position: absolute;
    top: 100%;
    left: -12px;
    width: 560px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 12px;
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: .15s ease;
}

.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: none; }
.menu a { color: var(--ink); text-transform: none; letter-spacing: 0; align-items: flex-start; gap: 12px; padding: 10px 12px; }
.menu a:hover { background: var(--cream); color: var(--navy); }
.menu a svg { color: #2c7a55; margin-top: 2px; }
.menu strong { display: block; font-size: 15px; }
.menu small { display: block; color: var(--ink-soft); font-weight: 500; font-size: 13px; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-phone { display: none; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.header-actions .btn-lime { display: none; }
.nav-toggle { background: none; border: 0; color: #fff; padding: 8px; }

@media (min-width: 720px) {
    .header-actions .btn-lime { display: inline-flex; }
}

@media (min-width: 1180px) {
    .nav { display: block; }
    .nav + .header-actions { margin-left: 8px; }
    .nav-toggle { display: none; }
}

@media (min-width: 1380px) { .header-phone { display: inline-flex; } }

/* Mobile menu open */
.nav-open .nav {
    display: block;
    position: fixed;
    inset: 0 0 0 0;
    top: 100px;
    background: var(--navy);
    padding: 16px var(--gutter);
    overflow-y: auto;
    z-index: 49;
}

.nav-open .nav ul { flex-direction: column; }
.nav-open .nav a { font-size: 22px; font-family: var(--display); letter-spacing: .04em; padding: 12px 0; }
.nav-open .menu { position: static; opacity: 1; visibility: visible; transform: none; width: auto; grid-template-columns: 1fr; background: transparent; box-shadow: none; padding: 0 0 8px 12px; }
.nav-open .menu a { color: #cfe0d4; font-family: var(--body); font-size: 16px; padding: 8px 0; }
.nav-open .menu small { display: none; }
.nav-open .nav-mobile-only { display: block; }

.finance-strip { background: var(--sky); color: var(--navy); font-size: 14px; font-weight: 600; }
.finance-strip .wrap { display: flex; justify-content: center; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding-top: 9px; padding-bottom: 9px; text-align: center; }
.finance-strip span { display: inline-flex; align-items: center; gap: 6px; }
.finance-strip a { color: var(--navy); font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    background: var(--navy-deep);
    color: #fff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .5;
    transform: scale(1.04);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(9, 33, 23, .92) 0%, rgba(9, 33, 23, .7) 55%, rgba(9, 33, 23, .45) 100%);
}

.hero-inner { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 48px; }
.hero .display { color: #fff; }
.hero-lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 720px; color: #dbe8df; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions--center { justify-content: center; }

@media (min-width: 1040px) { .hero-inner { padding-top: 84px; padding-bottom: 64px; } }

.ticker {
    position: relative;
    z-index: 1;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, .08);
    overflow: hidden;
    white-space: nowrap;
    padding: 12px 0;
}

.ticker-track { display: inline-flex; gap: 40px; animation: ticker 40s linear infinite; }
.ticker span { font-family: var(--display); font-size: 26px; letter-spacing: .06em; color: var(--sky); text-transform: uppercase; }
.ticker span::after { content: '•'; margin-left: 40px; color: var(--lime); }

@keyframes ticker { to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

.page-hero {
    position: relative;
    background: var(--navy);
    color: #fff;
    padding: 28px 0 48px;
    overflow: hidden;
}

.page-hero .display { color: #fff; }
.page-hero--slim { padding-bottom: 36px; }
.page-hero--image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(9, 33, 23, .95) 0%, rgba(9, 33, 23, .78) 60%, rgba(9, 33, 23, .55) 100%), var(--hero-img, none);
    background-size: cover;
    background-position: center;
}

.page-hero > .wrap { position: relative; }
.page-hero--thanks { padding: 72px 0; }

@media (min-width: 1040px) { .page-hero { padding: 36px 0 72px; } }

.crumbs ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: #9db7a6; }
.crumbs li + li::before { content: '/'; margin-right: 4px; opacity: .6; }
.crumbs a { color: #cfe0d4; text-decoration: none; }
.crumbs a:hover { color: var(--lime); }

/* ── Sections ─────────────────────────────────────────────────────── */

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--cream { background: var(--cream); }
.section--navy { background: var(--navy); color: #dbe8df; }
.section--navy .display, .section--navy .display-sm { color: #fff; }

@media (min-width: 1040px) { .section { padding: 96px 0; } }

.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 0; }
.section--navy .section-head p { color: #c1d4c6; }
.section-head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.section-head--row .display { margin: 0; }

.split { display: grid; gap: 36px; align-items: center; }
.split--top { align-items: start; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

@media (min-width: 1040px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }

.three-col { display: grid; gap: 20px; }
@media (min-width: 900px) { .three-col { grid-template-columns: repeat(3, 1fr); } }

.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.info-card svg { color: #2c7a55; }
.info-card h2, .info-card h3 { font-size: 19px; margin: 12px 0 6px; color: var(--navy); }
.info-card p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.three-col--dark .info-card { background: var(--navy-soft); border-color: rgba(255, 255, 255, .08); }
.three-col--dark .info-card h3 { color: #fff; }
.three-col--dark .info-card p { color: #c1d4c6; }
.three-col--dark .info-card svg { color: var(--lime); }
.big-num { font-family: var(--display); font-size: 54px; color: var(--navy); line-height: 1; }

.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tick-list li { position: relative; padding-left: 30px; }
.tick-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123d2b' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.tick-list--inline { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 14px 0 20px; font-size: 15px; }

.includes-card { background: var(--cream); border-radius: var(--radius); padding: 28px; }
.includes-card h3 { margin: 0 0 16px; font-family: var(--display); font-size: 28px; font-weight: 400; text-transform: uppercase; color: var(--navy); }

/* ── Trust row ───────────────────────────────────────────────────── */

.trust-row { background: #fff; border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; padding-top: 22px; padding-bottom: 22px; }
.trust-grid > div { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-soft); line-height: 1.3; }
.trust-grid svg { color: #2c7a55; }
.trust-grid strong { display: block; color: var(--navy); font-size: 15px; }

@media (min-width: 900px) { .trust-grid { grid-template-columns: repeat(5, 1fr); } }

/* ── How it works ────────────────────────────────────────────────── */

.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.how-steps li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 24px; }
.how-steps svg { color: #2c7a55; }
.how-steps h3 { font-size: 20px; margin: 12px 0 6px; color: var(--navy); }
.how-steps p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.how-num { position: absolute; right: 22px; top: 14px; font-family: var(--display); font-size: 56px; line-height: 1; color: var(--lime-deep); opacity: .7; }

@media (min-width: 900px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }

/* ── Services ────────────────────────────────────────────────────── */

.service-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.service-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card img, .service-card-fill { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.service-card-fill { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); color: var(--sky); }
.service-card-body { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 26px 20px 20px; }
.service-card-body strong { font-size: 18px; color: var(--navy); }
.service-card-body > span:not(.service-icon):not(.tag-instant) { color: var(--ink-soft); font-size: 15px; }
.service-icon { position: absolute; top: -20px; left: 20px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--lime); color: var(--navy); border-radius: 12px; box-shadow: var(--shadow); }

.tag-instant { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; align-self: flex-start; padding: 3px 9px; border-radius: 999px; background: #e3f6ec; color: #1f6b4a; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: none; }

.service-list { display: grid; gap: 40px; }
.service-row { display: grid; gap: 24px; align-items: center; }
.service-row-img img, .service-row-img .service-card-fill { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.service-row h2 a { text-decoration: none; }
.service-row p { color: var(--ink-soft); }

@media (min-width: 900px) {
    .service-row { grid-template-columns: 420px 1fr; gap: 48px; }
    .service-row:nth-child(even) .service-row-img { order: 2; }
}

.service-mini-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.service-mini-grid a { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; text-decoration: none; font-weight: 600; color: var(--navy); }
.service-mini-grid a svg:last-child { margin-left: auto; color: var(--ink-soft); }
.service-mini-grid a:hover { border-color: var(--navy); }

.town-pills { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.town-pills a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--cream); color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 600; }
.town-pills a:hover { background: var(--navy); color: #fff; }

/* ── Projects ────────────────────────────────────────────────────── */

.project-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.project-grid--compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.project-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-img { position: relative; display: block; }
.project-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project-flag { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--lime); color: var(--navy); font-size: 12px; font-weight: 800; }
.project-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.project-body strong { color: var(--navy); font-size: 17px; line-height: 1.3; }
.project-service { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #2c7a55; }
.project-more { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-bar button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; color: var(--navy); }
.filter-bar button span { color: var(--ink-soft); font-weight: 600; }
.filter-bar button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-bar button.active span { color: var(--sky); }
[data-filter-item][hidden] { display: none; }

.feature-compare { display: grid; gap: 28px; align-items: center; margin-bottom: 28px; }
@media (min-width: 1040px) { .feature-compare { grid-template-columns: 1.5fr 1fr; gap: 48px; } }

.compare { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; user-select: none; background: #ddd; }
.compare > img, .compare-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-50%); pointer-events: none; }
.compare-handle svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; padding: 12px; border-radius: 50%; background: var(--lime); color: var(--navy); box-shadow: var(--shadow); }
.compare-tag { position: absolute; top: 14px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.compare-tag--before { left: 14px; background: rgba(9, 33, 23, .75); color: #fff; }
.compare-tag--after { right: 14px; background: var(--lime); color: var(--navy); }
.compare-stack { display: grid; gap: 24px; margin-bottom: 24px; }
@media (min-width: 1040px) { .compare-stack { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); } }

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s ease; }
.gallery a:hover img { transform: scale(1.03); }

.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(8, 12, 24, .92); padding: 24px; cursor: zoom-out; }
.lightbox img { max-height: 90vh; width: auto; border-radius: var(--radius-sm); }

/* ── Navy feature, stats, quotes, team ───────────────────────────── */

.stat-stack { display: grid; gap: 14px; }
.stat-stack div, .stat-cards div { background: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.stat-stack strong, .stat-cards strong { display: block; font-family: var(--display); font-size: 48px; line-height: 1; color: var(--navy); }
.stat-stack span, .stat-cards span { color: var(--ink-soft); font-weight: 600; }
.stat-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 14px; }
.stat-cards strong { font-size: 38px; }

.steps-line { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.steps-line li { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.steps-line span { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--lime); font-family: var(--display); font-size: 24px; }
.steps-line h3 { margin: 0; font-size: 16px; color: var(--navy); line-height: 1.3; }
@media (min-width: 900px) { .steps-line { grid-template-columns: repeat(5, 1fr); } .steps-line li { flex-direction: column; align-items: flex-start; } }

.storm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.storm-steps li { position: relative; display: flex; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.storm-steps .how-num { position: static; font-size: 64px; opacity: 1; color: var(--sky); flex-shrink: 0; width: 44px; }
.storm-steps h3 { margin: 4px 0 6px; font-size: 20px; color: var(--navy); }
.storm-steps p { margin: 0; color: var(--ink-soft); }

.quote-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.quote { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.quote svg { color: var(--sky); }
.quote blockquote { margin: 0; font-size: 17px; color: var(--ink); }
.quote figcaption { margin-top: auto; font-weight: 700; color: var(--navy); }

.team-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.team-card { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.team-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; background: #111; }
.team-card figcaption { padding: 18px 20px 22px; }
.team-card strong { display: block; font-family: var(--display); font-size: 30px; font-weight: 400; color: var(--navy); line-height: 1; }
.team-card span { color: #2c7a55; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.team-card p { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; }

/* ── FAQ ─────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 17px; color: var(--navy); }
.faq summary svg { transition: transform .2s ease; color: var(--ink-soft); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-soft); }

/* ── Service area ────────────────────────────────────────────────── */

.area-map { height: 440px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #dfe6ea; }
.town-table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.town-table th, .town-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.town-table th { background: var(--navy); color: #fff; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.town-table td:not(:first-child) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.town-table a { color: var(--navy); font-weight: 700; text-decoration: none; }
.town-table small { color: var(--ink-soft); }
.hq-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 3px solid var(--navy); box-shadow: 0 0 0 4px rgba(223, 244, 120, .35); }
.town-marker { width: 12px; height: 12px; border-radius: 50%; background: var(--sky); border: 2px solid var(--navy); }

/* ── Contact ─────────────────────────────────────────────────────── */

.contact-cards { display: grid; gap: 12px; }
.contact-tile { display: flex; align-items: flex-start; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); }
.contact-tile svg { color: #2c7a55; margin-top: 2px; }
.contact-tile strong { display: block; color: var(--navy); }
.contact-tile--lime { background: var(--lime); border-color: var(--lime); }
.contact-tile--lime svg { color: var(--navy); }

/* ── Forms ───────────────────────────────────────────────────────── */

.lead-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg); }
.lead-card .display-sm { color: var(--navy); margin-bottom: 6px; }
.lead-card > .muted { margin: 0 0 18px; font-size: 15px; }
.form-grid { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 700; color: var(--navy); }
.field small { font-weight: 500; color: var(--ink-soft); }
.field input, .field select, .field textarea {
    width: 100%;
    border: 1.5px solid #cfd5df;
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    background: #fff;
}

.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(127, 220, 184, .25); }

.chips { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--navy); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid #cfd5df; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; background: #fff; }
.chip input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.fine { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); }

/* ── The estimator ───────────────────────────────────────────────── */

.address-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: 860px;
    padding: 8px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35), 0 0 0 6px rgba(127, 220, 184, .22);
}

.address-bar > svg { color: var(--navy); margin-left: 10px; }
.address-bar input { flex: 1 1 200px; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 18px; color: var(--ink); padding: 12px 4px; background: transparent; }
.address-bar .btn { flex: 1 1 100%; }
@media (min-width: 720px) { .address-bar .btn { flex: 0 0 auto; } }

.address-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; font-size: 14px; color: #b6cbbd; }
.section:not(.section--navy) .address-hint { color: var(--ink-soft); }
.section:not(.section--navy) .address-bar { box-shadow: var(--shadow-lg), 0 0 0 6px rgba(127, 220, 184, .18); }

.est-stage {
    display: grid;
    gap: 20px;
    margin-top: 28px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    animation: rise .4s ease;
}

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (min-width: 1040px) { .est-stage { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 20px; gap: 28px; } }

.est-visual { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.est-map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; }
.est-map { height: 340px; background: #10241b; }
@media (min-width: 1040px) { .est-map { height: 400px; } }

.scan-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 500; background: rgba(63, 224, 176, .06); }
.scan-line { position: absolute; left: 0; right: 0; height: 90px; background: linear-gradient(180deg, rgba(63, 224, 176, 0), rgba(63, 224, 176, .45) 85%, rgba(223, 244, 120, .9)); animation: scan 1.6s ease-in-out infinite; }
@keyframes scan { 0% { top: -90px; } 100% { top: 100%; } }

.map-chip { position: absolute; left: 12px; bottom: 12px; z-index: 600; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(9, 33, 23, .85); color: #fff; font-size: 13px; font-weight: 600; backdrop-filter: blur(4px); }
.map-chip b { color: var(--lime); }

.scan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: 1fr 1fr; font-size: 13px; color: var(--ink-soft); }
.scan-steps li { display: flex; align-items: center; gap: 8px; opacity: .45; transition: opacity .2s ease; }
.scan-steps li.is-active, .scan-steps li.is-done { opacity: 1; }
.scan-steps li.is-active { color: var(--navy); font-weight: 700; }
.scan-steps li.is-skip { opacity: .35; text-decoration: line-through; }
.step-icon { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c5ccd8; flex-shrink: 0; }
.is-active .step-icon { border-color: var(--sky); border-top-color: transparent; animation: spin .7s linear infinite; }
.is-done .step-icon { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 10px no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }

.draw-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: #fff8d6; border: 1px solid #f0dc7a; }
.draw-bar p { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; }
.draw-bar > div { display: flex; gap: 6px; }

.house3d-card { border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, #e3f1ea 0%, #f5f1e8 100%); border: 1px solid var(--line); }
.house3d-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 10px 14px 0; font-size: 14px; font-weight: 700; color: var(--navy); }
.house3d-head span { display: inline-flex; align-items: center; gap: 6px; }
.house3d-head small { font-weight: 500; color: var(--ink-soft); }
.house3d { height: 300px; cursor: grab; }
@media (min-width: 1040px) { .house3d { height: 340px; } }
.house3d:active { cursor: grabbing; }
.house3d canvas { display: block; width: 100% !important; height: 100% !important; }

.est-panel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.est-alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: #e8f6ef; color: #17543a; font-size: 15px; }
.est-alert--warn { background: #fff4d6; color: #6b4d00; }
.est-alert--error { background: #fde8e7; color: var(--danger); margin-bottom: 14px; }

.est-result .eyebrow { margin-bottom: 6px; }
.est-address { margin: 0 0 10px; font-size: 22px; line-height: 1.25; color: var(--navy); }
.est-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.est-redo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 16px; font-size: 14px; color: var(--ink-soft); }
.est-redo .link-button { display: inline-flex; align-items: center; gap: 6px; }
.est-redo .link-button:disabled { opacity: .5; cursor: progress; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--cream); color: var(--navy); }
.badge--res { background: #e3f6ea; color: #17613c; }
.badge--com { background: #ffe9cc; color: #7a4300; }
.badge--src { background: #e3f6ec; color: #1f6b4a; }

.est-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 12px; }
.est-stats div { background: var(--cream); border-radius: 10px; padding: 12px 14px; }
.est-stats dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.est-stats dd { margin: 2px 0 0; font-family: var(--display); font-size: 30px; line-height: 1; color: var(--navy); }
.est-stats dd small { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-left: 3px; }
.est-guess { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: #eef4ef; color: #2f4f3f; font-size: 13px; }
.est-guess svg { flex-shrink: 0; margin-top: 2px; }

.refine { display: grid; gap: 10px; margin-bottom: 16px; }
.refine-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.refine-label { width: 86px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--cream); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 5px; }
.seg button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.seg--pitch svg { width: 26px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
.swatches { display: flex; gap: 8px; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; background: var(--swatch); border: 3px solid #fff; box-shadow: 0 0 0 1px #cfd5df; }
.swatches button.active { box-shadow: 0 0 0 2px var(--navy); }
.swatches .swatch-photo { background: conic-gradient(#6b7c8f, #8a8f7a, #5d6b58, #9aa3ad, #6b7c8f); }

.price-cards { display: grid; gap: 10px; }
.price-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.price-card.is-primary { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18, 61, 43, .08); }
.price-card-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--lime); color: var(--navy); }
.price-card strong { display: block; color: var(--navy); }
.price-card small { color: var(--ink-soft); font-size: 13px; }
.price-card .range { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--navy); white-space: nowrap; text-align: right; }
.price-card .range small { display: block; font-family: var(--body); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.est-summary { padding: 14px 16px; border-radius: 12px; background: var(--navy); color: #dbe8df; font-size: 15px; }
.est-summary .eyebrow { color: var(--lime); margin-bottom: 6px; }
.est-summary p { margin: 0; }
.est-nearby { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); }
.est-fine { margin: 0; font-size: 12px; color: var(--ink-soft); }

.hero .lead-card, .page-hero .lead-card { box-shadow: none; border: 1px solid var(--line); }

/* ── CTA band, footer, mobile bar ────────────────────────────────── */

.cta-band { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-soft) 100%); color: #dbe8df; padding: 56px 0; }
.cta-band .display { color: #fff; }
.cta-band p:not(.eyebrow) { margin: 0; max-width: 620px; }
.cta-band-row { display: grid; gap: 24px; align-items: center; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 1040px) { .cta-band-row { grid-template-columns: 1.3fr 1fr; } .cta-band-actions { justify-content: flex-end; } }

.site-footer { background: var(--navy-deep); color: #a9bfb0; font-size: 15px; padding-top: 56px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr .9fr; } }
.footer-brand img { width: 170px; margin-bottom: 14px; }
.footer-brand address { font-style: normal; margin: 14px 0; line-height: 1.7; }
.site-footer h3 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .04em; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-towns { grid-template-columns: 1fr 1fr; font-size: 14px; }
.site-footer a { color: #d3e3d8; text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.footer-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.footer-badges img { width: 64px; background: #fff; border-radius: 50%; padding: 3px; }
.badge-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 13px; font-weight: 600; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 40px; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }

.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 2fr; background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .1); }
.mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 10px; color: #fff; font-weight: 700; text-decoration: none; }
.mobile-bar-primary { background: var(--lime); color: var(--navy) !important; }
@media (min-width: 1040px) { .mobile-bar { display: none; } }

/* ── Thanks ──────────────────────────────────────────────────────── */

.thanks-icon { display: inline-grid; place-items: center; width: 84px; height: 84px; margin-bottom: 16px; border-radius: 50%; background: var(--lime); color: var(--navy); }
.page-hero--thanks .hero-lead { margin-left: auto; margin-right: auto; }
.thanks-card { max-width: 520px; margin: 0 auto 28px; padding: 24px; border-radius: var(--radius); background: #fff; color: var(--ink); text-align: left; }
.thanks-card .eyebrow { display: block; }
.thanks-range { display: block; font-family: var(--display); font-size: 52px; line-height: 1; color: var(--navy); }
.thanks-card p { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; }
.demo-note { margin-top: 28px; font-size: 13px; color: #9db7a6; display: inline-flex; align-items: center; gap: 6px; }
.demo-note a { color: var(--lime); }

/* Leaflet polish */
.site .leaflet-container { font-family: var(--body); }
.site .leaflet-control-attribution { font-size: 10px; }
.outline-label { background: var(--lime); color: var(--navy); border: 0; border-radius: 999px; font-weight: 800; font-size: 12px; padding: 3px 10px; box-shadow: var(--shadow); }
.outline-label::before { display: none; }
.draw-vertex { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); border: 2px solid var(--navy); }

/* The outline draws itself once, then stays. */
.outline-anim { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: outline-draw 1.3s ease-out forwards; }
@keyframes outline-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .outline-anim { animation: none; stroke-dashoffset: 0; } }

.estimator.is-updating .price-cards, .estimator.is-updating .est-stats { opacity: .5; transition: opacity .15s ease; }

/* The hero line break is for wide screens; on a phone the words flow. */
.display br { display: none; }
@media (min-width: 720px) { .display br { display: inline; } }

/* Adjusting the outline on the satellite map. */
.map-edit { position: absolute; right: 12px; top: 12px; z-index: 600; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }
.map-edit.is-on { background: var(--lime); }
.edit-vertex { width: 14px; height: 14px; border-radius: 50%; background: var(--lime); border: 3px solid var(--navy); cursor: grab; }
.edit-mid { width: 12px; height: 12px; margin: 1px; border-radius: 50%; background: rgba(255, 255, 255, .85); border: 2px solid var(--navy); cursor: copy; }

/* Shingles to order: the number a roofer looks for first. */
.est-stats .stat-hero { grid-column: 1 / -1; background: var(--navy); color: #fff; }
.est-stats .stat-hero dt { color: var(--sky); }
.est-stats .stat-hero dd { color: #fff; font-size: 44px; }
.est-stats .stat-hero dd small { color: #c1d4c6; }
.est-stats .stat-hero p { margin: 4px 0 0; font-size: 13px; color: #c1d4c6; }

.badge--lidar { background: var(--lime); color: var(--navy); }
.est-stats .stat-hero .stat-lidar { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .15); color: var(--lime); }

/* Leaflet stacks its panes at z-index 400+; keep each map in its own layer so
   the sticky header always passes over it. */
.est-map-wrap, .area-map { isolation: isolate; position: relative; z-index: 0; }

/* Other buildings nearby: tap one to measure it instead. */
.neighbor-outline { cursor: pointer; }
.neighbor-outline:hover { stroke: var(--lime); fill-opacity: .18; }

/* ── RapidRoofing additions ─────────────────────────────────────────── */

.rr-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.rr-mark { width: 40px; height: 34px; }
.rr-word { font-family: var(--display); font-size: 30px; letter-spacing: .04em; line-height: 1; text-transform: uppercase; }
.rr-word b { font-weight: 400; color: var(--lime); }
@media (min-width: 720px) { .rr-word { font-size: 34px; } }
@media (min-width: 900px) { .rr-nav { display: block; } }

/* The hero backdrop: real satellite tiles with a slow scan sweeping over. */
.rr-hero { isolation: isolate; }
.rr-mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), 256px); justify-content: center; align-content: center; overflow: hidden; opacity: .55; filter: saturate(.8) contrast(1.05); }
.rr-mosaic img { width: 256px; height: 256px; max-width: none; }
.rr-sweep { position: absolute; left: 0; right: 0; height: 220px; background: linear-gradient(180deg, rgba(63, 224, 176, 0), rgba(63, 224, 176, .16) 80%, rgba(223, 244, 120, .5)); animation: rr-sweep 7s linear infinite; }
@keyframes rr-sweep { 0% { top: -220px; } 100% { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .rr-sweep { display: none; } }
.rr-hero::after { z-index: 0; }
.rr-hero .hero-inner, .rr-hero .ticker { z-index: 1; }

/* Address suggestions under the bar. */
.address-bar { position: relative; }
.rr-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 1100; list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); color: var(--ink); }
.rr-suggest li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.rr-suggest li svg { color: var(--ink-soft); }
.rr-suggest li:hover, .rr-suggest li.is-active { background: var(--cream); color: var(--navy); }
.rr-suggest li:hover svg, .rr-suggest li.is-active svg { color: var(--navy); }

.rr-try { border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.rr-try:hover { background: var(--lime); color: var(--navy); border-color: var(--lime); }

/* A survey grid flickers under the scan line while the house is found. */
.rr-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(223, 244, 120, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(223, 244, 120, .14) 1px, transparent 1px); background-size: 28px 28px; animation: rr-grid 1.2s ease-in-out infinite alternate; }
@keyframes rr-grid { from { opacity: .25; } to { opacity: .8; } }

.rr-stats div { background: var(--navy-soft); box-shadow: none; }
.rr-stats strong { color: var(--lime); }
.rr-stats span { color: #c1d4c6; }

.rr-footer { padding-top: 8px; }
.rr-footer .footer-base { margin-top: 0; border-top: 0; }
.rr-mobile-bar { grid-template-columns: 1fr 2fr; }
.lead-card .est-alert { margin: 0; }
.rr-hero::after { background: linear-gradient(90deg, rgba(9, 33, 23, .9) 0%, rgba(9, 33, 23, .62) 50%, rgba(9, 33, 23, .3) 100%), linear-gradient(0deg, rgba(9, 33, 23, .85) 0%, rgba(9, 33, 23, 0) 45%); }
.rr-mosaic { opacity: .85; }
.est-stage { scroll-margin-top: 90px; }
@media (min-width: 1040px) { .est-visual { position: sticky; top: 88px; align-self: start; } }
.est-nearby svg { flex-shrink: 0; margin-top: 3px; color: var(--ok); }
@media (max-width: 480px) {
    .price-card { grid-template-columns: auto 1fr; }
    .price-card .range { grid-column: 1 / -1; text-align: left; font-size: 30px; }
}
/* The mosaic crops itself, so the hero needn't: the address suggestions
   can hang below it and the estimate's map can stay sticky. */
.rr-hero { overflow: visible; }
.rr-hero .hero-inner { z-index: 2; }
.est-alert { display: block; }
.est-alert strong:first-child { display: inline; }
.map-chip { bottom: 28px; }

/* Phones: clear the iPhone home indicator; keep the bar labels on one line. */
.mobile-bar { padding-bottom: env(safe-area-inset-bottom, 0px); }
.mobile-bar a { white-space: nowrap; }
body.site { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1040px) { body.site { padding-bottom: 0; } }
.site-header { padding-top: env(safe-area-inset-top, 0px); }
@media (max-width: 380px) { .mobile-bar a { padding-left: 6px; padding-right: 6px; font-size: 15px; } }

/* ── Roof options: material cards, project details, breakdown, roof report ── */
.refine-row--wide { align-items: flex-start; }
.refine-row--wide .refine-label { padding-top: 8px; }
.materials { flex: 1 1 280px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.materials button { display: grid; gap: 2px; text-align: left; padding: 6px 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.materials button:hover { border-color: var(--periwinkle); transform: translateY(-1px); }
.materials button.active { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18, 61, 43, .12); }
.materials button.active .mat-name::after { content: ' ✓'; color: var(--ok); }
.mat-swatch { display: block; height: 34px; border-radius: 6px; margin-bottom: 4px; background-color: #555; }
.mat-name { font-size: 13px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.mat-meta { font-size: 11px; color: var(--ink-soft); }
.mat-price { font-family: var(--display); font-size: 19px; line-height: 1; color: var(--navy); margin-top: 2px; }
/* Textures drawn in CSS: tabbed shingles, seams, tile waves, slate, shakes, membrane. */
.mat-shingle { background: repeating-linear-gradient(0deg, transparent 0 9px, rgba(0,0,0,.35) 9px 11px), repeating-linear-gradient(90deg, #4a4d52 0 14px, #3c3f44 14px 16px); }
.mat-designer { background: repeating-linear-gradient(0deg, transparent 0 9px, rgba(0,0,0,.4) 9px 11px), repeating-linear-gradient(90deg, #5b5148 0 9px, #4a4139 9px 19px, #625850 19px 24px); }
.mat-standing_seam { background: repeating-linear-gradient(90deg, #4f6170 0 12px, #8ea3b1 12px 14px, #43535f 14px 15px); }
.mat-stone_steel { background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.15) 1px, transparent 2px) 0 0 / 5px 5px, repeating-linear-gradient(0deg, #6a3b2c 0 9px, #4c2a20 9px 11px); }
.mat-tile { background: radial-gradient(ellipse 8px 7px at 8px 0, #b8643f 98%, transparent) 0 0 / 16px 9px, #8e4a2f; }
.mat-slate { background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(0,0,0,.45) 8px 9px), repeating-linear-gradient(90deg, #4b5868 0 12px, #3e4a58 12px 13px, #556274 13px 22px, #3e4a58 22px 23px); }
.mat-shake { background: repeating-linear-gradient(0deg, transparent 0 10px, rgba(0,0,0,.35) 10px 12px), repeating-linear-gradient(90deg, #9a7a55 0 7px, #876846 7px 9px, #a88762 9px 15px, #7a5c3d 15px 16px); }
.mat-membrane { background: linear-gradient(90deg, transparent 0 48%, rgba(0,0,0,.08) 48% 52%, transparent 52%) 0 0 / 40px 100%, #e8ebee; }
.mat-epdm { background: linear-gradient(90deg, transparent 0 48%, rgba(255,255,255,.08) 48% 52%, transparent 52%) 0 0 / 40px 100%, #2b2d30; }
.mat-mod_bit { background: radial-gradient(circle, rgba(255,255,255,.25) 1px, transparent 1.5px) 0 0 / 4px 4px, #5d5a55; }

.refine-more { border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; }
.refine-more summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--navy); list-style: none; }
.refine-more summary::-webkit-details-marker { display: none; }
.refine-more summary small { font-weight: 600; color: var(--ink-soft); font-size: 12px; margin-left: auto; text-align: right; }
.refine-more summary::after { content: '+'; font-size: 18px; line-height: 1; color: var(--ink-soft); }
.refine-more[open] summary::after { content: '–'; }
.refine-more[open] { border-style: solid; }
.refine-more-body { display: grid; gap: 10px; padding: 0 12px 12px; }
.refine-label--inline { width: auto; margin-left: 8px; }
.stepper { display: inline-flex; align-items: center; background: var(--cream); border-radius: 10px; padding: 3px; }
.stepper button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #fff; color: var(--navy); font-size: 18px; font-weight: 700; line-height: 1; box-shadow: var(--shadow); cursor: pointer; }
.stepper output { min-width: 30px; text-align: center; font-family: var(--display); font-size: 22px; color: var(--navy); }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid #cfd5df; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.toggle[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }

.price-breakdown details { margin-top: 10px; border-radius: 12px; background: var(--cream); padding: 0 14px; }
.price-breakdown summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 11px 0; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--navy); }
.price-breakdown summary small { font-weight: 600; color: var(--ink-soft); }
.price-breakdown ul { list-style: none; margin: 0; padding: 0 0 12px; display: grid; gap: 6px; font-size: 13px; }
.price-breakdown .incl li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
.price-breakdown .incl svg { flex: none; margin-top: 2px; color: var(--ok); }
.price-breakdown .extras { border-top: 1px solid var(--line); padding-top: 10px; }
.price-breakdown .extras li { display: flex; justify-content: space-between; gap: 12px; }
.price-breakdown .extras small { color: var(--ink-soft); }
.price-breakdown .extras b { white-space: nowrap; color: var(--navy); }

.roof-report { margin-top: 14px; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; }
.roof-report header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.roof-report header > span { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--navy); color: var(--lime); }
.roof-report header strong { display: block; color: var(--navy); font-size: 16px; }
.roof-report header small { color: var(--ink-soft); font-size: 13px; }
.report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 10px; }
.report-grid div { background: var(--cream); border-radius: 10px; padding: 8px 10px; }
.report-grid dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.report-grid dd { margin: 2px 0 0; font-family: var(--display); font-size: 24px; line-height: 1; color: var(--navy); }
.report-grid dd small { font-family: var(--body); font-size: 11px; font-weight: 600; color: var(--ink-soft); margin-left: 3px; }
.roof-report .order summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--navy); padding: 6px 0; }
.roof-report .order summary small { font-weight: 600; color: var(--ink-soft); margin-left: 6px; }
.roof-report table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.roof-report td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.roof-report td:last-child { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
    .report-grid { grid-template-columns: repeat(2, 1fr); }
    .materials { grid-template-columns: repeat(2, 1fr); }
    .refine-more summary small { display: none; }
}
.address-hint--complex { margin-top: 8px; }
.rr-try--complex { border-color: rgba(223, 244, 120, .45); }
