/* ============================================
   Nik Behrendt – Filmmaker Portfolio
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    cursor: default;
    user-select: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Slider Container --- */
.slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* --- Individual Slide --- */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: none;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide.transitioning-in {
    z-index: 3;
}

.slide.transitioning-out {
    z-index: 2;
}

/* --- Slide Background --- */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.bg-video.loaded {
    opacity: 1;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* --- Slide Content --- */
.slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

/* --- Title --- */
.title {
    font-family: 'Montserrat', sans-serif;
    font-size: 130px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 50px;
    line-height: 130px;
    text-align: center;
    padding-left: 50px;
    position: relative;
    z-index: 9;
    text-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
    margin-top: -70px;
    opacity: 0;
    transform: translateY(-100%);
    transition: none;
    white-space: nowrap;
}

.slide.active .title {
    opacity: 1;
    transform: translateY(0);
}

/* --- Title Shadow (follows mouse) --- */
.title-shadow {
    font-family: 'Montserrat', sans-serif;
    font-size: 140px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    letter-spacing: 50px;
    line-height: 130px;
    text-align: center;
    padding-left: 50px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: -70px;
    z-index: 6;
    filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide.active .title-shadow {
    opacity: 1;
}

/* --- Subtitle --- */
.subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(11px, 1.6vw, 30px);
    font-weight: 400;
    color: #ffffff;
    letter-spacing: clamp(6px, 2vw, 40px);
    line-height: 30px;
    text-align: center;
    padding-left: clamp(6px, 2vw, 40px);
    text-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 60px;
    z-index: 12;
    opacity: 0;
    transition: none;
    white-space: nowrap;
}

.slide.active .subtitle {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* --- Button Area --- */
.button-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 280px;
    z-index: 13;
    cursor: pointer;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-bg {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 65%, rgba(0,0,0,0) 100%);
    transition: transform 0.5s cubic-bezier(0.39, 0.575, 0.565, 1),
                background 0.5s cubic-bezier(0.39, 0.575, 0.565, 1);
    z-index: -1;
}

.button-area:hover .button-bg {
    transform: scale(1.3);
    background: radial-gradient(circle, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 65%, rgba(0,0,0,0) 100%);
    backdrop-filter: blur(20px);
}

.button-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 5px;
    line-height: 20px;
    text-transform: uppercase;
    text-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.5s cubic-bezier(0.39, 0.575, 0.565, 1);
    pointer-events: none;
}

.button-area:hover .button-text {
    transform: scale(1.2);
}

.button-text-simple {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 5px;
    line-height: 20px;
    text-transform: uppercase;
    text-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

/* Contact slide buttons */
.contact-buttons {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 200px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 60px;
    pointer-events: all;
}

.contact-buttons .button-area {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 0;
}

.contact-me-btn {
    cursor: pointer;
}

/* --- Impressum Link --- */
.impressum-link {
    position: absolute;
    bottom: 38px;
    right: 79px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0;
    line-height: 13px;
    z-index: 14;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.slide.active .impressum-link {
    opacity: 1;
}

.impressum-link:hover {
    opacity: 0.7;
}

/* --- Mouse Overlay Effect --- */
.mouse-overlay {
    position: fixed;
    width: 1000px;
    height: 1000px;
    border-radius: 0;
    background: radial-gradient(circle, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 65%, rgba(0,0,0,0) 100%);
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 7;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: left, top;
}

.mouse-overlay.visible {
    opacity: 1;
}

.mouse-shadow {
    position: fixed;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    will-change: left, top;
}

/* --- Bullet Navigation --- */
.bullet-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    padding: 10px;
}

.bullet {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.bullet-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #e5e5e5;
    transition: background-color 0.3s ease;
    display: block;
}

.bullet:hover .bullet-dot,
.bullet.active .bullet-dot {
    background: #ffffff;
}

.bullet-title {
    position: absolute;
    left: 27px;
    top: -4px;
    color: #888888;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.75);
    line-height: 20px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.bullet-title::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.75);
}

