/* ============================================
   infra.limited - Styles
   Generative Dreamscape / Sunset-Warm / Organic Flow
   ============================================ */

/* CSS Custom Properties */
:root {
    --twilight-umber: #1e0f0a;
    --dusky-sienna: #3a1f14;
    --coral-ember: #e8734a;
    --tangerine-haze: #f2a65a;
    --peach-glow: #fcd5b0;
    --warm-cream: #faf3e8;
    --dusty-rose: #b48c78;
    --vermillion-dusk: #c94530;
    --deep-umber: #3a2218;
    --muted-terracotta: #b8856e;

    --bg-hue: 15;
    --bg-lightness: 5%;
    --bg-saturation: 50%;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--twilight-umber);
    color: var(--warm-cream);
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* SVG Filters (hidden) */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Infrastructure traces background */
.infra-traces-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* Ambient particles overlay */
.ambient-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 2s ease;
}

.ambient-particles.visible {
    opacity: 1;
}

.ambient-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

/* ============================================
   Navigation Blob
   ============================================ */
.nav-blob {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    cursor: pointer;
}

.nav-dot {
    width: 12px;
    height: 12px;
    background: var(--coral-ember);
    border-radius: 50%;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.4s ease;
    box-shadow: 0 0 20px rgba(232, 115, 74, 0.4);
}

.nav-blob:hover .nav-dot,
.nav-blob.active .nav-dot {
    transform: scale(0);
    opacity: 0;
}

.nav-links {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.3);
    transform-origin: top right;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: radial-gradient(ellipse at center, rgba(58, 31, 20, 0.95) 0%, rgba(30, 15, 10, 0.9) 100%);
    border-radius: 40% 30% 50% 35% / 35% 45% 30% 40%;
    box-shadow: 0 0 40px rgba(232, 115, 74, 0.2),
                0 0 80px rgba(242, 166, 90, 0.1);
    min-width: 140px;
}

.nav-blob:hover .nav-links,
.nav-blob.active .nav-links {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.nav-link {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(180, 140, 120, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--tangerine-haze);
}

/* ============================================
   Typography
   ============================================ */
.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--warm-cream);
    text-shadow: 0 0 60px rgba(232, 115, 74, 0.4);
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-title.visible {
    opacity: 1;
}

.hero-subtitle-container {
    position: relative;
    height: 2em;
    margin-top: 1.5rem;
}

.hero-subtitle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    color: rgba(180, 140, 120, 0.85);
    letter-spacing: 0.01em;
    line-height: 1.85;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--warm-cream);
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: rgba(180, 140, 120, 0.85);
}

/* ============================================
   Section Base
   ============================================ */
.section {
    position: relative;
    z-index: 1;
}

/* ============================================
   Section 1: Hero
   ============================================ */
.section-hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--twilight-umber);
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 2s ease;
}

