:root {
    --red: #e3141c;
    --red-deep: #b80f16;
    --ink: #1d2433;
    --yellow: #ffd21f;
    --lime: #b4d83e;
    --green: #4cbf84;
    --green-deep: #145030;
    --cream: #fbfbeb;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.hero img {
    max-width: 100%;
}

/* ===================================================
BASE = PHONE / TABLET (stacked layout)
=================================================== */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--cream);
    padding-top: 22px;
}

.hero,
.hero * {
    box-sizing: border-box;
}

.hero .wrap {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    padding-inline: 18px;
}

/* top bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.brand-logo {
    display: block;
    line-height: 1;
    text-decoration: none;
    color: var(--ink);
    flex: none;
}

.brand-logo .word {
    display: block;
    font-weight: 900;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    color: var(--red);
}

.brand-logo .word small {
    font-size: 1.4rem;
    font-weight: 900;
}

.brand-logo .tag {
    display: block;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 2px solid var(--ink);
    font-size: 0.625rem;
    font-weight: 600;
}

.tagline-badge {
    display: block;
    height: 34px;
    width: auto;
}

/* headline (cream area) */
.hero-top {
    text-align: center;
    padding-bottom: 30px;
}

.h-formula {
    display: block;
    margin: 0;
    font-weight: 900;
    color: var(--red);
    font-size: clamp(3.1rem, 15.5vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.025em;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.07);
}

.booklet-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(84%, 440px);
    aspect-ratio: 643/96;
    margin: 0.5rem auto 0.75rem;
    background: url("https://cdn.motion.ac.in/ssp/img/formula-booklet-img/Booklet-green-pill.png") center/100% 100% no-repeat;
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.5rem, 8vw, 2.9rem);
    letter-spacing: 0.28em;
    text-indent: 0.28em;
    line-height: 1;
}

.class-line {
    display: block;
    width: min(88%, 400px);
    height: auto;
    margin: 0 auto;
}

/* green area */
.hero-lower {
    position: relative;
    text-align: center;
    padding: 38px 18px 0;
    margin-inline: -18px;
    background: var(--green-deep) url("https://cdn.motion.ac.in/ssp/img/formula-booklet-img/Motion-Background-Portrait-464x1676.png") center bottom / 100% auto no-repeat;
    border-top: 9px solid var(--lime);
    border-radius: 50% 50% 0 0 / 34px 34px 0 0;
}

.subjects {
    display: block;
    width: min(86%, 500px);
    height: auto;
    margin: 0 auto;
}

.cta-wrap {
    position: relative;
    width: min(100%, 420px);
    margin: 26px auto 0;
}

.rays {
    position: absolute;
    left: -4px;
    top: -20px;
    width: 32px;
    z-index: 2;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    aspect-ratio: 665/108;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    background: url("https://cdn.motion.ac.in/ssp/img/formula-booklet-img/Red-button-base.png") center/100% 100% no-repeat;
    font-weight: 700;
    font-size: clamp(0.9rem, 4.3vw, 1.3rem);
    letter-spacing: 0.005em;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
    transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-download:hover,
.btn-download:focus-visible {
    color: #fff;
    transform: translateY(-2px);
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4));
}

.btn-download:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 4px;
    border-radius: 999px;
}

.btn-download:active {
    transform: translateY(1px);
}

.btn-download .ico,
.btn-download .div {
    height: clamp(24px, 6.6vw, 34px);
    width: auto;
}

.btn-download b {
    color: var(--yellow);
    font-weight: 700;
}

/* visual */
.visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1/0.95;
    margin-top: 28px;
}

.tablet {
    position: absolute;
    z-index: 3;
    left: 2%;
    top: 0;
    width: 60%;
    animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}

.student {
    position: absolute;
    z-index: 2;
    right: -3%;
    bottom: 0;
    width: 60%;
}

