
/* ========================================
   HERO — CONFIGURATION
   ======================================== */

.hero {

    /* Layout */

    --hero-inset: var(--page-inset);
    --hero-radius: var(--section-radius);

    --hero-container-width: 1800px;
    --hero-content-width: 1450px;

    /* Colors */

    --hero-background: #0d1e37;
    --hero-heading-accent: #9de88e;
    --hero-text: var(--white);
    --hero-text-secondary: var(--primary-50);

    /* Typography */

    --hero-title-size: clamp(42px, 5.6vw, 100px);

    /* Controls */

    --hero-control-size: 48px;
    --hero-control-offset: 24px;

    --hero-control-background: rgba(13, 30, 55, 0.48);
    --hero-control-hover: rgba(13, 30, 55, 0.80);
    --hero-control-border: rgba(255, 255, 255, 0.55);

    /* Section */

    position: relative;
    isolation: isolate;

    display: flex;
    align-items: center;

    width: calc(100% - 2 * var(--hero-inset));

    min-height: calc(
        100svh - var(--navbar-height) - var(--hero-inset)
    );

    margin: 0 auto var(--hero-inset);

    border-radius: var(--hero-radius);

    overflow: hidden;

    background: var(--hero-background);
    color: var(--hero-text);
}


/* ========================================
   BACKGROUND VIDEO
   ======================================== */

.hero__video,
.hero__overlay {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;
}

.hero__video {
    z-index: 0;

    object-fit: cover;
    object-position: center;
}


/* ========================================
   VIDEO OVERLAY
   ======================================== */

.hero__overlay {
    z-index: 1;

    background:
        linear-gradient(
            0deg,
            rgba(7, 18, 35, 0.28),
            transparent 35%
        ),
        linear-gradient(
            90deg,
            rgba(13, 30, 55, 0.88) 0%,
            rgba(13, 30, 55, 0.75) 33%,
            rgba(13, 30, 55, 0.53) 65%,
            rgba(13, 30, 55, 0.08) 100%
        );
}


/* ========================================
   HERO CONTENT
   ======================================== */

.hero .hero__container {
    position: relative;

    z-index: 2;

    width: 100%;
    max-width: var(--hero-container-width);

    min-width: 0;

    margin-inline: auto;

    padding:
        clamp(96px, 12vh, 128px)
        clamp(32px, 5vw, 96px);
}

.hero__content {
    width: 100%;
    max-width: var(--hero-content-width);

    min-width: 0;

    text-align: left;
}


/* ========================================
   HERO TYPOGRAPHY
   ======================================== */

.hero__title {
    margin: 0;

    font-family: var(--font-heading);
    font-size: var(--hero-title-size);
    font-weight: var(--font-weight-bold);

    line-height: 1.06;
    letter-spacing: -0.05em;

    overflow-wrap: anywhere;

    color: var(--hero-text);

    text-shadow:
        0 2px 20px rgba(0, 0, 0, 0.14);
}

.hero__title span {
    display: block;

    margin-top: 6px;

    color: var(--hero-heading-accent);
}


/* ========================================
   HERO DESCRIPTION
   ======================================== */

.hero__description {
    max-width: 1000px;

    margin-top: 36px;

    font-size: clamp(18px, 1.5vw, 24px);
    font-weight: var(--font-weight-regular);

    line-height: 1.65;
    letter-spacing: -0.015em;

    color: var(--hero-text-secondary);
}

.hero__description p {
    margin: 0;
}

.hero__description p + p {
    margin-top: var(--space-1);
}

.hero__description strong {
    color: var(--hero-text);

    font-weight: var(--font-weight-semibold);
}


/* ========================================
   CUSTOMER REFERENCE
   ======================================== */

.hero__reference {
    max-width: 1000px;

    margin-top: var(--space-6);

    font-size: clamp(16px, 1.2vw, 20px);
    font-weight: var(--font-weight-regular);

    line-height: 1.65;

    color: var(--hero-text-secondary);
}

.hero__reference strong {
    color: var(--hero-heading-accent);

    font-weight: var(--font-weight-semibold);
}


/* ========================================
   HERO ACTIONS
   ======================================== */

