/* ===========================
   Base
   =========================== */
:root {
    --navy: #050d24;
    --deep: #0a1a3f;
    --blue: #1e5eff;
    --sky: #3fa9ff;
    --cyan: #5ee7ff;
    --white: #f2f6ff;
    --muted: #9fb3d9;
    --radius: 22px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: "Outfit", system-ui, sans-serif;
    background: var(--navy);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container { width: min(1150px, 90%); margin: 0 auto; }

.gradient-text {
    background: linear-gradient(90deg, var(--sky), var(--cyan), var(--blue), var(--sky));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 6s linear infinite;
}

@keyframes shine { to { background-position: 300% 0; } }

/* ===========================
   Navigation
   =========================== */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 5%;
    transition: background .4s, padding .4s, box-shadow .4s;
}

.nav.scrolled {
    background: rgba(5, 13, 36, .8);
    backdrop-filter: blur(14px);
    padding: .9rem 5%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

.nav__logo { font-weight: 900; font-size: 1.4rem; letter-spacing: 2px; }
.nav__logo span { color: var(--sky); }

.nav__links { display: flex; gap: 2.2rem; list-style: none; }

.nav__links a {
    position: relative;
    font-weight: 600;
    opacity: .85;
    transition: opacity .3s;
}

.nav__links a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 100%; height: 2px;
    background: var(--cyan);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s ease;
}

.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav__toggle span { width: 26px; height: 3px; background: var(--white); border-radius: 3px; transition: .3s; }

/* ===========================
   Hero (big class photo)
   =========================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 680px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
    overflow: hidden;
    background: var(--navy);
}

/* Class photo — full screen, framed on the students */
.hero__image {
    position: absolute;
    inset: -4%;
    background:
        url("images/class-photo.jpg") center 38% / cover no-repeat,
        var(--deep);
    animation: heroIn 2.2s cubic-bezier(.2, .8, .2, 1) both,
               kenburns 26s ease-in-out 2.2s infinite alternate;
    will-change: transform;
}

@keyframes heroIn {
    from { transform: scale(1.18); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

@keyframes kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.06) translate(-1%, -1%); }
}

/* Light tint: keeps faces visible, darkens only the edges for text and nav */
.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 13, 36, .6) 0%, transparent 18%, transparent 50%, rgba(5, 13, 36, .9) 100%),
        linear-gradient(270deg, rgba(5, 13, 36, .55) 0%, transparent 45%),
        linear-gradient(120deg, rgba(30, 94, 255, .18), rgba(94, 231, 255, .06));
}

/* Glowing blue frame around the photo */
.hero::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(94, 231, 255, .35);
    border-radius: 28px;
    pointer-events: none;
    z-index: 2;
    box-shadow: inset 0 0 60px rgba(30, 94, 255, .25);
    animation: fadeUp 1.5s ease 1.6s both;
}

.hero__particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .6; }

.hero__content {
    position: relative;
    z-index: 3;
    padding: 0 6% 7.5rem;
    max-width: 760px;
}

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 6px;
    font-weight: 600;
    color: var(--cyan);
    margin-bottom: 1rem;
}

.hero__title {
    font-size: clamp(2.6rem, 6.5vw, 5.8rem);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -2px;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .6);
}

.hero__line { display: block; overflow: hidden; }

.hero__line > span {
    display: inline-block;
    transform: translateY(110%);
    animation: lineUp 1s cubic-bezier(.2, .8, .2, 1) forwards;
}

.hero__line:nth-child(2) > span { animation-delay: .25s; }

@keyframes lineUp { to { transform: translateY(0); } }

.hero__subtitle {
    max-width: 520px;
    margin: 1.2rem 0 1.8rem auto;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: #e3ecff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}

.hero__cta { display: flex; gap: 1rem; justify-content: flex-end; flex-wrap: wrap; }

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp .9s cubic-bezier(.2, .8, .2, 1) forwards;
    animation-delay: var(--d, .6s);
}

