/* ============================================
   Nik Behrendt – Filmmaker Portfolio
   Startseite (Fullscreen-Slider)
   ============================================ */

:root {
    --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --white: #ffffff;
    --white-85: rgba(255,255,255,0.85);
    --white-70: rgba(255,255,255,0.7);
    --white-55: rgba(255,255,255,0.55);
    --white-35: rgba(255,255,255,0.35);
    --white-15: rgba(255,255,255,0.15);
    --shadow-text: 0 6px 18px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.5);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
    --fs-xs: 11px;
    --fs-sm: 13px;
    --fs-md: 15px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: var(--font);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    cursor: default;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

a { text-decoration: none; color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.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;
}

/* --- Slider --- */
.slider {
    position: fixed;
    inset: 0;
    z-index: 1;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}

.slide.active { opacity: 1; visibility: visible; z-index: 2; }
.slide.transitioning-in { z-index: 3; }
.slide.transitioning-out { z-index: 2; }

/* --- Background --- */
.slide-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background-color: #000;
    background-size: cover;
    background-position: center;
}

/* Scrim: hält Titel und CTAs auf hellem Footage lesbar, ohne den Slap zu verdunkeln */
.slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0.30) 0%,
        rgba(0,0,0,0.00) 28%,
        rgba(0,0,0,0.00) 55%,
        rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}

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

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

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

/* --- Slide Content: Flex-Layout statt Pixel-Offsets --- */
.slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2.4vh, 26px);
    padding: 0 clamp(20px, 6vw, 80px) calc(clamp(24px, 6vh, 56px) + var(--safe-bottom));
    z-index: 5;
    pointer-events: none;
    text-align: center;
}

/* --- Subtitle (Eyebrow) --- */
.subtitle {
    font-size: clamp(11px, 1vw, 14px);
    font-weight: 400;
    letter-spacing: 0.45em;
    padding-left: 0.45em;
    text-transform: uppercase;
    color: var(--white-85);
    text-shadow: var(--shadow-text);
    white-space: nowrap;
    opacity: 0;
}

/* --- Title --- */
.title-wrap {
    position: relative;
    line-height: 1;
}

.title {
    position: relative;
    font-size: clamp(56px, 11vw, 160px);
    font-weight: 600;
    letter-spacing: 0.28em;
    padding-left: 0.28em;
    line-height: 1;
    color: var(--white);
    text-shadow: 0 10px 24px rgba(0,0,0,0.35);
    white-space: nowrap;
    z-index: 2;
    opacity: 0;
}

.title-shadow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(60px, 11.8vw, 172px);
    font-weight: 600;
    letter-spacing: 0.28em;
    padding-left: 0.28em;
    line-height: 1;
    color: rgba(0,0,0,0.5);
    filter: blur(10px);
    white-space: nowrap;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* --- Brief --- */
.about-brief {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
}

.about-brief p {
    font-size: clamp(11px, 0.9vw, 13px);
    font-weight: 300;
    letter-spacing: 0.22em;
    padding-left: 0.22em;
    text-transform: uppercase;
    color: var(--white-70);
    text-shadow: var(--shadow-text);
    line-height: 1.7;
    text-wrap: balance;
}

.about-brief .about-name {
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.3em;
    padding-left: 0.3em;
}

.about-brief .about-location {
    font-size: clamp(11px, 0.8vw, 12px);
    color: var(--white-55);
}

/* --- Actions --- */
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 2vh, 20px);
    margin-top: clamp(6px, 2vh, 20px);
    pointer-events: auto;
    opacity: 0;
}

/* Primärer CTA: Play-Kreis + Label */
.play-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 20px 8px 8px;
    border-radius: 999px;
    transition: background 0.35s ease;
}

.play-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.75);
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
    transition: transform 0.45s var(--ease-out), background 0.35s ease, border-color 0.35s ease;
}

.play-circle svg {
    width: 18px;
    height: 18px;
    margin-left: 3px;
    color: var(--white);
}

.play-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: var(--shadow-text);
    transition: letter-spacing 0.45s var(--ease-out);
}

.play-cta:hover .play-circle,
.play-cta:focus-visible .play-circle {
    transform: scale(1.08);
    background: rgba(255,255,255,0.14);
    border-color: var(--white);
}