.hero__actions {
    display: flex;

    flex-wrap: wrap;
    align-items: center;

    gap: var(--space-3) var(--space-7);

    margin-top: var(--space-10);
}


/* ========================================
   PRIMARY BUTTON
   ======================================== */

.hero__button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: var(--space-6);

    min-height: clamp(46px, 3.5vw, 58px);
    max-width: 100%;

    padding:
        14px
        clamp(24px, 2vw, 36px);

    border-radius: var(--radius-sm);

    font-family: var(--navbar-font);
    font-size: clamp(16px, 1.2vw, 20px);
    font-weight: var(--font-weight-medium);

    line-height: 1.25;

    text-align: center;
    text-decoration: none;

    transition:
        background-color var(--transition-default),
        color var(--transition-default);
}

.hero__button--primary {
    background: var(--cta-primary);
    color: var(--white);
}

.hero__button--primary:hover {
    background: var(--cta-hover);
}

.hero__button--primary:active {
    background: var(--cta-active);
}

.hero__button svg {
    flex-shrink: 0;

    transition: transform var(--transition-default);
}

.hero__button:hover svg {
    transform: translateX(4px);
}


/* ========================================
   HERO CONTROLS — LAYOUT
   ======================================== */

.hero__controls {
    position: absolute;

    z-index: 3;

    right: var(--hero-control-offset);
    bottom: var(--hero-control-offset);
    left: var(--hero-control-offset);

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    gap: var(--space-3);

    pointer-events: none;
}


/* ========================================
   HERO CONTROLS — SHARED STYLE
   ======================================== */

.hero__scroll,
.hero__video-toggle {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: var(--hero-control-size);

    border: 1px solid var(--hero-control-border);
    border-radius: var(--radius-full);

    background: var(--hero-control-background);
    color: var(--hero-text);

    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);

    pointer-events: auto;

    cursor: pointer;

    transition:
        background-color var(--transition-default),
        border-color var(--transition-default);
}

.hero__scroll:hover,
.hero__video-toggle:hover {
    background: var(--hero-control-hover);

    border-color: var(--white);
}


/* ========================================
   SCROLL TO NEXT SECTION
   ======================================== */

.hero__scroll {
    grid-column: 2;

    justify-self: center;

    gap: 14px;

    padding:
        var(--space-2)
        var(--space-5);

    font-family: var(--navbar-font);
    font-size: var(--font-size-body-small);
    font-weight: var(--font-weight-regular);

    line-height: 1;

    text-align: center;
    text-decoration: none;

    white-space: nowrap;
}

.hero__scroll svg {
    flex-shrink: 0;

    transition: transform var(--transition-default);
}

.hero__scroll:hover svg {
    transform: translateY(3px);
}


/* ========================================
   VIDEO PLAY / PAUSE CONTROL
   ======================================== */

.hero__video-toggle {
    grid-column: 3;

    justify-self: end;

    width: var(--hero-control-size);
    height: var(--hero-control-size);

    padding: 0;
}

.hero__video-toggle[hidden],
.hero__video-toggle .hero__play-icon,
.hero__video-toggle.is-paused .hero__pause-icon {
    display: none;
}

.hero__video-toggle.is-paused .hero__play-icon {
    display: block;
}


/* ========================================
   KEYBOARD ACCESSIBILITY
   ======================================== */

.hero__button:focus-visible,
.hero__scroll:focus-visible,
.hero__video-toggle:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 4px;
}


/* ========================================
   HERO ENTRANCE ANIMATION
   ======================================== */