@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero__scroll { position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%); z-index: 2; }

.hero__mouse {
    display: block;
    width: 28px; height: 46px;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 20px;
    position: relative;
}

.hero__mouse span {
    position: absolute;
    top: 8px; left: 50%;
    width: 4px; height: 8px;
    margin-left: -2px;
    background: var(--cyan);
    border-radius: 4px;
    animation: scrollDot 1.8s infinite;
}

@keyframes scrollDot {
    0%   { opacity: 0; transform: translateY(0); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(16px); }
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-block;
    padding: .95rem 2.1rem;
    border-radius: 50px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}

.btn--primary {
    background: linear-gradient(135deg, var(--blue), var(--sky));
    box-shadow: 0 10px 30px rgba(30, 94, 255, .45);
}

.btn--primary::before {
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
    transition: left .6s;
}

.btn--primary:hover::before { left: 140%; }

.btn--ghost { border: 2px solid rgba(255, 255, 255, .6); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }

.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(63, 169, 255, .45); }

/* Download button */
.btn--download { display: inline-flex; align-items: center; gap: .55rem; border-color: var(--cyan); }
.btn--download svg { transition: transform .3s; }
.btn--download:hover svg { animation: bounceDown .8s ease infinite; }
.btn--download.done { background: rgba(94, 231, 255, .2); }

@keyframes bounceDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ===========================
   Marquee
   =========================== */
.marquee {
    background: linear-gradient(90deg, var(--blue), var(--sky));
    padding: 1rem 0;
    overflow: hidden;
    transform: rotate(-1.5deg) scale(1.03);
    margin: -1rem 0 0;
    position: relative;
    z-index: 3;
}

.marquee__track { display: flex; gap: 3rem; width: max-content; animation: marquee 25s linear infinite; }

.marquee__track span { font-weight: 800; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 2px; white-space: nowrap; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ===========================
   Sections
   =========================== */
.section { padding: 7.5rem 0; position: relative; }

.section__title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 1rem;
}

.section__lead {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    color: var(--muted);
    font-size: 1.15rem;
}

/* Scroll reveal */
.reveal, .reveal-left, .reveal-right {
    opacity: 0;
    transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
    transition-delay: var(--d, 0s);
}

.reveal       { transform: translateY(50px); }
.reveal-left  { transform: translateX(-80px); }
.reveal-right { transform: translateX(80px); }

.visible { opacity: 1; transform: none; }

/* Stats */
.stats {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(30, 94, 255, .18), rgba(94, 231, 255, .05));
    border: 1px solid rgba(63, 169, 255, .25);
}

.stat__num {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: var(--cyan);
}

.stat__label { color: var(--muted); font-weight: 600; }

/* Passion cards */
.passions { background: linear-gradient(180deg, var(--navy), var(--deep) 50%, var(--navy)); }

.cards {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.card {
    position: relative;
    padding: 2.6rem 2.2rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(63, 169, 255, .25);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    overflow: hidden;
    scroll-margin-top: 120px;
}

.card.visible { transition: transform .15s ease-out, opacity .9s, box-shadow .3s; }

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(94, 231, 255, .25), transparent 50%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.card:hover::before { opacity: 1; }
.card:hover { box-shadow: 0 25px 60px rgba(30, 94, 255, .35); }

.card__icon {
    width: 80px; height: 80px;
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--blue), var(--sky));
    margin-bottom: 1.6rem;
    transform: translateZ(40px);
    box-shadow: 0 10px 25px rgba(30, 94, 255, .5);
}

.card__icon--ball  { animation: spin 6s linear infinite; }
.card__icon--shirt { animation: swing 3s ease-in-out infinite; transform-origin: top center; }
.card__icon--palm  { animation: sway 4s ease-in-out infinite; transform-origin: bottom center; }

