/* Hans Kaltenrieder Photography - Design System
   Version: 2.1 (Cleaned & Optimized)
*/

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/cormorant-garamond-300-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/cormorant-garamond-300-italic-latin.woff2') format('woff2');
}

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

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

/* =========================================
   DESIGN TOKENS
   ========================================= */

:root {
    --bg-color:       #ffffff;
    --text-color:     #121212;
    --muted-color:    #888;
    --line-color:     #f0f0f0;
    --header-height:  90px;

    --ease-out:       cubic-bezier(0.23, 1, 0.32, 1);
    --transition-speed: 1.2s;
}

/* =========================================
   RESET & BASE
   ========================================= */

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable both-edges;
}

body {
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;

    /* Page transition */
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    cursor: none;
}

body.page-loaded {
    opacity: 1;
}

body.intro-active {
    overflow: hidden;
}

main {
    transform: translateY(10px);
    transition: transform 0.8s var(--ease-out);
}

body.page-loaded main {
    transform: translateY(0);
}

a, button {
    cursor: none;
}

/* =========================================
   1. TYPOGRAPHY
   ========================================= */

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 300;
    display: inline-block;
    transition: letter-spacing var(--transition-speed) var(--ease-out),
                transform var(--transition-speed) var(--ease-out);
}

/* =========================================
   2. HEADER
   ========================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1100;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    backdrop-filter: blur(0px);
    transition: background-color 0.8s ease,
                backdrop-filter 0.8s ease,
                height var(--transition-speed) var(--ease-out);
}

/* Scrolled-State via JS-Klasse */
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 70px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-speed) var(--ease-out);
}

/* --- Intro States --- */

body.intro-active .site-header {
    height: 100vh;
    background-color: #ffffff;
    justify-content: center;
    padding: 0;
}

body.intro-active .logo-wrapper {
    transform: scale(1.8);
}

body.intro-active .logo {
    letter-spacing: 12px;
}

body.intro-active .site-nav {
    opacity: 0;
    pointer-events: none;
}

/* --- Navigation --- */

.site-nav {
    opacity: 1;
    transition: opacity 0.8s ease 1s;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.site-nav a {
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

/* Subtiler Underline-Hover */
.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-color);
    transition: width 0.4s var(--ease-out);
}

.site-nav a:hover::after {
    width: 100%;
}

.site-nav a:hover {
    color: var(--muted-color);
}

.site-nav a.active-link::after {
    width: 100%;
}

/* --- Hamburger Button --- */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    padding: 0;
    cursor: none;
    z-index: 1101;
    position: relative;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transition: transform 0.4s var(--ease-out), opacity 0.3s ease;
    transform-origin: center;
}

body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

body.intro-active .nav-toggle {
    opacity: 0;
    pointer-events: none;
}

body.nav-open {
    overflow: hidden;
}

/* =========================================
   3. FEATURED SPOTLIGHT
   ========================================= */

.featured-spotlight {
    max-width: 1600px;
    margin: 0 auto;
    padding: 120px 40px 120px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.spotlight-item {
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: calc(100vh - 220px);
    overflow: hidden;
    background: #fcfcfc;
    display: block;
    opacity: 0;
    transform: translateY(60px);
    animation: fadeInUp 1.4s var(--ease-out) forwards;
}

.spotlight-item:nth-child(1) { animation-delay: 1.2s; }
.spotlight-item:nth-child(2) { animation-delay: 1.8s; }

.spotlight-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: grayscale(40%);
    transition: transform var(--transition-speed) var(--ease-out),
                filter var(--transition-speed) ease;
}

.spotlight-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.spotlight-overlay {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 2;
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    pointer-events: none;
}

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

.spotlight-overlay span {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 8px;
}

.spotlight-overlay h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 300;
    margin: 0;
    line-height: 1.1;
}

/* =========================================
   4. MAIN GALLERY
   ========================================= */

.gallery-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 120px 40px 120px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: 80vh;
    overflow: hidden;
    background: #fcfcfc;
    text-decoration: none;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: grayscale(40%);
    transition: transform var(--transition-speed) var(--ease-out),
                filter var(--transition-speed) ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.overlay {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 2;
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

.overlay h2 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* =========================================
   5. PORTRAIT GRID
   ========================================= */

.series-info {
    display: flex;
    gap: 32px;
    justify-content: center;
    padding: 120px 40px 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--muted-color);
}

.series-info + .portrait-grid {
    padding-top: 60px;
}

.portrait-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 40px 100px;
}

.portrait-grid img,
.grid-label {
    grid-column: span 2;
}

.portrait-grid img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.portrait-grid img.tall {
    grid-column: span 1;
    aspect-ratio: 4 / 5;
    object-position: center 20%;
}

