/* ==========================================================================
   Rapid Plumber Mission Viejo CA — Shared Design System
   Brand colors sampled from the logo: navy #011A4B, teal #00A89A
   Layout language adapted from the homepage design reference.
   ========================================================================== */

:root {
    /* Brand */
    --navy: #0A1F4E;
    --navy-deep: #061535;
    --navy-ink: #011A4B;
    --navy-soft: #1B3470;
    --teal: #00A89A;
    --teal-bright: #2CC7B5;
    --teal-dark: #008C80;
    --teal-ink: #007469;
    --teal-tint: rgba(0, 168, 154, 0.09);
    --teal-tint-strong: rgba(0, 168, 154, 0.16);

    /* Neutrals */
    --text: #24303F;
    --text-light: #556273;
    --text-muted: #7A8797;
    --white: #FFFFFF;
    --off-white: #F6F9FB;
    --mist: #EBF4F5;
    --border: #DCE5EA;
    --warn: #B4521F;
    --warn-tint: #FFF4EC;

    /* Type */
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-accent: 'Roboto Slab', Georgia, serif;

    /* Layout */
    --container: 1200px;
    --container-narrow: 820px;
    --gutter: 24px;
    --section-y: 88px;
    --header-h: 80px;

    /* Surface */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(6, 21, 53, 0.06);
    --shadow-md: 0 6px 22px rgba(6, 21, 53, 0.08);
    --shadow-lg: 0 14px 44px rgba(6, 21, 53, 0.12);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast: 0.2s ease;
    --t-base: 0.35s var(--ease);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
    letter-spacing: -0.01em;
}

p { margin-bottom: 1rem; line-height: 1.75; }
p:last-child { margin-bottom: 0; }
strong { color: var(--navy); font-weight: 700; }

:focus-visible {
    outline: 3px solid var(--teal-bright);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    background: var(--navy);
    color: var(--white);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}
.skip-link:focus { top: 12px; }

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--gutter); }