.hero-canvas.visible {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   Section 2: Concept Drift
   ============================================ */
.section-concept {
    padding: clamp(8rem, 16vh, 16rem) 5%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.concept-wrapper {
    position: relative;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.blob {
    position: relative;
    flex: 0 1 550px;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.4s ease 0.5s,
                transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.blob.visible {
    opacity: 1;
    transform: scale(1);
}

.blob-inner {
    width: 100%;
    padding: clamp(2rem, 4vw, 4rem);
    background: linear-gradient(135deg, rgba(232, 115, 74, 0.15) 0%, rgba(242, 166, 90, 0.08) 50%, rgba(30, 15, 10, 0.9) 100%);
    border-radius: 40% 55% 45% 50% / 50% 40% 55% 45%;
    filter: drop-shadow(0 0 40px rgba(232, 115, 74, 0.3)) drop-shadow(0 0 80px rgba(242, 166, 90, 0.15));
    animation: blobBreathe 8s ease-in-out infinite;
    transition: filter 0.3s ease, background 0.3s ease;
}

.blob:hover .blob-inner {
    filter: drop-shadow(0 0 60px rgba(232, 115, 74, 0.4)) drop-shadow(0 0 100px rgba(242, 166, 90, 0.25));
    background: linear-gradient(135deg, rgba(232, 115, 74, 0.2) 0%, rgba(242, 166, 90, 0.12) 50%, rgba(30, 15, 10, 0.95) 100%);
}

.blob-left {
    transform-origin: center right;
    margin-right: -5%;
    z-index: 1;
}

.blob-left .blob-inner {
    border-radius: 50% 40% 55% 45% / 45% 55% 40% 50%;
    animation-delay: 0s;
}

.blob-right {
    transform-origin: center left;
    margin-left: -5%;
    z-index: 2;
    mix-blend-mode: normal;
}

.blob-right .blob-inner {
    border-radius: 45% 55% 40% 50% / 50% 45% 55% 40%;
    animation-delay: -4s;
}

.blob-content {
    max-width: 400px;
}

@keyframes blobBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

/* ============================================
   Section 3: Generative Canvas
   ============================================ */
.section-canvas {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.flow-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.flow-canvas.visible {
    opacity: 1;
}

/* ============================================
   Section 4: Infrastructure Whisper
   ============================================ */
.section-whisper {
    padding: clamp(6rem, 12vh, 12rem) 5%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whisper-wrapper {
    position: relative;
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: clamp(2rem, 4vw, 4rem);
    justify-items: center;
}

.whisper-blob {
    position: relative;
    width: 100%;
    max-width: 360px;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.4s ease 0.5s,
                transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.whisper-blob.visible {
    opacity: 1;
    transform: scale(1);
}

.whisper-blob .blob-inner {
    padding: clamp(1.8rem, 3vw, 3rem);
    background: linear-gradient(135deg, rgba(232, 115, 74, 0.12) 0%, rgba(242, 166, 90, 0.06) 50%, rgba(30, 15, 10, 0.9) 100%);
    border-radius: 45% 55% 50% 40% / 50% 40% 55% 45%;
    filter: drop-shadow(0 0 40px rgba(232, 115, 74, 0.25)) drop-shadow(0 0 80px rgba(242, 166, 90, 0.12));
    animation: blobBreathe 8s ease-in-out infinite;
    transition: filter 0.3s ease, background 0.3s ease;
}

.whisper-blob:hover .blob-inner {
    filter: drop-shadow(0 0 60px rgba(232, 115, 74, 0.4)) drop-shadow(0 0 100px rgba(242, 166, 90, 0.2));
    background: linear-gradient(135deg, rgba(232, 115, 74, 0.18) 0%, rgba(242, 166, 90, 0.1) 50%, rgba(30, 15, 10, 0.95) 100%);
}

.whisper-blob-1 {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
}

.whisper-blob-1 .blob-inner {
    border-radius: 50% 45% 55% 40% / 40% 55% 45% 50%;
    animation-delay: 0s;
}

.whisper-blob-2 {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    margin-top: clamp(2rem, 6vw, 6rem);
}

.whisper-blob-2 .blob-inner {
    border-radius: 40% 55% 45% 50% / 55% 40% 50% 45%;
    animation-delay: -2.7s;
}

.whisper-blob-3 {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
}

.whisper-blob-3 .blob-inner {
    border-radius: 55% 40% 50% 45% / 45% 50% 40% 55%;
    animation-delay: -5.3s;
}

.whisper-label {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #b8856e; /* Muted Terracotta at 60% opacity via separate opacity */
    opacity: 0.6;
    display: block;
    margin-bottom: 0.8rem;
}

.whisper-word {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--warm-cream);
    margin-bottom: 1rem;
}

.whisper-desc {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: rgba(180, 140, 120, 0.85);
}

/* ============================================
   Section 5: Closing Membrane
   ============================================ */
.section-closing {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.closing-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vmax;
    height: 120vmax;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(232, 115, 74, 0.2) 0%,
        rgba(201, 69, 48, 0.15) 25%,
        rgba(58, 31, 20, 0.3) 50%,
        rgba(30, 15, 10, 0.8) 75%,
        rgba(30, 15, 10, 1) 100%
    );
    animation: closingPulse 6s ease-in-out infinite;
}

@keyframes closingPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

.closing-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    padding: 2rem;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.4s ease 0.5s,
                transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.closing-content.visible {
    opacity: 1;
    transform: scale(1);
}

.closing-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--warm-cream);
    margin-bottom: 2rem;
    text-shadow: 0 0 40px rgba(232, 115, 74, 0.3);
}

.closing-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: rgba(180, 140, 120, 0.85);
    margin-bottom: 3rem;
}

.closing-domain {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(180, 140, 120, 0.6);
}

/* ============================================
   Scroll-linked color temperature
   ============================================ */
body {
    background-color: hsl(var(--bg-hue), var(--bg-saturation), var(--bg-lightness));
}

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

    .hero-canvas, .flow-canvas {
        opacity: 1 !important;
    }

    .ambient-particles {
        display: none;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .concept-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .blob-left, .blob-right {
        margin: 0;
    }

    .blob {
        flex: 0 1 100%;
    }

    .whisper-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .whisper-blob-1,
    .whisper-blob-2,
    .whisper-blob-3 {
        grid-column: 1;
        justify-self: center;
    }

    .whisper-blob-1 { grid-row: 1; }
    .whisper-blob-2 { grid-row: 2; margin-top: 0; }
    .whisper-blob-3 { grid-row: 3; }

    .nav-blob {
        top: 16px;
        right: 16px;
    }
}
