/* ===== lotus.dev - Crystalline Alien Temple ===== */

:root {
    --void-black: #050A12;
    --panel-frost: #0D1B2A;
    --border-ice: #1A2D42;
    --frost-white: #D8E4EE;
    --frost-mid: #8A9CB0;
    --frost-dim: #5A7890;
    --star-dust: #B0C4D8;
    --glow-core: #4AA8C8;
    --warm-anomaly: #C8A878;
    --panel-bg: rgba(13, 27, 42, 0.5);
    --border-glow: rgba(180, 200, 220, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void-black);
    color: var(--frost-white);
    font-family: 'Raleway', sans-serif;
    font-weight: 300;
    line-height: 1.9;
    overflow-x: hidden;
}

/* ===== Star Field ===== */
#star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease;
}

#star-field.visible {
    opacity: 1;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: var(--star-dust);
}

.star.warm {
    background: var(--warm-anomaly);
}

/* ===== Temple Sections ===== */
.temple-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

#opening {
    min-height: 100vh;
}

/* ===== Lotus Container ===== */
#lotus-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin-bottom: 3rem;
    animation: lotus-rotate 180s linear infinite;
}

@keyframes lotus-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.petal-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 300ms ease;
}

.petal-ring.visible {
    opacity: 1;
}

.petal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center bottom;
    border-radius: 50%;
    background: var(--glow-core);
    transition: opacity 0.3s ease;
}

.ring-inner .petal {
    width: 12px;
    height: 60px;
    opacity: 0.15;
    margin-left: -6px;
    margin-top: -60px;
}

.ring-middle .petal {
    width: 10px;
    height: 90px;
    opacity: 0.10;
    margin-left: -5px;
    margin-top: -90px;
}

.ring-outer .petal {
    width: 8px;
    height: 130px;
    opacity: 0.05;
    margin-left: -4px;
    margin-top: -130px;
}

/* ===== Temple Title ===== */
.temple-title {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--frost-white);
    text-align: center;
    opacity: 0;
    transition: opacity 500ms ease;
    position: relative;
    overflow: hidden;
}

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

.temple-title .shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(216, 228, 238, 0.15), transparent);
    pointer-events: none;
}

.temple-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--frost-dim);
    text-transform: uppercase;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 500ms ease 300ms;
}

.temple-title.visible ~ .temple-subtitle {
    opacity: 0.6;
}

/* ===== Frost Panels ===== */
.frost-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px) brightness(1.1);
    -webkit-backdrop-filter: blur(20px) brightness(1.1);
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    padding: 3rem 2.5rem;
    max-width: 520px;
    width: 100%;
    position: relative;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 400ms ease, transform 400ms ease, border-color 300ms ease, backdrop-filter 300ms ease;
}

.frost-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(180, 200, 220, 0.1), transparent);
    pointer-events: none;
}

.frost-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.frost-panel:hover {
    border-color: rgba(180, 200, 220, 0.25);
    backdrop-filter: blur(28px) brightness(1.1);
    -webkit-backdrop-filter: blur(28px) brightness(1.1);
}

.wide-panel {
    max-width: 680px;
}

/* ===== Typography ===== */
.section-number {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--glow-core);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

h2 {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--frost-white);
    margin-bottom: 1.5rem;
}

p {
    font-family: 'Raleway', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    line-height: 1.9;
    color: var(--frost-mid);
    margin-bottom: 1rem;
}

/* ===== Fibonacci Sequence Display ===== */
.sequence-display {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.seq-num {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    color: var(--frost-dim);
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(180, 200, 220, 0.1);
    border-radius: 2px;
}

.seq-num.active {
    color: var(--glow-core);
    border-color: var(--glow-core);
    background: rgba(74, 168, 200, 0.08);
}

/* ===== Divider Line ===== */
.divider-line {
    width: 300px;
    max-width: 80%;
    height: 1px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    background-image: repeating-linear-gradient(
        90deg,
        rgba(176, 196, 216, 0.12) 0px,
        rgba(176, 196, 216, 0.12) 20px,
        transparent 20px,
        transparent 30px,
        rgba(176, 196, 216, 0.12) 30px,
        rgba(176, 196, 216, 0.12) 34px,
        transparent 34px,
        transparent 44px
    );
    clip-path: inset(0 50% 0 50%);
    transition: clip-path 400ms ease;
}

.divider-line.visible {
    clip-path: inset(0 0 0 0);
}

/* ===== Mandala Markers ===== */
.mandala-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 600ms ease, transform 600ms ease;
}

.mandala-marker.visible {
    opacity: 1;
    transform: scale(1.0);
}

.mandala-small svg {
    width: 200px;
    height: 200px;
}

.mandala-large svg {
    width: 400px;
    height: 400px;
}

/* ===== End Mark ===== */
.end-mark {
    display: block;
    text-align: center;
    font-size: 1.5rem;
    color: var(--warm-anomaly);
    margin-top: 2rem;
    opacity: 0.5;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #lotus-container {
        width: 280px;
        height: 280px;
    }

    .frost-panel {
        padding: 2rem 1.5rem;
        max-width: 90%;
    }

    .wide-panel {
        max-width: 90%;
    }

    .sequence-display {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .seq-num {
        font-size: 0.9rem;
        padding: 0.3rem 0.5rem;
    }

    .mandala-large svg {
        width: 280px;
        height: 280px;
    }

    .mandala-small svg {
        width: 140px;
        height: 140px;
    }
}