/* In-content links */
.prose a,
.text-link {
    color: var(--teal-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(0, 116, 105, 0.35);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}
.prose a:hover,
.text-link:hover { color: var(--navy); text-decoration-color: var(--teal); }

/* ---------- Section headings ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--off-white); }
.section-mist { background: var(--mist); }
.section-dark { background: linear-gradient(140deg, var(--navy) 0%, var(--navy-deep) 100%); color: rgba(255, 255, 255, 0.82); }
.section-dark h2, .section-dark h3, .section-dark h4, .section-dark strong { color: var(--white); }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.4px;
    color: var(--teal-ink);
    margin-bottom: 14px;
}
.section-label::before {
    content: '';
    width: 32px;
    height: 2px;
    background: var(--teal);
    border-radius: 2px;
}
.section-dark .section-label { color: var(--teal-bright); }
.section-dark .section-label::before { background: var(--teal-bright); }

.section-title {
    font-size: clamp(1.75rem, 3.6vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}
.section-subtitle {
    font-size: 1.06rem;
    color: var(--text-light);
    max-width: 700px;
    line-height: 1.75;
}
.section-dark .section-subtitle { color: rgba(255, 255, 255, 0.72); }
.section-head { margin-bottom: 48px; }
.section-head.center { text-align: center; }
.section-head.center .section-subtitle { margin-left: auto; margin-right: auto; }
.section-head.center .section-label { justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 13px 30px;
    font-family: var(--font-heading);
    font-size: 0.97rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--t-base), color var(--t-base), border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
    white-space: nowrap;
    text-decoration: none;
}
.btn svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }

/* Teal with navy text keeps WCAG AA contrast */
.btn-primary { background: var(--teal); color: var(--navy-ink); box-shadow: 0 6px 18px rgba(0, 168, 154, 0.32); }
.btn-primary:hover { background: var(--teal-bright); box-shadow: 0 10px 26px rgba(0, 168, 154, 0.42); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-soft); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-ink); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.42); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-sm { min-height: 42px; padding: 9px 20px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Top bar ---------- */
.top-bar {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.83rem;
    padding: 9px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.top-bar-group { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.top-bar-item { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.85); }
a.top-bar-item:hover { color: var(--white); }
.top-bar-item svg { width: 14px; height: 14px; fill: var(--teal-bright); flex-shrink: 0; }

/* ---------- Header & navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-base);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--header-h);
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 46px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a,
.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 15px;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--navy);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    line-height: 1.4;
}
.main-nav > a:hover,
.main-nav > a[aria-current="page"],
.dropdown-trigger:hover,
.nav-dropdown.open .dropdown-trigger,
.dropdown-trigger.is-current {
    color: var(--teal-ink);
    background: var(--teal-tint);
}
.nav-dropdown { position: relative; }
.dropdown-icon { width: 14px; height: 14px; fill: currentColor; transition: transform var(--t-fast); }
.nav-dropdown.open .dropdown-icon { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 290px;
    padding: 8px 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
    z-index: 1001;
}
.dropdown-menu::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.nav-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
@media (hover: hover) and (min-width: 1025px) {
    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
}
.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--navy);
    border-left: 3px solid transparent;
}
.dropdown-menu a:hover,
.dropdown-menu a[aria-current="page"] { color: var(--teal-ink); background: var(--teal-tint); border-left-color: var(--teal); }

.header-cta { display: flex; align-items: center; gap: 16px; }
.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--navy);
}
.header-phone svg { width: 18px; height: 18px; fill: var(--teal); }
.header-phone:hover { color: var(--teal-ink); }

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 10px;
    background: var(--teal-tint);
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.mobile-toggle span { display: block; height: 2.5px; background: var(--navy); border-radius: 2px; }
.mobile-nav-header,
.mobile-nav-footer,
.mobile-sticky-cta,
.nav-backdrop { display: none; }

/* ---------- Content images ---------- */
.ph {
    position: relative;
    width: 100%;
    aspect-ratio: var(--ar, 4 / 3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #D6E3EE;
    box-shadow: var(--shadow-md);
}
.ph::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, calc(-50% - 22px));
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230A1F4E' opacity='.35'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
}
.ph::after {
    content: attr(data-ph);
    position: relative;
    margin-top: 64px;
    max-width: 90%;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: rgba(10, 31, 78, 0.6);
    line-height: 1.45;
}
.ph-dark {
    background:
        repeating-linear-gradient(135deg, rgba(44, 199, 181, 0.08) 0 14px, transparent 14px 28px),
        linear-gradient(150deg, #11285E 0%, #0A1B43 100%);
    border-color: rgba(255, 255, 255, 0.22);
}
.ph-dark::before { filter: invert(1); }
.ph-dark::after { color: rgba(255, 255, 255, 0.62); }
.ph.has-image { border: 0; padding: 0; }
.ph.has-image::before,
.ph.has-image::after { display: none; }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   HOMEPAGE
   ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(ellipse 60% 70% at 85% 20%, rgba(0, 168, 154, 0.28) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 0% 100%, rgba(44, 199, 181, 0.14) 0%, transparent 60%),
        linear-gradient(160deg, #0C2459 0%, var(--navy-deep) 70%);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40h28a12 12 0 0 1 12 12v28M40 0v28a12 12 0 0 0 12 12h28' fill='none' stroke='rgba(255,255,255,0.045)' stroke-width='2'/%3E%3C/svg%3E");
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; padding-top: 84px; padding-bottom: 72px; }
.hero-content { max-width: 900px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    margin-bottom: 22px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    background: rgba(0, 168, 154, 0.18);
    border: 1px solid rgba(44, 199, 181, 0.5);
    border-radius: 50px;
}
.hero-badge svg { width: 16px; height: 16px; fill: var(--teal-bright); }
.hero h1 {
    color: var(--white);
    font-size: clamp(2.3rem, 5.4vw, 3.9rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 22px;
}
.hero h1 span { color: var(--teal-bright); display: block; }
.hero-desc { font-size: 1.13rem; color: rgba(255, 255, 255, 0.86); max-width: 740px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 52px; }

.hero-finder {
    width: 100%;
    max-width: 1040px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-xl);
    padding: 26px;
    backdrop-filter: blur(6px);
}
.hero-finder-title {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}
.hero-finder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-finder a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: background var(--t-base), border-color var(--t-base), transform var(--t-base);
}
.hero-finder a:hover { background: rgba(0, 168, 154, 0.2); border-color: rgba(44, 199, 181, 0.6); transform: translateY(-2px); }
.hero-finder-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--teal);
}
.hero-finder-icon svg { width: 21px; height: 21px; fill: var(--navy-ink); }
.hero-finder-text { display: flex; flex-direction: column; line-height: 1.3; }
.hero-finder-text strong { color: var(--white); font-family: var(--font-heading); font-size: 0.98rem; }
.hero-finder-text span { color: rgba(255, 255, 255, 0.66); font-size: 0.82rem; }

