/*
 * Block: Hero - Home
 * SaaS-style hero with centered content and screenshot image
 */

/* =============================================
   SECTION OVERRIDE
   ============================================= */

.hero-home {
    padding-bottom: 0;
    overflow: visible;
}

.hero-home::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--body-bg-color, #fff);
    z-index: 2;
}

/* =============================================
   LAYOUT
   ============================================= */

.hero-home__layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--container-gap);
    position: relative;
    z-index: 3;
}

/* =============================================
   TEXT CONTENT
   ============================================= */

.hero-home__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--container-gap);
    text-align: center;
}

.hero-home .heading-group__title {
    animation: heroHome-fade-in-up 0.8s ease-out;
    max-width: var(--width-60);
    font-size: var(--h1);
}

.hero-home .heading-group__subtitle {
    animation: heroHome-fade-in-up 1s ease-out 0.2s backwards;
}

.hero-home .cluster {
    animation: heroHome-fade-in-up 1.2s ease-out 0.4s backwards;
}

/* =============================================
   MEDIA WRAPPER
   ============================================= */

.hero-home__media {
    position: relative;
    width: 100%;
    animation: heroHome-fade-in-up 1.4s ease-out 0.6s backwards;
    max-width: var(--width-90);
}

/* =============================================
   SCREENSHOT IMAGE
   ============================================= */

.hero-home__image {
    margin: 0;
    width: 100%;
}

.hero-home__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-m, 1.2rem);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
}

/* =============================================
   PLAY BUTTON
   ============================================= */

.hero-home__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: 2;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    color: var(--base);
    transition: transform var(--transition), opacity var(--transition);
}

.hero-home__play:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.hero-home__play-icon {
    width: clamp(4.8rem, 6vw, 8rem);
    height: clamp(4.8rem, 6vw, 8rem);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* =============================================
   VIDEO PLAYER
   ============================================= */

.hero-home__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-m, 1.2rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Active state: video playing */
.hero-home__media.is-playing .hero-home__video {
    opacity: 1;
    pointer-events: auto;
}

.hero-home__media.is-playing .hero-home__play {
    opacity: 0;
    pointer-events: none;
}

/* Paused state: video stays visible, play button returns */
.hero-home__media.is-paused .hero-home__video {
    opacity: 1;
    pointer-events: auto;
}

.hero-home__media.is-paused::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-m, 1.2rem);
    pointer-events: none;
    z-index: 1;
}

.hero-home__media.is-paused .hero-home__play {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes heroHome-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .hero-home .heading-group__title,
    .hero-home .heading-group__subtitle,
    .hero-home .cluster,
    .hero-home__media {
        animation: none !important;
    }
}
