@import url("./main-page.base.css");
@import url("./main-page.hero.css");
@import url("./main-page.plans.css");
@import url("../ap-subjects/ap-subjects.footer.css");
@import url("../ap-subjects/ap-subjects.themes.css");
@import url("./main-page.footer.css");
@import url("./main-page.responsive.css");

/* The supplied transparent logos stay unchanged, on white surfaces. */
:root {
    --aphero-brand-blue: #014565;
    --aphero-brand-teal: #01ada0;
    --aphero-footer-ink: #052a34;
    --aphero-header-height: 109px;
}

.scroll-story-section {
    background: var(--aphero-brand-blue);
}

.subjects-section,
.scroll-story-section {
    scroll-margin-top: calc(var(--aphero-header-height) + 1px);
}

.scroll-story-copy {
    top: var(--aphero-header-height);
    height: calc(100vh - var(--aphero-header-height));
}

/* Reuse the sign-in artwork without introducing new assets or interaction. */
.scroll-story-step {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
}

.scroll-story-tools {
    display: flex;
    align-items: flex-start;
    gap: clamp(12px, 1.8vw, 22px);
    max-width: 100%;
}

.story-tool {
    width: clamp(54px, 6.2vw, 80px);
    min-width: 0;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-align: center;
}

.story-tool-icon,
.story-tool-icon svg {
    display: block;
    width: clamp(48px, 5vw, 64px);
    height: clamp(48px, 5vw, 64px);
}

.story-tool-label {
    color: #ffffff;
    font: 700 0.7rem/1.35 "Manrope", sans-serif;
}

/* Frame only the right previews; retain every screenshot's full contents. */
.scroll-story-visual .scroll-story-frame {
    aspect-ratio: auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(0, 25, 40, 0.26);
}

.story-preview-toolbar {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 8px 12px;
    border-bottom: 1px solid #dce8ed;
    background: #f1f7f9;
}

.story-preview-dots {
    position: relative;
    display: block;
    width: 32px;
    height: 7px;
    flex: 0 0 auto;
}

.story-preview-dots::before {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a1b7c1;
    box-shadow: 11px 0 #b6c8cf, 22px 0 #cbd9de;
}

.story-preview-title {
    color: #526772;
    font: 700 0.65rem/1.4 "Manrope", sans-serif;
    letter-spacing: 0.025em;
}

.story-preview-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #ffffff;
}

.story-preview-viewport {
    width: 100%;
    aspect-ratio: 1900 / 1000;
    overflow: hidden;
    background: #ffffff;
}

.story-preview-viewport .scroll-story-carousel-track img {
    object-fit: contain;
    background: #ffffff;
}

/* A short, separate directory follows the full scrolling experience. */
.landing-main > .ap-subject-catalog {
    padding: clamp(30px, 4vw, 48px) 0 24px;
    background: #ffffff;
    color: var(--aphero-footer-ink);
}

.ap-catalog-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-bottom: 30px;
    text-align: center;
}

.ap-catalog-header h2 {
    margin: 0;
    color: var(--aphero-brand-blue);
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.ap-catalog-mask {
    display: block;
    width: min(180px, 100%);
    height: auto;
    object-fit: contain;
    background: #ffffff;
}

.ap-catalog-actions {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.ap-catalog-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid var(--aphero-brand-blue);
    border-radius: 6px;
    background: var(--aphero-brand-blue);
    color: #ffffff;
    font: 700 0.86rem/1.35 "Manrope", sans-serif;
    text-decoration: none;
    text-align: center;
}

.ap-catalog-link svg {
    display: block;
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ap-catalog-link:hover {
    background: #052a34;
    border-color: #052a34;
}

.ap-catalog-link:focus-visible {
    outline: 3px solid var(--aphero-brand-teal);
    outline-offset: 4px;
}

.ap-catalog-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 4vw, 56px);
    border-top: 1px solid #dbe8eb;
    padding-top: 24px;
}

.ap-catalog-group {
    min-width: 0;
}

.ap-catalog-group h3 {
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--aphero-brand-blue);
    font: 800 0.82rem/1.4 "Manrope", sans-serif;
    letter-spacing: 0.035em;
}

