/* bppa.com styles. Hand-edited; bump ?v=N in .templates/page.html after changes. */

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/assets/fonts/outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
        U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
        U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #010066;
    --navy-deep: #00004a;
    --navy-soft: #e9e9f5;
    --amber: #f5b400;
    --amber-deep: #d99c00;
    --amber-text: #8a5a00;
    --amber-star: #b07800;
    --ink: #16162e;
    --muted: #55566e;
    --line: #dcdce8;
    --surface: #f5f5fa;
    --white: #ffffff;
    --good: #0b7a3e;
    --bad: #b3261e;
    --radius: 12px;
    --shadow: 0 6px 24px rgba(1, 0, 102, 0.08);
    --container: 1160px;
    --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); }
main a { overflow-wrap: anywhere; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); color: var(--navy); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    background: var(--amber);
    color: var(--navy-deep);
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.topbar :focus-visible,
.hero :focus-visible,
.section-navy :focus-visible,
.site-footer :focus-visible { outline-color: var(--amber); }
.contact-form :focus-visible { outline-color: var(--navy); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 999px;
    border: 2px solid transparent;
    font: 600 1rem/1.2 var(--font);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--amber); color: var(--navy-deep); }
.btn-primary:hover { background: var(--amber-deep); color: var(--navy-deep); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); color: var(--white); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }

/* ---------- Header ---------- */

.topbar {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 6px;
    padding-bottom: 6px;
}
.topbar a { color: var(--white); text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: var(--white); }
.topbar-note { display: none; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(1.4) blur(6px);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--navy);
    margin-right: auto;
}
.brand img { width: 52px; height: 52px; }
.brand-name { font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.brand-name small { display: block; font-weight: 500; font-size: 0.78rem; color: var(--muted); }

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    font: 600 0.95rem var(--font);
    color: var(--navy);
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 20px 16px; }
.site-nav a {
    display: block;
    padding: 12px 4px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--line);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--navy); }
.site-nav a[aria-current="page"] { font-weight: 700; }
.header-cta { display: none; white-space: nowrap; }

@media (min-width: 1200px) {
    .nav-toggle { display: none; }
    .site-nav {
        display: block;
        position: static;
        border: 0;
        box-shadow: none;
        background: transparent;
    }
    .site-nav ul { display: flex; gap: 4px; padding: 0; }
    .site-nav a { border: 0; padding: 8px 9px; font-size: 0.93rem; border-radius: 6px; white-space: nowrap; }
    .site-nav a:hover { background: var(--navy-soft); }
    .header-cta { display: inline-flex; padding: 10px 18px; }
    .site-nav .nav-contact { display: none; }
}

@media (min-width: 720px) {
    .topbar-note { display: inline; }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    isolation: isolate;
    color: var(--white);
    background: var(--navy-deep) url('/assets/images/hero-storm-poster.webp') center / cover no-repeat;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgba(0, 0, 50, 0.92) 0%, rgba(1, 0, 102, 0.78) 55%, rgba(1, 0, 102, 0.45) 100%);
}
.hero .container { padding-top: 72px; padding-bottom: 72px; }
.hero-eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.hero h1 { max-width: 820px; }
.hero-lead { max-width: 680px; font-size: 1.2rem; color: rgba(255, 255, 255, 0.9); }
.hero-lead strong { color: var(--amber); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-note { font-size: 0.95rem; color: rgba(255, 255, 255, 0.85); }
.hero-bbb { font-size: 0.95rem; margin: 0; }
.hero-bbb a { color: var(--white); font-weight: 600; }
.hero-video-toggle {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(0, 0, 74, 0.8);
    color: var(--white);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.hero-video-toggle[hidden] { display: none; }

@media (min-width: 900px) {
    .hero .container { padding-top: 120px; padding-bottom: 120px; }
}

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section-alt { background: var(--surface); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2 { color: var(--white); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-head .lead-question { color: var(--navy); font-style: italic; font-weight: 500; }
.section-navy .section-head p { color: rgba(255, 255, 255, 0.85); }
.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--amber-text);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.section-navy .eyebrow { color: var(--amber); }

.callout {
    margin: 28px 0;
    padding: 20px 24px;
    border-left: 5px solid var(--amber);
    background: var(--white);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow);
    font-weight: 600;
    color: var(--navy);
}
.section-alt .callout { background: var(--white); }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.45em;
    width: 14px;
    height: 8px;
    border-left: 3px solid var(--amber-deep);
    border-bottom: 3px solid var(--amber-deep);
    transform: rotate(-45deg);
}

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

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.card h3 { color: var(--navy); }
.card-icon { width: 84px; height: 84px; margin-bottom: 14px; }
.card .check-list { font-size: 0.98rem; }
.help-cards .card h3 { font-size: 1.08rem; line-height: 1.35; }

/* ---------- Testimonials ---------- */

.reviews {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 340px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.review {
    scroll-snap-align: start;
    margin: 0;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--line);
}
.review-stars { color: var(--amber-star); letter-spacing: 2px; font-size: 1.05rem; }
.review blockquote { margin: 8px 0 12px; font-size: 1rem; }
.review figcaption { color: var(--muted); font-size: 0.92rem; font-weight: 600; }

/* ---------- Videos ---------- */

.video-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
.video-card { margin: 0; }
.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card figcaption { margin-top: 12px; color: var(--muted); font-size: 0.98rem; }

/* ---------- Adjuster types ---------- */

.type-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .type-list { grid-template-columns: repeat(3, 1fr); } }
.type-list li { padding: 22px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.type-list li.type-ours { border: 2px solid var(--navy); background: var(--navy-soft); }
.type-list strong { display: block; color: var(--navy); font-size: 1.1rem; margin-bottom: 6px; }

/* ---------- Process ---------- */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li {
    counter-increment: step;
    position: relative;
    padding: 20px 22px 20px 76px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
}
.steps li::before {
    content: counter(step);
    position: absolute;
    left: 20px;
    top: 18px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--amber);
    color: var(--navy-deep);
    font-weight: 700;
}

