/* ===== LANDING PAGE SPECIFIC ===== */

.container {
    max-width: 750px;
    margin: 0 auto;
}

h1 {
    font-size: 28px;
    margin-bottom: 1rem;
}

h2 {
    font-size: 21.5px;
    margin: 3rem 0 1rem;
    font-family: 'Geist Mono', monospace;
    color: var(--text-muted);
}

main a {
    color: var(--text-link);
    line-height: 1.4;
    text-decoration: none;
    border-bottom: solid 1px var(--text-link);
}

.mainpage-header {
    height: 100vh;
    min-height: 1080px;
    align-content: center;
}

/* ===== HEADER ===== */
.application-icons-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.application-icons-header img {
    outline: solid 2.5px #424c52;
    width: 90px;
    height: auto;
    border-radius: 24px;
}

header h1 {
    text-align: center;
    font-size: 28px;
}

.tagline {
    margin-bottom: 0.8rem;
    color: #aaa;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 500;
}

.heading-buttons {
    text-align: center;
}

/* ===== SECTION ANOTHER HEADER ===== */
.another-header {
    margin: 3rem 0;
}

.application-section-image {
    display: flex;
    justify-content: center;
    align-items: start;
    gap: 15px;
}

.application-section-image img {
    width: 100%;
    max-width: 360px;
    height: auto;
}

#image-svg-another-heading {
    width: 100%;
    max-width: 495px;
    height: auto;
}

/* ===== MAIN SECTION ===== */
main {
    max-width: 750px;
    margin: 0 auto;
    padding-top: 2.5rem;
}

main>h1:first-child {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

main>h2 {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.25px;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

main>p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    font-weight: 400;
}

main>footer {
    margin-top: 4rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-muted);
    padding-top: 2rem;
}

main>footer a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: none;
}

main>footer a:hover {
    color: var(--text-link);
}


/* ============================================
   LOADING SCREEN
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    outline: solid 2px #424c52;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.80);
    animation: loaderIconIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
}

@keyframes loaderIconIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   HERO ENTRANCE  (staggered, plays after loader)
   ============================================ */

/* Default hidden state — every hero child starts invisible */
.hero-anim {
    opacity: 0;
    transform: translateY(18px);
    /* will be triggered by .hero-visible on the parent */
}

/* The parent gate — added by JS after loader finishes */
.mainpage-header.hero-visible .hero-anim {
    animation: heroReveal 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger delays via inline --delay or utility classes */
.mainpage-header.hero-visible .hero-anim-0 {
    animation-delay: 0s;
}

.mainpage-header.hero-visible .hero-anim-1 {
    animation-delay: 0.12s;
}

.mainpage-header.hero-visible .hero-anim-2 {
    animation-delay: 0.24s;
}

.mainpage-header.hero-visible .hero-anim-3 {
    animation-delay: 0.36s;
}

.mainpage-header.hero-visible .hero-anim-4 {
    animation-delay: 0.52s;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icon pops slightly bigger */
.mainpage-header.hero-visible .application-icons-header.hero-anim {
    animation-name: heroIconPop;
}

@keyframes heroIconPop {
    0% {
        opacity: 0;
        transform: scale(0.78);
    }

    60% {
        transform: scale(1.06);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mockup images — slide up from a bit further */
.application-section-image.hero-anim {
    transform: translateY(32px);
}


/* ============================================
   SCROLL-REVEAL  (main content sections)
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* h2 headings get a left-slide instead */
.scroll-reveal-h2 {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-h2.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Code blocks: subtle scale + fade */
.scroll-reveal-code {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-code.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Footer */
.scroll-reveal-footer {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-footer.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================
   NAV ACTIVE STATE (scroll spy)
   ============================================ */
.nav-link.active {
    color: var(--text-primary) !important;
}

.nav-link.active::after {
    width: 100% !important;
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1000px) {
    .container {
        padding: 0rem 1.5rem 2rem;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
        margin: 2rem 0 0.8rem;
    }

    main>h1:first-child {
        font-size: 2rem;
    }

    main>h2 {
        font-size: 1.25rem;
        margin-top: 3rem;
    }

    main>p {
        font-size: 0.85rem;
    }

    .application-icons-header img {
        width: 70px;
        border-radius: 20px;
    }

    .tagline {
        font-size: 0.8rem;
    }

    #image-svg-another-heading {
        max-width: 50%;
    }

    .application-section-image img {
        max-width: 35%;
    }

    .application-section-image {
        gap: 10px;
    }

    .loader-icon {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }

    .tagline {
        font-size: 3vw;
    }

    main>h1:first-child {
        font-size: 1.75rem;
    }

    .loader-text {
        font-size: 13px;
    }
}

/* ===== LIGHT MODE ===== */
@media (prefers-color-scheme: light) {
    main a {
        color: #4a4aff;
        border-bottom: solid 1px #4a4aff;
    }

    main>h1:first-child {
        background: linear-gradient(135deg, #000 0%, #666 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    main>h2 {
        color: var(--text-primary);
    }

    main>footer a:hover {
        color: #4a4aff;
    }

    .application-icons-header img {
        outline: solid 2.5px #ccc;
    }

    .tagline {
        color: #777;
    }

    h2 {
        color: #777;
    }

    .loader-icon {
        outline-color: #ccc;
    }
}