/* ============================================================
   LUNE.DEV - Crystallographic Design System
   Frutiger Aero meets Mineralogy
   ============================================================ */

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #0D2B3E;
    background: linear-gradient(135deg, #0D2B3E 0%, #153B4E 25%, #1A4A5A 50%, #0D2B3E 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    position: relative;
}

/* ============================================================
   SECTION LAYOUT
   ============================================================ */

.section {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
}

/* Dark crystal section background */
.reflection {
    background: #081C28;
}

/* Section 1: Chamber */
.chamber {
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, rgba(110, 198, 184, 0.15) 0%, rgba(74, 173, 168, 0.1) 50%, rgba(13, 43, 62, 0.2) 100%);
}

.chamber-title {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 300;
    color: #D0F0E8;
    letter-spacing: 0.08em;
    text-shadow: 0 0 60px rgba(110, 198, 184, 0.3);
    margin-bottom: 8vh;
    text-align: center;
    animation: titlePulse 4s ease-in-out infinite;
}

.crystal-cluster {
    width: clamp(200px, 40vw, 400px);
    height: clamp(200px, 40vw, 400px);
    filter: drop-shadow(0 20px 60px rgba(110, 198, 184, 0.2));
    animation: crystalFloat 6s ease-in-out infinite;
}

/* Section 2: Formation */
.formation {
    background: rgba(13, 43, 62, 0.5);
    backdrop-filter: blur(8px);
    padding: 4rem 2rem;
    min-height: 120vh;
}

/* Section 3: Observations */
.observations {
    background: rgba(26, 74, 90, 0.5);
    backdrop-filter: blur(8px);
    padding: 4rem 2rem;
    min-height: 120vh;
}

/* Section 4: Reflection */
.reflection {
    background: linear-gradient(180deg, rgba(26, 74, 90, 0.5) 0%, rgba(13, 43, 62, 0.7) 100%);
    backdrop-filter: blur(8px);
    padding: 4rem 2rem;
    min-height: 100vh;
    justify-content: center;
}

/* ============================================================
   MASONRY LAYOUT
   ============================================================ */

.masonry-container {
    width: 100%;
    max-width: 1200px;
    column-count: 2;
    column-gap: 2rem;
    gap: 2rem;
}

.masonry-card {
    break-inside: avoid;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.masonry-card:hover {
    border-color: rgba(74, 173, 168, 0.3);
    box-shadow: 0 12px 48px rgba(110, 198, 184, 0.2),
                inset 0 0 20px rgba(110, 198, 184, 0.1);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.12);
}

/* Varied heights for masonry effect */
.card-short {
    min-height: 220px;
}

.card-medium {
    min-height: 320px;
}

.card-tall {
    min-height: 420px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.card-title,
.closing-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 600;
    color: #6EC6B8;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(110, 198, 184, 0.2);
    letter-spacing: 0.03em;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #D0F0E8;
    margin-bottom: 1rem;
    font-weight: 400;
}

.card-text:last-child {
    margin-bottom: 0;
}

/* Closing Section Typography */
.chamber-closing {
    max-width: 700px;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.closing-title {
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: #A8E6CF;
}

.closing-text {
    font-size: 1rem;
    line-height: 1.9;
    color: #D0F0E8;
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.closing-text:last-child {
    margin-bottom: 0;
}

.closing-signature {
    font-style: italic;
    font-weight: 300;
    font-size: 0.9rem;
    margin-top: 2rem;
    color: #4AADA8;
    opacity: 0.9;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes titlePulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 60px rgba(110, 198, 184, 0.3);
    }
    50% {
        opacity: 0.95;
        text-shadow: 0 0 90px rgba(110, 198, 184, 0.5);
    }
}

@keyframes crystalFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(2deg);
    }
    50% {
        transform: translateY(-40px) rotate(0deg);
    }
    75% {
        transform: translateY(-20px) rotate(-2deg);
    }
}

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

@keyframes shimmer {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    }
    50% {
        border-color: rgba(110, 198, 184, 0.2);
        box-shadow: 0 8px 32px rgba(110, 198, 184, 0.1);
    }
}

/* Stagger animation for cards on scroll */
.masonry-card {
    animation: fadeInUp 0.8s ease-out backwards;
}

.formation .masonry-card:nth-child(1) { animation-delay: 0.1s; }
.formation .masonry-card:nth-child(2) { animation-delay: 0.2s; }
.formation .masonry-card:nth-child(3) { animation-delay: 0.3s; }
.formation .masonry-card:nth-child(4) { animation-delay: 0.4s; }
.formation .masonry-card:nth-child(5) { animation-delay: 0.5s; }

.observations .masonry-card:nth-child(1) { animation-delay: 0.1s; }
.observations .masonry-card:nth-child(2) { animation-delay: 0.2s; }
.observations .masonry-card:nth-child(3) { animation-delay: 0.3s; }
.observations .masonry-card:nth-child(4) { animation-delay: 0.4s; }
.observations .masonry-card:nth-child(5) { animation-delay: 0.5s; }

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 768px) {
    .masonry-container {
        column-count: 1;
        column-gap: 0;
    }

    .section {
        padding: 1.5rem;
        min-height: auto;
    }

    .chamber {
        height: auto;
        padding: 3rem 1.5rem;
        min-height: 100vh;
    }

    .chamber-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
        margin-bottom: 4vh;
    }

    .crystal-cluster {
        width: clamp(150px, 50vw, 300px);
        height: clamp(150px, 50vw, 300px);
    }

    .formation,
    .observations {
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .chamber-closing {
        padding: 1.5rem;
    }

    .card-title,
    .closing-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }

    .masonry-card {
        min-height: auto;
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }

    .closing-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .section {
        padding: 1rem;
    }

    .chamber-title {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
        margin-bottom: 2vh;
    }

    .crystal-cluster {
        width: clamp(120px, 60vw, 200px);
        height: clamp(120px, 60vw, 200px);
    }

    .card-text {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .masonry-card {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }

    .chamber-closing {
        padding: 1.2rem;
    }

    .closing-text {
        font-size: 0.9rem;
        line-height: 1.7;
        margin-bottom: 1rem;
    }

    .closing-title {
        font-size: clamp(1rem, 6vw, 1.3rem);
        margin-bottom: 1rem;
    }
}

/* ============================================================
   COLOR ACCENTS & GLASSMORPHISM
   ============================================================ */

/* Teal primary palette */
:root {
    --primary-teal: #6EC6B8;
    --secondary-teal: #4AADA8;
    --light-teal: #D0F0E8;
    --dark-navy: #0D2B3E;
    --navy-dark: #153B4E;
    --navy-accent: #1A4A5A;
    --mint-accent: #A8E6CF;
    --coral-accent: #E6A8B4;
    --medium-teal: #2A6A6A;
}

/* Subtle color shifts on focus/interaction */
.masonry-card {
    color-scheme: dark;
}

/* SVG filter effects */
.crystal-cluster {
    filter: drop-shadow(0 20px 60px rgba(110, 198, 184, 0.2))
            saturate(1.1)
            brightness(1.05);
}

/* ============================================================
   SCROLLBAR STYLING (optional decorative element)
   ============================================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(13, 43, 62, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(110, 198, 184, 0.5);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 198, 184, 0.8);
}

/* ============================================================
   PRINT STYLES (optional)
   ============================================================ */

@media print {
    body {
        background: white;
    }

    .masonry-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .section {
        page-break-inside: avoid;
    }
}
