/**
 * EDEN01 2026 Upgrade: Atmosphere Section
 * Curated Story Block Layout
 * Date: 2026-01-14
 * 
 * QA Checklist:
 * ✅ Contrast: All text meets WCAG AA minimum
 * ✅ Hover: Subtle, smooth, no jarring motion
 * ✅ Images: Lazy-loaded, optimized
 * ✅ Spacing: Comfortable reading rhythm
 * ✅ Responsive: Graceful stack on mobile
 */

.atmosphere {
    padding: var(--space-section-lg) 0;
    background: var(--color-bg-primary);
    position: relative;
    overflow: hidden; /* Für Grid */
}

/* ========================================
   Grid Background - Ultra-subtil wie Stoffstruktur im Anzug
   Opacity 2-4% - nur sichtbar wenn man hinsieht
   ======================================== */

.atmosphere__grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(201, 169, 97, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(201, 169, 97, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.25; /* Insgesamt ca. 3-4% sichtbar */
    z-index: 0;
    pointer-events: none;
    
    /* Extra-Move: Grid verschwindet im Bildbereich (extrem hochwertig) */
    /* Stärker im Textbereich (links), schwächer im Bildbereich (rechts) */
    mask-image: 
        linear-gradient(
            to right,
            black 0%,
            black 35%,
            rgba(0, 0, 0, 0.4) 55%,  /* Schwächer im Bildbereich */
            rgba(0, 0, 0, 0.15) 100%
        ),
        linear-gradient(
            to bottom,
            transparent 0%,
            black 6%,
            black 100%
        );
    -webkit-mask-image: 
        linear-gradient(
            to right,
            black 0%,
            black 35%,
            rgba(0, 0, 0, 0.4) 55%,
            rgba(0, 0, 0, 0.15) 100%
        ),
        linear-gradient(
            to bottom,
            transparent 0%,
            black 6%,
            black 100%
        );
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.atmosphere__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--padding-inline);
    position: relative; /* Über dem Grid */
    z-index: 1;
}

/* Section Kicker - sehr klein, dezent */
.atmosphere__meta {
    font-family: var(--font-body);
    font-size: clamp(0.65rem, 0.7vw, 0.75rem); /* 11-12px */
    font-weight: 400;
    letter-spacing: 0.18em; /* Präzise wie gefordert */
    text-transform: uppercase;
    color: var(--color-accent-gold, #c9a961); /* Gold statt Muted */
    opacity: 0.85; /* Etwas mehr Präsenz */
    text-align: center;
    margin-bottom: var(--space-lg); /* Weniger Abstand zur Headline */
}

/* Section Headline - Gravitas, ruhig, selbstbewusst */
.atmosphere__headline {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 4vw, 4rem); /* 32-64px responsive */
    font-weight: 300; /* Nicht fett, ruhig */
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
    text-align: center;
    max-width: 900px;
    margin: 0 auto var(--space-section-md); /* Viel Abstand zu Kapiteln */
    opacity: 0;
    transform: translateY(20px);
    transition: 
        opacity var(--motion-slow) var(--ease-luxury),
        transform var(--motion-slow) var(--ease-luxury);
}

.atmosphere__headline.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gold-Punkt am Satzende - Option A (minimal, elegant, erwachsen) */
.atmosphere__headline-dot {
    color: var(--color-accent-gold);
    opacity: 0.9;
}

/* Split Layout */
.atmosphere__split {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: var(--space-2xl);
    align-items: start;
    position: relative; /* Für Gold-Linie */
}

/* ========================================
   Vertikale Gold-Achse - Editorial Museum Move
   ======================================== */

.atmosphere__gold-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1.5px; /* 1-2px Hairline */
    background: var(--color-accent-gold);
    opacity: 0.4; /* 30-50% */
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.2s var(--ease-luxury);
}

/* Gold-Linie erscheint mit Scroll */
.atmosphere__split:has(.atmosphere__chapter.is-visible) .atmosphere__gold-line {
    transform: scaleY(1);
}

