@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/*
  Video text mask — black stage that dissolves into the page
  (soft transition, no hard edge).
*/

.hero.hero--clip-mask {
    display: grid;
    place-items: center;
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    min-height: calc(100svh - 120px);
    margin: -32px 0 0;
    margin-left: -50vw;
    padding: clamp(16px, 3vh, 36px) 0 clamp(72px, 14vh, 160px);
    overflow: hidden;
    gap: 0;

    /* Transparent so page atmosphere shows through the dissolve */
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/*
  Black veil that fades out at top + bottom into the page.
  This is the transition (not a hard color stop).
*/
.hero.hero--clip-mask::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: #000;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.55) 8%,
        #000 18%,
        #000 58%,
        rgba(0, 0, 0, 0.7) 78%,
        rgba(0, 0, 0, 0.25) 90%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.55) 8%,
        #000 18%,
        #000 58%,
        rgba(0, 0, 0, 0.7) 78%,
        rgba(0, 0, 0, 0.25) 90%,
        transparent 100%
    );
}

/* Extra soft bottom dissolve into page haze */
.hero.hero--clip-mask::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(42vh, 280px);
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        color-mix(in srgb, var(--bg) 20%, transparent) 35%,
        color-mix(in srgb, var(--bg) 55%, transparent) 65%,
        color-mix(in srgb, var(--bg) 85%, transparent) 88%,
        var(--bg) 100%
    );
}

.hero-clip-mask {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: transparent;
}

.hero-clip-mask__video {
    display: block;
    width: min(100%, 1480px);
    height: min(78vh, 860px);
    max-height: calc(100svh - 130px);
    object-fit: cover;
    background: transparent;

    /* Static SVG text-mask fallback (JS upgrades to Bebas Neue) */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1100 680'%3E%3Ctext x='550' y='245' text-anchor='middle' dominant-baseline='middle' font-family='Impact,Arial Black,sans-serif' font-size='340' font-weight='700' fill='white'%3ELAURA%3C/text%3E%3Ctext x='550' y='475' text-anchor='middle' dominant-baseline='middle' font-family='Impact,Arial Black,sans-serif' font-size='340' font-weight='700' fill='white'%3ETESORO%3C/text%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1100 680'%3E%3Ctext x='550' y='245' text-anchor='middle' dominant-baseline='middle' font-family='Impact,Arial Black,sans-serif' font-size='340' font-weight='700' fill='white'%3ELAURA%3C/text%3E%3Ctext x='550' y='475' text-anchor='middle' dominant-baseline='middle' font-family='Impact,Arial Black,sans-serif' font-size='340' font-weight='700' fill='white'%3ETESORO%3C/text%3E%3C/svg%3E");
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .hero.hero--clip-mask {
        min-height: calc(100svh - 160px);
        margin-top: -24px;
        padding-bottom: clamp(64px, 16vh, 120px);
    }

    .hero.hero--clip-mask::after {
        height: min(36vh, 200px);
    }

    .hero-clip-mask__video {
        width: 100%;
        height: min(70vh, 620px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-clip-mask__video {
        animation: none;
    }
}
