/* ==========================================================================
   CINEMATIC FULLSCREEN VIDEO HERO
   House On The Clouds–inspired luxury atmosphere
   ========================================================================== */

.cinematic-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background-color: var(--bg-primary);
}

/* --- Media layer --- */
.cinematic-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    will-change: transform;
}

.cinematic-hero__video,
.cinematic-hero__fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

.cinematic-hero__video {
    transform: scale(1.06);
    animation: heroVideoZoom 28s ease-out forwards;
    filter: brightness(0.78) contrast(1.03) saturate(0.9);
}

.cinematic-hero.is-video-fallback .cinematic-hero__video {
    display: none;
}

.cinematic-hero__fallback {
    display: none;
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
    transform: scale(1.06);
    animation: heroVideoZoom 28s ease-out forwards;
}

.cinematic-hero.is-video-fallback .cinematic-hero__fallback {
    display: block;
}

@keyframes heroVideoZoom {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
}

/* --- Overlays --- */
.cinematic-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(61, 46, 40, 0.38) 0%, rgba(61, 46, 40, 0.08) 40%, transparent 62%),
        linear-gradient(0deg, rgba(45, 34, 30, 0.55) 0%, rgba(45, 34, 30, 0.18) 45%, transparent 72%),
        rgba(61, 46, 40, 0.08);
}

.cinematic-hero__grain {
    position: absolute;
    inset: -50%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    animation: heroGrainDrift 9s steps(8) infinite;
}

@keyframes heroGrainDrift {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(-4%, -6%); }
    50%      { transform: translate(5%, 4%); }
    75%      { transform: translate(-3%, 7%); }
}

/* --- Content --- */
.cinematic-hero__content {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(6.5rem, 15vh, 10rem) clamp(1.5rem, 4vw, 5rem) clamp(6rem, 13vh, 8.5rem);
    max-width: 1320px;
    margin: 0 auto;
    will-change: transform;
}

.cinematic-hero__title {
    font-family: var(--font-headings);
    font-size: clamp(1.85rem, 5.2vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-on-media);
    max-width: 14ch;
    margin-bottom: var(--space-md);
}

.cinematic-hero__line-wrap {
    display: block;
    overflow: hidden;
    padding: 0.06em 0;
}

.cinematic-hero__line {
    display: block;
    transform: translateY(110%);
    opacity: 0;
    will-change: transform, opacity;
}

.cinematic-hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.78rem, 1.4vw, 0.95rem);
    font-weight: 300;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-on-media-muted);
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
    max-width: 32rem;
    opacity: 0;
    transform: translateY(24px);
}

.cinematic-hero__cta-wrap {
    opacity: 0;
    transform: translateY(20px);
}

.cinematic-hero__cta.btn-primary {
    padding: var(--btn-padding);
    font-size: var(--btn-font-size);
    letter-spacing: 0.24em;
    border: 1px solid rgba(247, 241, 234, 0.35);
    color: var(--text-on-media);
    background-color: rgba(61, 46, 40, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cinematic-hero__cta.btn-primary:hover {
    background-color: rgba(106, 42, 42, 0.4);
    border-color: rgba(247, 241, 234, 0.5);
}

/* --- Scroll cue --- */
.cinematic-hero__scroll {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-on-media-muted);
    text-decoration: none;
    transform: translateX(-50%);
    opacity: 0;
    transition: color 0.35s ease;
}

.cinematic-hero__scroll:hover {
    color: var(--accent-gold);
}

.cinematic-hero__scroll-label {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.cinematic-hero__scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent-gold), transparent);
    transform-origin: top center;
    animation: heroScrollLine 2.4s ease-in-out infinite;
}

@keyframes heroScrollLine {
    0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
    50%      { transform: scaleY(1); opacity: 1; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .cinematic-hero__video,
    .cinematic-hero__fallback {
        animation: none;
        transform: scale(1);
    }

    .cinematic-hero__grain {
        animation: none;
    }

    .cinematic-hero__line,
    .cinematic-hero__subtitle,
    .cinematic-hero__cta-wrap,
    .cinematic-hero__scroll {
        opacity: 1;
        transform: none;
    }

    .cinematic-hero__scroll-line {
        animation: none;
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .cinematic-hero__content {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .cinematic-hero__title {
        letter-spacing: 0.045em;
        max-width: 16ch;
    }
}

@media (max-width: 767px) {
    .cinematic-hero__content {
        padding-bottom: clamp(5rem, 14vh, 6.5rem);
        align-items: center;
        text-align: center;
    }

    .cinematic-hero__title {
        font-size: clamp(1.45rem, 7.2vw, 2rem);
        letter-spacing: 0.04em;
        max-width: 100%;
    }

    .cinematic-hero__subtitle {
        letter-spacing: 0.2em;
        margin-bottom: var(--space-md);
    }

    .cinematic-hero__scroll {
        bottom: var(--space-sm);
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .cinematic-hero__content {
        padding-top: 5rem;
        padding-bottom: 3.5rem;
    }

    .cinematic-hero__title {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
        margin-bottom: var(--space-sm);
    }

    .cinematic-hero__subtitle {
        margin-bottom: var(--space-sm);
    }

    .cinematic-hero__scroll {
        display: none;
    }
}
