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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a14;
    color: #e8e4f0;
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.9rem, 1vw, 1.1rem);
    line-height: 1.8;
    letter-spacing: 0.03em;
    overflow-x: hidden;
    position: relative;
}

/* === COORDINATE GRID BACKGROUND === */
.coordinate-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 120px 120px;
    background-position: center center;
    mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 80%);
    opacity: 0.3;
}

/* === ORGANIC BLOBS === */
.blob {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: radial-gradient(ellipse at 40% 40%, #ff2ecb, #7b2fff 60%, transparent 85%);
    animation: blob-morph var(--duration, 15s) ease-in-out infinite;
    will-change: transform, border-radius;
    pointer-events: none;
    z-index: 0;
}

@keyframes blob-morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(0, 0) scale(1); }
    25% { border-radius: 58% 42% 56% 44% / 42% 58% 42% 58%; transform: translate(10px, -15px) scale(1.02); }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: translate(-5px, 10px) scale(0.98); }
    75% { border-radius: 44% 56% 42% 58% / 58% 42% 58% 42%; transform: translate(8px, 5px) scale(1.01); }
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-blob {
    width: clamp(300px, 50vw, 600px);
    height: clamp(300px, 50vw, 600px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
}

.hero-blob-secondary {
    width: clamp(200px, 30vw, 400px);
    height: clamp(200px, 30vw, 400px);
    top: 60%;
    left: 40%;
    transform: translate(-50%, -50%);
    opacity: 0.4;
    background: radial-gradient(ellipse at 60% 50%, #7b2fff, #00f0ff 50%, transparent 80%);
}

.hero-panel {
    width: clamp(280px, 60vw, 700px);
    padding: 3rem;
    text-align: center;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 9rem);
    text-transform: uppercase;
    color: #e8e4f0;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    color: #8a8499;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
}

.scroll-ripple {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 46, 203, 0.4);
    animation: scroll-pulse 2.5s ease-out infinite;
}

@keyframes scroll-pulse {
    0% { transform: translateX(-50%) scale(1); opacity: 0.6; }
    100% { transform: translateX(-50%) scale(3); opacity: 0; }
}

/* === GLASS PANEL === */
.glass-panel {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), backdrop-filter 0.3s ease;
    will-change: backdrop-filter;
}

.glass-panel:hover {
    transform: translateY(-4px) scale(1.01);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
}

/* === RIPPLE EFFECT === */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 46, 203, 0.3), transparent 70%);
    transform: scale(0);
    animation: ripple-expand 600ms ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes ripple-expand {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(1); opacity: 0; }
}

/* === NEON GLOW LINE === */
.neon-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff2ecb 30%, #00f0ff 70%, transparent);
    box-shadow: 0 0 20px rgba(255, 46, 203, 0.4), 0 0 60px rgba(255, 46, 203, 0.1);
    animation: neon-pulse 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes neon-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* === CONTENT GRID === */
.content-zone {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.8fr;
    gap: 2rem;
}

.grid-container--two {
    grid-template-columns: 1fr 1fr;
}

.grid-card {
    margin-top: var(--offset, 0);
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.grid-card.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.grid-card:hover {
    transform: translateY(-4px) scale(1.01);
}

.grid-card.revealed:hover {
    transform: translateY(-4px) scale(1.01);
}

.card-blob {
    width: clamp(200px, 80%, 400px);
    height: clamp(200px, 80%, 400px);
    top: -20%;
    left: -10%;
    opacity: 0.35;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: #e8e4f0;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.card-body {
    color: #e8e4f0;
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.card-annotation {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.75rem, 0.85vw, 0.85rem);
    color: rgba(255, 255, 255, 0.45);
    display: block;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(0, 240, 255, 0.15);
    padding-top: 0.75rem;
}

/* === LEATHER STRIP === */
.leather-strip {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background:
        linear-gradient(180deg, #c8923a 0%, #a06d20 50%, #c8923a 100%);
    border-radius: 12px 0 0 12px;
    z-index: 2;
}

.leather-strip::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-radial-gradient(circle at 1.5px 1.5px, rgba(0,0,0,0.15) 0px, transparent 1px);
    background-size: 3px 3px;
}

/* === INTERSTITIAL === */
.interstitial {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem;
    z-index: 1;
}

.interstitial-blob {
    width: clamp(300px, 40vw, 500px);
    height: clamp(300px, 40vw, 500px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
}

.interstitial-quote {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #e8e4f0;
    opacity: 0.6;
    text-align: center;
    max-width: 900px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.leather-rule {
    border: none;
    height: 3px;
    max-width: 120px;
    margin: 3rem auto;
    background: linear-gradient(90deg, #c8923a, #a06d20, #c8923a);
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

.interstitial-annotation {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.75rem, 0.85vw, 0.85rem);
    color: rgba(255, 255, 255, 0.45);
    position: relative;
    z-index: 1;
}

/* === SINGULARITY FOOTER === */
.singularity {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: radial-gradient(ellipse at 50% 50%, #ff2ecb 0%, #7b2fff 30%, #0a0a14 70%);
}

.singularity-blob {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    animation: singularity-converge 8s ease-in-out infinite alternate;
}

.singularity-blob--secondary {
    width: 200px;
    height: 200px;
    background: radial-gradient(ellipse at 50% 50%, #00f0ff, #7b2fff 60%, transparent 85%);
    opacity: 0.4;
    animation-delay: -3s;
}

.singularity-blob--tertiary {
    width: 250px;
    height: 250px;
    background: radial-gradient(ellipse at 50% 50%, #c8923a, #ff2ecb 50%, transparent 80%);
    opacity: 0.3;
    animation-delay: -6s;
}

@keyframes singularity-converge {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(0.3); }
}

.singularity-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: rgba(232, 228, 240, 0.2);
    position: relative;
    z-index: 1;
    letter-spacing: 0.1em;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .grid-container,
    .grid-container--two {
        grid-template-columns: 1fr;
    }

    .grid-card {
        margin-top: 0 !important;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .interstitial-quote {
        font-size: clamp(2rem, 6vw, 4rem);
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .blob {
        animation: none;
    }
    .scroll-ripple {
        animation: none;
    }
    .neon-line {
        animation: none;
        opacity: 0.7;
    }
    .singularity-blob {
        animation: none;
    }
    .grid-card {
        opacity: 1;
        transform: none;
    }
}