.play-cta:hover .play-label { letter-spacing: 0.36em; }

/* Sekundäre Links */
.hero-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-link {
    position: relative;
    display: inline-block;
    padding: 12px 14px;
    font-size: var(--fs-xs);
    font-weight: 400;
    letter-spacing: 0.28em;
    padding-left: calc(14px + 0.28em);
    text-transform: uppercase;
    color: var(--white-70);
    text-shadow: var(--shadow-text);
    transition: color 0.3s ease;
}

.hero-link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 8px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.hero-link:hover { color: var(--white); }
.hero-link-ig { display: inline-flex; align-items: center; gap: 8px; }
.hero-link-ig svg { width: 14px; height: 14px; }
.hero-link:hover::after { transform: scaleX(1); }

.hero-links .hero-link + .hero-link::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--white-35);
    transform: translateY(-50%);
}

/* --- Contact --- */
.contact-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-email {
    font-size: clamp(16px, 2vw, 24px);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--white);
    text-shadow: var(--shadow-text);
    padding: 10px 4px;
    border-bottom: 1px solid var(--white-35);
    transition: border-color 0.3s ease;
}

.contact-email:hover { border-color: var(--white); }

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--white-85);
    border: 1px solid var(--white-35);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.25);
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.copy-btn svg { width: 15px; height: 15px; }
.copy-btn:hover, .copy-btn.copied { border-color: var(--white); background: rgba(255,255,255,0.14); color: var(--white); }

/* --- Toast --- */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(72px + var(--safe-bottom));
    transform: translate(-50%, 12px);
    padding: 10px 18px;
    font-size: var(--fs-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #000;
    background: var(--white);
    border-radius: 999px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out), visibility 0.3s;
    z-index: 200;
    pointer-events: none;
}

.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* --- Impressum --- */
.impressum-link {
    position: fixed;
    right: clamp(20px, 4vw, 48px);
    bottom: calc(clamp(20px, 3.5vh, 32px) + var(--safe-bottom));
    padding: 8px 10px;
    font-size: var(--fs-xs);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white-55);
    text-shadow: var(--shadow-text);
    z-index: 60;
    transition: color 0.3s ease;
}

.impressum-link:hover { color: var(--white); }

/* --- Mouse Overlay --- */
.mouse-overlay {
    position: fixed;
    width: 1000px;
    height: 1000px;
    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; }

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

.bullet {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 50%;
}

.bullet-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    box-shadow: 0 1px 4px rgba(0,0,0,0.6);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.bullet:hover .bullet-dot { background: var(--white-85); }

.bullet.active .bullet-dot {
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.22), 0 1px 4px rgba(0,0,0,0.6);
}

.bullet-title {
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translate(-8px, -50%);
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--white);
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 3px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: transform 0.3s var(--ease-out), opacity 0.3s ease, visibility 0.3s;
    pointer-events: none;
}

.bullet-title::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 5px 5px 5px 0;
    border-color: transparent rgba(0,0,0,0.65) transparent transparent;
}

.bullet:hover .bullet-title,
.bullet:focus-visible .bullet-title {
    visibility: visible;
    opacity: 1;
    transform: translate(0, -50%);
}

/* --- Slide Transition Animations --- */
@keyframes slideInFromBottom { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideInFromTop    { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes slideOutToTop     { from { transform: translateY(0); } to { transform: translateY(-100%); } }
@keyframes slideOutToBottom  { from { transform: translateY(0); } to { transform: translateY(100%); } }

@keyframes titleEnter {
    from { opacity: 0; transform: translateY(-60%); letter-spacing: 0.4em; }
    to   { opacity: 1; transform: translateY(0); letter-spacing: 0.28em; }
}
@keyframes titleLeave {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-40%); }
}
@keyframes riseIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

.slide.active .title,
.slide.active .subtitle,
.slide.active .about-brief,
.slide.active .hero-actions,
.slide.active .title-shadow { opacity: 1; }

