/* paraligm.com - Botanical Glass Terrarium */
/* Colors: #0D0A1A, #1A1230, #2E4A8F, #1B6B4A, #8A2BE2, #C0325A, #E2D4F0, #B4A0C8, #3B6CB0, #4A9B6E, #D4577A */
/* Fonts: Bebas Neue, Playfair Display, Nunito Sans, IBM Plex Mono */

:root {
    --obsidian-violet: #0D0A1A;
    --midnight-amethyst: #1A1230;
    --imperial-sapphire: #2E4A8F;
    --emerald-depth: #1B6B4A;
    --amethyst-blaze: #8A2BE2;
    --ruby-whisper: #C0325A;
    --lavender-mist: #E2D4F0;
    --moonstone: #B4A0C8;
    --sapphire-dilute: #3B6CB0;
    --peridot-green: #4A9B6E;
    --tourmaline-rose: #D4577A;
    --glass-surface: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --scroll-y: 0;
    --bg-glow-1: #1A1230;
    --bg-glow-2: #0D0A1A;
    --chamber-hue: 270;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--obsidian-violet);
    color: var(--lavender-mist);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== LAYER 0: Background Gradient ===== */
.layer-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at 30% 70%, var(--bg-glow-1), var(--bg-glow-2), var(--obsidian-violet));
    animation: bgDrift 60s ease-in-out infinite alternate;
    transition: background 1.5s ease;
}

@keyframes bgDrift {
    0% {
        background: radial-gradient(ellipse at 30% 70%, #1A1230, #0D0A1A, #0D0A1A);
    }
    15% {
        background: radial-gradient(ellipse at 40% 60%, #1A1240, #0D0A20, #0D0A1A);
    }
    30% {
        background: radial-gradient(ellipse at 55% 45%, #1A2040, #0D0A22, #0D0A1A);
    }
    50% {
        background: radial-gradient(ellipse at 65% 35%, #1A1A38, #0D1020, #0D0A1A);
    }
    70% {
        background: radial-gradient(ellipse at 60% 50%, #201A35, #0D0D1E, #0D0A1A);
    }
    85% {
        background: radial-gradient(ellipse at 45% 55%, #1E1535, #0D0B1C, #0D0A1A);
    }
    100% {
        background: radial-gradient(ellipse at 70% 30%, #1A1230, #0D0A1A, #0D0A1A);
    }
}

/* ===== LAYER 1: Mid-ground Botanicals ===== */
.layer-mid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    transform: translateY(calc(var(--scroll-y) * -0.4px));
}

.botanical-svg {
    position: absolute;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.botanical-svg.visible {
    opacity: 0.6;
}

.botanical-iris {
    width: clamp(200px, 30vw, 400px);
    top: 5%;
    right: 8%;
}

.botanical-fern {
    width: clamp(250px, 35vw, 500px);
    top: 20%;
    left: -5%;
}

.botanical-lotus {
    width: clamp(200px, 28vw, 420px);
    top: 42%;
    right: 5%;
}

.botanical-moss {
    width: clamp(220px, 30vw, 450px);
    top: 62%;
    left: 2%;
}

.botanical-passion {
    width: clamp(200px, 28vw, 400px);
    top: 80%;
    right: 10%;
}

/* ===== LAYER 3: Floating Petals ===== */
#layer-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    transform: translateY(calc(var(--scroll-y) * 0.15px));
}

.floating-petal {
    position: absolute;
    filter: blur(1px);
}

.petal-1 {
    width: 35px;
    top: 15%;
    left: 10%;
    animation: floatPetal1 25s ease-in-out infinite;
}

.petal-2 {
    width: 28px;
    top: 35%;
    right: 15%;
    animation: floatPetal2 22s ease-in-out infinite;
}

.petal-3 {
    width: 22px;
    top: 55%;
    left: 20%;
    animation: floatPetal3 28s ease-in-out infinite;
}

.petal-4 {
    width: 30px;
    top: 72%;
    right: 25%;
    animation: floatPetal4 24s ease-in-out infinite;
}

.petal-5 {
    width: 25px;
    top: 88%;
    left: 40%;
    animation: floatPetal5 26s ease-in-out infinite;
}

@keyframes floatPetal1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -20px) rotate(45deg); }
    50% { transform: translate(-15px, -40px) rotate(90deg); }
    75% { transform: translate(20px, -15px) rotate(135deg); }
}

@keyframes floatPetal2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-25px, 15px) rotate(-30deg); }
    50% { transform: translate(20px, -25px) rotate(-60deg); }
    75% { transform: translate(-10px, 20px) rotate(-90deg); }
}

