/* Minimal reset */


html, body {
    height: 100%;
}

body {
    background: #000;
    color: #fff;
}

/* Timing and easing */
:root {
    /* Slow start → fast end (noticeable acceleration) */
    --ease-accel: cubic-bezier(0.78, 0, 0.92, 1);

    /* Curtain feels snappy */
    --ease-curtain: cubic-bezier(0.2, 0.9, 0.2, 1);

    --bg-fade-dur: 0.9s;

    /* Curtain timings */
    --curtain-in: 0.26s; /* slide up to cover */
    --curtain-out: 0.80s; /* slide out to reveal */
    --curtain-hold: 60ms; /* small pause while switching state */
}

/* =========================
   HERO
========================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
}

/* Background: no movement, only subtle fade */
.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .30), rgba(0, 0, 0, .45)),
    var(--hero) center/cover no-repeat;
    opacity: 0;
    animation: bgFadeIn var(--bg-fade-dur) ease .02s forwards;
    will-change: opacity;
    z-index: 0;
}

@keyframes bgFadeIn {
    to {
        opacity: 1;
    }
}

.hero-top {
    position: absolute;
    top: 10px;
    left: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.brand{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    text-decoration: none;
}

/* Logo image */
.brand img{
    max-width: 22px;
    max-height: 22px;
    width: auto;
    height: auto;
    display: block;
    pointer-events: none; /* prevents drag/select */
}

.menu-btn {
    font-size: 7pt;
    background: transparent;
    border: 0;
    color: #fff;
    font-weight: 600;
    letter-spacing: .14em;
    cursor: pointer;
    opacity: .9;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 16px;
}

/* Your preferred sizing */
.hero-title {
    margin: 0;
    font-size: clamp(78px, 25.5vw, 260px);
    line-height: .9;
    letter-spacing: .03em;
}

/* Title reveal */
.reveal {
    display: inline-block;
    transform: translateY(26px) scale(.985);
    opacity: 0;
    animation: revealUp 1.25s var(--ease-accel) .18s forwards;
    will-change: transform, opacity;
}

@keyframes revealUp {
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.play-btn{
    position: absolute;
    left: 20px;
    bottom: -50px;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;

    opacity: .9;
    text-align: left;
}


.play-ico {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
}

.play-text {
    font-size: 12px;
    letter-spacing: .22em;
    font-weight: 600;
}

/* =========================
   VIDEO OVERLAY
========================= */
.video-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    display: none;
    z-index: 900;
}

.video-overlay.is-open {
    display: block;
}

.back-btn {
    position: absolute;
    top: 22px;
    left: 22px;
    background: transparent;
    border: 0;
    color: #fff;
    font-weight: 600;
    letter-spacing: .14em;
    cursor: pointer;
    opacity: .9;
    z-index: 3;
}

.video-wrap {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1;
}

.video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-ui {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 22px;
    align-items: center;
    z-index: 2;
}

.ui-left {
    min-width: 220px;
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.pause-btn {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    opacity: .9;
}

.chapter {
    font-size: 12px;
    letter-spacing: .18em;
    opacity: .85;
    white-space: nowrap;
}

.time {
    font-size: 40px;
    letter-spacing: .08em;
    font-weight: 700;
    opacity: .95;
    white-space: nowrap;
}

.bar {
    position: relative;
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, .25);
}

.bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: rgba(255, 255, 255, .9);
}

.bar-range {
    position: absolute;
    inset: -10px 0 -10px 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

/* =========================
   GLOBAL CURTAIN (FULL PAGE)
========================= */
.curtain {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 800; /* above everything */
    pointer-events: none;
    transform: translateY(0);
    opacity: 1;
    display: block;
}

/* Intro: starts covering, then slides up and fades out */
.curtain.is-intro {
    display: block;
    pointer-events: none;
    animation: curtainIntro 0.95s var(--ease-curtain) 0s forwards;
}

/* Transition: bring curtain in (from bottom to cover) */
.curtain.is-in {
    display: block;
    pointer-events: auto; /* blocks clicks during transition */
    animation: curtainIn var(--curtain-in) var(--ease-curtain) 0s forwards;
}

/* Transition: take curtain out (cover -> slides up and fades) */
.curtain.is-out {
    display: block;
    pointer-events: none;
    animation: curtainOut var(--curtain-out) var(--ease-accel) 0s forwards;
}

@keyframes curtainIntro {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-110%);
        opacity: 0.92;
    }
}

/* Starts below view, slides up to cover */
@keyframes curtainIn {
    from {
        transform: translateY(110%);
        opacity: 1;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slides up away and fades slightly */
@keyframes curtainOut {
    0% {
        transform: translateY(0);
    }

    55% {
        transform: translateY(-14%);
    }

    80% {
        transform: translateY(-40%);
    }

    100% {
        transform: translateY(-110%);
    }
}

/* Letter-by-letter reveal */
.reveal{
    display: inline-block;
    opacity: 1;              /* don't hide the whole word */
    transform: none;
    animation: none;         /* IMPORTANT: disable old whole-word animation */
}

.reveal .char{
    display: inline-block;
    opacity: 0;
    transform: translateY(80px);
    will-change: transform, opacity;

    animation: charUp 0.9s var(--ease-accel) forwards;
    animation-delay: calc(var(--i) * 80ms + 180ms);
}

@keyframes charUp{
    to{
        opacity: 1;
        transform: translateY(0);
    }
}
