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

:root {
    --aurora-pink: #ff2d95;
    --aurora-cyan: #00f0ff;
    --aurora-green: #39ff14;
    --aurora-violet: #b537f2;
    --void-black: #07060b;
    --void-near-black: #12111a;
    --text-primary: #f0eef5;
    --text-muted: #7a7589;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void-black);
    color: var(--text-primary);
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    overflow-x: hidden;
}

/* === Aurora Canvas === */
#aurora-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* === Conch Spiral SVG === */
#conch-spiral {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    max-width: 800px;
    max-height: 800px;
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
    animation: draw-spiral 8s ease-out forwards;
}

@keyframes draw-spiral {
    to { stroke-dashoffset: 0; }
}

/* === Sections === */
.section {
    display: grid;
    place-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.section--tall {
    min-height: 150vh;
}

.section--deep {
    min-height: 200vh;
}

.section-inner {
    text-align: center;
}

.column {
    max-width: clamp(320px, 60vw, 680px);
    padding-inline: clamp(1rem, 4vw, 3rem);
    width: 100%;
}

.column--wide {
    max-width: clamp(320px, 70vw, 800px);
}

.column--narrow {
    max-width: 480px;
}

/* === Typography === */
.micro-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.4;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Hero title - nacre gradient text */
.hero-title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 100;
    font-style: normal;
    font-size: clamp(2rem, 7vw, 5.5rem);
    letter-spacing: 0.35em;
    text-transform: lowercase;
    color: transparent;
    background: linear-gradient(90deg, #ff2d95, #00f0ff, #39ff14, #b537f2);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 0.5px rgba(240, 238, 245, 0.3);
    animation: nacre-shift 8s ease-in-out infinite alternate;
    margin: 2rem 0;
    will-change: background-position;
}

@keyframes nacre-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Poem lines */
.poem-line {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 2;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin: 4rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
    position: relative;
    will-change: transform, opacity;
}

.poem-line.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* === Specimens Grid === */
.specimens-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    padding: 4rem 0;
}

.specimen {
    width: clamp(120px, 15vw, 200px);
    height: clamp(120px, 15vw, 200px);
    border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
    animation: specimen-rotate 30s linear infinite;
    cursor: pointer;
    position: relative;
    contain: layout style paint;
    will-change: transform;
    transition: filter 0.4s ease;
    justify-self: center;
}

.specimen:nth-child(1) {
    background: conic-gradient(from 0deg, #ff2d95, #00f0ff, #39ff14, #b537f2, #ff2d95);
    box-shadow: 0 0 40px rgba(255, 45, 149, 0.3);
}
.specimen:nth-child(2) {
    background: conic-gradient(from 60deg, #00f0ff, #39ff14, #b537f2, #ff2d95, #00f0ff);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.3);
    border-radius: 40% 60% 30% 70% / 60% 40% 50% 50%;
    animation-duration: 35s;
}
.specimen:nth-child(3) {
    background: conic-gradient(from 120deg, #39ff14, #b537f2, #ff2d95, #00f0ff, #39ff14);
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.3);
    border-radius: 70% 30% 50% 50% / 40% 70% 30% 60%;
    animation-duration: 28s;
}
.specimen:nth-child(4) {
    background: conic-gradient(from 180deg, #b537f2, #ff2d95, #00f0ff, #39ff14, #b537f2);
    box-shadow: 0 0 40px rgba(181, 55, 242, 0.3);
    border-radius: 50% 50% 40% 60% / 70% 30% 60% 40%;
    animation-duration: 32s;
}
.specimen:nth-child(5) {
    background: conic-gradient(from 240deg, #ff2d95, #39ff14, #00f0ff, #b537f2, #ff2d95);
    box-shadow: 0 0 40px rgba(255, 45, 149, 0.3);
    border-radius: 30% 70% 60% 40% / 50% 50% 70% 30%;
    animation-duration: 38s;
}
.specimen:nth-child(6) {
    background: conic-gradient(from 300deg, #00f0ff, #ff2d95, #b537f2, #39ff14, #00f0ff);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.3);
    border-radius: 50% 40% 60% 50% / 30% 60% 40% 70%;
    animation-duration: 26s;
}

.specimen:hover {
    filter: brightness(1.4) contrast(1.2);
}

@keyframes specimen-rotate {
    to { transform: rotate(360deg); }
}

/* === Closing Title === */
.closing-title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 100;
    font-style: normal;
    font-size: clamp(2rem, 7vw, 5.5rem);
    letter-spacing: 0.35em;
    text-transform: lowercase;
    color: var(--text-primary);
}

.closing-title .char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.6s ease, color 0.6s ease;
}

.closing-title.animate .char {
    opacity: 1;
}

/* === Ripple === */
@keyframes ripple-expand {
    0% { transform: scale(0); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0; }
}

.ripple-ring {
    position: absolute;
    inset: -50px;
    border-radius: 50%;
    border: 1px solid currentColor;
    animation: ripple-expand 0.8s ease-out forwards;
    pointer-events: none;
}

/* === Glitch Tears === */
.glitch-tear {
    position: fixed;
    z-index: 100;
    mix-blend-mode: screen;
    pointer-events: none;
    will-change: clip-path;
    animation: glitch-reveal 0.6s ease-out forwards;
}

@keyframes glitch-reveal {
    0% { clip-path: inset(0 100% 0 0); }
    33% { clip-path: inset(0 0 0 0); }
    66% { clip-path: inset(0 0 0 0); }
    100% { clip-path: inset(0 100% 0 0); }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    #aurora-canvas { display: none; }
    body { background: linear-gradient(135deg, #07060b 0%, #12111a 100%); }
    .specimen { animation: none; }
    .glitch-tear { display: none; }
    #conch-spiral { animation: none; stroke-dashoffset: 0; }
    .hero-title { animation: none; }
}

/* === Responsive === */
@media (max-width: 600px) {
    .specimens-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
