/* Responsive corrections for the Figma-aligned public homepage. */

@media (max-width: 1260px) {
    .eb-hero__copy {
        left: var(--eb-gutter);
        width: 445px;
    }

    .eb-hero__visual {
        left: 470px;
        transform: scale(0.94);
        transform-origin: top left;
    }

    .eb-hero__messages {
        width: 560px;
    }

    .eb-message--teacher {
        width: 525px;
    }

    .eb-founding-card {
        grid-template-columns: 165px minmax(280px, 0.9fr) minmax(380px, 1.1fr);
        gap: 30px;
        padding-inline: 42px;
    }

    .eb-founding-seal {
        width: 155px;
    }

    .eb-footer__brand-column {
        gap: 56px;
    }
}

@media (max-width: 1050px) {
    :root {
        --eb-gutter: 28px;
    }

    .eb-hero {
        min-height: 690px;
    }

    .eb-hero__copy {
        top: 160px;
        width: 410px;
    }

    .eb-hero__title {
        font-size: 48px;
    }

    .eb-hero__visual {
        left: 430px;
        transform: scale(0.87);
    }

    .eb-hero__messages {
        top: 350px;
        width: 520px;
    }

    .eb-message--teacher {
        width: 490px;
    }

    .eb-message p {
        font-size: 13px;
    }

    .eb-level-card {
        height: 420px;
        grid-template-rows: 175px 245px;
    }

    .eb-founding-card {
        grid-template-columns: 145px minmax(260px, 1fr);
    }

    .eb-founding-seal {
        width: 140px;
    }

    .eb-feature-list {
        grid-column: 1 / -1;
        padding-top: 28px;
        border-top: 1px solid rgba(1, 54, 240, 0.18);
    }

    .eb-footer__grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 54px;
    }

    .eb-footer__brand-column {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 820px) {
    .eb-header__inner {
        min-height: 74px;
    }

    .eb-brand__logo {
        width: 185px;
        height: auto;
    }

    .eb-header__actions {
        gap: 10px;
    }

    .eb-header__actions .eb-button {
        padding-inline: 16px;
    }

    .eb-hero {
        min-height: auto;
        padding-top: 76px;
        padding-bottom: 70px;
    }

    .eb-hero__stage {
        min-height: 610px;
    }

    .eb-hero__copy {
        top: 255px;
        left: var(--eb-gutter);
        width: min(460px, calc(100% - (var(--eb-gutter) * 2)));
    }

    .eb-hero__visual {
        top: 15px;
        left: auto;
        right: var(--eb-gutter);
        transform: scale(0.72);
        transform-origin: top right;
    }

    .eb-hero__messages {
        display: none;
    }

    .eb-level-grid {
        grid-template-columns: 1fr;
    }

    .eb-level-card {
        height: 260px;
        grid-template-columns: 44% minmax(0, 1fr);
        grid-template-rows: 1fr;
        grid-template-areas: "image body";
    }

    .eb-level-card__body {
        grid-area: body;
        align-self: center;
    }

    .eb-level-card__image {
        grid-area: image;
    }

    .eb-founding-card {
        grid-template-columns: 150px minmax(0, 1fr);
    }

    .eb-founding-seal {
        width: 145px;
    }

    .eb-feature-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .eb-footer__grid {
        grid-template-columns: 1fr;
    }

    .eb-footer__brand-column {
        grid-template-columns: minmax(0, 1fr) 160px;
    }
}

