/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Outfit", "Helvetica Neue", sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 400;
    line-height: 1.65;
    background-color: #5B1A2E;
    color: #F0E8DA;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Typography */
h1, h2, h3 {
    font-family: "Space Grotesk", Arial, sans-serif;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: #F5EDE0;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #F5EDE0;
    margin-bottom: 1.2em;
}

h3 {
    font-size: 1.3em;
    font-weight: 500;
    color: #F5EDE0;
}

p {
    max-width: 55ch;
    margin-bottom: 1.2em;
    color: #F0E8DA;
}

/* Scroll Container */
.scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    width: 100vw;
    height: 100vh;
    will-change: transform;
    position: relative;
}

/* Panels */
.panel {
    min-width: 100vw;
    min-height: 100vh;
    scroll-snap-align: start;
    padding: clamp(8vw, 10vh, 10vw);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.panel-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Panel 1: The Base Layer */
.panel-1 {
    background-color: #5B1A2E;
    position: relative;
}

.panel-1 .blob-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
}

.panel-1 .panel-text {
    text-align: left;
    z-index: 3;
    position: relative;
}

.panel-1 h1 {
    margin-bottom: 0.3em;
}

.panel-1 .tagline {
    font-weight: 300;
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    color: #C8B8D4;
    max-width: 40ch;
    margin-bottom: 3em;
}

.scroll-hint {
    position: relative;
    height: 60px;
    width: 200px;
    margin-top: 2em;
}

.hint-gradient {
    position: absolute;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, transparent, #8C3A52, #A89060);
    opacity: 0.6;
    border-radius: 50%;
    filter: blur(10px);
    animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Panel 2: The Bridge */
.panel-2 {
    background: linear-gradient(90deg, #5B1A2E 0%, #F5EDE0 100%);
}

.bridge-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    align-items: center;
    width: 100%;
    max-width: 1000px;
}

.column-left {
    color: #2E2226;
}

.column-left h2 {
    color: #2E2226;
}

.column-left p {
    color: #2E2226;
}

.column-right {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
}

.lottie-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Panel 3: The Landscape */
.panel-3 {
    background-color: #F5EDE0;
    position: relative;
}

.panel-3 .background-grid {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.ecosystem-content {
    position: relative;
    z-index: 2;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 4vh;
}

.ecosystem-content h2 {
    color: #2E2226;
    position: relative;
    z-index: 3;
    margin-bottom: 2em;
    align-self: flex-start;
    width: 100%;
    text-align: left;
}

.ecosystem-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    will-change: transform;
    transform: translateZ(0);
}

/* Panel 4: The Experience */
.panel-4 {
    background-color: #FAF6F0;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 4vh;
}

.panel-4 h2 {
    color: #2E2226;
    width: 100%;
    text-align: left;
    margin-bottom: 3em;
}

.cards-container {
    display: flex;
    justify-content: space-between;
    gap: 2vw;
    width: 100%;
    max-width: 1100px;
    flex-wrap: nowrap;
}

.experience-card {
    flex: 1;
    min-width: 280px;
    background-color: #F5EDE0;
    border: 3px solid #8C3A52;
    border-radius: 12px;
    padding: 2em;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg width='120' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='0,8 15,0 30,8 45,0 60,8 75,0 90,8 105,0 120,8' fill='none' stroke='%23B76E7F' stroke-width='2'/%3E%3C/svg%3E") repeat-x;
    background-size: 120px 8px;
}

.experience-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg width='120' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='0,0 15,8 30,0 45,8 60,0 75,8 90,0 105,8 120,0' fill='none' stroke='%23F5EDE0' stroke-width='2'/%3E%3C/svg%3E") repeat-x;
    background-size: 120px 8px;
}

.card-header {
    border-bottom: 2px solid #8C3A52;
    padding-bottom: 1em;
}

.experience-card h3 {
    color: #2E2226;
    margin: 0;
}

.experience-card .lottie-container {
    height: 200px;
    flex-grow: 1;
}

.experience-card p {
    color: #2E2226;
    font-weight: 300;
    font-size: 0.95em;
    margin: 0;
}

/* Panel 5: The Invitation */
.panel-5 {
    background-color: #5B1A2E;
    position: relative;
}

.panel-5 .blob-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
}

.panel-text.inverted {
    text-align: center;
    z-index: 3;
    position: relative;
}

.panel-5 h2 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    margin-bottom: 1.2em;
}

.panel-5 p {
    max-width: 60ch;
    margin: 0 auto 2em;
    color: #F0E8DA;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2.5em;
    margin-top: 2em;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid #B76E7F;
    border-radius: 50%;
    color: #B76E7F;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.footer-link:hover {
    background-color: #B76E7F;
    color: #F5EDE0;
    transform: scale(1.1);
}

.footer-link svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}

/* Progress Indicator */
.progress-indicator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1em;
    z-index: 1000;
    pointer-events: auto;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #A89060;
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.4s ease;
}

.progress-dot.active {
    background-color: #8C3A52;
    opacity: 1;
    transform: scale(1.4);
}

/* Fog Overlays */
.fog-left,
.fog-right {
    position: fixed;
    top: 0;
    width: 120px;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
    animation: fog-breathe 10s ease-in-out infinite alternate;
}

.fog-left {
    left: 0;
    background: linear-gradient(90deg, rgba(95, 26, 46, 0.9), transparent);
}

.fog-right {
    right: 0;
    background: linear-gradient(270deg, rgba(95, 26, 46, 0.9), transparent);
}

@keyframes fog-breathe {
    0% { opacity: 0.85; }
    100% { opacity: 0.95; }
}

/* Blobs SVG Styling */
.blobs-1 circle,
.blobs-1 ellipse,
.blobs-1 path,
.blobs-5 circle,
.blobs-5 ellipse,
.blobs-5 path {
    transition: d 0.1s ease, r 0.1s ease, cx 0.1s ease, cy 0.1s ease;
}

.ecosystem-items circle,
.ecosystem-items ellipse,
.ecosystem-items path,
.ecosystem-items line {
    transition: r 0.1s ease, cx 0.1s ease, cy 0.1s ease, opacity 0.3s ease;
}

.ecosystem-items circle:hover {
    opacity: 1 !important;
}

/* Responsive Design for Touch/Mobile */
@media (max-width: 768px) {
    .scroll-container {
        touch-action: pan-x;
    }

    .bridge-columns {
        grid-template-columns: 1fr;
        gap: 2vw;
    }

    .cards-container {
        flex-direction: column;
        gap: 1.5vw;
    }

    .experience-card {
        min-width: auto;
    }

    .panel {
        padding: 6vw;
    }

    .footer-links {
        gap: 1.5em;
    }

    .footer-link {
        width: 40px;
        height: 40px;
    }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Utility Classes */
.pattern-defs {
    display: none;
}