.ap-catalog-group h3::before {
    content: "";
    display: block;
    width: 5px;
    height: 16px;
    border-radius: 2px;
    background: var(--aphero-brand-teal);
    flex: 0 0 auto;
}

.ap-catalog-group ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ap-catalog-group li {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.subjects-brand-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 38px 18px 32px;
    background: #ffffff;
    text-align: center;
    scroll-margin-top: var(--aphero-header-height);
}

.subjects-brand-heading h2 {
    margin: 0;
    color: var(--aphero-brand-blue);
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    line-height: 1.2;
}

.subjects-brand-heading img {
    display: block;
    width: min(260px, 100%);
    height: auto;
    object-fit: contain;
    background: #ffffff;
}

.landing-footer {
    min-height: clamp(400px, 34vw, 460px);
    background: var(--aphero-brand-teal);
    color: var(--aphero-footer-ink);
}

.landing-footer .footer-inner {
    min-height: clamp(400px, 34vw, 460px);
    padding-block: 88px 104px;
}

.footer-aphero-brand {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    width: 208px;
    max-width: 100%;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    background: transparent;
    text-decoration: none;
}

.footer-aphero-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #ffffff;
    pointer-events: none;
    /* White only inside the supplied logo's angular teal outline. */
    clip-path: polygon(
        28.15% 13.48%, 71.93% 13.48%,
        93.22% 35.89%, 93.46% 39.15%,
        85.89% 68.82%, 51.12% 88.60%,
        48.96% 88.60%, 14.04% 68.98%,
        6.54% 39.15%, 6.78% 35.89%
    );
}

.footer-aphero-brand img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.landing-footer .footer-eyebrow {
    color: var(--aphero-footer-ink);
    border-left-color: var(--aphero-brand-blue);
}

.landing-footer .footer-contact {
    border-color: rgba(5, 42, 52, 0.35);
}

.landing-footer .footer-contact-list a {
    color: var(--aphero-footer-ink);
    font-weight: 700;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.landing-footer a:focus-visible {
    outline: 3px solid var(--aphero-brand-blue);
    outline-offset: 5px;
}

@media (max-width: 900px) {
    /* Phones/tablets read each complete title-and-preview pair in normal flow. */
    .scroll-story-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: none;
    }

    .scroll-story-copy,
    .scroll-story-visual {
        display: contents;
        position: static;
        top: auto;
        height: auto;
        margin: 0;
        padding: 0;
    }

    .scroll-story-section .scroll-story-step {
        position: static;
        inset: auto;
        grid-column: 1;
        align-items: center;
        gap: 18px;
        padding: 44px 0 24px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        scroll-margin-top: var(--aphero-header-height);
    }

    .scroll-story-step[data-story-step="0"] {
        grid-row: 1;
    }

    .scroll-story-step[data-story-step="1"] {
        grid-row: 3;
    }

    .scroll-story-step[data-story-step="2"] {
        grid-row: 5;
    }

    .scroll-story-visual .scroll-story-frame {
        grid-column: 1;
        margin-bottom: 36px;
    }

    .scroll-story-frame[data-story-frame="0"] {
        grid-row: 2;
    }

    .scroll-story-frame[data-story-frame="1"] {
        grid-row: 4;
    }

    .scroll-story-frame[data-story-frame="2"] {
        grid-row: 6;
    }

    .scroll-story-heading-row {
        max-width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    :root {
        --aphero-header-height: 137px;
    }

    .ap-catalog-header {
        gap: 14px;
    }

    .ap-catalog-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 18px;
    }

    .ap-catalog-group:first-child {
        grid-column: 1 / -1;
    }

    .ap-catalog-group:first-child ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 18px;
    }

    .ap-catalog-group li {
        font-size: 0.84rem;
    }
}

@media (max-height: 600px) and (max-width: 900px) {
    .scroll-story-section .scroll-story-step {
        gap: 12px;
    }

    .scroll-story-step h2 {
        font-size: clamp(1.8rem, 6vw, 2.35rem);
    }
}

@media (max-width: 600px) {
    .subjects-brand-heading {
        padding-top: 30px;
        padding-bottom: 26px;
    }

    .footer-aphero-brand {
        width: 184px;
    }
}

