/* Homepage styles. Existing section and card class names are retained. */
.main-body {
    max-width: 1440px;
    margin: auto;
    padding: 0 24px 32px;
}

.hero-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 560px;
    padding: 96px max(24px, calc((100% - 1200px) / 2));
    display: flex;
    align-items: center;
    justify-content: center;
    background: #21183B;
    color: var(--on-primary-clr);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15,10,28,.65);
    z-index: -1;
}

.hero-content {
    max-width: 760px;
    text-align: center;
}

.hero-content h1 {
    font-size: var(--text-hero);
    margin: 20px 0;
    font-weight: 800;
}

.hero-intro {
    font-size: 1.25rem;
    max-width: 540px;
    margin-inline: auto;
}

.hero-cohort-dates {
    max-width: 620px;
    margin: 14px auto 0;
    color: var(--on-primary-clr);
    font-size: .95rem;
    line-height: 1.5;
}

.hero-cohort-dates strong {
    color: var(--brand-yellow);
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.hero-actions .button-primary {
    background: var(--accent-clr);
    color: var(--on-accent-clr);
}

.button-outline {
    border-color: currentColor;
    color: var(--on-primary-clr);
}

.hero-section :focus-visible {
    outline-color: white;
}

.media-note {
    position: absolute;
    bottom: 16px;
    left: 24px;
    font-size: .75rem;
}

.video-toggle,
.sound-toggle {
    border: 0;
    background: transparent;
    color: var(--on-primary-clr);
    cursor: pointer;
    font: inherit;
}

.Advert-section {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    padding: 32px 0;
    border-bottom: 1px solid var(--line-clr);
}

.Advert-section > div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px;
}

.Advert-section > div + div {
    border-left: 1px solid var(--line-clr);
}

.landing-icon {
    width: 40px;
    height: 40px;
    fill: var(--primary-clr);
    flex-shrink: 0;
}

.fact-value {
    font-size: clamp(1.1rem,2vw,1.75rem);
    font-weight: 700;
    line-height: 1.2;
}

.center-text {
    font-size: var(--text-small);
    font-weight: 400;
    color: var(--secondary-text-clr);
    margin-top: 6px;
}

.next-2-section {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    padding: 64px 40px;
    margin-top: 24px;
    background: var(--surface-clr);
}

.row-1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}

.row-1-text h2 {
    margin: 16px 0;
}

.row-1-text h5 {
    font-size: var(--text-body);
    font-weight: 400;
}

.row-1-text h5 br {
    display: none;
}

.row-1-text .eyebrow {
    color: var(--primary-clr);
}

.row-1-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.row-2 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-story-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 6px;
}

.image-placeholder {
    background: #D9EBF8;
    color: #263B4C;
    min-height: 250px;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    border: 1px dashed #56758E;
}

.row-2 h6 {
    font-size: .75rem;
    font-weight: 400;
    margin-top: 8px;
    color: var(--secondary-text-clr);
}

.next-3-section {
    padding: 64px 40px;
}

.learning-journey {
    margin-bottom: 24px;
}

.curriculum-cards {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 24px;
}

.c-Card, .cCard {
    border: 2px solid var(--line-clr);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.c-Card {
    border-color: var(--primary-clr);
    background: var(--surface-clr);
}

.first-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #ECEAF0;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 2px;
}

.c-Card .status-badge {
    background: var(--primary-clr);
    color: var(--on-primary-clr);
}

.second-line {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.second-line > :first-child {
    font-size: var(--text-card-title);
    font-weight: 700;
    line-height: 1.3;
}

.second-line br {
    display: none;
}

.third-line {
    margin-top: auto;
}

.cCard .third-line {
    font-size: var(--text-small);
    color: var(--secondary-text-clr);
}

.cCard .third-line svg {
    display: none;
}

.suitability-section {
    margin: 0 40px 64px;
    padding: 32px;
    border: 1px solid var(--line-clr);
    border-left: 6px solid var(--primary-clr);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}

.suitability-section h2 {
    margin: 12px 0;
}

.assessment-intro {
    align-self: center;
}

.text-link {
    display: inline-block;
    margin-top: 16px;
    font-weight: 700;
}

.footer {
    padding: 32px 40px;
    border: 1px solid var(--line-clr);
    border-top: 8px solid var(--accent-clr);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.f-section-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line-clr);
}

