/* ===================================
   FAMILY COASTER - VIDEO GATE + GRID
   Loaded LAST, so it also carries a few
   light-theme fixups for hero elements
   whose colors were hardcoded elsewhere.
   =================================== */

/* ---- Hero: cheerful coaster orbs (override old amber) ---- */
.hero::before {
    background:
        radial-gradient(ellipse 600px 600px at 15% 45%, rgba(214, 57, 15, 0.14) 0%, transparent 70%),
        radial-gradient(ellipse 520px 520px at 85% 70%, rgba(29, 158, 150, 0.13) 0%, transparent 70%),
        radial-gradient(ellipse 460px 360px at 55% 8%, rgba(255, 183, 3, 0.16) 0%, transparent 65%);
}
.hero::after {
    background:
        linear-gradient(135deg,
            transparent 0%,
            rgba(58, 134, 255, 0.03) 25%,
            transparent 50%,
            rgba(255, 183, 3, 0.04) 75%,
            transparent 100%);
    background-size: 400% 400%;
}

/* Brand accent word (nav) */
.nav-brand span { color: var(--accent-primary); }

/* Chip/eyebrow labels: darker accent so small uppercase text passes AA on light chips */
.section-label, .hero-label { color: var(--accent-darker); }

/* ===================================
   VIDEOS SECTION SHELL
   =================================== */
.video-stage {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* ===================================
   VIDEO GRID (facade cards)
   =================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-6);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.video-card {
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 9 / 16;
    border: none;
    padding: 0;
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-md);
    text-align: left;
    font: inherit;
    color: var(--text-primary);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.video-card:hover,
.video-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    outline: none;
}

.video-card:focus-visible {
    outline: 3px solid var(--fun-blue);
    outline-offset: 2px;
}

/* Thumbnail fills the card, caption overlays the bottom */
.video-card__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark gradient so overlaid text is always legible on any thumbnail */
.video-card__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(15, 18, 34, 0.88) 0%,
        rgba(15, 18, 34, 0.55) 46%,
        rgba(15, 18, 34, 0) 80%);
}

/* Play badge */
.video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(15, 18, 34, 0.35);
    transition: transform 0.3s var(--ease-out), background 0.3s ease;
}
.video-card__play::before {
    content: '';
    width: 0;
    height: 0;
    margin-left: 5px;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent var(--accent-primary);
}
.video-card:hover .video-card__play,
.video-card:focus-visible .video-card__play {
    transform: translate(-50%, -50%) scale(1.12);
    background: #ffffff;
}

/* Caption block at the bottom */
.video-card__caption {
    position: relative;
    margin-top: auto;
    padding: var(--space-4);
    z-index: 1;
}
.video-card__num {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fun-yellow);
    margin-bottom: var(--space-1);
}
.video-card__title {
    font-size: var(--text-base);
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 var(--space-1);
    text-shadow: 0 1px 3px rgba(15, 18, 34, 0.7);
}
.video-card__sub {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(15, 18, 34, 0.7);
}

/* Injected iframe replaces the card face on click */
.video-card.is-playing {
    cursor: default;
    aspect-ratio: 9 / 16;
}
.video-card.is-playing:hover { transform: none; }
.video-card iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===================================
   LOCKED STATE (video wall behind glass)
   =================================== */
.video-stage.locked .video-grid {
    filter: blur(9px) saturate(1.05) brightness(0.92);
    transform: scale(1.03);
    pointer-events: none;
    user-select: none;
}
.video-stage.locked .video-card { box-shadow: none; }

/* ===================================
   THE EMAIL GATE
   =================================== */
.video-gate {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    z-index: 5;
}
.video-stage:not(.locked) .video-gate { display: none; }

.video-gate__card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 250, 246, 0.97);
    border: 1px solid var(--executive-steel);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-8) var(--space-6);
    text-align: center;
}

.video-gate__icon {
    font-size: 2.75rem;
    line-height: 1;
    margin-bottom: var(--space-3);
}
.video-gate__title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}
.video-gate__subtitle {
    font-size: var(--text-base);
    color: var(--text-tertiary);
    margin-bottom: var(--space-5);
}

.video-gate__benefits {
    list-style: none;
    margin: 0 0 var(--space-6);
    padding: 0;
    display: grid;
    gap: var(--space-2);
    text-align: left;
}
.video-gate__benefits li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}
.video-gate__benefits li span[aria-hidden] {
    flex-shrink: 0;
    font-size: 1.15rem;
    line-height: 1.4;
}

