/**
 * Lake City Ultrabots — FIRST Page
 * Sections: Hero · What is FIRST? · FIRST Program Ladder
 * Skills (section 3) and Team Story (section 5) CSS is shared — also loaded by our-team.astro
 */

/* ═══════════════════════════════════════════
   1. HERO
═══════════════════════════════════════════ */
.first-hero {
    position: relative;
    height: 72vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.first-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary, #cc0000);
    z-index: 3;
}

.first-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    transform: scale(1.04);
    transition: transform 10s ease;
}

.first-hero:hover .first-hero-bg {
    transform: scale(1);
}

.first-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

.first-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.first-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--primary, #cc0000);
    margin-bottom: 18px;
}

.first-hero-content h1 {
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 900;
    color: white;
    line-height: 1.08;
    margin-bottom: 22px;
    letter-spacing: -1.5px;
    max-width: 680px;
}

.first-hero-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.65;
    max-width: 540px;
}

/* ═══════════════════════════════════════════
   2. WHAT IS FIRST?
═══════════════════════════════════════════ */
.first-what {
    background: #ffffff;
    padding: 70px 0;
}

.first-what-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.first-logo-wrap {
    display: inline-block;
    background: var(--dark, #333);
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.first-logo {
    max-width: 210px;
    display: block;
    height: auto;
}

.first-what-text h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark, #333);
    line-height: 1.3;
    margin-bottom: 22px;
}

.first-what-stats {
    display: flex;
    gap: 28px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.what-stat-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary, #cc0000);
    line-height: 1;
}

.what-stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--gray, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.first-what-text p {
    color: var(--gray, #666);
    font-size: 1rem;
    line-height: 1.72;
    margin-bottom: 26px;
}

/* Video embed */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.15);
}

.video-responsive iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

@media (min-width: 900px) {
    .first-what-grid {
        grid-template-columns: 1fr 1fr;
        gap: 56px;
    }

    .first-what-text h2 {
        font-size: 1.8rem;
    }
}

/* ═══════════════════════════════════════════
   3. SKILLS THAT BUILD LIVES
═══════════════════════════════════════════ */
.first-skills {
    background: #111;
    padding: 0;
}

.first-skills-header {
    text-align: center;
    padding: 44px 20px 32px;
}

.first-skills-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.first-skills-header p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.05rem;
}

.first-skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
}

@media (min-width: 768px) {
    .first-skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.skill-photo-card {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.skill-photo-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.skill-photo-card:hover img {
    transform: scale(1.07);
}

.skill-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.94) 0%,
        rgba(0, 0, 0, 0.55) 55%,
        rgba(0, 0, 0, 0.08) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 22px 24px;
    transition: background 0.3s ease;
}

.skill-photo-card:hover .skill-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.97) 0%,
        rgba(0, 0, 0, 0.78) 65%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.skill-card-icon {
    font-size: 1.6rem;
    color: var(--primary, #cc0000);
    margin-bottom: 8px;
}

.skill-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 7px;
    line-height: 1.2;
}

.skill-card-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
    margin-bottom: 0;
}

.skill-card-realworld {
    font-size: 0.82rem;
    color: var(--primary, #cc0000);
    font-style: italic;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.skill-photo-card:hover .skill-card-realworld {
    max-height: 60px;
    opacity: 1;
    margin-top: 7px;
}

/* ═══════════════════════════════════════════
   4. FIRST PROGRAM LADDER
═══════════════════════════════════════════ */
.first-ladder {
    background-color: #1a1a1a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L0 31.8l12.98 7.5v6.35h-2v-5.2zM15 0v1.5l13 7.5 1.01-.59V0h-2v7.09L15 0zm0 49v-6.35l11-6.35 1 .58V49h-2v-5.35L15 49z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 28px 49px;
    padding: 72px 0 80px;
}

.first-ladder-header {
    text-align: center;
    margin-bottom: 56px;
}

.first-ladder-header h2 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.3px;
    margin-bottom: 10px;
}

.first-ladder-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

/* Desktop: horizontal 4-column with connecting line */
.ladder-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
    padding-top: 8px;
}

