/* =====================================================================
   Home page hero — modernized text column (headline, buttons, stats).
   Scoped to .hm-text inside the original hero in templates/index.html.
   ===================================================================== */

.hm-text {
    --hm-navy: #0b2545;
    --hm-blue: var(--chartedway-blue, #084992);
    --hm-green: var(--chartedway-green-dark, #28B463);
    --hm-ink-soft: #4a5a70;
    --hm-border: rgba(8, 73, 146, 0.12);
    padding-top: 25px;
}

/* ---- Headline ---- */
.hm-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 1.1rem + 1.6vw, 2.6rem);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: var(--hm-navy);
    margin-bottom: 1.25rem;
    text-wrap: balance;
}

.hm-title-org {
    color: var(--hm-blue);
}

.hm-title-accent {
    background: linear-gradient(90deg, var(--hm-blue) 0%, var(--hm-green) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

.hm-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--hm-ink-soft);
    margin-bottom: 1.5rem;
}

/* ---- Buttons ---- */
.hm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.75rem 0 2.25rem;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.hm-btn--primary {
    background: var(--hm-blue);
    color: #fff;
    box-shadow: 0 10px 24px -8px rgba(8, 73, 146, 0.55);
}

.hm-btn--primary:hover,
.hm-btn--primary:focus-visible {
    color: #fff;
    background: #063a75;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -10px rgba(8, 73, 146, 0.6);
}

.hm-btn--primary i {
    transition: transform 0.2s ease;
}

.hm-btn--primary:hover i {
    transform: translateX(3px);
}

.hm-btn--ghost {
    color: var(--hm-blue);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(8, 73, 146, 0.25);
}

.hm-btn--ghost:hover,
.hm-btn--ghost:focus-visible {
    color: var(--hm-blue);
    background: #fff;
    border-color: var(--hm-blue);
    transform: translateY(-2px);
}

.hm-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--hm-blue);
}

/* ---- Stats row ---- */
.hm-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2rem;
    margin-bottom: 1rem;
}

.hm-stat {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.hm-stat + .hm-stat {
    padding-left: 2rem;
    border-left: 1px solid var(--hm-border);
}

.hm-stat-num {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--hm-blue);
    letter-spacing: -0.02em;
}

.hm-stat-label {
    font-size: 0.85rem;
    color: var(--hm-ink-soft);
}

.hm-stat--season {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.hm-stat--season i {
    font-size: 1.6rem;
    color: var(--hm-green);
}

.hm-stat--season strong {
    font-family: var(--font-heading);
    color: var(--hm-navy);
}

@media (max-width: 575.98px) {
    .hm-stats {
        gap: 1rem 1.25rem;
    }

    .hm-stat + .hm-stat {
        padding-left: 1.25rem;
    }

    .hm-stat--season {
        flex-basis: 100%;
        padding-left: 0 !important;
        border-left: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-btn,
    .hm-btn--primary i {
        transition: none !important;
        transform: none !important;
    }
}

/* =====================================================================
   Photo reel sizing — grows with the screen on large displays.
   Overrides the fixed sizes in custom.css for the home page hero only.
   ===================================================================== */

/* Let the hero use more width on big monitors (Bootstrap caps at 1320px). */
@media (min-width: 1400px) {
    .hero-container {
        max-width: min(92vw, 1760px);
    }
}

/* Same 16:9 shape as most reel images, never taller than the window allows,
   so the benefit cards stay visible without scrolling. */
@media (min-width: 992px) {
    .hero-section .hero-card {
        width: 100%;
        aspect-ratio: 16 / 9;
        max-height: calc(100vh - 260px);
        min-height: 360px;
    }
}

@media (min-width: 1600px) {
    .hero-section .hero-card {
        border-radius: 28px;
    }
}

/* Caption and controls scale with the photo. Thumbnails were removed,
   so the caption can use the full width (custom.css reserved 130px). */
@media (min-width: 769px) {
    .hero-section .hero-card-caption {
        right: 24px;
    }

    .hero-section .hero-card-caption-text {
        font-size: clamp(17px, 0.55rem + 0.75vw, 24px);
    }
}

@media (min-width: 1600px) {
    .hero-section .hero-card-ctrl {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .hero-section .hero-benefit-text {
        font-size: 16px;
    }
}

/* =====================================================================
   Odd-shaped photos (tall, square, text graphics): show the whole image
   over a blurred copy of itself instead of cropping. The .is-contain class
   is added by the carousel script when the photo's shape doesn't match
   the box by more than 5%.
   ===================================================================== */
.hero-section .hero-card-slide.is-contain {
    background-image: none !important;   /* replaced by the two layers below */
    background-color: #0a2544;
}

/* blurred copy fills the box */
.hero-section .hero-card-slide.is-contain::before,
/* the whole photo, uncropped, on top */
.hero-section .hero-card-slide.is-contain::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--slide-img);
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

.hero-section .hero-card-slide.is-contain::before {
    inset: -40px;
    background-size: cover;
    filter: blur(28px) brightness(0.7) saturate(1.1);
}

.hero-section .hero-card-slide.is-contain::after {
    background-size: contain;
}