/* Split intro */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-media { position: relative; }
.split-media .media-note {
    position: absolute;
    right: -18px;
    bottom: -22px;
    max-width: 260px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 18px 20px;
    border-left: 4px solid var(--teal);
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-light);
}
.media-note strong { display: block; font-family: var(--font-heading); font-size: 1rem; margin-bottom: 4px; }
.check-list { display: grid; gap: 12px; margin-top: 22px; }
.check-list li { position: relative; padding-left: 34px; line-height: 1.6; }
.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--teal-tint-strong) no-repeat center / 13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23007469'%3E%3Cpath d='M16.7 5.3a1 1 0 0 1 0 1.4l-8 8a1 1 0 0 1-1.4 0l-4-4a1 1 0 1 1 1.4-1.4L8 12.6l7.3-7.3a1 1 0 0 1 1.4 0z'/%3E%3C/svg%3E");
}

/* Services grid */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.svc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 28px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
    overflow: hidden;
}
.svc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--navy));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-base);
}
.svc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(0, 168, 154, 0.35); }
.svc-card:hover::before { transform: scaleX(1); }
.svc-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--teal-tint);
    margin-bottom: 20px;
    transition: background var(--t-base);
}
.svc-icon svg { width: 28px; height: 28px; fill: var(--teal-ink); transition: fill var(--t-base); }
.svc-card:hover .svc-icon { background: var(--navy); }
.svc-card:hover .svc-icon svg { fill: var(--teal-bright); }
.svc-card h3 { font-size: 1.24rem; margin-bottom: 10px; }
.svc-card p { color: var(--text-light); font-size: 0.96rem; flex-grow: 1; }
.svc-card .svc-signs { margin: 14px 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.svc-signs span {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--navy);
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
}
.svc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--teal-ink);
}
.svc-link svg { width: 16px; height: 16px; fill: currentColor; transition: transform var(--t-fast); }
.svc-card:hover .svc-link svg { transform: translateX(4px); }
.svc-link::after { content: ''; position: absolute; inset: 0; }

/* Symptom table (homepage) */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--white); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 0.95rem; }
.data-table caption { text-align: left; padding: 18px 22px 0; font-size: 0.85rem; color: var(--text-muted); caption-side: bottom; padding-bottom: 16px; }
.data-table th,
.data-table td { padding: 16px 22px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); line-height: 1.6; }
.data-table thead th {
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}
.data-table tbody th { font-family: var(--font-heading); color: var(--navy); font-weight: 700; width: 24%; }
.data-table tbody tr:nth-child(even) { background: var(--off-white); }
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table a { color: var(--teal-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Diagnosis feature (dark) */
.diag-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: start; }
.diag-points { display: grid; gap: 18px; }
.diag-point {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 18px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.diag-point-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 168, 154, 0.2); }
.diag-point-icon svg { width: 24px; height: 24px; fill: var(--teal-bright); }
.diag-point h3 { font-size: 1.1rem; margin-bottom: 6px; }
.diag-point p { font-size: 0.95rem; color: rgba(255, 255, 255, 0.74); }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: step; position: relative; }
.steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--teal) 0 10px, transparent 10px 18px);
    opacity: 0.5;
}
.step { position: relative; text-align: center; padding: 0 6px; }
.step-num {
    position: relative;
    z-index: 1;
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--teal);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy);
    box-shadow: 0 0 0 6px var(--off-white);
}
.step h3 { font-size: 1.06rem; margin-bottom: 8px; }
.step p { font-size: 0.92rem; color: var(--text-light); line-height: 1.65; }

