/* Base element styles, the page frame (header, footer, mobile quick bar) and the layout helpers every
   page uses. Values come from tokens.css; components.css holds the reusable pieces (cards, badges,
   search bar, provider card, forms) and pages.css the sections that belong to one page. */

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

html,
body {
    max-width: 100vw;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--color-navy);
    line-height: 1.2;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

button {
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
}

ul.plain,
ol.plain {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    box-shadow: var(--ring);
}

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    z-index: 10001;
    padding: 0.75rem 1.25rem;
    background-color: var(--color-navy);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: var(--space-3);
    color: #fff;
}

[aria-busy="true"] {
    opacity: 0.72;
    transition: opacity 0.15s ease;
}

.icon {
    flex-shrink: 0;
    vertical-align: middle;
}

/* Layout helpers */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    /* Containers own the side gutters; a shared wrapper owns its block spacing. */
    padding-inline: var(--space-5);
}

.container-narrow {
    max-width: 860px;
}

.container-prose {
    max-width: 780px;
}

.text-center {
    text-align: center;
}

.muted {
    color: var(--slate-600);
}

.text-sage {
    color: var(--color-primary);
}

.error {
    color: var(--red-600);
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    padding: var(--space-12) 0;
}

.section-tight {
    padding: var(--space-8) 0;
}

.section-white {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.section-head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
}

.section-head.left {
    text-align: left;
    margin-left: 0;
}

.eyebrow {
    display: inline-block;
    width: fit-content;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-primary);
    background-color: var(--color-primary-soft);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--color-navy);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.section-sub {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    color: var(--color-text-2);
    margin-top: 0.75rem;
    line-height: 1.6;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.75rem;
}

.grid-auto-sm {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
}

.sidebar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 3rem;
    align-items: start;
    padding-block: var(--space-8);
}

.sidebar-layout.wide-side {
    grid-template-columns: minmax(0, 1fr) 420px;
}

