/* ====================================
   HERO SECTION — Premium B&W Design
   ==================================== */

/* Hero Base wrapper styling is managed in styles.css */

/* Make the inner container fill the hero section height */
.hero-section>.container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Visibility classes */
.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Noise Grain (DISABLED — too expensive on most devices)
.hero-grain { ... }
*/
.hero-grain {
    display: none;
}

/* Radial Glow behind content */
.hero-radial-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* Static Stars Background (CSS-only) */
.hero-stars-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Generate tiny static white dots using box-shadow */
    background: transparent;
    opacity: 0.9;
    transform-origin: center center;
}

[data-theme="dark"] .hero-stars-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow:
        10vw 15vh #fff, 20vw 80vh #fff, 30vw 25vh #fff, 40vw 60vh #fff,
        50vw 10vh #fff, 60vw 90vh #fff, 70vw 35vh #fff, 80vw 70vh #fff,
        90vw 20vh #fff, 15vw 50vh #fff, 25vw 5vh #fff, 35vw 95vh #fff,
        45vw 40vh #fff, 55vw 75vh #fff, 65vw 15vh #fff, 75vw 85vh #fff,
        85vw 30vh #fff, 95vw 65vh #fff, 5vw 45vh #fff, 8vw 85vh #fff,
        18vw 22vh #fff, 28vw 68vh #fff, 38vw 12vh #fff, 48vw 88vh #fff,
        58vw 42vh #fff, 68vw 78vh #fff, 78vw 8vh #fff, 88vw 52vh #fff,
        98vw 92vh #fff, 12vw 72vh #fff, 32vw 48vh #fff, 52vw 28vh #fff,
        72vw 58vh #fff, 92vw 38vh #fff, 22vw 32vh #fff, 42vw 82vh #fff,
        62vw 62vh #fff, 82vw 18vh #fff, 3vw 12vh #fff, 13vw 33vh #fff,
        23vw 55vh #fff, 33vw 77vh #fff, 43vw 99vh #fff, 53vw 21vh #fff,
        63vw 44vh #fff, 73vw 66vh #fff, 83vw 88vh #fff, 93vw 10vh #fff,
        2vw 95vh #fff, 11vw 76vh #fff, 21vw 57vh #fff, 31vw 38vh #fff,
        41vw 19vh #fff, 51vw 80vh #fff, 61vw 61vh #fff, 71vw 42vh #fff,
        81vw 23vh #fff, 91vw 4vh #fff, 7vw 30vh #fff, 17vw 60vh #fff,
        27vw 90vh #fff, 37vw 20vh #fff, 47vw 50vh #fff, 57vw 80vh #fff,
        67vw 10vh #fff, 77vw 40vh #fff, 87vw 70vh #fff, 97vw 15vh #fff,
        24vw 85vh #fff, 54vw 35vh #fff, 84vw 55vh #fff, 36vw 2vh #fff;
    border-radius: 50%;
}

[data-theme="light"] .hero-stars-layer {
    display: none;
}

/* ---- Hero Content ---- */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding-top: clamp(64px, 10dvh, 120px);
    padding-bottom: clamp(40px, 6dvh, 80px);
    padding-left: 16px;
    padding-right: 16px;
    /* Flexbox: main text centers, stats push to bottom */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Eyebrow */
.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #a3c2fa;
    /* Soft sky blue restored */
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    border: 1px solid rgba(163, 194, 250, 0.35);
    padding: 0.72rem 1.35rem;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.4));
    box-shadow:
        0 12px 30px rgba(2, 6, 23, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Title */
#animated-hero-title {
    font-size: clamp(2.5rem, 8vw + 1rem, 5.6rem); /* GitHub-scale: ~90px max */
    font-weight: 800;
    margin-bottom: 2.2rem;
    letter-spacing: -0.045em;
    line-height: 1.0;

    /* Premium white-to-blue gradient */
    background: linear-gradient(170deg, #ffffff 10%, #bfdbff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
}

/* Word & Letter Anim Wrappers */
.anim-word {
    display: inline-block;
    white-space: nowrap;
}

.anim-letter {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Subtitle */
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.35rem); /* GitHub-scale: ~22px max */
    color: rgba(255, 255, 255, 0.95);
    max-width: 720px;
    margin: 0 auto 3.5rem;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

/* ---- CTA Row ---- */
.hero-cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(20px);
}

.hero-proof-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    opacity: 0;
    transform: translateY(20px);
}

.hero-proof-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.14);
    background: rgba(15, 23, 42, 0.42);
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.22);
}

/* Primary Button */
.btn-discover-wrap {
    display: inline-block;
    padding: 1px;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    transition: box-shadow 0.3s ease;
}