/* ========================================
   Left: Story Block - Intentional Narrow Column
   Redaktionelle Achse / Ausstellungsführung
   ======================================== */

.atmosphere__story {
    display: flex;
    flex-direction: column;
    gap: var(--space-section-sm);
    padding-right: var(--space-xl);
    padding-left: var(--space-xl); /* Abstand von Gold-Linie */
    
    /* A) Präzise definierte Text-Achse - Magazin/Buch/Ausstellung */
    max-width: 580px; /* 520-600px - exakt definiert, nicht zufällig */
}

/* Chapter Blocks */
.atmosphere__chapter {
    opacity: 0;
    transform: translateY(20px);
    transition: 
        opacity var(--motion-slow) var(--ease-luxury),
        transform var(--motion-slow) var(--ease-luxury);
}

.atmosphere__chapter.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger entrance */
.atmosphere__chapter:nth-child(1) { transition-delay: 0.1s; }
.atmosphere__chapter:nth-child(2) { transition-delay: 0.2s; }
.atmosphere__chapter:nth-child(3) { transition-delay: 0.3s; }

/* Kapitel-Nummern in Gold - Galerie/Ausstellung/Katalog Feel */
.atmosphere__chapter-num {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.8vw, 0.85rem); /* Etwas kleiner als Titel */
    font-weight: 400;
    letter-spacing: 0.2em; /* Erhöhter Letter-spacing */
    color: var(--color-accent-gold); /* Reines Gold, keine Muted-Version */
    opacity: 0.85;
    display: block;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.atmosphere__chapter-title {
    font-family: var(--font-headline);
    font-size: clamp(1.8rem, 2.8vw, 3.8rem); /* +15% größer - Kapitel, keine Headlines */
    font-weight: 400;
    line-height: var(--lh-headline);
    letter-spacing: var(--ls-headline);
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

.atmosphere__chapter-text {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--color-text-secondary);
    max-width: 50ch;
}

/* Signature Facts Row */
.atmosphere__facts {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-hairline-subtle);
    border-bottom: 1px solid var(--color-hairline-subtle);
    opacity: 0;
    transform: translateY(20px);
    transition: 
        opacity var(--motion-slow) var(--ease-luxury),
        transform var(--motion-slow) var(--ease-luxury);
    transition-delay: 0.4s;
}

.atmosphere__facts.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.atmosphere__fact {
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
}

.atmosphere__divider {
    color: var(--color-accent-gold-muted);
    opacity: 0.5;
}

/* CTA Link */
.atmosphere__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: 
        opacity var(--motion-slow) var(--ease-luxury),
        transform var(--motion-slow) var(--ease-luxury),
        color var(--motion-base) var(--ease-luxury);
    transition-delay: 0.5s;
}

.atmosphere__cta.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.atmosphere__cta svg {
    transition: transform var(--motion-base) var(--ease-luxury);
}

.atmosphere__cta:hover {
    color: var(--color-accent-gold);
    cursor: url('../images/Papagei-cursor.png') 32 32, pointer !important;
}

.atmosphere__cta:hover svg {
    transform: translateX(4px);
}

/* ========================================
   Right: Layered Images
   B) Bilder brechen bewusst aus - Spannung zwischen Ordnung (Text) und Wildnis (Bild)
   ======================================== */

.atmosphere__visuals {
    position: relative;
    height: 700px; /* Erhöht von 600px */
    margin-right: calc(-1 * var(--padding-inline)); /* Bricht nach rechts aus dem Container */
    padding-right: var(--padding-inline); /* Kompensiert für inneren Content */
}

/* Large Image: Main visual */
.atmosphere__image--large {
    position: absolute;
    top: 0;
    left: 0;
    width: 75%;
    height: 80%;
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: 
        opacity var(--motion-slower) var(--ease-luxury),
        transform var(--motion-slower) var(--ease-luxury);
}