.sticky {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero bands */
.hero {
    position: relative;
    padding: var(--space-10) 0 var(--space-8) 0;
    background-color: var(--color-bg);
    background-image: var(--hero-light-gradient);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    overflow: visible;
    z-index: 20;
}

.hero::before {
    display: none;
}

.hero > .container {
    position: relative;
    z-index: 25;
}

.hero h1 {
    font-family: var(--font-display);
    color: var(--color-navy);
    font-size: clamp(1.85rem, 5vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.75px;
    margin-bottom: 1.15rem;
}

.hero .lede {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--color-text-2);
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 2rem auto;
}

.hero.compact {
    padding: 3.5rem 0 3rem 0;
}

.hero.centered {
    text-align: center;
}

.hero.photo {
    background-color: var(--color-navy);
    background-size: cover;
    background-position: center;
    padding: 4.5rem 0 4rem 0;
    color: var(--color-surface);
    border-bottom: none;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.hero.photo::before {
    display: block;
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(31, 46, 61, 0.72) 0%, rgba(31, 46, 61, 0.45) 55%, rgba(31, 46, 61, 0.22) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero.photo h1,
.hero.photo .lede,
.hero.photo .breadcrumbs,
.hero.photo .breadcrumbs a,
.hero.photo .trust-bar,
.hero.photo .trust-bar strong {
    color: var(--color-surface);
    text-shadow: 0 2px 12px rgba(15, 23, 42, 0.45);
}

.hero.photo .trust-bar {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.hero-badge {
    margin-bottom: var(--space-4);
}

.hero.photo .btn-outline {
    border-color: var(--color-surface);
    color: var(--color-surface);
}

.hero.photo .btn-outline:hover {
    background: var(--color-surface);
    color: var(--color-navy);
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--slate-600);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

ol.breadcrumbs {
    list-style: none;
}

ol.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

ol.breadcrumbs li + li::before {
    content: "›";
    color: var(--slate-500);
    font-weight: 400;
}

.hero.photo ol.breadcrumbs li + li::before {
    color: rgba(255, 255, 255, 0.75);
}

.breadcrumbs a {
    color: inherit;
}

.hero .breadcrumbs,
.hero .breadcrumbs a {
    color: var(--slate-600);
}

.breadcrumbs .current {
    color: var(--color-text);
    font-weight: 600;
}

.hero.photo .breadcrumbs .current {
    color: var(--color-surface);
}

/* Site header */
.site-header {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.site-nav-desktop {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav-desktop a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.site-nav-desktop a:hover {
    color: var(--color-primary);
}

.site-cta-desktop {
    display: flex;
    align-items: center;
}

.phone-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background-color: var(--slate-50);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    color: var(--color-navy);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.phone-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.phone-pill.green {
    background-color: var(--green-50);
    border-color: var(--green-200);
    color: var(--green-800);
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
}

.site-mobile-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.hamburger {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background-color: var(--slate-50);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--slate-800);
}

.site-mobile-drawer {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1005;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    padding: 0.75rem 1rem 1.25rem 1rem;
}

.site-mobile-drawer nav {
    display: flex;
    flex-direction: column;
}

.site-mobile-drawer nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--color-navy);
    font-weight: 600;
    font-size: 0.95rem;
}

.site-mobile-drawer nav a span:last-child {
    color: var(--slate-400);
    font-size: 0.9rem;
}

.drawer-ctas {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.drawer-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem;
    background-color: var(--slate-50);
    border: 1px solid var(--slate-300);
    border-radius: 10px;
    color: var(--color-navy);
    font-weight: 600;
    font-size: 0.88rem;
}

@media (max-width: 820px) {
    .site-header-inner {
        height: var(--header-height-mobile);
    }

    .site-nav-desktop,
    .site-cta-desktop {
        display: none;
    }

    .site-mobile-actions {
        display: flex;
    }

    .site-mobile-drawer[data-open] {
        display: block;
    }
}

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo.sm {
    gap: 0.6rem;
}

.logo svg {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-name {
    font-weight: 800;
    color: var(--color-ink);
    letter-spacing: -0.5px;
    font-size: 1.5rem;
}

.logo.sm .logo-name {
    font-size: 1.25rem;
}

.logo.lg .logo-name {
    font-size: 1.85rem;
}

.logo.light .logo-name {
    color: #fff;
}

.logo-tagline {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--slate-500);
    margin-top: 3px;
}

.logo.light .logo-tagline {
    color: var(--slate-400);
}

/* Messages */
.messages {
    list-style: none;
    margin: 0;
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary-soft);
    color: var(--color-navy);
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: #fff;
    padding-top: 4.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3.5rem;
    padding-bottom: 3.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand p {
    color: var(--slate-400);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-support {
    margin-top: 0.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-support span {
    font-size: 0.85rem;
    color: var(--slate-300);
}

.footer-support a {
    color: var(--color-sand);
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-col h4,
.footer-col .footer-heading {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.2px;
}

.footer-col a {
    color: var(--slate-300);
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: #fff;
}

.footer-disclosure {
    background-color: var(--footer-bg-2);
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-disclosure p {
    font-size: 0.8rem;
    color: var(--slate-300);
    line-height: 1.6;
}

.footer-disclosure a {
    color: var(--slate-200);
    text-decoration: underline;
}

.footer-disclosure a:hover {
    color: #fff;
}

.footer-bottom {
    background-color: var(--footer-bg-3);
    padding: 1.25rem 0;
    color: var(--slate-300);
    font-size: 0.85rem;
}

.site-footer .muted {
    color: var(--slate-400);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--slate-400);
}

.footer-legal .free {
    color: var(--color-sand);
    font-weight: 600;
}

@media (max-width: 960px) {
    .site-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.25rem;
        padding-bottom: 2.5rem;
    }
}

@media (max-width: 600px) {
    .site-footer {
        padding-top: 2.75rem;
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 2rem;
    }

    .footer-bottom .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Mobile floating quick action bar */
.mobile-quick-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.mobile-quick-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.mobile-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 600;
    transition: all var(--transition);
    flex: 1;
}

.mobile-quick-call {
    background-color: var(--slate-100);
    color: var(--slate-800);
    border: 1px solid var(--slate-300);
}

.mobile-quick-call .circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--color-primary-soft);
    flex-shrink: 0;
}

.mobile-quick-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.mobile-quick-text small {
    font-size: 0.7rem;
    color: var(--slate-500);
    font-weight: 500;
}

.mobile-quick-text strong {
    font-size: 0.82rem;
    color: var(--slate-800);
}

.mobile-quick-search {
    background-color: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
    font-size: 0.86rem;
    font-weight: 700;
}

.mobile-quick-search:hover {
    background-color: var(--color-primary-hover);
    color: #fff;
}

@media (max-width: 768px) {
    .mobile-quick-bar {
        display: block;
    }

    body {
        padding-bottom: 72px;
    }
}

/* Responsive collapse of the shared layouts */
@media (max-width: 960px) {
    .sidebar-layout,
    .sidebar-layout.wide-side {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .sticky {
        position: static;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 2.5rem 0;
    }

    .sidebar-layout {
        padding-block: var(--space-6) calc(var(--space-6) + var(--space-2));
    }

    .grid-2 {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .hero {
        padding: 2rem 0 2.25rem 0;
    }

    .hide-mobile {
        display: none;
    }

    .phone-pill.green {
        min-height: 44px;
        padding-inline: 0.9rem;
    }

    .stack-mobile {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .container {
        padding-inline: var(--space-4);
    }

    .full-mobile {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .mobile-quick-bar,
    .skip-link,
    .messages,
    nav,
    footer,
    header {
        display: none !important;
    }

    body {
        padding-bottom: 0;
        background-color: #fff;
    }
}