.btn-discover-wrap:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.btn-discover {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    background: linear-gradient(135deg, #ffffff 0%, #c0d4ff 100%);
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: 750;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 24px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

/* Light Sweep Beam */
.btn-discover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transform: skewX(-25deg);
    transition: none;
    animation: lightSweep 4s infinite cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

@keyframes lightSweep {
    0% {
        left: -150%;
    }

    100% {
        left: 150%;
    }
}

.btn-discover:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.btn-discover:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

.btn-discover .btn-text {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.btn-discover:hover .btn-text {
    opacity: 1;
}

.btn-discover .btn-arrow {
    margin-left: 0.75rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.btn-discover:hover .btn-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Ghost / Secondary Button */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-ghost:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.08);
    transition-duration: 0.1s;
}

/* ---- Stats Row ---- */
.hero-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    transform: translateY(20px);
    /* Push stats to the bottom of the hero container */
    margin-top: auto;
    width: min(100%, 860px);
}

.hero-stat {
    text-align: center;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        linear-gradient(145deg, rgba(8, 15, 28, 0.88), rgba(12, 21, 36, 0.76));
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.35rem 1.6rem 1.2rem;
    border-radius: 1.45rem;
    min-width: 160px;
    transition: all 0.3s ease;
    box-shadow:
        0 18px 40px rgba(2, 6, 23, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-stat::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(125, 211, 252, 0.16), transparent 28%),
        radial-gradient(circle at 82% 85%, rgba(56, 189, 248, 0.12), transparent 32%);
    pointer-events: none;
    opacity: 0.92;
}

.hero-stat:hover {
    transform: translateY(-5px);
    border-color: rgba(191, 219, 254, 0.26);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        linear-gradient(145deg, rgba(10, 18, 32, 0.92), rgba(14, 26, 44, 0.82));
    box-shadow:
        0 22px 46px rgba(2, 6, 23, 0.46),
        0 0 34px rgba(59, 130, 246, 0.12);
}

.hero-stat-number {
    display: inline;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 16px rgba(96, 165, 250, 0.12);
}

.hero-stat-plus {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 600;
    color: rgba(191, 219, 254, 0.82);
    position: relative;
    z-index: 1;
}

.hero-stat-label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: rgba(226, 232, 240, 0.72);
    margin-top: 0.45rem;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
}



/* ---- FEFU Title Shimmer ---- */
@keyframes titleShimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* Individual letter spans get the gradient text effect */
.fefu-main-letter,
.fefu-rest-word {
    background: linear-gradient(90deg,
            #ffffff 0%,
            #ffffff 35%,
            #c0d4ff 50%,
            #ffffff 65%,
            #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShimmer 5s ease-in-out 4s infinite;
}

/* ========================================
   TABLET — Any touch device larger than a phone
   Covers all iPads (portrait + landscape), Android tablets.
   pointer:coarse = touch screen | pointer:fine = desktop mouse
   No pixel upper-limit — purely input-method based.
   ======================================== */
@media (min-width: 769px) and (pointer: coarse) {
    /* Tablet container alignments */
    .hero-section>.container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        height: 100%;
        padding: 0 16px;
    }

    .hero-content {
        max-width: 580px;
        width: 100%;
        margin: 0 auto;
        padding-top: 100px;
        padding-bottom: 80px;
        gap: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #animated-hero-title {
        font-size: clamp(3rem, 8vw, 4.5rem); 
        font-weight: 700;
        line-height: 1.15;
        max-width: 90%;
        margin-bottom: 10px;
    }

    .hero-subtitle {
        max-width: 520px;
        font-size: 20px;
        line-height: 1.6;
        margin-top: 8px;
        margin-bottom: 0px;
        padding: 0;
    }

    .hero-eyebrow {
        font-size: 12px;
        letter-spacing: 2px;
        padding: 6px 14px;
        border-radius: 999px;
        margin-bottom: 6px;
    }

    .hero-cta-row {
        display: flex;
        gap: 16px;
        margin-top: 16px;
        flex-wrap: nowrap;
        justify-content: center;
        margin-bottom: 0px;
    }

    .btn-discover,
    .btn-ghost {
        font-size: 16px;
        padding: 14px 28px;
    }

    .hero-stats-row {
        gap: 12px;
        flex-wrap: nowrap;
        justify-content: center;
        margin-top: 24px;
        width: 100%;
    }

    .hero-proof-row {
        margin-top: 12px;
        gap: 10px;
    }

    .hero-proof-pill {
        padding: 0.6rem 0.9rem;
        font-size: 11px;
        letter-spacing: 0.06em;
    }

    .hero-stat {
        padding: 16px 12px;
        min-width: 0;
        flex: 1;
        border-radius: 16px;
    }

    .hero-stat-number {
        font-size: 24px;
    }

    .hero-stat-label {
        font-size: 10px;
        letter-spacing: 0;
    }

    .hero-stat-plus {
        font-size: 18px;
    }
}

