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

:root {
    /* Colors */
    --primary-color: #e30813;
    --tech-card-bg: #131320;
    --tech-text: #c7c7c7;
    --tech-text-dim: #8888aa;
    --tech-border: rgba(255, 255, 255, 0.1);
    --bg-dark: #0a0a1a;
    --bg-darker: #0e0e25;
    --text-white: #ffffff;

    --scroll-duration: 30s;
    --team-scroll-progress: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    background-color: var(--bg-dark);
    color: var(--text-white);
}

/* --- Common / Utilities --- */
.bg-grid-pattern {
    background-image:
            linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-poster,
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster {
    z-index: -2;
}

.hero-video {
    z-index: -1;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-video.playing {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
}

.hero-main {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 5vw;
}

.hero-title {
    font-size: 13vw;
    font-weight: 900;
    line-height: 0.8;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    letter-spacing: 0.04em;
    opacity: 0.95;
    color: var(--text-white);
}

.hero-title-line {
    font-family: 'Tahoma', sans-serif;
    display: block;
    transform: translateY(50px);
    opacity: 0;
    animation: slideUpFade 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.hero-title-line-1 {
    animation-delay: 0.2s;
}

.hero-title-line-2 {
    animation-delay: 0.4s;
    color: transparent;
    -webkit-text-stroke: 3px rgba(255, 255, 255, 0.9);
}

.hero-title-line-3 {
    animation-delay: 0.6s;
}

.hero-footer {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding-bottom: 4rem;
    padding-right: 5vw;
}

.hero-desc-panel {
    max-width: 400px;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
    text-align: right;
}

.hero-panel-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-panel-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.hero-panel-line {
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.hero-desc-text {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

.hero-scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
}

.hero-scroll-mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background-color: var(--text-white);
    border-radius: 2px;
    animation: scrollMouse 2s infinite;
}

.hero-scroll-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Eagle 3 Section --- */
.eagle3-section {
    border-top: 4px solid var(--tech-border);
    background-color: var(--bg-dark);
    padding: 6rem 6rem 8rem 6rem;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Apply common grid pattern */
.eagle3-section,
.events-section,
.team-photo-section,
.crew-section,
.sponsors-section {
    background-image:
            linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.eagle3-container {
    max-width: 100rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.eagle3-content {
    flex: 1;
    z-index: 2;
    margin-right: 2rem;
}

.eagle3-title {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.eagle3-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 500;
}

.eagle3-desc {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--tech-text);
    max-width: 600px;
    margin-bottom: 2rem;
}

.eagle3-img-wrapper {
    flex: 1.5;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.eagle3-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

.eagle3-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 200, 0, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    filter: blur(40px);
}

/* --- Events Section --- */
.events-section {
    position: relative;
    color: var(--text-white);
    padding: 12rem 2rem 8rem 2rem;
    overflow: hidden;
    background-color: var(--bg-darker);
    clip-path: polygon(0 10vw, 100% 0, 100% 100%, 0 100%);
    transform: translateY(-10vw);
    margin-bottom: -10vw;
}

.events-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(10vw + 4px);
    background: var(--tech-border);
    clip-path: polygon(0 10vw, 100% 0, 100% 4px, 0 100%);
    z-index: 5;
}

.events-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.events-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 3.5rem;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.events-container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 1;
    max-width: 1200px;
}

.events-card {
    background-color: var(--tech-card-bg);
    width: 100%;
    max-width: 500px;
    position: relative;
    clip-path: polygon(20px 0, 100% 0,
    100% calc(100% - 20px), calc(100% - 20px) 100%,
    0 100%, 0 20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.events-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}

.events-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.02) 45%, transparent 50%);
    background-size: 200% 200%;
    transition: background-position 0.5s;
    pointer-events: none;
}

.events-card:hover::before {
    background-position: 100% 100%;
}

.events-card-border-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
}

.events-card-border-bottom {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
}

.events-card-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--tech-border);
    flex-shrink: 0;
}

.events-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) contrast(1.1);
    transition: filter 0.3s ease, transform 0.5s ease;
}

.events-card:hover .events-card-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.events-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.events-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    color: var(--text-white);
}

.events-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--tech-border);
    border-bottom: 1px solid var(--tech-border);
    padding: 1rem 0;
}

.events-card-meta-item {
    display: flex;
    flex-direction: column;
}

.events-card-meta-label {
    font-size: 0.7rem;
    color: var(--tech-text-dim);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.events-card-meta-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.events-card-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #bbb;
    margin-bottom: 2rem;
}

/* --- Team Photo Section --- */
.team-photo-section {
    background-color: var(--bg-dark);
    border-top: 4px solid var(--tech-border);
    padding: 10vh 0 10vh 0;
    height: 250vh;
    position: relative;
}

.team-photo-card {
    width: 90%;
    max-width: 100rem;
    height: 80vh;
    margin: 0 auto 2rem auto;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 10vh;
    isolation: isolate;
}

