/* The original theme retains the existing About Us section. */
.homepage-learning-journey { display: none; }

body.homepage-themed .homepage-about-legacy { display: none; }

body.homepage-themed .homepage-learning-journey {
    display: block;
    padding: var(--hp-space-learning-journey-desktop-top, 72px) 0 var(--hp-space-learning-journey-desktop-bottom, 72px);
    color: var(--hp-text);
    background: var(--hp-background);
}

/* Let this two-panel section span the page while keeping text padding inside. */
.homepage-learning-journey > .container {
    width: 100%;
    max-width: none;
    padding-inline: 0;
}

.homepage-journey-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    min-height: clamp(510px, 32vw, 650px);
    background: var(--hp-surface);
}

.homepage-journey-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 54px clamp(44px, 4vw, 88px);
    text-align: center;
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--hp-primary) 40%, var(--hp-surface)),
        color-mix(in srgb, var(--hp-primary) 12%, var(--hp-surface)) 48%,
        color-mix(in srgb, var(--hp-primary) 48%, var(--hp-surface)));
}

/* Keep the continuous page background around a distinct introduction panel. */
body.homepage-themed[data-theme-section-style] .homepage-content-flow .homepage-learning-journey {
    background: transparent;
}

body.homepage-themed[data-theme-section-style] .homepage-content-flow .homepage-journey-intro {
    margin: 16px clamp(16px, 2vw, 40px);
    border: 1px solid color-mix(in srgb, var(--hp-primary) 14%, var(--hp-surface));
    border-radius: var(--hp-radius);
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--hp-primary) 22%, var(--hp-surface)),
        color-mix(in srgb, var(--hp-primary) 12%, var(--hp-surface)));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 50%),
        0 12px 30px color-mix(in srgb, var(--hp-primary) 7%, transparent);
}

body.homepage-themed[data-theme-section-style] .homepage-content-flow .homepage-journey-intro::before {
    top: 14px;
    left: 14px;
    width: 72px;
    height: 54px;
    opacity: 0.35;
}

.homepage-journey-intro::before,
.homepage-journey-steps::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 82px;
    pointer-events: none;
    background-image: radial-gradient(circle, var(--hp-secondary) 1.5px, transparent 2px);
    background-size: 19px 19px;
    opacity: 0.8;
}

.homepage-journey-intro::before { top: 0; left: 0; }