.video-gate__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.video-gate__input {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--text-base);
    font-family: inherit;
    color: var(--text-primary);
    background: #ffffff;
    border: 2px solid var(--executive-steel);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.video-gate__input::placeholder { color: var(--text-muted); }
.video-gate__input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(214, 57, 15, 0.15);
}

.video-gate__privacy {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin: var(--space-3) 0 0;
}

/* ===================================
   SUCCESS BANNER (after unlock)
   =================================== */
.video-unlocked-banner {
    display: none;
    max-width: 640px;
    margin: 0 auto var(--space-10);
    padding: var(--space-5) var(--space-6);
    text-align: center;
    background: linear-gradient(135deg, var(--fun-teal) 0%, #178f88 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.5s var(--ease-out) both;
}
.video-unlocked-banner.show { display: block; }
.video-unlocked-banner h3 {
    color: #ffffff;
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}
.video-unlocked-banner p {
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    font-size: var(--text-base);
}

/* ===================================
   HERO COASTER CANVAS
   =================================== */
.hero-coaster {
    display: block;
    width: 100%;
    max-width: 900px;
    height: 190px;
    margin: var(--space-8) auto 0;
    position: relative;
    z-index: 1;
}

/* ===================================
   OUR STORY (the letter)
   =================================== */
.story { background: var(--bg-primary); }
.letter { max-width: 660px; margin: 0 auto; }
.letter .lead {
    font-family: Georgia, "Iowan Old Style", Palatino, "Times New Roman", serif;
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    line-height: 1.45; letter-spacing: -0.01em;
    color: var(--text-primary); margin: 0 0 var(--space-5);
}
.letter p {
    font-family: Georgia, "Iowan Old Style", Palatino, "Times New Roman", serif;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.75; color: var(--text-secondary); margin: 0 0 var(--space-5);
}
.letter .em { color: var(--accent-primary); font-weight: 600; }
.letter .sign {
    font-family: Georgia, "Iowan Old Style", Palatino, serif;
    font-size: 1.6rem; font-style: italic; color: var(--text-primary); margin-top: var(--space-2);
}
.letter .sign small {
    display: block; font-family: inherit; font-style: normal;
    font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--text-muted); margin-top: var(--space-1);
}

/* Fear meter */
.fearmeter {
    max-width: 660px; margin: var(--space-8) auto 0;
    background: #ffffff; border: 1px solid var(--executive-steel);
    border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6);
    box-shadow: var(--shadow-sm);
}
.fearmeter__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-3); }
.fearmeter__top b { font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.fearmeter__top span { font-family: Georgia, serif; font-style: italic; color: var(--fun-teal); font-weight: 600; }
.fearmeter__track { height: 14px; border-radius: 999px; background: var(--bg-tertiary); overflow: hidden; border: 1px solid var(--executive-steel); }
.fearmeter__fill {
    height: 100%; width: 0;
    background: linear-gradient(90deg, #7A5CFF, var(--accent-primary) 55%, var(--fun-yellow));
    border-radius: 999px; transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fearmeter__labels { display: flex; justify-content: space-between; margin-top: var(--space-3); font-size: var(--text-sm); }
.fearmeter__labels span { color: var(--text-tertiary); }
.fearmeter__labels .now { color: var(--accent-primary); font-weight: 700; }

/* Awareness pull-quote */
.callout {
    max-width: 660px; margin: var(--space-8) auto 0;
    background: #ffffff; border: 1px solid var(--executive-steel);
    border-left: 6px solid var(--accent-primary);
    border-radius: var(--radius-lg); padding: var(--space-6) var(--space-6); box-shadow: var(--shadow-sm);
}
.callout .big {
    font-weight: 800; letter-spacing: -0.02em;
    font-size: clamp(1.4rem, 3.4vw, 1.9rem); line-height: 1.12;
    color: var(--text-primary); margin: 0 0 var(--space-3);
}
.callout .big s { color: var(--text-muted); text-decoration-thickness: 3px; }
.callout .big em { color: var(--accent-primary); font-style: normal; }
.callout p { font-family: Georgia, serif; font-size: 1.05rem; color: var(--text-tertiary); margin: 0; line-height: 1.6; }

/* Confetti (fixed overlay, fired on unlock) */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 640px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-4);
    }
    .video-gate__card { padding: var(--space-6) var(--space-5); }
}

/* ===================================
   REDUCED MOTION
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .video-grid,
    .video-card,
    .video-card__play,
    .video-unlocked-banner {
        transition: none !important;
        animation: none !important;
    }
    .video-card:hover { transform: none; }
}