.f-section-1 h2 {
    font-size: 1.5rem;
}

.f-section-1 h5 {
    font-size: var(--text-small);
    font-weight: 400;
    margin-top: 8px;
}

.footer-email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border: 1px solid var(--primary-clr);
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
}

.footer-email svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.flx-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 24px;
}

.footer-logo {
    width: 120px;
}

.flx-section h6 {
    font-size: .75rem;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.flx-section ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 24px;
    font-size: var(--text-small);
}

.flx-section a {
    color: var(--text-clr);
    text-decoration: none;
}

.copyright-section {
    margin-top: 24px;
}

.copyright-section h6 {
    font-weight: 400;
    font-size: .75rem;
}

@media (max-width: 1000px) {
    .main-body {
        padding: 0 20px 24px;
    }

    .next-2-section {
        gap: 24px;
        padding: 40px 24px;
    }

    .next-3-section {
        padding: 48px 0;
    }

    .curriculum-cards {
        gap: 16px;
    }

    .first-line {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .suitability-section {
        margin-left: 0;
        margin-right: 0;
    }

}

@media (max-width: 767px) {
    .main-body {
        padding: 0 16px 24px;
    }

    .hero-section {
        min-height: 520px;
        padding: 64px 24px 80px;
    }

    .hero-intro {
        font-size: 1.125rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .Advert-section, .next-2-section, .curriculum-cards, .suitability-section {
        grid-template-columns: 1fr;
    }

    .Advert-section {
        padding: 16px 0;
    }

    .Advert-section > div {
        justify-content: flex-start;
        padding: 20px;
    }

    .Advert-section > div + div {
        border-left: 0;
        border-top: 1px solid var(--line-clr);
    }

    .next-2-section {
        padding: 32px 20px;
    }

    .next-3-section {
        padding: 40px 0;
    }

    .suitability-section {
        padding: 24px 20px;
        margin-bottom: 40px;
    }

    .footer {
        padding: 24px 20px;
    }

    .f-section-1 {
        align-items: flex-start;
        flex-direction: column;
    }

    /* On mobile, controls join the normal flow so they can never cover the CTAs. */
    .hero-section {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 32px;
    }

    .video-controls {
        position: static;
        justify-content: center;
        width: 100%;
        margin-top: 24px;
        gap: 10px;
    }

    .video-control-label {
        white-space: normal;
        text-align: left;
    }

    .video-status {
        position: static;
        max-width: none;
        margin-top: 6px;
        text-align: center;
    }

}

/* Compact icon controls for the autoplaying background video. */
.video-controls {
    position: absolute;
    right: 24px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--on-primary-clr);
    z-index: 1;
}

.video-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 2px 0;
    border-radius: 999px;
}

.video-control-circle {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: rgba(15, 10, 28, .28);
    backdrop-filter: blur(4px);
}

.video-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.video-control-label {
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
    white-space: nowrap;
}

.video-control-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, .5);
}

.sound-toggle {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
}

.sound-icon {
    width: 25px;
    height: 25px;
    fill: currentColor;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}

.video-toggle:hover .video-control-circle,
.video-toggle:focus-visible .video-control-circle,
.sound-toggle:hover,
.sound-toggle:focus-visible {
    background: rgba(255, 255, 255, .14);
}

.video-status {
    position: absolute;
    right: 24px;
    bottom: 68px;
    max-width: 280px;
    font-size: .8rem;
    text-align: right;
}

/* Orange is decorative here, not small text on a white background. */
.learning-journey h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 16px;
    background: var(--brand-orange);
}

