/* ==========================================
   Landing Page - Viewport & Centering Fix
   Prevents scrollbar and centers hero content
   Uses fluid typography that scales with viewport
   ========================================== */

/* Prevent scrolling on landing page */
body.landing-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
}

    /* Hero section - column layout: content fills middle, footer pinned bottom */
    body.landing-page .hero-section {
        height: calc(100vh - 50px);
        min-height: 0;
        max-height: calc(100vh - 50px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        position: relative;
        padding: 0 !important;
        margin: 0;
    }

    /* Content fills available space above the footer and centers the card inside */
    body.landing-page .hero-content {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: clamp(10px, 2vw, 20px);
        box-sizing: border-box;
        min-height: 0;
    }

    /* ==========================================
   Welcome Card — Dark glass treatment
   Lets the hero GIF dominate; light text on
   low-opacity dark fill with backdrop blur.
   ========================================== */

    body.landing-page .card-hero-transparent {
        background: rgba(15, 25, 35, 0.55);
        border: 1px solid rgba(255, 255, 255, 0.14);
        backdrop-filter: blur(20px) saturate(140%);
        -webkit-backdrop-filter: blur(20px) saturate(140%);
        box-shadow:
            0 24px 60px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        color: rgba(255, 255, 255, 0.92);
        /* SCSS sets 3rem 2rem; trim it so the card fits a laptop hero
           without clipping now that text stays at full size. */
        padding: 1.75rem 1.75rem;
    }

        body.landing-page .card-hero-transparent:hover {
            box-shadow:
                0 32px 80px rgba(0, 0, 0, 0.55),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
        }

        /* Solid amber heading — the SCSS gradient-clip read as muddy
       on dark glass; flip to a flat amber that matches the CTA. */
        body.landing-page .card-hero-transparent h1 {
            text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
        }

        body.landing-page .card-hero-transparent h1.text-warning {
            background: none;
            -webkit-text-fill-color: #ffc107;
            color: #ffc107;
        }

        /* Flip body copy to light on dark glass. */
        body.landing-page .card-hero-transparent .main-content,
        body.landing-page .card-hero-transparent .main-content p,
        body.landing-page .card-hero-transparent .main-content li,
        body.landing-page .card-hero-transparent > div {
            color: rgba(255, 255, 255, 0.92);
        }

    /* ==========================================
   Welcome Card — Sensible fixed type scale
   The previous fluid-clamp-everything approach
   produced unreadable text and asymmetric padding.
   Card sizes naturally to its content.
   ========================================== */

    body.landing-page .display-4 {
        font-size: clamp(1.75rem, 3.5vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }

    body.landing-page .main-content,
    body.landing-page .main-content p,
    body.landing-page .main-content li {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Bootstrap's default mt-5 (3rem) is too generous given the
       trimmed copy — pull the button closer to balance the card. */
    body.landing-page .mt-5 {
        margin-top: 1rem !important;
    }

    /* Tighten inter-element spacing inside the welcome card so it
       fits a laptop hero without clipping. */
    body.landing-page .card-hero-transparent .mb-4 {
        margin-bottom: 1rem !important;
    }

/* ==========================================
   Feature Grid — 2x2 dark-glass tiles beside the Welcome card.
   Stays a 2x2 at every viewport (per design intent).
   ========================================== */

body.landing-page .feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

body.landing-page .feature-tile {
    background: rgba(15, 25, 35, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    border-radius: 0.9rem;
    padding: 1.1rem 1.15rem;
    color: rgba(255, 255, 255, 0.92);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    body.landing-page .feature-tile:hover {
        transform: translateY(-3px);
        box-shadow:
            0 16px 40px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(255, 193, 7, 0.25) inset;
    }

body.landing-page .feature-icon {
    width: 1.6rem;
    height: 1.6rem;
    color: #ffc107;
    margin-bottom: 0.5rem;
    display: block;
}

body.landing-page .feature-title {
    font-size: 1.02rem;
    font-weight: 600;
    color: #ffc107;
    margin: 0 0 0.35rem 0;
    line-height: 1.2;
}

body.landing-page .feature-desc {
    font-size: 0.85rem;
    line-height: 1.45;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================
   Doc-tile row — secondary links beneath the
   feature grid pointing to /help and /developers.
   Visibly shorter than .feature-tile so the
   third row fits the locked-viewport hero.
   ========================================== */

body.landing-page .doc-tile-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

body.landing-page .doc-tile {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.9rem;
    background: rgba(15, 25, 35, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-radius: 0.65rem;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.landing-page .doc-tile:hover,
body.landing-page .doc-tile:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 193, 7, 0.45);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    color: #ffe082;
    outline: none;
}

body.landing-page .doc-tile-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: #ffc107;
    flex: 0 0 auto;
}

body.landing-page .doc-tile-label {
    flex: 1 1 auto;
    color: #ffc107;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.landing-page .doc-tile-arrow {
    color: rgba(255, 193, 7, 0.75);
    font-size: 0.95rem;
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

body.landing-page .doc-tile:hover .doc-tile-arrow {
    transform: translateX(2px);
}

@media (max-width: 480px) {
    body.landing-page .doc-tile-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* ==========================================
   Contact Card
   ========================================== */

.landing-contact-card {
    display: flex;
    flex-direction: column;
    gap: clamp(0.25rem, 1vmin, 0.5rem);
}

.landing-contact-title {
    font-size: clamp(1rem, 3.2vmin, 2rem);
    font-weight: 700;
    color: #c47d00;
    margin-bottom: clamp(0.4rem, 1.4vmin, 0.85rem);
    line-height: 1.2;
    white-space: nowrap;
}

.landing-contact-intro {
    font-size: clamp(0.65rem, 1.8vmin, 1rem);
    line-height: 1.5;
    color: rgba(33, 37, 41, 0.8);
    margin-bottom: clamp(0.5rem, 1.8vmin, 1.25rem);
}

.landing-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 1.6vmin, 1rem);
}

.landing-contact-list li {
    display: flex;
    flex-direction: column;
    gap: clamp(0.1rem, 0.4vmin, 0.2rem);
}

.landing-contact-name {
    font-size: clamp(0.7rem, 1.8vmin, 1rem);
    font-weight: 600;
    color: #212529;
}

.landing-contact-email {
    font-size: clamp(0.65rem, 1.6vmin, 0.95rem);
    color: #c47d00;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: normal;
}

.landing-contact-email:hover {
    color: #8a5700;
    text-decoration: underline;
}

/* ==========================================
   Landing Footer
   Pinned to the bottom of the hero section.
   Brand slot on the left (reserved for future logos),
   contacts on the right as a single compact row.
   ========================================== */

.landing-footer {
    flex: 0 0 auto;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.75rem, 2vw, 2rem);
    padding: clamp(0.5rem, 1.4vmin, 0.9rem) clamp(1rem, 3vw, 2.5rem);
    background: rgba(12, 20, 28, 0.6);
    backdrop-filter: blur(10px) saturate(140%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(0.7rem, 1.4vmin, 0.9rem);
}

.landing-footer-brand {
    flex: 0 1 auto;
    min-width: 0;
    color: rgba(255, 255, 255, 0.7);
}

.landing-footer-cta {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.landing-footer-label {
    color: rgba(255, 255, 255, 0.65);
}

.landing-footer-btn {
    background: transparent;
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.55);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.landing-footer-btn:hover,
.landing-footer-btn:focus-visible {
    background: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
    color: #ffe082;
    outline: none;
}

/* ==========================================
   Additional adjustments for extreme cases
   ========================================== */

/* Mobile - let the footer wrap. The hero-section height locks are
   handled by the small-viewport block below; re-asserting them here
   would re-trap the page at the very widths where we most need to
   scroll. */
@media (max-width: 768px) {
    .landing-footer {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .landing-footer-cta {
        justify-content: center;
    }
}

/* ==========================================
   Small-viewport escape hatch
   Below 992px wide OR 600px tall, the locked-viewport
   composition stops fitting and content gets clipped
   (overflow: hidden + 100vh lock). Lift both, let the
   page flow naturally, and switch the video to a fixed
   ambient backdrop so it stays visible behind scrolling
   content instead of stretching with hero-section.
   The Bootstrap col-lg-6 columns already stack at this
   breakpoint, so reordering isn't needed — the welcome
   card (source order) lands above the feature/doc tiles.
   ========================================== */
@media (max-width: 991.98px), (max-height: 599.98px) {
    body.landing-page {
        overflow: visible;
        height: auto;
        min-height: 100vh;
    }

    body.landing-page .hero-section {
        height: auto;
        max-height: none;
        min-height: 100vh;
    }

    body.landing-page .hero-background {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    /* Keep the welcome card, tiles, and footer above the fixed video. */
    body.landing-page .hero-content,
    body.landing-page .landing-footer {
        position: relative;
        z-index: 2;
    }

    /* Breathing room top and bottom when the page scrolls. */
    body.landing-page .hero-content {
        padding-top: clamp(1rem, 4vh, 2rem);
        padding-bottom: clamp(1rem, 4vh, 2rem);
        align-items: flex-start;
    }
}