@keyframes spin  { to { rotate: 360deg; } }
@keyframes swing { 0%, 100% { rotate: -8deg; } 50% { rotate: 8deg; } }
@keyframes sway  { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }

.card h3 { font-size: 1.7rem; margin-bottom: .7rem; transform: translateZ(30px); }
.card p  { color: var(--muted); margin-bottom: 1.2rem; }

.card__list { list-style: none; }
.card__list li { padding: .35rem 0 .35rem 1.6rem; position: relative; }
.card__list li::before { content: "➜"; position: absolute; left: 0; color: var(--cyan); }

/* Feature rows */
.feature__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature--reverse .feature__text { order: 2; }

.tag {
    display: inline-block;
    padding: .35rem 1rem;
    border-radius: 50px;
    background: rgba(63, 169, 255, .15);
    border: 1px solid var(--sky);
    color: var(--cyan);
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature__text h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; margin-bottom: 1.2rem; }
.feature__text p  { color: var(--muted); font-size: 1.1rem; }

.feature__visual {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    background: linear-gradient(145deg, #0f2a6b, #123b9a);
    border: 1px solid rgba(63, 169, 255, .3);
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
}

/* Pitch animation */
.pitch { position: absolute; inset: 8%; border: 3px solid rgba(255, 255, 255, .35); border-radius: 10px; }
.pitch__line { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: rgba(255, 255, 255, .35); }

.pitch__circle {
    position: absolute;
    left: 50%; top: 50%;
    width: 30%; aspect-ratio: 1;
    border: 3px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.pitch__ball {
    position: absolute;
    font-size: 2.4rem;
    animation: ballPath 6s ease-in-out infinite;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .4));
}

@keyframes ballPath {
    0%   { left: 10%; top: 60%; rotate: 0deg; }
    25%  { left: 45%; top: 15%; rotate: 360deg; }
    50%  { left: 80%; top: 45%; rotate: 720deg; }
    75%  { left: 45%; top: 75%; rotate: 1080deg; }
    100% { left: 10%; top: 60%; rotate: 1440deg; }
}

/* Hangers animation */
.hangers { display: flex; gap: 1.4rem; }

.hanger {
    font-size: clamp(2.5rem, 5vw, 4rem);
    animation: float 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * .3s);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, .35));
}

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }

/* Elche banner */
.elche-banner {
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(30, 94, 255, .35), transparent 70%);
    overflow: hidden;
}

.elche-banner__palms { display: flex; justify-content: center; gap: 2rem; font-size: 3rem; margin-bottom: 1.5rem; }

.elche-banner__palms span { animation: sway 4s ease-in-out infinite; transform-origin: bottom center; display: inline-block; }
.elche-banner__palms span:nth-child(even) { animation-delay: -2s; }

.elche-banner__title { font-size: clamp(3rem, 9vw, 7rem); font-weight: 900; line-height: 1; margin-bottom: 1.2rem; }

/* Footer */
.footer {
    padding: 2.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid rgba(63, 169, 255, .2);
    color: var(--muted);
}

.footer__top { color: var(--sky); font-weight: 600; }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 820px) {
    .nav__toggle { display: flex; }

    .nav__links {
        position: fixed;
        top: 0; right: 0;
        height: 100vh;
        width: 70%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(5, 13, 36, .97);
        transform: translateX(100%);
        transition: transform .4s ease;
    }

    .nav__links.open { transform: none; }
    .nav__toggle { z-index: 101; }

    .feature__grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .feature--reverse .feature__text { order: 0; }

    /* Phones: centre the text at the bottom of the photo */
    .hero { justify-content: center; text-align: center; }
    .hero__content { padding-bottom: 6.5rem; }
    .hero__subtitle { margin: 1rem auto 1.5rem; }
    .hero__cta { justify-content: center; }
    .hero::after { inset: 8px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal, .reveal-left, .reveal-right, .reveal-up, .hero__line > span { opacity: 1; transform: none; }
}