.homepage-journey-intro h2 {
    max-width: 560px;
    margin: 0 0 12px;
    color: var(--hp-text);
    font-size: clamp(27px, 2.5vw, 36px);
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.homepage-journey-subtitle {
    max-width: 560px;
    margin: 0;
    color: var(--hp-text);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.7;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.homepage-journey-description {
    width: 100%;
    max-width: 560px;
    margin: 36px 0 24px;
    color: var(--hp-text);
    font-size: 17px;
    font-weight: 500;
    line-height: 2;
    text-align: left;
    overflow-wrap: anywhere;
}

.homepage-journey-about-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    color: var(--hp-text);
    border-bottom: 1px solid currentColor;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.homepage-journey-about-link:hover { color: var(--hp-text); }

.homepage-journey-steps {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 42px clamp(28px, 3vw, 72px) 60px;
}

.homepage-journey-steps::after { right: 0; bottom: 0; }

.homepage-journey-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.homepage-journey-step {
    --journey-step-color: #81d7dd;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: center;
}

.homepage-journey-step:nth-child(2) { --journey-step-color: #b2dc69; }
.homepage-journey-step:nth-child(3) { --journey-step-color: #f3d34a; }
.homepage-journey-step:nth-child(4) { --journey-step-color: #f59d9e; }

.homepage-journey-step > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    color: var(--hp-text);
    text-decoration: none;
    border-radius: min(var(--hp-radius), 12px);
}

.homepage-journey-art {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: clamp(180px, 13vw, 260px);
    margin-bottom: 20px;
}

.homepage-journey-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: transform 180ms ease;
}

.homepage-journey-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 7px solid var(--journey-step-color);
    border-radius: 50%;
    background: #fff;
    color: #243b35;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--journey-step-color) 30%, transparent);
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}

.homepage-journey-track {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(100% + 12px);
    height: 28px;
    margin: 8px 0 16px;
    color: var(--journey-step-color);
    font-size: 23px;
}

.homepage-journey-track::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px dashed color-mix(in srgb, var(--hp-text) 55%, transparent);
}

.homepage-journey-track i {
    position: relative;
    padding: 0 3px;
    background: var(--hp-surface);
    font-weight: 800;
}

.homepage-journey-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 8px 9px;
    border-radius: var(--hp-radius);
    background: var(--hp-primary);
    color: var(--hp-on-primary);
    font-size: clamp(15px, 1vw, 18px);
    font-weight: 700;
    line-height: 1.5;
    box-shadow: 0 3px 0 color-mix(in srgb, var(--hp-primary) 60%, var(--hp-text)),
        0 5px 12px color-mix(in srgb, var(--hp-primary) 16%, transparent);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.homepage-journey-cta-arrow {
    display: inline-block;
    flex-shrink: 0;
    font-size: 1.15em;
    line-height: 1;
}

.homepage-journey-hint .homepage-journey-cta-arrow {
    animation: homepage-journey-arrow-hint 1500ms ease-in-out 2;
}

@keyframes homepage-journey-arrow-hint {
    0%, 20%, 80%, 100% { transform: translateX(0); }
    45%, 55% { transform: translateX(4px); }
}

.homepage-journey-caption {
    display: block;
    margin-top: 14px;
    color: var(--hp-text);
    font-size: clamp(13px, 0.9vw, 16px);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.homepage-journey-step > a:is(:hover, :focus-visible) .homepage-journey-art img { transform: translateY(-4px); }
.homepage-journey-step > a:is(:hover, :focus-visible) .homepage-journey-label {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 color-mix(in srgb, var(--hp-primary) 60%, var(--hp-text)),
        0 8px 16px color-mix(in srgb, var(--hp-primary) 22%, transparent);
}
.homepage-journey-step > a:active .homepage-journey-label {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px color-mix(in srgb, var(--hp-text) 20%, transparent);
}

.homepage-learning-journey a:focus-visible {
    outline: 3px solid var(--hp-primary);
    outline-offset: 5px;
}

@media (max-width: 1199px) {
    .homepage-journey-layout { grid-template-columns: minmax(0, 1fr); }
    .homepage-journey-intro { padding: 40px 56px; }
    .homepage-journey-description { max-width: 680px; margin-top: 22px; }
    .homepage-journey-steps { padding: 38px 36px 50px; }
    .homepage-journey-list { gap: 20px; }
    .homepage-journey-track { width: calc(100% + 20px); }
}

@media (max-width: 767px) {
    body.homepage-themed .homepage-learning-journey {
        padding-top: var(--hp-space-learning-journey-mobile-top, 72px);
        padding-bottom: var(--hp-space-learning-journey-mobile-bottom, 72px);
    }
}

@media (max-width: 575px) {
    body.homepage-themed .homepage-learning-journey { padding: var(--hp-space-learning-journey-mobile-top, 40px) 0 var(--hp-space-learning-journey-mobile-bottom, 40px); }
    .homepage-journey-intro { padding: 38px 24px 28px; }
    .homepage-journey-subtitle { font-size: 16px; }
    .homepage-journey-description { font-size: 16px; }
    .homepage-journey-steps { padding: 28px 20px 40px; }
    .homepage-journey-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; }
    .homepage-journey-art { height: 150px; margin-bottom: 14px; }
    .homepage-journey-track { width: calc(100% + 18px); margin-bottom: 12px; }
    .homepage-journey-label { font-size: 14px; padding-inline: 6px; }
    .homepage-journey-caption { font-size: 12px; }
    .homepage-journey-intro::before,
    .homepage-journey-steps::after { width: 72px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    .homepage-journey-art img,
    .homepage-journey-label { transition: none; }
    .homepage-journey-cta-arrow { animation: none !important; }
    .homepage-journey-step > a:is(:hover, :focus-visible, :active) .homepage-journey-art img,
    .homepage-journey-step > a:is(:hover, :focus-visible, :active) .homepage-journey-label { transform: none; }
}