.atmosphere__image--large.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Small Image: Overlap bottom-right */
.atmosphere__image--small {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 50%;
    border-radius: 4px;
    overflow: hidden;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: 
        opacity var(--motion-slower) var(--ease-luxury),
        transform var(--motion-slower) var(--ease-luxury);
    transition-delay: 0.2s;
    
    /* Elevated shadow */
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(201, 169, 97, 0.2);
}

.atmosphere__image--small.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Drittes Bild - Rhythm (medium) */
.atmosphere__image--medium {
    position: absolute;
    top: calc(80% + var(--space-md, 1.5rem)); /* Direkt unter Bild 1 mit minimalem Abstand */
    left: 0;
    width: 75%; /* Gleiche Breite wie Bild 1 */
    height: auto;
    aspect-ratio: 4 / 5; /* Gleiche Proportionen wie Bild 1 */
    border-radius: 4px;
    overflow: hidden;
    z-index: 1; /* Gleiche Layer wie Bild 1 */
    opacity: 0;
    transform: translateY(30px);
    transition: 
        opacity var(--motion-slower) var(--ease-luxury),
        transform var(--motion-slower) var(--ease-luxury);
    transition-delay: 0.4s;
    
    /* Elevated shadow */
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 1px rgba(201, 169, 97, 0.3);
}

.atmosphere__image--medium.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.atmosphere__image {
    cursor: url('../images/Papagei-cursor.png') 32 32, pointer !important;
    transition: transform var(--motion-slow) var(--ease-luxury);
}

.atmosphere__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--motion-slow) var(--ease-luxury);
}

/* Hover: Subtle scale */
.atmosphere__image:hover {
    transform: translateY(-2px);
    cursor: url('../images/Papagei-cursor.png') 32 32, pointer !important;
}

.atmosphere__image:hover img {
    transform: scale(var(--scale-subtle));
}

/* Overlay for depth */
.atmosphere__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(10, 15, 10, 0.2) 100%
    );
    opacity: 0.6;
    transition: opacity var(--motion-base) var(--ease-luxury);
}

.atmosphere__image:hover .atmosphere__image-overlay {
    opacity: 0.3;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .atmosphere__split {
        grid-template-columns: 1fr;
        gap: var(--space-section-sm);
    }
    
    .atmosphere__story {
        padding-right: 0;
        padding-left: var(--space-lg); /* Weniger auf Tablet */
        margin-bottom: var(--space-section-sm);
        max-width: 100%; /* Auf Tablet volle Breite */
    }
    
    .atmosphere__visuals {
        height: 600px; /* Erhöht von 500px */
        margin-right: calc(-1 * var(--padding-inline) / 2); /* Weniger Ausbruch auf Tablet */
    }
    
    /* Gold-Linie bleibt sichtbar */
    .atmosphere__gold-line {
        left: 0;
    }
}

@media (max-width: 768px) {
    .atmosphere__facts {
        flex-wrap: wrap;
    }
    
    .atmosphere__visuals {
        height: 500px; /* Erhöht von 400px */
        margin-right: 0; /* Kein Ausbruch auf Mobile */
    }
    
    .atmosphere__image--large {
        width: 85%;
        height: 75%;
    }
    
    .atmosphere__image--small {
        width: 60%;
        height: 45%;
    }
    
    .atmosphere__image--medium {
        width: 85%; /* Gleich wie large auf Mobile */
        top: calc(75% + var(--space-sm, 1rem));
        left: 0;
    }
    
    .atmosphere__story {
        padding-left: var(--space-md); /* Noch weniger auf Mobile */
        max-width: 100%;
    }
}

/* ========================================
   Reduced Motion Support
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .atmosphere__chapter,
    .atmosphere__facts,
    .atmosphere__cta,
    .atmosphere__image {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .atmosphere__image:hover {
        transform: none;
    }
    
    .atmosphere__image:hover img {
        transform: none;
    }
}