.ladder-steps::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 0;
}

/* Highlight the line from FLL all the way to FRC */
.ladder-steps::after {
    content: '';
    position: absolute;
    top: 35px;
    left: 12.5%;
    width: 50%;
    height: 2px;
    background: var(--primary, #cc0000);
    z-index: 0;
}

.ladder-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.ladder-step-badge {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.ladder-step.active .ladder-step-badge {
    width: 68px;
    height: 68px;
    background: var(--primary, #cc0000);
    border-color: var(--primary, #cc0000);
    color: white;
    font-size: 0.8rem;
    box-shadow: 0 0 0 5px rgba(204, 0, 0, 0.25);
    margin-bottom: 14px;
}

.ladder-step-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
    line-height: 1.2;
}

.ladder-step.active .ladder-step-name {
    color: var(--primary, #cc0000);
}

.ladder-step-age {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    margin-bottom: 10px;
}

.ladder-step-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.55;
}

.ladder-step.active .ladder-step-desc {
    color: rgba(255, 255, 255, 0.75);
}

.ladder-you-are-here {
    display: inline-block;
    background: var(--primary, #cc0000);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 10px;
}

/* Clickable ladder steps */
a.ladder-step {
    text-decoration: none;
}

a.ladder-step:hover .ladder-step-badge {
    border-color: rgba(204, 0, 0, 0.6);
    background: rgba(204, 0, 0, 0.14);
    color: white;
    transform: scale(1.08);
}

a.ladder-step.active:hover .ladder-step-badge {
    box-shadow: 0 0 0 9px rgba(204, 0, 0, 0.3);
    transform: scale(1.05);
}

a.ladder-step:not(.active):hover .ladder-step-name {
    color: var(--primary, #cc0000);
}

/* Mobile: vertical list */
@media (max-width: 767px) {
    .ladder-steps {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 0;
    }

    .ladder-steps::before,
    .ladder-steps::after {
        display: none;
    }

    .ladder-step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 18px;
    }

    .ladder-step-badge {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .ladder-step.active .ladder-step-badge {
        margin-bottom: 0;
    }

    .ladder-step-content {
        flex: 1;
    }
}

/* ═══════════════════════════════════════════
   5. TEAM STORY
═══════════════════════════════════════════ */
.first-team-story {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0;
    background: var(--dark, #333);
}

@media (min-width: 900px) {
    .first-team-story {
        grid-template-columns: 1fr 1fr;
        min-height: 520px;
    }
}

.first-story-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 260px 260px;
}

@media (max-width: 899px) {
    .first-story-photos {
        grid-template-rows: 220px 220px;
    }
}

.story-photo {
    overflow: hidden;
}

.story-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.story-photo:hover img {
    transform: scale(1.05);
}

.story-photo.large {
    grid-row: span 2;
}

.first-story-content {
    background: var(--dark, #333);
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary, #cc0000);
    margin-bottom: 14px;
}

.first-story-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.3px;
    margin-bottom: 28px;
}

.story-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.story-stat {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px 10px;
    text-align: center;
}

.story-stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary, #cc0000);
    line-height: 1;
    margin-bottom: 6px;
}

.story-stat-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.first-story-content p {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
    line-height: 1.72;
    margin-bottom: 28px;
}

.btn-outline-light {
    display: inline-block;
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 11px 26px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.25s ease;
    align-self: flex-start;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
   MOBILE GENERAL
═══════════════════════════════════════════ */
@media (max-width: 600px) {
    .first-hero-content {
        padding: 0 24px;
    }

    .first-skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-photo-card {
        aspect-ratio: 16 / 9;
    }

    /* Show real-world callout always on mobile (no hover) */
    .skill-card-realworld {
        max-height: 60px;
        opacity: 1;
        margin-top: 6px;
    }

    .first-story-photos {
        grid-template-rows: 180px 180px;
    }

    .first-story-content {
        padding: 40px 28px;
    }

    .story-stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .story-stat-num {
        font-size: 1.4rem;
    }
}
