/* Explain: Styles for the custom green-lit reel player on the Pilsen page. */
/* Pilsen Halloween — featured vertical reel presented in a custom green-lit player. */

.pil-reel-frame {
    position: relative;
    width: min(100%, 26rem, 46vh);
    margin-inline: auto;
}

.pil-reel-frame::before {
    position: absolute;
    inset: -0.55rem;
    z-index: 0;
    content: '';
    border-radius: 2.1rem;
    border: 1px solid rgba(48, 232, 121, 0.45);
    box-shadow: 0 0 34px rgba(48, 232, 121, 0.2);
    pointer-events: none;
}

.pil-reel-glow {
    position: absolute;
    inset: -16%;
    z-index: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 143, 76, 0.55), rgba(0, 143, 76, 0) 68%);
    filter: blur(42px);
    pointer-events: none;
    animation: pil-glow-pulse 6s ease-in-out infinite;
}

@keyframes pil-glow-pulse {
    0%, 100% { opacity: 0.68; }
    50% { opacity: 1; }
}

.pil-reel-stage {
    position: relative;
    z-index: 1;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 1.6rem;
    border: 1px solid rgba(48, 232, 121, 0.5);
    background: var(--pil-night);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(48, 232, 121, 0.22);
}

.pil-reel-poster,
.pil-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pil-reel-poster {
    z-index: 0;
    transition: opacity 500ms ease;
}

.pil-video {
    z-index: 1;
    background: #050907;
}

.pil-reel-scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(5, 9, 7, 0.42), rgba(5, 9, 7, 0.14) 38%, rgba(5, 9, 7, 0.94));
    transition: opacity 500ms ease;
    pointer-events: none;
}

.pil-reel-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: flex;
    width: 5.2rem;
    height: 5.2rem;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(48, 232, 121, 0.65);
    border-radius: 999px;
    background: rgba(5, 9, 7, 0.55);
    color: var(--pil-neon);
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), background 320ms ease, color 320ms ease, opacity 400ms ease;
}

.pil-reel-play::after {
    position: absolute;
    inset: -0.75rem;
    content: '';
    border-radius: 999px;
    border: 1px solid rgba(48, 232, 121, 0.3);
    animation: pil-ring 2.8s ease-out infinite;
}

@keyframes pil-ring {
    0% { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1.35); opacity: 0; }
}

.pil-reel-play:hover,
.pil-reel-play:focus-visible {
    transform: translate(-50%, -50%) scale(1.08);
    background: var(--pil-neon);
    color: #04140b;
}

.pil-reel-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 4;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 169, 72, 0.55);
    background: rgba(5, 9, 7, 0.72);
    color: var(--pil-gold);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: opacity 400ms ease;
}

.pil-reel-cta {
    position: absolute;
    top: calc(50% + 3.7rem);
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
    color: var(--pil-warm);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    white-space: nowrap;
    text-transform: uppercase;
    text-shadow: 0 2px 14px rgba(5, 9, 7, 0.9);
    pointer-events: none;
    transition: opacity 400ms ease;
}

/* playing state */

.pil-reel-stage.is-playing .pil-reel-poster,
.pil-reel-stage.is-playing .pil-reel-scrim,
.pil-reel-stage.is-playing .pil-reel-play,
.pil-reel-stage.is-playing .pil-reel-cta,
.pil-reel-stage.is-playing .pil-reel-badge {
    opacity: 0;
    pointer-events: none;
}

.pil-reel-stage.is-playing .pil-reel-play {
    visibility: hidden;
}

/* ---------- custom controls ---------- */

.pil-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 1.6rem 0.85rem 0.8rem;
    background: linear-gradient(180deg, transparent, rgba(5, 9, 7, 0.95) 46%);
}

.pil-reel-stage.is-playing .pil-controls {
    display: flex;
}

.pil-ctl {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pil-line);
    border-radius: 999px;
    background: rgba(5, 9, 7, 0.6);
    color: var(--pil-warm);
    font-size: 0.78rem;
    cursor: pointer;
    transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}

.pil-ctl:hover,
.pil-ctl:focus-visible {
    border-color: var(--pil-neon);
    color: var(--pil-neon);
}

.pil-progress {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    height: 1.8rem;
    align-items: center;
    cursor: pointer;
}

.pil-progress:focus-visible {
    outline: 2px solid var(--pil-neon);
    outline-offset: 3px;
    border-radius: 999px;
}

.pil-progress-track {
    position: relative;
    display: block;
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(244, 242, 233, 0.22);
}

.pil-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pil-emerald), var(--pil-neon));
}

.pil-time {
    flex: 0 0 auto;
    color: var(--pil-muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

.pil-volume {
    flex: 0 0 auto;
    width: 4.6rem;
    height: 1.4rem;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.pil-volume::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(244, 242, 233, 0.22);
}

.pil-volume::-webkit-slider-thumb {
    width: 0.8rem;
    height: 0.8rem;
    margin-top: -0.28rem;
    border: 0;
    border-radius: 50%;
    background: var(--pil-neon);
    -webkit-appearance: none;
}

.pil-volume::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(244, 242, 233, 0.22);
}

.pil-volume::-moz-range-thumb {
    width: 0.8rem;
    height: 0.8rem;
    border: 0;
    border-radius: 50%;
    background: var(--pil-neon);
}

/* ---------- project fact sheet ---------- */

.pil-fact {
    padding-top: 0.9rem;
    border-top: 1px solid var(--pil-line);
}

.pil-fact-label {
    display: block;
    color: var(--pil-neon);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.pil-fact-value {
    display: block;
    margin-top: 0.55rem;
    color: var(--pil-warm);
    font-size: 0.98rem;
    font-weight: 700;
}

/* ---------- responsive ---------- */

@media (max-width: 639px) {
    .pil-volume {
        display: none;
    }

    .pil-time {
        display: none;
    }

    .pil-reel-play {
        width: 4.4rem;
        height: 4.4rem;
        font-size: 1.25rem;
    }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .pil-reel-glow,
    .pil-reel-play::after {
        animation: none !important;
    }

    .pil-reel-play,
    .pil-reel-poster,
    .pil-reel-scrim,
    .pil-reel-badge {
        transition: none !important;
    }
}