/* ========================================
   MOBILE (≤768px) — Desktop-copy approach
   Only font-size, padding, and gap scaled down.
   Layout stays identical to desktop.
   ======================================== */
@media (max-width: 768px) {
    /* Mobile container alignments */
    .hero-section>.container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        /* DO NOT CENTER VERTICALLY */
        height: 100%;
        padding: 0 16px;
    }

    .hero-radial-glow {
        width: 320px;
        height: 320px;
        opacity: 0.75;
    }

    .hero-content {
        position: relative;
        z-index: 10;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 110px;
        padding-bottom: 140px;
        gap: 24px;
        max-width: 440px;
        /* Locks layout to 420px sweet-spot on all mobile */
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .hero-content::before {
        display: none;
    }

    .hero-eyebrow {
        margin-bottom: 8px;
        font-size: 11px;
        letter-spacing: 2px;
        padding: 6px 14px;
        border-radius: 999px;
    }

    #animated-hero-title {
        font-size: 34px;
        font-weight: 700;
        line-height: 1.15;
        max-width: 95%;
        margin-bottom: 0px;
    }

    .hero-subtitle {
        max-width: 380px;
        font-size: 16px;
        line-height: 1.6;
        margin-top: 10px;
        margin-bottom: 0px;
        padding: 0;
    }

    .hero-cta-row {
        display: flex;
        gap: 16px;
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 0px;
    }

    .btn-discover {
        padding: 11px 18px;
        font-size: 15px;
    }

    .btn-ghost {
        padding: 11px 18px;
        font-size: 15px;
    }

    .hero-proof-row {
        width: 100%;
        gap: 8px;
        margin-top: 0;
    }

    .hero-proof-pill {
        min-height: 32px;
        padding: 0.52rem 0.78rem;
        font-size: 10.5px;
        letter-spacing: 0.04em;
        border-color: rgba(191, 219, 254, 0.12);
        background: rgba(15, 23, 42, 0.3);
        box-shadow: none;
    }

    .hero-stats-row {
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: center;
        margin-top: auto;
        width: 100%;
    }

    .hero-stat {
        padding: 12px 6px;
        min-width: 0;
        flex: 1;
        border-radius: 16px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.22);
    }

    .hero-stat-number {
        font-size: 20px;
    }

    .hero-stat-label {
        font-size: 9.5px;
        letter-spacing: 0;
    }

    .hero-stat-plus {
        font-size: 16px;
    }

    /* Utility toggles */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .hero-swipe-indicator.mobile-only {
        flex-direction: column;
        align-items: center;
        position: absolute;
        bottom: 0.75rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 20;
    }

    .swipe-text {
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 0.25rem;
    }

    .swipe-icon {
        width: 18px;
        height: 18px;
        color: rgba(255, 255, 255, 0.8);
        animation: swipeUpBounce 2s ease-in-out infinite;
    }

    @keyframes swipeUpBounce {

        0%,
        100% {
            transform: translateY(0);
            opacity: 0.3;
        }

        50% {
            transform: translateY(-6px);
            opacity: 1;
        }
    }
}

/* ========================================
   VERY SMALL PHONES (≤360px)
   Scale down text/spacing only — buttons stay side-by-side.
   ======================================== */
@media (max-width: 360px) {
    .hero-content {
        padding-top: 90px;
        padding-bottom: 110px;
        gap: 18px;
    }

    #animated-hero-title {
        font-size: 25px;
    }

    .hero-subtitle {
        font-size: 15px;
        max-width: 100%;
    }

    .hero-eyebrow {
        font-size: 10px;
        padding: 5px 12px;
    }

    .hero-proof-pill {
        font-size: 9px;
        padding: 0.48rem 0.62rem;
    }
}

@media (max-width: 768px) and (pointer: coarse) {
    .hero-stars-layer,
    .hero-radial-glow {
        opacity: 0.45;
    }

    .btn-discover::before {
        animation-duration: 7s;
    }
}

html.low-end-device .hero-stars-layer,
html.low-end-device .hero-radial-glow {
    display: none;
}

html.low-end-device .hero-eyebrow,
html.low-end-device .hero-stat,
html.low-end-device .hero-proof-pill {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.low-end-device .hero-stat,
html.low-end-device .hero-proof-pill,
html.low-end-device .btn-discover,
html.low-end-device .btn-ghost {
    box-shadow: none !important;
}

html.low-end-device .btn-discover::before {
    animation: none;
}

html.low-end-device .hero-content {
    gap: 18px;
}

html.low-end-device .hero-stat::before {
    display: none;
}