.portrait-grid img.wide {
    grid-column: span 2;
    aspect-ratio: 3 / 2;
}

.series-info ~ .portrait-grid img.wide {
    max-height: calc(100vh - 220px);
}

.grid-label {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 100px 0 20px;
    border-bottom: 1px solid var(--line-color);
    color: var(--muted-color);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 5px;
}

.grid-label span {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    letter-spacing: 0;
    color: var(--text-color);
}

/* =========================================
   6. SCROLL REVEAL
   ========================================= */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity var(--transition-speed) var(--ease-out),
                transform var(--transition-speed) var(--ease-out);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================================
   7. CONTENT SECTIONS (ABOUT / CONTACT)
   ========================================= */

section {
    max-width: 800px;
    margin: 0 auto 160px;
    padding: 0 20px;
    text-align: center;
}

section h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 50px;
}

section p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #444;
}

.about-img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    object-position: center bottom;
    display: block;
    margin: 0 auto 50px;
    filter: grayscale(25%);
}

.email-link {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 3px;
    transition: opacity 0.3s ease;
}

.email-link:hover {
    opacity: 0.6;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.instagram-link:hover {
    opacity: 1;
}

/* =========================================
   8. FOOTER & LEGAL
   ========================================= */

footer {
    border-top: 1px solid var(--line-color);
    padding: 80px 20px;
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
    line-height: 2.2;
}

.legal-link {
    text-decoration: none;
    color: #bbb;
    font-size: 0.6rem;
    letter-spacing: 1px;
    display: inline-block;
    margin-top: 5px;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: var(--text-color);
}

/* =========================================
   COMING SOON
   ========================================= */

.coming-soon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    text-align: center;
    padding: 0 20px;
}

.coming-soon-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--muted-color);
    margin: 0 0 20px;
}

.coming-soon-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin: 0 0 30px;
}

.coming-soon-text {
    font-size: 0.9rem;
    color: var(--muted-color);
    margin: 0;
}

/* =========================================
   LEGAL DIVIDER
   ========================================= */

.legal-divider {
    border: none;
    border-top: 1px solid var(--line-color);
    margin: 60px 0;
}

.legal-wrapper {
    max-width: 800px;
    margin: 140px auto;
    padding: 0 20px 100px;
}

.legal-content {
    text-align: left;
    margin-bottom: 60px;
}

.legal-content h1 {
    text-align: left;
    margin-bottom: 30px;
}

.legal-content p {
    text-align: left;
    font-size: 0.9rem;
}

/* =========================================
   9. CUSTOM CURSOR
   ========================================= */

.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    z-index: 9999;
    will-change: transform;
    opacity: 0;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--text-color);
}

.cursor-outline {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(18, 18, 18, 0.6);
    transition: width 0.3s var(--ease-out),
                height 0.3s var(--ease-out),
                background-color 0.3s ease,
                border-color 0.3s ease;
}

body.cursor-hover .cursor-outline {
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.04);
    border-color: transparent;
}

/* =========================================
   10. ANIMATIONS
   ========================================= */

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   11. RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    a, button {
        cursor: auto;
    }

    .site-header {
        padding: 0 20px;
    }

    body.intro-active .logo-wrapper {
        transform: scale(1.1);
    }

    body.intro-active .logo {
        letter-spacing: 6px;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--bg-color);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        z-index: 1050;
    }

    body.nav-open .site-nav {
        opacity: 1;
        pointer-events: all;
    }

    body.nav-open .site-header {
        background-color: var(--bg-color);
    }

    .site-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }

    .site-nav a {
        font-size: 1.2rem;
        letter-spacing: 4px;
    }

    .featured-spotlight {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 100px 20px 40px;
    }

    .spotlight-overlay h2 {
        font-size: 1.4rem;
    }

    .gallery-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 100px 20px 80px;
    }

    .portrait-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-top: 120px;
        padding-inline: 20px;
    }

    .portrait-grid img,
    .grid-label {
        grid-column: span 1;
    }

    .portrait-grid img.tall {
        aspect-ratio: 4 / 5;
        object-position: center center;
    }

    .portrait-grid img.wide {
        grid-column: span 1;
        aspect-ratio: auto;
    }

    .series-info {
        gap: 12px;
        padding: 120px 20px 0;
        letter-spacing: 1px;
        font-size: 0.6rem;
    }

    .grid-label {
        padding: 60px 0 10px;
    }

    /* Bilder auf Touch-Geräten in Farbe */
    .spotlight-item img,
    .gallery-item img,
    .about-img {
        filter: grayscale(0%);
    }

    /* Titel auf Touch-Geräten permanent einblenden */
    .overlay,
    .spotlight-overlay {
        opacity: 1;
        transform: translateY(0);
    }

    /* Cursor auf Touch-Geräten ausblenden */
    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}