.assessment-intro .button {
    margin-top: 16px;
    cursor: pointer;
}

/* Native dialog provides modal focus containment and Escape dismissal. */
#suitability-dialog {
    margin: auto;
    width: min(540px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 36px 28px;
    border: 1px solid var(--line-clr);
    border-radius: 8px;
    color: var(--text-clr);
    background: var(--background-clr);

    /* Animation starting state */
   opacity: 0;
   transform: translateY(10px) scale(.99);

    transition:
        opacity .32s cubic-bezier(.22, 1, .36, 1),
        transform .32s cubic-bezier(.22, 1, .36, 1),
        display .32s allow-discrete,
        overlay .32s allow-discrete;
}

#suitability-dialog[open] {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#suitability-dialog::backdrop {
    background: rgba(15, 10, 28, 0);

    transition:
        background-color .3s cubic-bezier(.22, 1, .36, 1),
        display .3s allow-discrete,
        overlay .3s allow-discrete;
}

#suitability-dialog[open]::backdrop {
    background: rgba(15, 10, 28, .65);
    
}

@starting-style {

    #suitability-dialog[open] {
        opacity: 0;
        transform: translateY(10px) scale(.99);
    }

    #suitability-dialog[open]::backdrop {
        background: rgba(15, 10, 28, 0);
    }
}

@media (prefers-reduced-motion: reduce) {

    #suitability-dialog,
    #suitability-dialog::backdrop {
        transition: none;
    }

}

#guide-title {
    padding-right: 24px;
    font-size: 1.75rem;
    color: var(--primary-clr);
}

.dialog-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 2rem;
    cursor: pointer;
}

.guide-badge {
    display: inline-block;
    margin: 16px 0;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--accent-clr);
    color: var(--on-accent-clr);
    font-size: .75rem;
    font-weight: 700;
}

.guide-description {
    color: var(--secondary-text-clr);
}

#guide-form fieldset {
    border: 0;
    margin-top: 24px;
    min-width: 0;
}

#guide-form legend {
    font-weight: 700;
    margin-bottom: 10px;
}

.choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.choice-row label {
    position: relative;
    flex: 1 1 100px;
    cursor: pointer;
}

.choice-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.choice-row span {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 10px;
    border: 1px solid var(--line-clr);
    border-radius: 4px;
    text-align: center;
}

.choice-row input:checked + span {
    background: var(--primary-clr);
    color: var(--on-primary-clr);
    border-color: var(--primary-clr);
}

.choice-row input:focus-visible + span {
    outline: 3px solid var(--focus-clr);
    outline-offset: 3px;
}

.guide-submit {
    width: 100%;
    margin-top: 24px;
    border-color: var(--primary-clr);
    background: var(--background-clr);
    color: var(--primary-clr);
    cursor: pointer;
}

#guide-result {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line-clr);
}

#guide-result h3 {
    font-size: 1.5rem;
    color: var(--primary-clr);
}

#guide-result p {
    margin-top: 12px;
}

#guide-result .button {
    width: 100%;
    margin-top: 20px;
}

.guide-disclaimer {
    font-size: .875rem;
    color: var(--secondary-text-clr);
}

.text-button {
    display: block;
    margin-top: 16px;
    border: 0;
    background: transparent;
    color: var(--primary-clr);
    text-decoration: underline;
    cursor: pointer;
    min-height: 44px;
}

body.guide-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .hero-section {
        padding-bottom: 32px;
    }

    /* Keep the controls in normal document flow below the hero actions on mobile. */
    .video-controls {
        position: static;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        margin-top: 24px;
        justify-content: center;
        gap: 10px;
    }

    .video-control-label {
        white-space: normal;
        text-align: left;
    }

    .video-status {
        position: static;
        max-width: none;
        margin-top: 6px;
        text-align: center;
    }

    .media-note {
        left: 0;
        width: 100%;
        text-align: center;
        bottom: 12px;
    }

    #suitability-dialog {
        padding: 36px 20px 24px;
    }

}