/* ---------- Results table ---------- */

.table-wrap {
    overflow: auto;
    max-height: 560px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table thead th {
    position: sticky;
    top: 0;
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    z-index: 1;
}
.data-table tbody tr:nth-child(even) { background: var(--surface); }
.results-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.results-table td, .results-table th { text-align: right; }
.results-table td:last-child { font-weight: 700; color: var(--good); }
.table-note { margin-top: 12px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Certifications ---------- */

.cert-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cert {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 22px 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.97rem;
}
.cert img { height: 96px; width: auto; object-fit: contain; }
.cert small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }

/* ---------- Team ---------- */

.team-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
.team-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.team-card h3 { margin-bottom: 2px; color: var(--navy); }
.team-role { color: var(--amber-text); font-weight: 600; margin-bottom: 14px; }
.team-card p { font-size: 0.98rem; }
.team-more { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 22px; }
.team-more .team-card { padding: 18px 22px; }
.team-more .team-role { margin: 0; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.contact-form { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); min-width: 0; }
@media (max-width: 400px) { .contact-form { padding: 20px 16px; } }
.contact-form h3 { color: var(--navy); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.field input, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #7a7a92;
    border-radius: 8px;
    font: inherit;
    color: inherit;
    background: var(--white);
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.field textarea { min-height: 140px; resize: vertical; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.req { color: var(--bad); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.6em; margin: 12px 0 0; font-weight: 600; }
.form-status.ok { color: var(--good); }
.form-status.err { color: var(--bad); }
.form-note { font-size: 0.9rem; color: var(--muted); margin: 0 0 12px; }
.form-privacy { font-size: 0.85rem; color: var(--muted); margin: 12px 0 0; }
.cf-turnstile { margin: 6px 0 16px; }

.contact-info .info-list { list-style: none; padding: 0; margin: 0 0 24px; }
.contact-info .info-list li { margin-bottom: 10px; }
.contact-info a { color: var(--white); }
.contact-info a:hover { color: var(--amber); }
.map-frame { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--navy-deep); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Plain content pages (FAQ, appraisal terms, 404) ---------- */

.page-hero { background: var(--navy); color: var(--white); padding: 56px 0 48px; }
.page-hero h1 { margin-bottom: 8px; }
.page-hero p { color: rgba(255, 255, 255, 0.85); max-width: 720px; margin: 0; font-size: 1.1rem; }
.prose { max-width: 820px; }

.faq-list { max-width: 860px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--white); }
.faq-item summary {
    cursor: pointer;
    padding: 18px 52px 18px 22px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--navy);
    list-style: none;
    position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-answer { padding: 0 22px 8px; }
.faq-answer blockquote { margin: 0 0 1em; padding: 12px 18px; border-left: 4px solid var(--navy); background: var(--surface); font-style: italic; }

.terms-key { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0 0 20px; padding: 0; list-style: none; color: var(--muted); }
.terms-key strong { color: var(--ink); }
.terms-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.terms-search input { flex: 1 1 260px; max-width: 420px; padding: 12px 14px; border: 1px solid #7a7a92; border-radius: 8px; font: inherit; }
.terms-count { color: var(--muted); font-size: 0.95rem; }
.terms-table td:first-child { font-weight: 600; color: var(--navy); }
.terms-table .no-match td { text-align: center; color: var(--muted); font-weight: 400; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.badge-uni { background: #e6f4ea; color: var(--good); }
.badge-bi { background: #fff4d6; color: #7a5200; }
.badge-na { background: var(--surface); color: var(--muted); }
.clause { margin-top: 28px; max-width: 860px; }
.clause summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.clause-body { padding: 12px 18px; margin-top: 10px; background: var(--surface); border-radius: var(--radius); font-size: 0.96rem; }

.not-found { padding: 96px 20px; text-align: center; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.85); padding: 56px 0 24px; font-size: 0.97rem; }
.site-footer h2 { color: var(--white); font-size: 1.1rem; margin-bottom: 14px; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--amber); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand img { width: 72px; height: 72px; margin-bottom: 10px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 8px; }
.site-footer p { margin: 0 0 10px; }
.copyright { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.88rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Areas served ---------- */

.area-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.area-list li {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.97rem;
}