.slide.animate-in .title        { animation: titleEnter 1s var(--ease-inout) forwards; }
.slide.animate-in .subtitle     { animation: riseIn 0.8s 0.25s var(--ease-out) both; }
.slide.animate-in .about-brief  { animation: riseIn 0.8s 0.4s var(--ease-out) both; }
.slide.animate-in .hero-actions { animation: riseIn 0.8s 0.55s var(--ease-out) both; }
.slide.animate-in .title-shadow { animation: fadeIn 0.6s 0.3s ease both; }

.slide.animate-out .title { animation: titleLeave 0.35s var(--ease-inout) forwards; }
.slide.animate-out .subtitle,
.slide.animate-out .about-brief,
.slide.animate-out .hero-actions,
.slide.animate-out .title-shadow { animation: fadeOut 0.3s var(--ease-inout) forwards; }

/* --- Preloader (Logo-Loader kommt aus loader.css) --- */
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0s 0.6s;
}

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

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

.showreel-close {
    position: absolute;
    top: max(12px, env(safe-area-inset-top, 0px));
    right: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-70);
    z-index: 9999;
    transition: color 0.3s ease, transform 0.3s ease;
}

.showreel-close:hover { color: var(--white); transform: rotate(90deg); }

.showreel-video {
    width: min(92vw, calc((100vh - 120px) * 16 / 9), 1400px);
    max-height: calc(100vh - 120px);
    aspect-ratio: 16 / 9;
    background: #000;
    outline: none;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    transform: scale(0.96);
    transition: transform 0.5s var(--ease-out);
}

.showreel-overlay.active .showreel-video { transform: scale(1); }

/* --- Swipe Hint (mobile only) --- */
.swipe-hint {
    position: fixed;
    bottom: calc(14px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: none;
    color: var(--white-55);
    opacity: 0;
    animation: swipeHintFade 5s ease 2.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(6px); } }
@keyframes swipeHintFade { 0% { opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }

/* --- Focus --- */
.play-cta:focus-visible,
.hero-link:focus-visible,
.impressum-link:focus-visible,
.bullet:focus-visible,
.copy-btn:focus-visible,
.contact-email:focus-visible,
.showreel-close:focus-visible {
    outline: 2px solid rgba(255,255,255,0.9);
    outline-offset: 4px;
    border-radius: 999px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .title { letter-spacing: 0.24em; padding-left: 0.24em; }
    .title-shadow { letter-spacing: 0.24em; padding-left: 0.24em; }
}

@media (max-width: 778px) {
    .subtitle { letter-spacing: 0.32em; padding-left: 0.32em; }
    .bullet-title { display: none; }
    .impressum-link { right: 16px; }
}

@media (max-width: 480px) {
    .slide-content { gap: 14px; padding-bottom: calc(64px + var(--safe-bottom)); }
    .title { font-size: clamp(44px, 13vw, 56px); letter-spacing: 0.2em; padding-left: 0.2em; }
    .title-shadow { font-size: clamp(48px, 14vw, 60px); letter-spacing: 0.2em; padding-left: 0.2em; }
    .subtitle { font-size: 11px; letter-spacing: 0.28em; padding-left: 0.28em; white-space: normal; }
    .about-brief p { font-size: 11px; letter-spacing: 0.16em; padding-left: 0.16em; }
    .about-brief .about-name { letter-spacing: 0.24em; padding-left: 0.24em; }
    .about-brief .about-location { font-size: 11px; }
    .play-circle { width: 52px; height: 52px; }
    .hero-link { padding: 12px 12px; }
    .contact-email { font-size: 16px; }
    .mouse-overlay { display: none; }
    .bullet-nav { left: 6px; }
    .impressum-link { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(40px + var(--safe-bottom)); }
    .swipe-hint { display: block; bottom: calc(10px + var(--safe-bottom)); }
    .toast { bottom: calc(96px + var(--safe-bottom)); }
}

@media (max-height: 560px) {
    .slide-content { gap: 8px; }
    .title { font-size: clamp(40px, 9vh, 90px); }
    .title-shadow { font-size: clamp(44px, 9.6vh, 96px); }
    .about-brief .about-location { display: none; }
    .play-circle { width: 44px; height: 44px; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .slide.active .title, .slide.active .subtitle, .slide.active .about-brief,
    .slide.active .hero-actions, .slide.active .title-shadow { opacity: 1; }
}