/* Repair vs replace columns */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.compare-col { border-radius: var(--radius-lg); padding: 34px 32px; border: 1px solid var(--border); background: var(--white); box-shadow: var(--shadow-sm); }
.compare-col.repair { border-top: 5px solid var(--teal); }
.compare-col.replace { border-top: 5px solid var(--navy); }
.compare-col h3 { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; margin-bottom: 14px; }
.compare-col h3 svg { width: 28px; height: 28px; fill: var(--teal-ink); }
.compare-col.replace h3 svg { fill: var(--navy); }
.compare-col > p { color: var(--text-light); }
.compare-note {
    margin-top: 26px;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    background: var(--mist);
    border-left: 4px solid var(--teal);
    color: var(--text);
}

/* Estimate factors */
.factor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.factor {
    padding: 26px 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--border);
}
.factor-num { font-family: var(--font-accent); font-size: 0.9rem; font-weight: 600; color: var(--teal-ink); margin-bottom: 8px; display: block; }
.factor h3 { font-size: 1.08rem; margin-bottom: 8px; }
.factor p { font-size: 0.94rem; color: var(--text-light); }

/* Local context */
.local-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.local-cards { display: grid; gap: 16px; }
.local-card { display: grid; grid-template-columns: 6px 1fr; gap: 20px; padding: 22px 24px 22px 0; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.local-card::before { content: ''; background: var(--teal); border-radius: 0 4px 4px 0; }
.local-card h3 { font-size: 1.06rem; margin-bottom: 6px; }
.local-card p { font-size: 0.94rem; color: var(--text-light); }

/* FAQ */
.faq-list { max-width: 880px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: border-color var(--t-base), box-shadow var(--t-base); }
.faq-item.open { border-color: rgba(0, 168, 154, 0.45); box-shadow: var(--shadow-md); }
.faq-item h3 { font-size: inherit; margin: 0; }
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.4;
}
.faq-question:hover { color: var(--teal-ink); }
.faq-icon {
    flex-shrink: 0;
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--teal-tint);
}
.faq-icon::before,
.faq-icon::after { content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; background: var(--teal-ink); transform: translate(-50%, -50%); transition: transform var(--t-base); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.open .faq-icon { background: var(--teal); }
.faq-item.open .faq-icon::before,
.faq-item.open .faq-icon::after { background: var(--navy-ink); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-answer { padding: 0 24px 22px; color: var(--text-light); }
.faq-answer[hidden] { display: none; }
.no-js .faq-answer[hidden] { display: block; }

/* Closing CTA band */
.cta-band { padding: 84px 0; background: linear-gradient(120deg, var(--navy) 0%, #0D2C66 55%, #0A5E66 100%); position: relative; overflow: hidden; color: var(--white); }
.cta-band::after { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(44, 199, 181, 0.3), transparent 65%); }
.cta-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr auto; gap: 40px; align-items: center; }
.cta-inner h2 { color: var(--white); font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 12px; }
.cta-inner p { color: rgba(255, 255, 255, 0.82); max-width: 640px; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; }
.cta-meta { margin-top: 10px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.cta-meta a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   INNER PAGES (About, Contact, Legal, Sitemap, 404)
   ========================================================================== */
.page-hero {
    position: relative;
    padding: 64px 0 56px;
    background: linear-gradient(160deg, var(--off-white) 0%, var(--mist) 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 40px solid rgba(0, 168, 154, 0.08);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; max-width: 820px; }
.page-hero p { font-size: 1.08rem; color: var(--text-light); max-width: 680px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.87rem; font-weight: 600; margin-bottom: 18px; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); }
.breadcrumbs li + li::before { content: '›'; color: var(--text-muted); }
.breadcrumbs a { color: var(--teal-ink); }
.breadcrumbs a:hover { color: var(--navy); }
.breadcrumbs [aria-current] { color: var(--navy); }

/* About editorial */
.editorial { display: grid; grid-template-columns: 260px 1fr; gap: 64px; align-items: start; }
.editorial-aside { position: sticky; top: calc(var(--header-h) + 28px); }
.editorial-aside nav { border-left: 2px solid var(--border); }
.editorial-aside nav p { font-family: var(--font-heading); font-size: 0.78rem; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 700; color: var(--text-muted); padding-left: 18px; margin-bottom: 10px; }
.editorial-aside a { display: block; padding: 7px 18px; margin-left: -2px; border-left: 2px solid transparent; font-weight: 600; font-size: 0.93rem; color: var(--text-light); }
.editorial-aside a:hover { color: var(--teal-ink); border-left-color: var(--teal); }
.editorial-body { max-width: 760px; }
.editorial-body .lede { font-family: var(--font-accent); font-size: 1.32rem; line-height: 1.6; color: var(--navy); margin-bottom: 34px; }
.editorial-body h2 { font-size: 1.7rem; margin: 52px 0 16px; padding-top: 8px; }
.editorial-body h2:first-of-type { margin-top: 0; }
.editorial-body figure { margin: 36px 0; }
.editorial-body figcaption { margin-top: 10px; font-size: 0.86rem; color: var(--text-muted); }
.pull-quote {
    margin: 40px 0;
    padding: 6px 0 6px 28px;
    border-left: 4px solid var(--teal);
    font-family: var(--font-accent);
    font-size: 1.24rem;
    line-height: 1.6;
    color: var(--navy);
}
.values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0; }
.value { padding: 22px; border-radius: var(--radius-md); background: var(--off-white); border: 1px solid var(--border); }
.value h3 { font-size: 1.05rem; margin-bottom: 6px; }
.value p { font-size: 0.93rem; color: var(--text-light); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
.contact-methods { display: grid; gap: 16px; }
.contact-method {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 18px;
    align-items: center;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.contact-method.primary { background: var(--navy); border-color: var(--navy); color: rgba(255, 255, 255, 0.8); }
.contact-method.primary h2,
.contact-method.primary a { color: var(--white); }
.contact-method-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--teal-tint); }
.contact-method.primary .contact-method-icon { background: var(--teal); }
.contact-method-icon svg { width: 24px; height: 24px; fill: var(--teal-ink); }
.contact-method.primary .contact-method-icon svg { fill: var(--navy-ink); }
.contact-method h2 { font-size: 0.82rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.contact-method a,
.contact-method address { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--navy); font-style: normal; line-height: 1.4; word-break: break-word; }
.contact-method a:hover { color: var(--teal-ink); }
.contact-method.primary a:hover { color: var(--teal-bright); }
.contact-method small { display: block; font-size: 0.85rem; margin-top: 2px; }
.contact-map { display: grid; gap: 14px; align-content: start; }
.contact-map iframe { display: block; width: 100%; min-height: 360px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); background: var(--white); }
.contact-map .text-link { justify-self: start; }
.prep-list { margin-top: 26px; padding: 26px; border-radius: var(--radius-lg); background: var(--mist); }
.prep-list h2 { font-size: 1.15rem; margin-bottom: 12px; }
.callout { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; margin-top: 22px; padding: 20px 22px; border-radius: var(--radius-md); background: var(--mist); border-left: 4px solid var(--teal); }
.callout svg { width: 26px; height: 26px; fill: var(--teal-ink); margin-top: 2px; }
.callout.warn { background: var(--warn-tint); border-left-color: var(--warn); }
.callout.warn svg { fill: var(--warn); }
.callout p { font-size: 0.95rem; }

.form-card { padding: 38px; border-radius: var(--radius-xl); background: var(--white); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.form-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.form-card > p { color: var(--text-light); margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.form-field label .req { color: var(--warn); }
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--off-white);
    font-size: 0.97rem;
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 4px var(--teal-tint-strong); }
.form-field [aria-invalid="true"] { border-color: var(--warn); background: var(--warn-tint); }
.field-hint { font-size: 0.82rem; color: var(--text-muted); }
.field-error { font-size: 0.84rem; font-weight: 600; color: var(--warn); }
.field-error:empty { display: none; }
.form-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.form-status { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-error { background: var(--warn-tint); color: var(--warn); }
.form-status.is-info { background: var(--teal-tint); color: var(--teal-ink); }
.form-note { font-size: 0.84rem; color: var(--text-muted); }

/* Legal documents */
.doc { padding: 64px 0 88px; }
.doc-body { max-width: 780px; margin: 0 auto; }
.doc-meta { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.doc-body h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.doc-body h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.doc-body ul { list-style: disc; padding-left: 22px; margin-bottom: 1rem; }
.doc-body li { margin-bottom: 6px; }
.doc-contact { margin-top: 36px; padding: 22px 24px; background: var(--off-white); border-radius: var(--radius-md); border: 1px solid var(--border); }
.doc-contact address { font-style: normal; }

/* HTML sitemap */
.sitemap-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.sitemap-group { padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--white); box-shadow: var(--shadow-sm); }
.sitemap-group h2 { font-size: 1.15rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--teal-tint-strong); }
.sitemap-group li + li { margin-top: 4px; }
.sitemap-group a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-weight: 600; color: var(--navy); }
.sitemap-group a:hover { color: var(--teal-ink); }
.sitemap-group a span { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }

