/* ============================================
   riron.org - Theory as Dopamine
   Color Palette:
     Midnight Core: #0F172A
     Deep Layer: #050A18
     Slate Alt: #1E293B
     Theory Blue: #3B82F6
     Dopamine Amber: #F59E0B
     Candle Warm: #D4A040
     Star Silver: #CBD5E1
   Fonts: Zilla Slab (700), Nunito (400,600), Fira Code (400)
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.8;
    color: #CBD5E1;
    background-color: #050A18;
    overflow-x: hidden;
}

/* ---- Typography ---- */

h2, h3 {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
}

h2 {
    font-size: clamp(28px, 4.5vw, 56px);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h3 {
    font-size: clamp(20px, 2.5vw, 28px);
    line-height: 1.3;
    margin-bottom: 0.4em;
}

code, .theory-equation {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 14px;
}

/* ---- Amber Highlight ---- */

.amber-highlight {
    color: #F59E0B;
    font-weight: 600;
}

/* ---- Glass Card Base ---- */

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    z-index: 2;
}

/* ---- Candle Glow Base ---- */

.candle-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, #D4A040 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.6s ease;
}

.candle-glow.visible {
    opacity: 0.1;
}

/* ---- Candle Positions ---- */

.candle-1 { top: 20%; left: 15%; width: 140px; height: 140px; }
.candle-2 { top: 35%; right: 10%; width: 100px; height: 100px; }
.candle-3 { bottom: 25%; left: 30%; width: 120px; height: 120px; }
.candle-4 { top: 10%; right: 25%; width: 90px; height: 90px; }
.candle-5 { bottom: 15%; right: 20%; width: 110px; height: 110px; }

.candle-corner-tl { top: 10%; left: 5%; width: 120px; height: 120px; }
.candle-corner-tr { top: 10%; right: 5%; width: 120px; height: 120px; }
.candle-corner-bl { bottom: 10%; left: 5%; width: 120px; height: 120px; }
.candle-corner-br { bottom: 10%; right: 5%; width: 120px; height: 120px; }
.candle-center { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 200px; }

.candle-footer-1 { top: 30%; left: 10%; width: 80px; height: 80px; }
.candle-footer-2 { top: 20%; right: 15%; width: 100px; height: 100px; }
.candle-footer-3 { bottom: 20%; left: 50%; width: 90px; height: 90px; }

/* ---- Parallax Layers ---- */

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

.orb-1 { top: 10%; left: 60%; width: 300px; height: 300px; }
.orb-2 { top: 50%; left: 10%; width: 200px; height: 200px; }
.orb-3 { bottom: 20%; right: 15%; width: 250px; height: 250px; }
.orb-4 { top: 30%; right: 20%; width: 220px; height: 220px; }
.orb-5 { bottom: 30%; left: 15%; width: 280px; height: 280px; }
.orb-6 { top: 20%; left: 40%; width: 240px; height: 240px; }

/* ---- Diagonal Sections ---- */

.diagonal-section {
    position: relative;
    padding: 8rem 2rem;
    overflow: hidden;
}

.diagonal-section + .diagonal-section {
    margin-top: -3vw;
}

.shade-primary {
    background-color: #0F172A;
    clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 calc(100% - 3vw));
}

.shade-alt {
    background-color: #1E293B;
    clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 calc(100% - 3vw));
}

/* ---- Hero Section ---- */

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #0F172A;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5vw), 0 100%);
    padding-bottom: 10vw;
}

.hero-card {
    text-align: center;
    max-width: 600px;
    width: 90%;
    padding: 3rem 2.5rem;
    opacity: 0;
    transform: scale(0.95);
    animation: heroCardIn 0.6s ease-out 0.4s forwards;
}

@keyframes heroCardIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wordmark {
    margin-bottom: 1.5rem;
}

.wordmark-kanji {
    display: block;
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 96px);
    color: #F59E0B;
    line-height: 1.1;
    letter-spacing: 0.05em;
}

.wordmark-domain {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 2.5vw, 28px);
    color: #CBD5E1;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    margin-top: 0.3em;
}

.hero-tagline {
    font-size: clamp(16px, 2vw, 22px);
    color: #CBD5E1;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.8s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-hint {
    position: absolute;
    bottom: calc(5vw + 2rem);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 0.5s ease-out 1.2s forwards, bounce 2s ease-in-out 1.7s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---- Theory Sections ---- */

.theory-section {
    padding: 10rem 2rem 8rem;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.theory-card {
    padding: 3rem;
}

.theory-title {
    color: #3B82F6;
    margin-bottom: 0.6em;
}

.theory-body {
    color: #CBD5E1;
    margin-bottom: 1.5em;
}

.theory-equation {
    display: block;
    background: rgba(5, 10, 24, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    color: #3B82F6;
    font-size: 15px;
    text-align: center;
    margin-top: 1rem;
}

/* ---- Insight Wall Section ---- */

.insight-section {
    padding: 10rem 2rem 8rem;
}

.section-heading {
    text-align: center;
    color: #F59E0B;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.insight-card {
    padding: 2rem;
}

.insight-title {
    color: #3B82F6;
    font-size: clamp(18px, 2vw, 24px);
    margin-bottom: 0.4em;
}

.insight-body {
    color: #CBD5E1;
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.7;
}

/* ---- Scroll Reveal ---- */

.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Footer ---- */

.footer-section {
    position: relative;
    background-color: #050A18;
    padding: 6rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
}

.footer-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 2.5rem;
    text-align: center;
}

.footer-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(16px, 2vw, 20px);
    color: #CBD5E1;
    margin-bottom: 0.5em;
}

.footer-domain {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 32px);
    color: #F59E0B;
    letter-spacing: 0.1em;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .diagonal-section {
        padding: 6rem 1.2rem;
    }

    .theory-section {
        padding: 8rem 1.2rem 6rem;
    }

    .insight-section {
        padding: 8rem 1.2rem 6rem;
    }

    .glass-card {
        padding: 1.8rem;
    }

    .hero-card {
        padding: 2rem 1.5rem;
    }

    .theory-card {
        padding: 2rem;
    }

    .insight-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .floating-orb {
        display: none;
    }
}

@media (max-width: 480px) {
    .diagonal-section {
        padding: 5rem 1rem;
    }

    .theory-section {
        padding: 7rem 1rem 5rem;
    }

    .insight-section {
        padding: 7rem 1rem 5rem;
    }
}