.bullet:hover .bullet-title {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

.bullet.active:hover .bullet-title {
    background: #ffffff;
}

.bullet.active:hover .bullet-title::after {
    border-color: transparent transparent transparent #ffffff;
}

/* --- Slide Transition Animations --- */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 1;
        visibility: visible;
    }
    to {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 1;
        visibility: visible;
    }
    to {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

@keyframes slideOutToTop {
    from {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    to {
        transform: translateY(-100%);
        opacity: 1;
        visibility: visible;
    }
}

@keyframes slideOutToBottom {
    from {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    to {
        transform: translateY(100%);
        opacity: 1;
        visibility: visible;
    }
}

/* Content enter animations */
@keyframes titleEnter {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtitleEnter {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Content leave animations */
@keyframes titleLeave {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* Active slide content animations */
.slide.animate-in .title {
    animation: titleEnter 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.slide.animate-in .subtitle {
    animation: subtitleEnter 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.slide.animate-in .button-text,
.slide.animate-in .button-bg,
.slide.animate-in .button-area,
.slide.animate-in .contact-buttons,
.slide.animate-in .impressum-link,
.slide.animate-in .title-shadow {
    animation: fadeIn 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.slide.animate-out .title {
    animation: titleLeave 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.slide.animate-out .subtitle,
.slide.animate-out .button-text,
.slide.animate-out .button-bg,
.slide.animate-out .button-area,
.slide.animate-out .contact-buttons,
.slide.animate-out .impressum-link,
.slide.animate-out .title-shadow {
    animation: fadeOut 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-dots {
    display: flex;
    gap: 8px;
}

.preloader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6d6d6d;
    animation: preloaderBounce 1.4s infinite ease-in-out both;
}

.preloader-dots span:nth-child(1) { animation-delay: -0.32s; }
.preloader-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes preloaderBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* --- About Brief (NIK slide) --- */
.about-brief {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 130px;
    text-align: center;
    z-index: 12;
    opacity: 0;
    transition: none;
    pointer-events: none;
}

.slide.active .about-brief {
    opacity: 1;
}

.slide.animate-in .about-brief {
    animation: fadeIn 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.slide.animate-out .about-brief {
    animation: fadeOut 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.about-brief p {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: rgba(255,255,255,0.7);
    letter-spacing: 4px;
    line-height: 24px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

.about-brief .about-location {
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* --- Nav Buttons (Slide 1) --- */
.nav-buttons {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 280px;
    display: flex;
    gap: 24px;
    z-index: 13;
    pointer-events: all;
    opacity: 0;
    transition: none;
}

.slide.active .nav-buttons {
    opacity: 1;
}

.slide.animate-in .nav-buttons {
    animation: fadeIn 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.slide.animate-out .nav-buttons {
    animation: fadeOut 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.nav-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 14px 32px;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.2);
    transition: all 0.35s ease;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.nav-btn:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.4);
    transform: scale(1.05);
}

/* --- Showreel CTA --- */
.showreel-cta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 350px;
    z-index: 13;
    cursor: pointer;
    pointer-events: all;
    opacity: 0;
    transition: none;
}

.slide.active .showreel-cta {
    opacity: 1;
}

.slide.animate-in .showreel-cta {
    animation: fadeIn 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.slide.animate-out .showreel-cta {
    animation: fadeOut 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.showreel-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.play-triangle {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.showreel-cta:hover .showreel-text {
    color: #ffffff;
}

/* --- Showreel Overlay --- */
.showreel-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.showreel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.showreel-close {
    position: absolute;
    top: 20px; right: 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    z-index: 9999;
    padding: 10px;
    transition: color 0.3s ease;
}

.showreel-close:hover { color: #ffffff; }

.showreel-video {
    max-width: 90%;
    max-height: 80vh;
    outline: none;
}

/* --- Swipe Hint (mobile only) --- */
.swipe-hint {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: swipeHintFade 4s ease 2s forwards;
    pointer-events: none;
}

.swipe-hint svg {
    animation: swipeHintBounce 1.5s ease-in-out infinite;
}

@keyframes swipeHintBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes swipeHintFade {
    0% { opacity: 0; }
    15% { opacity: 0.6; }
    85% { opacity: 0.6; }
    100% { opacity: 0; }
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
    .title {
        font-size: 100px;
        line-height: 100px;
        letter-spacing: 40px;
        padding-left: 40px;
    }

    .title-shadow {
        font-size: 105px;
        line-height: 100px;
        letter-spacing: 40px;
        padding-left: 40px;
    }

    .subtitle {
        font-size: 22px;
        line-height: 22px;
        letter-spacing: 20px;
        padding-left: 20px;
    }
}

@media (max-width: 1024px) and (min-width: 779px) {
    .about-brief { margin-top: 110px; }
    .showreel-cta { margin-top: 280px; }
}

/* --- Responsive: Small Tablet --- */
@media (max-width: 778px) {
    .title {
        font-size: 70px;
        line-height: 70px;
        letter-spacing: 25px;
        padding-left: 25px;
        margin-top: -50px;
    }

    .title-shadow {
        font-size: 75px;
        line-height: 70px;
        letter-spacing: 25px;
        padding-left: 25px;
        margin-top: -50px;
    }

    .subtitle {
        font-size: 16px;
        line-height: 20px;
        letter-spacing: 15px;
        padding-left: 15px;
        margin-top: 40px;
    }

    .button-area {
        margin-top: 180px;
    }

    .button-bg {
        width: 180px;
        height: 180px;
    }

    .impressum-link {
        right: 20px;
        bottom: 25px;
    }

    .bullet-nav {
        left: 12px;
    }

    .bullet {
        padding: 8px 10px;
    }

    .bullet-title {
        display: none;
    }

    .contact-buttons {
        margin-top: 160px;
        gap: 40px;
    }

    .about-brief { margin-top: 90px; }
    .about-brief p { font-size: 11px; letter-spacing: 3px; }
    .showreel-cta { margin-top: 230px; }
    .nav-buttons { margin-top: 180px; gap: 16px; }
    .nav-btn { font-size: 11px; letter-spacing: 3px; padding: 12px 24px; }
}

/* --- Responsive: Mobile --- */
@media (max-width: 480px) {
    .bg-video {
        min-width: unset;
        min-height: unset;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .title {
        font-size: 48px;
        line-height: 48px;
        letter-spacing: 18px;
        padding-left: 18px;
        margin-top: -40px;
    }

    .title-shadow {
        font-size: 52px;
        line-height: 48px;
        letter-spacing: 18px;
        padding-left: 18px;
        margin-top: -40px;
    }

    .subtitle {
        font-size: 11px;
        line-height: 18px;
        letter-spacing: 6px;
        padding-left: 6px;
        margin-top: 30px;
        white-space: nowrap;
    }

    .button-text {
        font-size: 12px;
        letter-spacing: 4px;
    }

    .button-text-simple {
        font-size: 12px;
        letter-spacing: 4px;
    }

    .button-bg {
        width: 130px;
        height: 130px;
    }

    .button-area {
        margin-top: 140px;
    }

    .contact-buttons {
        margin-top: 120px;
        gap: 30px;
    }

    .impressum-link {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        bottom: 20px;
        font-size: 10px;
        line-height: 16px;
    }

    .bullet-nav {
        left: 8px;
        gap: 4px;
    }

    .bullet {
        padding: 10px 12px;
    }

    .bullet-dot {
        width: 8px;
        height: 8px;
    }

    .bullet-title {
        display: none;
    }

    .mouse-overlay {
        display: none;
    }

    .about-brief { margin-top: 70px; }
    .about-brief p { font-size: 10px; letter-spacing: 2px; line-height: 20px; }
    .about-brief .about-location { font-size: 9px; }
    .showreel-cta { margin-top: 180px; }
    .nav-buttons { margin-top: 140px; gap: 12px; }
    .nav-btn { font-size: 10px; letter-spacing: 2px; padding: 11px 20px; }
    .showreel-text { font-size: 10px; letter-spacing: 2px; }
    .swipe-hint { display: flex; }
}

/* --- Responsive: Very Small Mobile --- */
@media (max-width: 360px) {
    .title {
        font-size: 40px;
        line-height: 40px;
        letter-spacing: 14px;
        padding-left: 14px;
    }

    .title-shadow {
        font-size: 44px;
        line-height: 40px;
        letter-spacing: 14px;
        padding-left: 14px;
    }

    .subtitle {
        font-size: 10px;
        letter-spacing: 8px;
        padding-left: 8px;
    }
}