@media (max-width: 620px) {
    :root {
        --eb-gutter: 20px;
    }

    .eb-header__inner {
        min-height: 65px;
    }

    .eb-brand__logo {
        width: 166px;
    }

    .eb-header__actions {
        display: none;
    }

    .eb-hero {
        padding-top: 65px;
        padding-bottom: 58px;
    }

    .eb-pixel-cloud--left {
        display: none;
    }

    .eb-pixel-cloud--right {
        top: auto;
        right: -42px;
        bottom: 10px;
        transform: scale(0.75);
    }

    .eb-hero__stage {
        display: flex;
        min-height: 0;
        flex-direction: column;
    }

    .eb-hero__visual {
        position: relative;
        inset: auto;
        width: 100%;
        height: 205px;
        transform: none;
        order: 1;
    }

    .eb-hero__outline-b {
        top: 54px;
        left: 17%;
        width: 103px;
        height: auto;
    }

    .eb-hero__photo-b {
        top: 0;
        left: auto;
        right: 4%;
        width: 210px;
    }

    .eb-hero__copy {
        position: relative;
        inset: auto;
        width: 100%;
        margin-top: 8px;
        order: 2;
    }

    .eb-eyebrow {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .eb-hero__title {
        margin-bottom: 32px;
        font-size: clamp(34px, 10vw, 43px);
        line-height: 1;
    }

    .eb-hero__title strong::after {
        bottom: -9px;
        height: 4px;
    }

    .eb-hero__signin {
        min-width: 126px;
        min-height: 42px;
    }

    .eb-hero__messages {
        display: none;
    }

    .eb-section-title {
        font-size: 24px;
    }

    .eb-section--overview {
        padding-top: 30px;
        padding-bottom: 26px;
    }

    .eb-section--overview .eb-section-title {
        margin-bottom: 28px;
    }

    .eb-overview-card {
        aspect-ratio: 1.75 / 1;
    }

    .eb-overview-card__fallback span {
        margin-bottom: -4px;
        font-size: 16px;
    }

    .eb-overview-card__fallback strong {
        font-size: clamp(50px, 17vw, 72px);
    }

    .eb-overview-card__fallback em {
        font-size: clamp(34px, 11vw, 48px);
    }

    .eb-overview-card__play {
        border-top-width: 24px;
        border-bottom-width: 24px;
        border-left-width: 38px;
    }

    .eb-overview-pixels--left {
        display: none;
    }

    .eb-overview-pixels--right {
        right: -88px;
        bottom: -52px;
        transform: rotate(180deg) scale(0.55);
    }

    .eb-section--levels {
        padding-top: 18px;
        padding-bottom: 42px;
    }

    .eb-level-heading {
        margin-bottom: 30px;
    }

    .eb-level-heading .eb-section-title {
        margin-bottom: 16px;
    }

    .eb-level-heading p {
        font-size: 11px;
    }

    .eb-level-grid {
        gap: 10px;
    }

    .eb-level-card {
        height: 142px;
        grid-template-columns: 42% minmax(0, 1fr);
        border-radius: 14px;
    }

    .eb-level-card__body {
        padding: 13px 15px;
    }

    .eb-level-card__class {
        margin-bottom: 4px;
        padding: 3px 8px;
        font-size: 7px;
    }

    .eb-level-card__code {
        font-size: 31px;
    }

    .eb-level-card p {
        margin-top: 7px;
        font-size: 10px;
        line-height: 1.28;
    }

    .eb-level-card__arrow {
        top: 10px;
        right: 10px;
        width: 23px;
        height: 23px;
        border-radius: 5px;
        font-size: 15px;
    }

    .eb-section--founding {
        padding-bottom: 36px;
    }

    .eb-founding-card {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 34px 24px;
        border-radius: 16px;
        text-align: left;
    }

    .eb-founding-seal {
        width: 126px;
        margin-inline: auto;
    }

    .eb-founding-copy {
        text-align: center;
    }

    .eb-founding-copy h2 {
        font-size: 38px;
    }

    .eb-founding-copy > strong {
        font-size: 11px;
    }

    .eb-founding-actions {
        justify-content: center;
    }

    .eb-feature-list {
        grid-column: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 10px;
        padding-top: 22px;
    }

    .eb-feature-list li {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
    }

    .eb-icon-badge {
        width: 34px;
        height: 34px;
    }

    .eb-icon-badge svg {
        width: 18px;
        height: 18px;
    }

    .eb-feature-list strong {
        font-size: 9px;
    }

    .eb-footer__grid {
        gap: 42px;
        padding-top: 42px;
        padding-bottom: 46px;
    }

    .eb-footer__brand-column {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .eb-brand__logo--footer {
        width: 210px;
    }

    .eb-footer__nav {
        gap: 14px;
        padding-top: 0;
    }

    .eb-footer__contact h2 {
        margin-bottom: 20px;
        font-size: 31px;
    }

    .eb-contact-form__row {
        grid-template-columns: 1fr auto;
    }

    .eb-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding-block: 22px;
    }

    .eb-footer__bottom nav {
        gap: 18px;
        flex-wrap: wrap;
    }
}

@media (max-width: 390px) {
    .eb-hero__outline-b {
        left: 10%;
    }

    .eb-hero__photo-b {
        right: 0;
        width: 205px;
    }

    .eb-hero__title {
        font-size: 35px;
    }

    .eb-contact-form__row {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .eb-contact-form input[type="email"],
    .eb-contact-form .eb-button {
        border-radius: 6px;
    }
}

@media (max-width: 820px) {
    .eb-level-card__image {
        min-width: 0;
        min-height: 0;
        height: 260px;
        align-self: stretch;
    }
}

@media (max-width: 620px) {
    .eb-level-card__image {
        height: 142px;
    }

    .eb-level-card--a2 .eb-level-card__image { background-position: center 26%; }
    .eb-level-card--b1 .eb-level-card__image { background-position: center 47%; }
    .eb-level-card--b2 .eb-level-card__image { background-position: center 66%; }
}

/* Stage 1 visual parity hotfix v4 responsive corrections. */
@media (max-width: 1260px) {
    .eb-founding-seal {
        width: 155px;
        height: 155px;
    }
}

@media (max-width: 1050px) {
    .eb-founding-seal {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 820px) {
    .eb-founding-seal {
        width: 145px;
        height: 145px;
    }
}

@media (max-width: 620px) {
    .eb-founding-seal {
        width: 126px;
        height: 126px;
    }

    .eb-icon-badge {
        width: 36px;
        height: 36px;
    }

    .eb-icon-badge img {
        width: 20px;
        height: 20px;
    }

    .eb-feature-list li {
        grid-template-columns: 36px minmax(0, 1fr);
    }
}
