/* --- Cinematic Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 999999; /* Über allem anderen */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.2s var(--transition-smooth), visibility 1.2s;
}

.preloader-text {
    color: var(--accent-color);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    animation: pulseText 1.5s infinite alternate;
}

/* Versteckt den Preloader weich */
.preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes pulseText {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.contact-btn.magnetic {
    transition: background 0.4s var(--transition-smooth), color 0.4s var(--transition-smooth), transform 0.1s linear;
    /* transform 0.1s linear ist wichtig für das weiche, magnetische Gefühl */
}

.contact-btn.magnetic:hover {
    background: var(--accent-color);
    color: #000;
}


/* --- LOKALE SCHRIFTARTEN (Inter) --- */

/* Inter Light (300) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../media/fonts/inter-v13-latin-300.woff2') format('woff2');
}

/* Inter Regular (400) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../media/fonts/inter-v13-latin-regular.woff2') format('woff2');
}

/* Inter Bold (700) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../media/fonts/inter-v13-latin-700.woff2') format('woff2');
}

/* Inter ExtraBold (800) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../media/fonts/inter-v13-latin-800.woff2') format('woff2');
}

/* --- Globale Styles & Variablen --- */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-muted: #888888;
    --accent-color: #ffffff; /* Weiß für Buttons auf Schwarz */
    --font-main: 'Inter', sans-serif;
    --transition-smooth: cubic-bezier(0.23, 1, 0.32, 1); /* Crisp easing */
    --container-width: 1300px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    background-color: var(--bg-color);
    scrollbar-width: thin; /* Firefox scrollbar */
    scrollbar-color: #333 #000;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Custom Cursor --- */
/* Versteckt den Standard-Mauszeiger auf Desktop */
@media (min-width: 769px) {
    body, a, button { cursor: none !important; }
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: var(--accent-color);
    border-radius: 50%;
    pointer-events: none; /* Klicks gehen durch den Cursor hindurch */
    z-index: 10000;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference; /* Invertiert die Farbe je nach Hintergrund */
    transition: width 0.3s var(--transition-smooth), height 0.3s var(--transition-smooth);
    will-change: transform, width, height;
}

/* Zustand wenn der Cursor über ein klickbares Element hovert */
.custom-cursor.is-hovering {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    mix-blend-mode: normal;
}

/* Auf mobilen Geräten blenden wir den Custom Cursor aus */
@media (max-width: 768px) {
    .custom-cursor { display: none !important; }
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 5vw;
    width: 100%;
}

/* --- Utilities for Animations --- */
.fade-in {
    opacity: 0;
    transition: opacity 1s var(--transition-smooth);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--transition-smooth), transform 1s var(--transition-smooth);
}

/* Klasse die per JS hinzugefügt wird */
.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Sektion 1: Hero / Showreel --- */
.hero-section {
    height: 160vh; /* Etwas mehr Höhe für längeren Video-Effekt */
    position: relative;
}

.video-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    will-change: transform, opacity;
}

.grain-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Falls du grain.png hast: */
    /* background-image: url('../media/grain.png'); */
    background-repeat: repeat;
    opacity: 0.03; /* Sehr subtil */
    z-index: 1;
    pointer-events: none;
}

.showreel {
    position: absolute;
    top: 50%; left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 */
    min-height: 100vh;
    min-width: 177.77vh; 
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    filter: grayscale(20%) contrast(110%); /* Minimaler Style */
}

.overlay-text {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-transform: uppercase;
}

.overlay-text h1 {
    font-size: clamp(3rem, 12vw, 10rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.9;
    margin-bottom: 0.5rem;
}

.overlay-text p {
    font-size: 0.9rem;
    letter-spacing: 0.4em;
    font-weight: 300;
    color: var(--text-muted);
}

/* Kleiner Scroll-Pfeil unten */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #fff 0%, rgba(255,255,255,0) 100%);
    z-index: 2;
}

/* --- Sektion 2: Portfolio Grid --- */
.portfolio-section {
    position: relative;
    z-index: 10;
    background-color: #080808; /* Minimal heller als schwarz */
    padding: 15vh 0;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    box-shadow: 0 -30px 60px rgba(0,0,0,0.7);
}

.section-header {
    margin-bottom: 10vh;
    text-align: left;
}

.section-header .subtitle {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Das Grid System */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Spalten */
    gap: 30px; /* Abstand zwischen Bildern */
}

/* Container für Bild + Hover-Effekt */
.image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 125%; /* Hochformat 4:5 Verhältnis */
    overflow: hidden;
    border-radius: 8px;
    background-color: #111;
}

.image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}

/* Hover Overlay (Titel/Kategorie) */
.item-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.item-overlay h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.item-overlay p {
    font-size: 0.85rem;
    color: #ccc;
    font-weight: 300;
}

/* Hover Interaktionen */
.portfolio-item:hover img {
    transform: scale(1.05); /* Leichter Zoom */
}

.portfolio-item:hover .item-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* --- Sektion 3: Kontakt --- */
.contact-section {
    position: relative;
    z-index: 10;
    background-color: var(--bg-color);
    padding: 20vh 0;
    text-align: center;
}

.contact-content h2 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.contact-content p {
    color: var(--text-muted);
    margin-bottom: 4rem;
    font-size: 1.2rem;
    font-weight: 300;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.contact-btn {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--accent-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    border-radius: 50px;
    transition: all 0.4s var(--transition-smooth);
}

.contact-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}


/* --- Responsive Anpassungen (Mobile) --- */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Spalten auf Tablets */
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr; /* 1 Spalte auf Handys */
        gap: 20px;
    }
    
    .section-header { margin-bottom: 5vh; }
    
    .portfolio-section {
        padding: 10vh 0;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
}

/* --- Footer --- */
.site-footer {
    background-color: #000;
    padding: 5vh 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.site-footer p {
    color: #444;
    font-size: 0.75rem;
}

/* --- Video Lightbox --- */
.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none; /* Blockiert Klicks im Hintergrund */
    transition: opacity 0.5s var(--transition-smooth);
}

.video-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    width: 90vw;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.5s var(--transition-smooth);
}

.video-lightbox.is-open .lightbox-content {
    transform: scale(1);
}

.lightbox-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 5vw;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: none; /* Wegen Custom Cursor */
    z-index: 2;
    padding: 20px;
}