.cw-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    background-color: var(--color-bg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    overflow: hidden;
}

@media (max-width: 767px) {
    .cw-hero[style*="--cw-hero-bg-mobile"] {
        background-image: var(--cw-hero-bg-mobile) !important;
    }
}

.cw-hero__video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    transform: scale(calc(1 + var(--cw-p, 0) * 0.06));
    will-change: transform;
    backface-visibility: hidden;
}

.cw-hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.cw-hero__video-overlay {
    position: absolute;
    inset: 0;
    background: var(--color-bg);
    opacity: calc(0.3 + var(--cw-p, 0) * 0.15);
    will-change: opacity;
    pointer-events: none;
}

.cw-hero__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%);
    opacity: var(--cw-p, 0);
    will-change: opacity;
    pointer-events: none;
    z-index: 1;
}

.cw-hero__grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: calc(var(--cw-p, 0) * 0.06);
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
}

.cw-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--color-bg) 0%,
        rgba(11, 12, 14, 0.85) 40%,
        rgba(11, 12, 14, 0.55) 100%
    );
    z-index: 1;
}

.cw-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 120px 24px 80px 24px;
}

.cw-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--color-secondary);
    padding: 0.375rem 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--color-secondary-light);
    opacity: 0;
}

.cw-hero__headline {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.cw-hero__headline-line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
}

.cw-hero__headline-accent {
    display: block;
    color: var(--color-accent);
    opacity: 0;
    transform: translateY(40px);
}

.cw-hero__sub {
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);
    line-height: var(--lh-body);
    color: var(--color-text-muted);
    max-width: 580px;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
}

.cw-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
}

@media (max-width: 480px) {
    .cw-hero__ctas {
        flex-direction: column;
    }
}

.cw-hero__right-image {
    display: none;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 1;
    overflow: hidden;
}

.cw-hero__right-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.cw-hero__right-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        var(--color-bg) 0%,
        rgba(11, 12, 14, 0.85) 20%,
        rgba(11, 12, 14, 0.4) 55%,
        transparent 100%
    );
}

@media (min-width: 768px) {
    .cw-hero--has-image .cw-hero__right-image {
        display: block;
    }
}

.cw-hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
}

/* Mobile: shrink the display headline so long words ("Chatsworth") fit,
   and center the hero content. */
@media (max-width: 767px) {
    .cw-hero {
        min-height: 78vh;
    }
    .cw-hero__content {
        text-align: center;
        padding-top: 88px;
    }
    .cw-hero__headline {
        font-size: clamp(2.25rem, 11vw, 3.75rem);
        align-items: center;
    }
    .cw-hero__sub {
        margin-left: auto;
        margin-right: auto;
    }
    .cw-hero__ctas {
        justify-content: center;
        align-items: center;
    }
}

.cw-hero__scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: var(--color-divider);
    margin: 0 auto;
    transform-origin: top;
    animation: cw-scroll-line 2s var(--ease-out) infinite;
}

@keyframes cw-scroll-line {
    0%   { transform: scaleY(0); opacity: 0; }
    30%  { opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

@media (min-width: 768px) {
    .cw-hero__content {
        padding: 140px 48px 100px 48px;
    }
}

@media (min-width: 1280px) {
    .cw-hero__content {
        padding: 160px 0 180px 80px;
    }
}