@keyframes hero-content-enter {

    from {
        opacity: 0;

        transform: translateY(12px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}

@media (prefers-reduced-motion: no-preference) {

    .hero__title {
        animation: hero-content-enter 600ms ease-out both;
    }

    .hero__description {
        animation: hero-content-enter 600ms ease-out 100ms both;
    }

    .hero__reference {
        animation: hero-content-enter 600ms ease-out 180ms both;
    }

    .hero__actions {
        animation: hero-content-enter 600ms ease-out 260ms both;
    }

}


/* ========================================
   RESPONSIVE — TABLET PORTRAIT
   ======================================== */

@media (min-width: 769px) and (max-width: 1200px)
       and (orientation: portrait) {

    .hero {
        --hero-title-size: clamp(44px, 6.2vw, 74px);

        min-height: 72svh;
    }

    .hero .hero__container {
        padding: 80px 48px 112px;
    }

    .hero__title {
        line-height: 1.08;
        letter-spacing: -0.045em;
    }

    .hero__description {
        max-width: 780px;

        margin-top: var(--space-8);

        font-size: 20px;

        line-height: 1.65;
    }

    .hero__reference {
        margin-top: var(--space-6);

        font-size: 18px;
    }

    .hero__actions {
        margin-top: var(--space-8);
    }

    .hero__button {
        min-height: 54px;

        font-size: 18px;
    }

}


/* ========================================
   RESPONSIVE — MOBILE
   ======================================== */

@media (max-width: 768px) {

    .hero {
        --hero-title-size: clamp(30px, 7.5vw, 52px);

        --hero-control-size: 44px;
        --hero-control-offset: 16px;

        flex-direction: column;

        align-items: stretch;
        justify-content: center;

        min-height: 0;
    }


    /* Background */

    .hero__overlay {
        background:
            linear-gradient(
                0deg,
                rgba(7, 18, 35, 0.82) 0%,
                rgba(13, 30, 55, 0.65) 50%,
                rgba(13, 30, 55, 0.72) 100%
            );
    }


    /* Content */

    .hero .hero__container {
        padding:
            clamp(48px, 9svh, 80px)
            var(--space-6)
            var(--space-8);
    }

    .hero__title {
        line-height: 1.12;

        letter-spacing: -0.045em;
    }

    .hero__title span {
        margin-top: var(--space-2);
    }


    /* Description */

    .hero__description {
        margin-top: var(--space-6);

        font-size: 16px;

        line-height: 1.65;
    }

    .hero__description p + p {
        margin-top: var(--space-2);
    }


    /* Customer reference */

    .hero__reference {
        margin-top: var(--space-5);

        font-size: 15px;

        line-height: 1.6;
    }


    /* Main action */

    .hero__actions {
        margin-top: var(--space-7);
    }

    .hero__button {
        gap: var(--space-4);

        min-height: 48px;

        padding:
            var(--space-3)
            var(--space-6);

        font-size: 16px;
    }


    /* Bottom controls */

    .hero__controls {
        position: relative;

        inset: auto;

        grid-template-columns:
            minmax(0, 1fr)
            auto;

        gap: var(--space-3);

        padding:
            0
            var(--hero-control-offset)
            var(--hero-control-offset);
    }

    .hero__scroll {
        grid-column: 1;
        grid-row: 1;

        justify-self: start;

        gap: var(--space-2);

        min-width: 0;
        max-width: 100%;

        padding:
            var(--space-2)
            var(--space-4);

        font-size: 13px;

        line-height: 1.3;
        white-space: normal;
    }

    .hero__video-toggle {
        grid-column: 2;
        grid-row: 1;
    }

}


/* ========================================
   RESPONSIVE — SMALL MOBILE
   ======================================== */

@media (max-width: 360px) {

    .hero {
        --hero-title-size: clamp(26px, 8.5vw, 30px);

        --hero-control-offset: 12px;
    }

    .hero .hero__container {
        padding:
            var(--space-10)
            var(--space-4)
            var(--space-7);
    }

    .hero__description {
        margin-top: var(--space-5);

        font-size: 15px;
    }

    .hero__reference {
        font-size: 14px;
    }

    .hero__actions {
        margin-top: var(--space-6);
    }

    .hero__button {
        gap: var(--space-3);

        padding-inline: var(--space-4);
    }

    .hero__controls {
        gap: var(--space-2);
    }

    .hero__scroll {
        padding-inline: var(--space-3);

        font-size: 12px;
    }

}


/* ========================================
   ACCESSIBILITY — REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {

    /*
     * Keep the video element visible.
     * JavaScript prevents playback, allowing
     * the static poster to remain visible.
     */

    .hero__video-toggle {
        display: none;
    }

    .hero__button,
    .hero__button svg,
    .hero__scroll,
    .hero__scroll svg,
    .hero__video-toggle {
        transition: none;
    }

    .hero__button:hover svg,
    .hero__scroll:hover svg {
        transform: none;
    }

}