@keyframes floatPetal3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(35px, -30px) rotate(60deg); }
    66% { transform: translate(-20px, -15px) rotate(120deg); }
}

@keyframes floatPetal4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-20px, -25px) rotate(40deg); }
    50% { transform: translate(15px, -35px) rotate(80deg); }
    75% { transform: translate(-25px, -10px) rotate(120deg); }
}

@keyframes floatPetal5 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(25px, 20px) rotate(-45deg); }
    66% { transform: translate(-30px, -20px) rotate(-90deg); }
}

/* ===== PERSPECTIVE CONTAINER ===== */
#perspective-container {
    position: relative;
    z-index: 2;
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    z-index: 3;
}

.domain-name {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(72px, 12vw, 180px);
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 0 40px rgba(138, 43, 226, 0.3);
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.3em;
}

.domain-name span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.domain-name span.revealed {
    opacity: 0.85;
    transform: translateY(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease-out 1.5s, transform 0.8s ease-out 1.5s;
}

.hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== BREATHING SPACE ===== */
.breathing-space {
    min-height: 40vh;
}

/* ===== CHAMBERS ===== */
.chamber {
    padding: 5vh 5vw;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* ===== GLASS PANELS ===== */
.glass-panel {
    position: relative;
    background: var(--glass-surface);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: clamp(24px, 4vw, 48px);
    max-width: 900px;
    width: 85%;
    will-change: backdrop-filter;
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, backdrop-filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    backdrop-filter: blur(22px) saturate(1.8);
    -webkit-backdrop-filter: blur(22px) saturate(1.8);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 0 30px rgba(138, 43, 226, 0.08);
}

.panel-left {
    transform: translateX(-60px);
    margin-right: auto;
}

.panel-right {
    transform: translateX(60px);
    margin-left: auto;
}

.glass-panel.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Condensation Effect */
.condensation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 3px 3px;
    animation: condensate 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes condensate {
    0%, 100% { opacity: 0.02; }
    50% { opacity: 0.06; }
}

/* Refraction Lines */
.refraction-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: repeating-linear-gradient(
        15deg,
        transparent,
        transparent 40px,
        rgba(255, 255, 255, 0.03) 40px,
        rgba(255, 255, 255, 0.03) 41px
    );
    pointer-events: none;
    z-index: 0;
}

/* Panel Grid */
.panel-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.618fr;
    gap: clamp(16px, 3vw, 40px);
    align-items: center;
}

.panel-text {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.panel-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chamber-specimen {
    width: 100%;
    max-width: 280px;
    height: auto;
}

/* ===== TYPOGRAPHY ===== */
.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(28px, 4vw, 52px);
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--lavender-mist);
}

.body-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: rgba(226, 212, 240, 0.9);
}

.caption-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(180, 160, 200, 0.7);
}

.specimen-label {
    display: block;
    margin-bottom: 0.5em;
}

/* Text reveal animation */
.panel-text .body-text,
.panel-text .section-title,
.panel-text .specimen-label {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.panel-text.revealed .specimen-label {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0ms;
}

.panel-text.revealed .section-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 100ms;
}

.panel-text.revealed .body-text:nth-of-type(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 200ms;
}

.panel-text.revealed .body-text:nth-of-type(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 300ms;
}

/* ===== FOOTER ===== */
.chamber-footer {
    text-align: center;
    padding: 4vh 0 6vh;
}

.chamber-footer .caption-text {
    opacity: 0.5;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .floating-petal {
        animation: none !important;
    }
    .layer-mid {
        transform: none !important;
    }
    #layer-petals {
        transform: none !important;
    }
    .layer-bg {
        animation: none !important;
    }
    .condensation {
        animation: none !important;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .panel-grid {
        grid-template-columns: 1fr;
    }

    .panel-illustration {
        order: -1;
    }

    .glass-panel {
        width: 95%;
    }

    .panel-left,
    .panel-right {
        margin: 0 auto;
    }

    .chamber {
        padding: 3vh 3vw;
        min-height: 60vh;
    }

    .breathing-space {
        min-height: 20vh;
    }

    .chamber-specimen {
        max-width: 200px;
    }
}