.books {
    position: absolute;
    z-index: 4;
    right: -2%;
    bottom: -3px;
    width: 28%;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (min-width: 576px) {
    .hero {
        padding-top: 30px;
    }

    .brand-logo .word {
        font-size: 2.1rem;
    }

    .brand-logo .word small {
        font-size: 1.7rem;
    }

    .brand-logo .tag {
        font-size: 0.72rem;
    }

    .tagline-badge {
        height: 42px;
    }

    .h-formula {
        font-size: 5.4rem;
    }

    .booklet-pill {
        font-size: 2.7rem;
    }

    .btn-download {
        font-size: 1.3rem;
    }

    .visual {
        max-width: 620px;
        margin-inline: auto;
    }
}

/* ===================================================
DESKTOP (>=1100px): banner-faithful stage.
Everything is positioned in % of the stage and sized in
cqw, so the whole composition scales together.
=================================================== */
@media (min-width: 1100px) {
    .hero {
        padding: 0;
    }

    .hero .wrap {
        max-width: 1920px;
        padding: 0;
    }

    .hero-lower {
        margin-inline: 0;
        padding: 0;
    }

    .stage {
        position: relative;
        width: 100%;
        aspect-ratio: 1942/809;
        container-type: inline-size;
        background: var(--cream) url("https://cdn.motion.ac.in/ssp/img/formula-booklet-img/Motion-Background-Desktop-1440x600.png") center/100% 100% no-repeat;
    }

    .topbar,
    .hero-top,
    .hero-lower,
    .copy-lower,
    .visual,
    .hero-top h1 {
        display: contents;
    }

    .stage .brand-logo {
        position: absolute;
        left: 3.2%;
        top: 4.6%;
    }

    .brand-logo .word {
        font-size: clamp(1.8rem, 3.1cqw, 3.6rem);
    }

    .brand-logo .word small {
        font-size: 0.8em;
    }

    .brand-logo .tag {
        font-size: clamp(0.7rem, 1.05cqw, 1.2rem);
        margin-top: 0.3em;
        padding-top: 0.3em;
    }

    .tagline-badge {
        position: absolute;
        left: 82.8%;
        top: 4.6%;
        width: 15.3%;
        height: auto;
    }

    /* left column, centred on x = 35.5% like the banner */
    .h-formula,
    .booklet-pill,
    .class-line,
    .subjects,
    .cta-wrap {
        position: absolute;
        left: 35.5%;
        transform: translateX(-50%);
        margin: 0;
    }

    .h-formula {
        top: 15.8%;
        font-size: 8.4cqw;
        white-space: nowrap;
    }

    .booklet-pill {
        top: 34.4%;
        width: 33%;
        font-size: 4.3cqw;
    }

    .class-line {
        top: 49.2%;
        width: 29.8%;
    }

    .subjects {
        top: 58.4%;
        width: 35.8%;
    }

    .cta-wrap {
        top: 80.8%;
        width: 34%;
    }

    .rays {
        left: -5%;
        top: -22%;
        width: 8%;
    }

    .btn-download {
        font-size: clamp(0.95rem, 1.85cqw, 1.9rem);
        gap: 1.1cqw;
    }

    .btn-download .ico,
    .btn-download .div {
        height: 3.1cqw;
    }

    /* right column */
    .tablet {
        left: 57.2%;
        top: 16%;
        width: 29.9%;
        animation-name: riseDesk;
    }

    .student {
        left: 79.5%;
        right: auto;
        top: 22%;
        bottom: auto;
        width: 24.5%;
    }

    .books {
        left: 90.2%;
        right: auto;
        top: 72%;
        bottom: auto;
        width: 9.8%;
    }

    @keyframes riseDesk {
        from {
            opacity: 0;
            transform: translateY(40px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* ===================== LEAD FORM MODAL ===================== */
#leadModal .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    font-family: "Poppins", sans-serif;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

#leadModal .lead-head {
    position: relative;
    padding: 22px 24px 18px;
    background: #fff;
    color: #000;
    border-bottom: 1px solid #b4d83e;
    text-align: center;
}

#leadModal .lead-head h2 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
}

#leadModal .lead-head p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

#leadModal .btn-close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: none;
    background: #fff;
}

#leadModal .modal-body {
    padding: 22px 24px 26px;
    background: #fff;
}

#leadModal label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1d2433;
}

#leadModal label span {
    color: #e3141c;
}

#leadModal .form-control,
#leadModal .form-select {
    border-radius: 10px;
    border: 1.5px solid #cfd8d2;
    font-size: 0.95rem;
}

#leadModal .form-control:focus,
#leadModal .form-select:focus {
    border-color: #4cbf84;
    box-shadow: 0 0 0 0.2rem rgba(76, 191, 132, 0.25);
}

#leadModal .btn-submit {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    background: linear-gradient(180deg, #f0262d, #b80f16);
    box-shadow: 0 6px 16px rgba(227, 20, 28, 0.35);
}

#leadModal .btn-submit:focus-visible {
    outline: 3px solid #ffd21f;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .tablet {
        animation: none;
    }

    .btn-download {
        transition: none;
    }
}

@media (max-width:767px) {
    .student {
        display: none;
    }

    .tablet {
        left: 8%;
        top: 0;
        width: 80%;
    }
}