/* 404 */
.nf { padding: 96px 0 104px; text-align: center; background: radial-gradient(ellipse 50% 60% at 50% 0%, var(--mist), transparent 70%); }
.nf-code { font-family: var(--font-heading); font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; line-height: 1; letter-spacing: -0.05em; color: var(--navy); }
.nf-code span { color: var(--teal); }
.nf h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin: 10px 0 14px; }
.nf p { color: var(--text-light); max-width: 540px; margin: 0 auto 28px; }
.nf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.nf-links { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; font-size: 0.93rem; }
.nf-links a { color: var(--teal-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.72); padding: 72px 0 0; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.25fr 1.35fr; gap: 44px; padding-bottom: 52px; }
.footer-logo-img { height: 44px; width: auto; margin-bottom: 20px; }
.footer-brand p { max-width: 340px; }
.footer-heading { color: var(--white); font-size: 1.04rem; margin-bottom: 18px; position: relative; padding-bottom: 12px; }
.footer-heading::after { content: ''; position: absolute; left: 0; bottom: 0; width: 34px; height: 2px; background: var(--teal); }
.footer-links li + li { margin-top: 9px; }
.footer-links a { color: rgba(255, 255, 255, 0.72); }
.footer-links a:hover { color: var(--teal-bright); }
.footer-contact-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; line-height: 1.55; }
.footer-contact-item svg { width: 16px; height: 16px; fill: var(--teal-bright); flex-shrink: 0; margin-top: 4px; }
.footer-contact-item a { color: rgba(255, 255, 255, 0.82); word-break: break-word; }
.footer-contact-item a:hover { color: var(--teal-bright); }
.footer-contact-item address { font-style: normal; }
.footer-location iframe { display: block; width: 100%; height: 240px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.86rem; }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-bottom-links a { color: rgba(255, 255, 255, 0.66); }
.footer-bottom-links a:hover { color: var(--teal-bright); }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 990;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 8px 22px rgba(6, 21, 53, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--teal); color: var(--navy-ink); }
.back-to-top:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 3px; }
.back-to-top svg { width: 22px; height: 22px; fill: currentColor; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
    .header-phone span { display: none; }
}

