/* ============================================================================
   home.css — homepage styles (hero, collage, routing strip, fresh reviews,
   scroll reveals, stat counters, testimonial star rows, closing CTA band).
   Loaded only by templates/index.html; behaviors live in static/js/home.js.
   Classes are prefixed `bp-`.
   Design tokens (--ba-*) come from blueatlas.css, which loads first.
   Header dropdown styles live in blueatlas.css (used on every page).
   ========================================================================== */


/* ─── 1. Hero ────────────────────────────────────────────────────────── */

.bp-hero {
    background:
        radial-gradient(ellipse at 10% 8%, rgba(31, 95, 153, 0.10) 0%, transparent 40%),
        radial-gradient(ellipse at 88% 16%, rgba(201, 151, 61, 0.13) 0%, transparent 38%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 68%);
    min-height: 88vh;
    overflow: hidden;
    padding: 132px 0 76px;
    position: relative;
    display: flex;
    align-items: center;
}

.bp-hero-grid {
    align-items: center;
    display: grid;
    gap: 56px;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    width: 100%;
}

.bp-hero-copy {
    max-width: 620px;
}

.bp-hero-title {
    color: var(--ba-ink);
    font-family: var(--ba-font);
    font-size: clamp(36px, 4vw, 58px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin: 0 0 20px;
}

.bp-hero-lede {
    color: #475569;
    font-size: clamp(17px, 1.5vw, 19px);
    line-height: 1.58;
    margin: 0 0 24px;
    max-width: 540px;
}


/* ─── Proof chips ────────────────────────────────────────────────────── */

.bp-proof-chips {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 30px;
}

.bp-chip {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(11, 25, 41, 0.05);
    color: #334155;
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 600;
    gap: 6px;
    letter-spacing: -0.008em;
    line-height: 1;
    padding: 9px 14px;
    white-space: nowrap;
}

.bp-chip-star {
    color: var(--ba-gold);
    font-size: 13px;
    line-height: 1;
}


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

.bp-hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bp-button-primary {
    background: var(--ba-ink);
    box-shadow: 0 8px 28px rgba(11, 25, 41, 0.20);
    color: #ffffff;
}

.bp-button-primary:hover {
    box-shadow: 0 14px 38px rgba(11, 25, 41, 0.28);
    transform: translateY(-2px);
}

.bp-button-ghost {
    background: #ffffff;
    border-color: var(--ba-border);
    color: var(--ba-ink);
}

.bp-button-ghost:hover {
    background: #f8fafc;
    border-color: rgba(201, 151, 61, 0.45);
    color: var(--ba-ink);
}


/* ─── 1b. Photo collage ──────────────────────────────────────────────── */

.bp-hero-visual {
    display: flex;
    justify-content: flex-end;
}

.bp-settle-collage {
    animation-delay: 0.46s;
    animation-duration: 0.95s;
}

.bp-collage {
    aspect-ratio: 1 / 0.94;
    margin: 0;
    max-width: 560px;
    position: relative;
    width: 100%;
}

.bp-photo {
    background: #ffffff;
    border-radius: 18px;
    box-shadow:
        0 20px 60px rgba(11, 25, 41, 0.16),
        0 4px 12px rgba(11, 25, 41, 0.07),
        0 0 0 1px rgba(11, 25, 41, 0.04);
    margin: 0;
    overflow: hidden;
    position: absolute;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.bp-photo img {
    aspect-ratio: 4 / 3;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.bp-photo-1 {
    left: 0;
    top: 0;
    transform: rotate(-4deg);
    width: 58%;
    z-index: 2;
}

.bp-photo-2 {
    right: 0;
    top: 21%;
    transform: rotate(5deg);
    width: 52%;
    z-index: 3;
}

.bp-photo-3 {
    bottom: 0;
    left: 13%;
    transform: rotate(-2deg);
    width: 56%;
    z-index: 4;
}

.bp-photo:hover {
    box-shadow:
        0 28px 74px rgba(11, 25, 41, 0.22),
        0 6px 16px rgba(11, 25, 41, 0.08),
        0 0 0 1px rgba(11, 25, 41, 0.05);
    z-index: 5;
}

.bp-photo-1:hover { transform: rotate(-4deg) translateY(-5px); }
.bp-photo-2:hover { transform: rotate(5deg) translateY(-5px); }
.bp-photo-3:hover { transform: rotate(-2deg) translateY(-5px); }

.bp-photo-caption {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 10px;
    bottom: 10px;
    box-shadow: 0 4px 14px rgba(11, 25, 41, 0.14);
    display: flex;
    flex-direction: column;
    gap: 2px;
    left: 10px;
    line-height: 1.25;
    max-width: calc(100% - 20px);
    padding: 8px 11px;
    position: absolute;
}

.bp-photo-caption strong {
    color: var(--ba-ink);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-photo-caption span {
    color: var(--ba-blue);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Fallback when the database returns no listing photos */
.bp-collage-fallback {
    background:
        radial-gradient(ellipse at 22% 20%, rgba(31, 95, 153, 0.20) 0%, transparent 52%),
        radial-gradient(ellipse at 78% 76%, rgba(201, 151, 61, 0.22) 0%, transparent 50%),
        linear-gradient(150deg, #eef4fb 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(11, 25, 41, 0.12);
    height: 100%;
    width: 100%;
}


/* ─── 2. Compact routing strip — overlaps the hero fold so "pick your
       path" is visible before any scrolling ─────────────────────────── */

.bp-routing-strip {
    background: transparent;
    margin-top: -44px;
    padding: 0 0 12px;
    position: relative;
    z-index: 5;
}

.bp-routing-inner {
    align-items: center;
    background: #eef2f7;
    border: 1px solid var(--ba-border);
    border-radius: 14px;
    box-shadow: var(--ba-shadow-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 16px 20px;
}

.bp-routing-label {
    color: var(--ba-blue);
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin: 0;
    text-transform: uppercase;
}

.bp-routing-grid {
    display: grid;
    flex: 1 1 640px;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bp-route {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(11, 25, 41, 0.12);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(11, 25, 41, 0.08), 0 1px 2px rgba(11, 25, 41, 0.06);
    display: flex;
    gap: 10px;
    padding: 13px 15px;
    text-decoration: none;
    transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.bp-route:hover {
    border-color: rgba(201, 151, 61, 0.55);
    box-shadow: 0 8px 22px rgba(11, 25, 41, 0.14), 0 2px 6px rgba(11, 25, 41, 0.08);
    transform: translateY(-2px);
}

.bp-route:active {
    box-shadow: 0 1px 4px rgba(11, 25, 41, 0.10);
    transform: translateY(0);
}

.bp-route-icon {
    align-items: center;
    background: rgba(201, 151, 61, 0.14);
    border-radius: 6px;
    color: var(--ba-gold);
    display: flex;
    flex-shrink: 0;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.bp-route-title {
    color: var(--ba-navy);
    flex: 1;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.bp-route-arrow {
    color: var(--ba-gold);
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.18s, transform 0.18s;
}

.bp-route:hover .bp-route-arrow {
    color: var(--ba-gold);
    transform: translateX(3px);
}


/* ─── Returning-visitor chip (injected by public.js on the homepage) ─── */

.bp-welcome-back {
    align-items: center;
    background: rgba(201, 151, 61, 0.10);
    border: 1px solid rgba(201, 151, 61, 0.38);
    border-radius: 999px;
    display: inline-flex;
    gap: 4px;
    margin: 0 0 18px;
    padding: 8px 10px 8px 14px;
    transition: background 0.15s, border-color 0.15s;
}

.bp-welcome-back:hover {
    background: rgba(201, 151, 61, 0.16);
    border-color: rgba(201, 151, 61, 0.60);
}

.bp-welcome-back-link {
    align-items: center;
    color: var(--ba-ink);
    display: inline-flex;
    font-size: 13px;
    font-weight: 600;
    gap: 7px;
    text-decoration: none;
}

.bp-welcome-back-dismiss {
    align-items: center;
    background: none;
    border: none;
    border-radius: 50%;
    color: rgba(11, 25, 41, 0.45);
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    height: 20px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 20px;
}

.bp-welcome-back-dismiss:hover {
    background: rgba(11, 25, 41, 0.08);
    color: var(--ba-ink);
}


/* ─── 5. Testimonials ────────────────────────────────────────────────── */

.bp-testimonial-grid {
    margin-top: 34px;
}

.bp-fresh-reviews {
    margin-top: 34px;
}

.bp-fresh-label {
    align-items: center;
    color: var(--ba-slate);
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
    letter-spacing: 0.10em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.bp-fresh-label .bp-chip-star {
    letter-spacing: 0.14em;
}

.bp-fresh-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bp-fresh-card {
    background: #f8fafc;
    border: 1px solid var(--ba-border);
    border-left: 3px solid var(--ba-gold);
    border-radius: 10px;
    margin: 0;
    padding: 16px 18px;
}

.bp-fresh-card p {
    color: #334155;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 10px;
}

.bp-fresh-card footer {
    color: var(--ba-slate);
    font-size: 12.5px;
    font-weight: 600;
}

@media (max-width: 960px) {
    .bp-fresh-grid { grid-template-columns: minmax(0, 1fr); }
}

.bp-reviews-more {
    margin: 26px 0 0;
}

.bp-reviews-more a {
    color: var(--ba-blue);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.bp-reviews-more a:hover {
    color: var(--ba-gold);
    text-decoration: underline;
}


/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
    .bp-hero-grid { gap: 40px; }
    .bp-collage { max-width: 480px; }
}

@media (max-width: 960px) {
    .bp-hero {
        min-height: 0;
        padding: 116px 0 64px;
    }
    .bp-hero-grid {
        gap: 48px;
        grid-template-columns: minmax(0, 1fr);
    }
    .bp-hero-copy { max-width: 640px; }
    .bp-hero-visual { justify-content: center; }
    .bp-collage { max-width: 520px; }
    .bp-routing-grid {
        flex-basis: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .bp-hero { padding: 104px 0 60px; }
    .bp-routing-strip { margin-top: -22px; }
    .bp-routing-inner { padding: 14px 16px; }
    .bp-hero-visual { display: none; }
    .bp-chip {
        font-size: 12px;
        padding: 8px 12px;
        white-space: normal;
    }
    .bp-hero-actions .ba-button {
        flex: 1 1 100%;
    }
    .bp-routing-grid { grid-template-columns: minmax(0, 1fr); }
}


/* ─── Reduced motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .bp-photo,
    .bp-route,
    .bp-route-arrow,
    .bp-button-primary,
    .bp-button-ghost {
        transition: none;
    }
    .bp-photo-1:hover { transform: rotate(-4deg); }
    .bp-photo-2:hover { transform: rotate(5deg); }
    .bp-photo-3:hover { transform: rotate(-2deg); }
    .bp-route:hover,
    .bp-button-primary:hover { transform: none; }
    .bp-route:hover .bp-route-arrow { transform: none; }
    .bp-settle-collage { animation: none; }
    .bp-js .bp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ============================================================================
   POLISH — scroll reveals, stat counters, testimonial star rows, CTA band.
   ========================================================================== */


/* ─── P1. Scroll reveals ─────────────────────────────────────────────────
   Progressive enhancement: home.js stamps `bp-js` on <html> as soon as it
   runs, so sections are only ever hidden when JS is there to show them
   again. Without JS (or if the script fails) everything stays visible. */

.bp-js .bp-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.bp-js .bp-reveal.is-visible {
    opacity: 1;
    transform: none;
}


/* ─── P1b. Bigger stat numbers ───────────────────────────────────────────
   The shared .ba-stat strong is 32px (blueatlas.css); on the homepage the
   proof strip is the page's evidence center, so we size it up. */

.ba-stat strong {
    font-size: clamp(38px, 3.4vw, 46px);
    letter-spacing: -0.045em;
    line-height: 1.05;
    margin-bottom: 8px;
}

/* The .bp-count wrapper is a <span>, so the shared `.ba-stat span` label rule
   (13px, blueatlas.css) grabs it — restore the headline size inside <strong>. */
.ba-stat strong span {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}


/* ─── P2. Testimonial star row ───────────────────────────────────────── */

.bp-stars-row {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0 0 10px;
}

.bp-stars {
    color: var(--ba-gold);
    font-size: 14px;
    letter-spacing: 2px;
    line-height: 1;
}

.bp-google-mark {
    align-items: center;
    display: inline-flex;
    line-height: 0;
}

.bp-google-mark svg {
    display: block;
    height: 16px;
    width: 16px;
}


/* ─── P3. Closing CTA band ───────────────────────────────────────────── */

.bp-cta-band {
    background:
        radial-gradient(ellipse at 12% 20%, rgba(31, 95, 153, 0.38) 0%, transparent 52%),
        radial-gradient(ellipse at 86% 78%, rgba(201, 151, 61, 0.24) 0%, transparent 50%),
        var(--ba-navy, #0b1929);
    color: #ffffff;
    padding: 72px 0;
    position: relative;
}

.bp-cta-band-inner {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: space-between;
}

.bp-cta-band h2 {
    color: #ffffff;
    font-family: var(--ba-font);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 10px;
}

.bp-cta-band p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 16px;
    line-height: 1.55;
    margin: 0;
    max-width: 460px;
}

.bp-service-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.bp-service-area-link {
    border: 1px solid var(--ba-border, #e2e8f0);
    border-radius: 999px;
    color: var(--ba-navy, #14395c);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.bp-service-area-link:hover {
    background: var(--ba-navy, #14395c);
    color: #ffffff;
}

.bp-service-area-link--all {
    border-style: dashed;
}

.bp-cta-band-alt {
    font-size: 14px;
    margin-top: 12px;
}

.bp-cta-band-alt a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bp-cta-band-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.bp-cta-band-button {
    background: var(--ba-gold);
    border-color: var(--ba-gold);
    box-shadow: 0 10px 30px rgba(201, 151, 61, 0.28);
    color: var(--ba-ink, #0b1929);
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.bp-cta-band-button:hover {
    background: #d7a747;
    border-color: #d7a747;
    box-shadow: 0 16px 40px rgba(201, 151, 61, 0.36);
    color: var(--ba-ink, #0b1929);
    transform: translateY(-2px);
}

.bp-cta-band-phone {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.bp-cta-band-phone:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 960px) {
    .bp-cta-band { padding: 60px 0; }
    .bp-cta-band-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .bp-cta-band { padding: 52px 0; }
    .bp-cta-band-actions {
        gap: 14px;
        width: 100%;
    }
    .bp-cta-band-button {
        text-align: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bp-cta-band-button { transition: none; }
    .bp-cta-band-button:hover { transform: none; }
}