.team-photo-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.team-photo-title {
    position: absolute;
    top: -50%;
    width: 100%;
    height: 200%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18vw;
    font-weight: 900;
    text-transform: uppercase;
    mix-blend-mode: screen;
    line-height: 1;
    text-align: center;
    color: black;
    background-color: white;
    transform: translateY(0);
    /* centered vertically at start */
    transition:
            transform 0.1s linear,
            font-size 0.1s linear,
            background-color 0.1s linear,
            color 0.1s linear;

    /* Scroll Animation for Text (JS-driven for all browsers) */
    transform: translateY(calc(30vh * var(--team-scroll-progress)));
    transition: transform 0.05s linear;
}

/* --- Crew Section --- */
.crew-section {
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-darker);
    border-top: 4px solid var(--tech-border);
    border-bottom: 4px solid var(--tech-border);
}

.crew-title {
    font-size: 4rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-white);
}

.crew-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: center;
}

.crew-card {
    background-color: var(--tech-card-bg);
    width: 100%;
    position: relative;
    clip-path: polygon(20px 0, 100% 0,
    100% calc(100% - 20px), calc(100% - 20px) 100%,
    0 100%, 0 20px);
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 4rem 3rem;
}

.crew-member {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    transition: transform 0.3s ease;
    z-index: 1;
}

.crew-member:hover {
    transform: translateY(-5px);
}

.crew-member-photo-frame {
    width: 180px;
    height: 240px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    clip-path: polygon(15px 0, 100% 0,
    100% calc(100% - 15px), calc(100% - 15px) 100%,
    0 100%, 0 15px);
}

.crew-member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) contrast(1.1);
    background: radial-gradient(circle at center,
    #232f59 0%,
    #232f59 40%,
    #1a2344 100%);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.crew-member:hover .crew-member-photo {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.crew-member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.crew-member-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-white);
    letter-spacing: 0.5px;
}

.crew-member-role {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.crew-divider {
    height: 1px;
    width: 40px;
    background-color: var(--tech-border);
    margin-bottom: 1.5rem;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.crew-member:hover .crew-divider {
    width: 80px;
    background-color: var(--primary-color);
}

.crew-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.crew-contact-link {
    font-size: 0.85rem;
    color: var(--tech-text-dim);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 400;
    letter-spacing: 0.5px;
    border-bottom: 1px solid transparent;
}

.crew-contact-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.crew-vertical-divider {
    width: 1px;
    background-color: var(--tech-border);
    margin: 2rem 1rem;
    align-self: stretch;
    z-index: 1;
}

/* --- Sponsors Section --- */
.sponsors-section {
    text-align: center;
    background-color: var(--bg-dark);
    padding: 4rem 0;
    overflow: hidden;
    position: relative;
}

.sponsors-title {
    font-size: 4rem;
    margin-bottom: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-white);
}

.sponsors-scroll {
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.sponsors-track {
    display: flex;
    width: max-content;
    animation: scroll var(--scroll-duration, 20s) linear infinite;
}

.sponsors-tile {
    width: 200px;
    height: 120px;
    background: #ffffff;
    border-radius: 15px;
    margin: 0 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sponsors-tile:hover {
    transform: scale(1.05);
}

.sponsors-tile img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: filter 0.3s ease;
}

/* --- Animations --- */
@keyframes slideUpFade {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scrollMouse {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 10px);
        opacity: 0;
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- Media Queries --- */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        padding: 1rem;
    }

    .hero-main {
        grid-column: 1 / -1;
        padding-left: 0;
        justify-content: center;
        text-align: center;
    }

    .hero-title {
        font-size: 18vw;
        align-items: center;
    }

    .hero-title-line-2 {
        -webkit-text-stroke: 0px rgba(255, 255, 255, 0.9);
        color:white;
    }

    .hero-footer {
        grid-column: 1 / -1;
        justify-content: center;
        padding-right: 0;
        padding-bottom: 6rem;
    }

    .hero-desc-panel {
        text-align: center;
        max-width: 100%;
    }

    .hero-panel-header {
        justify-content: center;
    }

    .eagle3-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .eagle3-title {
        font-size: 3.5rem;
    }

    .eagle3-desc {
        margin: 0 auto;
    }

    .crew-card {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        padding: 4rem 2rem;
        clip-path: polygon(20px 0, 100% 0,
        100% calc(100% - 20px), calc(100% - 20px) 100%,
        0 100%, 0 20px);
    }

    .crew-vertical-divider {
        width: 80%;
        height: 1px;
        margin: 1rem 0;
    }

    .crew-member {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .team-photo-title {
        font-size: 18vw;
    }

    .sponsors-tile {
        width: 150px;
        height: 90px;
        margin: 0 15px;
    }

    .sponsors-track {
        width: calc(180px * 14);
    }

    .events-container {
        flex-direction: column;
        align-items: center;
    }
}