@media (max-width: 1024px) {
    :root { --section-y: 72px; --header-h: 72px; }
    .logo-img { height: 40px; }
    .mobile-toggle { display: flex; }
    .header-cta .btn { display: none; }
    .header-phone span { display: inline; }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(360px, 88vw);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 0 20px 24px;
        background: var(--white);
        box-shadow: -10px 0 40px rgba(6, 21, 53, 0.2);
        transform: translateX(105%);
        visibility: hidden;
        transition: transform 0.32s var(--ease), visibility 0.32s;
        overflow-y: auto;
        z-index: 1100;
    }
    .main-nav.open { transform: translateX(0); visibility: visible; }
    body.nav-open .site-header { z-index: 1100; }
    .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(6, 21, 53, 0.5); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; z-index: 1050; }
    body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
    .mobile-nav-header { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); border-bottom: 1px solid var(--border); margin-bottom: 10px; }
    .mobile-nav-logo { height: 34px; width: auto; }
    .mobile-nav-close { width: 44px; height: 44px; border: 0; border-radius: var(--radius-sm); background: var(--teal-tint); font-size: 1.7rem; line-height: 1; color: var(--navy); cursor: pointer; }
    .main-nav > a,
    .dropdown-trigger { width: 100%; justify-content: space-between; padding: 13px 14px; font-size: 1rem; }
    .dropdown-menu { position: static; min-width: 0; padding: 0 0 6px 10px; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; }
    .nav-dropdown.open .dropdown-menu { display: block; }
    .dropdown-menu a { padding: 10px 14px; font-size: 0.95rem; }
    .mobile-nav-footer { display: grid; gap: 10px; margin-top: auto; padding-top: 22px; }

    .hero-finder-grid { grid-template-columns: repeat(2, 1fr); }
    .svc-grid,
    .factor-grid { grid-template-columns: repeat(2, 1fr); }
    .split,
    .diag-grid,
    .local-grid,
    .contact-grid { grid-template-columns: 1fr; gap: 44px; }
    .split.reverse > :first-child { order: 0; }
    .split-media .media-note { right: 12px; }
    .steps { grid-template-columns: repeat(2, 1fr); gap: 34px 24px; }
    .steps::before { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-location iframe { height: 280px; }
    .editorial { grid-template-columns: 1fr; gap: 28px; }
    .editorial-aside { position: static; }
    .editorial-aside nav { display: flex; flex-wrap: wrap; gap: 6px; border-left: 0; }
    .editorial-aside nav p { width: 100%; padding-left: 0; }
    .editorial-aside a { margin: 0; border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 0.86rem; }
    .sitemap-groups { grid-template-columns: 1fr 1fr; }
    .cta-inner { grid-template-columns: 1fr; }
    .cta-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 768px) {
    :root { --section-y: 60px; --gutter: 20px; }
    .top-bar .top-bar-hide-sm { display: none; }
    .header-phone { display: none; }
    body { padding-bottom: 68px; }
    .mobile-sticky-cta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 980;
        background: var(--white);
        box-shadow: 0 -4px 20px rgba(6, 21, 53, 0.14);
    }
    .mobile-cta-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem; }
    .mobile-cta-btn svg { width: 18px; height: 18px; fill: currentColor; }
    .mobile-cta-call { background: var(--teal); color: var(--navy-ink); }
    .mobile-cta-book { background: var(--navy); color: var(--white); }
    .back-to-top { right: 16px; bottom: 82px; width: 46px; height: 46px; }

    .hero .container { padding-top: 56px; padding-bottom: 52px; }
    .hero-actions .btn { width: 100%; }
    .hero-finder { padding: 18px; }
    .hero-finder-grid,
    .svc-grid,
    .factor-grid,
    .compare,
    .values-grid,
    .form-grid,
    .sitemap-groups,
    .footer-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; text-align: left; }
    .step { display: grid; grid-template-columns: 60px 1fr; gap: 0 18px; text-align: left; padding: 0; }
    .step-num { margin: 0; grid-row: span 2; }
    .split-media .media-note { position: static; max-width: none; margin-top: 14px; }
    .compare-col,
    .form-card { padding: 26px 22px; }
    .cta-actions .btn { width: 100%; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .footer-location iframe { height: 260px; }
    .contact-map iframe { min-height: 300px; }
}

@media (max-width: 380px) {
    .logo-img { height: 32px; }
    .hero h1 { font-size: 2.05rem; }
    .btn { padding: 12px 20px; white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    .btn:hover,
    .svc-card:hover { transform: none; }
}

@media print {
    .top-bar,
    .site-header,
    .mobile-sticky-cta,
    .back-to-top,
    .cta-band { display: none !important; }
    body { padding: 0; }
}

.doc-body .doc-contact h2 { margin-top: 0; }

