@import url('https://fonts.googleapis.com/css?family=Montserrat');

/* ------------- VARIABLES ------------- */
:root {
    --parallax-offset: 30vh;
    --content-offset: 40vh;
    --transition-speed: 1.2s;
}

.parallax-hero-container,
.parallax-hero-container * {
    box-sizing: border-box;
}

.parallax-hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.background {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
    height: calc(100vh + var(--parallax-offset));
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
	padding: 50px;
    transform: translateY(var(--parallax-offset));
    transition: transform var(--transition-speed) cubic-bezier(0.22, 0.44, 0, 1);
}

.background:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    display: block;
    cursor: pointer;
    z-index: 0;
}

.background-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* First slide specific styling */
.background:first-child {
    transform: translateY(calc(var(--parallax-offset) / -2));
    z-index: 7;
}

.background:first-child .content-wrapper {
    transform: translateY(calc(var(--parallax-offset) / 2));
}

/* Stacking order for slides */
.background:nth-child(1) { z-index: 7; }
.background:nth-child(2) { z-index: 6; }
.background:nth-child(3) { z-index: 5; }
.background:nth-child(4) { z-index: 4; }
.background:nth-child(5) { z-index: 3; }
.background:nth-child(6) { z-index: 2; }
.background:nth-child(7) { z-index: 1; }

.content-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    text-align: center;
    flex-flow: column nowrap;
    color: #fff;
    font-family: Montserrat, sans-serif;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    transform: translateY(var(--content-offset));
    will-change: transform;
    backface-visibility: hidden;
    transition: transform calc(var(--transition-speed) + 0.5s) cubic-bezier(0.22, 0.44, 0, 1);
    padding: 0 20px;
    pointer-events: none;
}

.content-title {
    font-size: 12vh;
    line-height: 1.4;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.content-subtitle {
    font-size: 3vh;
    line-height: 1.4;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-title { font-size: 8vh; }
    .content-subtitle { font-size: 2.5vh; }
}
@media (max-width: 480px) {
    .content-title { font-size: 6vh; }
    .content-subtitle { font-size: 2vh; }
}

/* ------------- PARALLAX STATES ------------- */
.background.up-scroll {
    transform: translate3d(0, calc(var(--parallax-offset) / -2), 0);
}
.background.up-scroll .content-wrapper {
    transform: translateY(calc(var(--parallax-offset) / 2));
}
.background.up-scroll + .background {
    transform: translate3d(0, var(--parallax-offset), 0);
}
.background.up-scroll + .background .content-wrapper {
    transform: translateY(var(--parallax-offset));
}

.background.down-scroll {
    transform: translate3d(0, calc(-100vh - var(--parallax-offset)), 0);
}
.background.down-scroll .content-wrapper {
    transform: translateY(var(--content-offset));
}
.background.down-scroll + .background:not(.down-scroll) {
    transform: translate3d(0, calc(var(--parallax-offset) / -2), 0);
}
.background.down-scroll + .background:not(.down-scroll) .content-wrapper {
    transform: translateY(calc(var(--parallax-offset) / 2));
}

/* ---- Controls (TOP-LEFT) ---- */
.hero-controls {
/*     position: absolute; */
    top: 20px;
    left: 20px;
    display: flex;
    gap: 12px;
    z-index: 10;
    pointer-events: auto;
}

.hero-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-btn:hover {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.75);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-btn:active {
    transform: scale(0.95);
}

.hero-btn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.icon-sound,
.icon-play {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
}

/* Sound button - Speaker icon */
.hero-sound .icon-sound::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent #fff;
}

.hero-sound .icon-sound::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 10px;
    background: #fff;
    border-radius: 0 2px 2px 0;
}

/* Sound waves when unmuted */
.hero-sound[aria-pressed="true"] .icon-sound {
    position: relative;
}

.hero-sound[aria-pressed="true"] .icon-sound::before {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-left: none;
    border-radius: 0 50% 50% 0;
}

.hero-sound[aria-pressed="true"] .icon-sound::after {
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent #fff;
    background: transparent;
    border-radius: 0;
}

/* Muted state - X over speaker */
.hero-sound[aria-pressed="false"]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #ff4444;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-radius: 1px;
}

/* Play button - Pause icon (default when playing) */
.hero-play .icon-play::before,
.hero-play .icon-play::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #fff;
    border-radius: 1px;
}

.hero-play .icon-play::before {
    left: 5px;
}

.hero-play .icon-play::after {
    right: 5px;
}

/* Play button - Play icon (when paused) */
.hero-play[data-state="paused"] .icon-play::before,
.hero-play[data-state="paused"] .icon-play::after {
    display: none;
}

.hero-play[data-state="paused"] .icon-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent #fff;
    margin-left: 2px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hero-controls {
        top: 15px;
        left: 15px;
        gap: 10px;
    }
    
    .hero-btn {
        width: 40px;
        height: 40px;
    }
}