/* rironbusou.com - Surreal Theory as Candlelit Ritual */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Fonts: Roboto Slab (slab-serif headings), Source Serif 4 (body serif) */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Source Serif 4', 'Georgia', serif;
    background-color: #1a1a2e;
    color: #f5f0e8;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Candle glow ambient overlay */
.candle-glow {
    position: fixed;
    bottom: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 140vw;
    height: 80vh;
    background: radial-gradient(ellipse at center bottom, rgba(232, 184, 75, 0.08) 0%, rgba(232, 184, 75, 0.03) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Botanical margin illustrations */
.botanical-margin {
    position: fixed;
    left: 0;
    top: 0;
    width: 120px;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 40px 10px;
}

.botanical-svg {
    width: 80px;
    height: auto;
    opacity: 0.6;
    transition: opacity 1s ease;
}

.botanical-1 { animation: botanicalSway1 12s ease-in-out infinite; }
.botanical-2 { animation: botanicalSway2 15s ease-in-out infinite; }
.botanical-3 { animation: botanicalSway3 18s ease-in-out infinite; }

@keyframes botanicalSway1 {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    50% { transform: rotate(1deg) translateX(3px); }
}

@keyframes botanicalSway2 {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    50% { transform: rotate(-0.8deg) translateX(-2px); }
}

@keyframes botanicalSway3 {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    50% { transform: rotate(0.6deg) translateX(2px); }
}

/* Typography */
h1, h2, h3 {
    font-family: 'Roboto Slab', 'Rockwell', serif;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #f5f0e8;
    margin-bottom: 1.5rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #e8b84b;
    margin-top: 0.75rem;
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #e8b84b;
    margin-bottom: 0.75rem;
}

p {
    color: rgba(245, 240, 232, 0.85);
    margin-bottom: 1rem;
}

.lead-text {
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    color: #f5f0e8;
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* Sections */
.section {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px 80px 140px;
}

.section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 60%;
    background: radial-gradient(ellipse at center bottom, rgba(232, 184, 75, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.section-content {
    max-width: 1000px;
    width: 100%;
}

.section-content.f-pattern {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Hero */
#hero {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 100%, rgba(232, 184, 75, 0.1) 0%, rgba(26, 26, 46, 0.95) 50%, #1a1a2e 100%);
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 40px;
}

.hero-content {
    max-width: 700px;
}

.hero-title {
    font-family: 'Roboto Slab', 'Rockwell', serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #f5f0e8;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 80px rgba(232, 184, 75, 0.3), 0 0 40px rgba(232, 184, 75, 0.1);
}

.hero-subtitle {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #e8b84b;
    font-style: italic;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    margin-bottom: 2rem;
}

.hero-divider {
    width: 200px;
    margin: 0 auto 2rem;
    opacity: 0.5;
}

.hero-divider svg {
    width: 100%;
    height: auto;
}

.hero-description {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: rgba(245, 240, 232, 0.7);
    line-height: 1.8;
    max-width: 540px;
    margin: 0 auto;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scroll-text {
    font-family: 'Roboto Slab', serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #6c757d;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #e8b84b, transparent);
    animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

/* Philosophy section */
#philosophy {
    background: radial-gradient(ellipse at 30% 80%, rgba(232, 184, 75, 0.06) 0%, transparent 50%);
}

.section-visual {
    margin-top: 1rem;
}

.duotone-frame {
    position: relative;
    border: 1px solid rgba(232, 184, 75, 0.2);
    padding: 8px;
}

.duotone-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #1a1a2e 0%, #4a90d9 40%, #e8b84b 70%, #1a1a2e 100%);
    filter: sepia(0.4) saturate(0.6) brightness(0.7) hue-rotate(10deg);
    position: relative;
}

.duotone-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(232, 184, 75, 0.15) 100%);
    mix-blend-mode: overlay;
}

.philosophy-img {
    background: linear-gradient(160deg, #1a1a2e 0%, #2a2a4e 20%, #4a90d9 45%, #e8b84b 65%, #3a3a5e 85%, #1a1a2e 100%);
}

/* Theories section */
#theories {
    background: radial-gradient(ellipse at 70% 90%, rgba(74, 144, 217, 0.05) 0%, transparent 50%);
}

.theories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.theory-card {
    background: rgba(245, 240, 232, 0.03);
    border: 1px solid rgba(232, 184, 75, 0.12);
    padding: 2rem;
    position: relative;
    transition: background 0.6s ease, border-color 0.6s ease;
}

.theory-card:hover {
    background: rgba(245, 240, 232, 0.06);
    border-color: rgba(232, 184, 75, 0.3);
}

.theory-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #e8b84b, transparent);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.theory-card:hover::before {
    opacity: 1;
}

.theory-number {
    font-family: 'Roboto Slab', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(232, 184, 75, 0.15);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.theory-card h3 {
    font-size: 1.15rem;
}

.theory-card p {
    font-size: 0.95rem;
    color: rgba(245, 240, 232, 0.7);
}

/* Meditations section */
#meditations {
    background: radial-gradient(ellipse at 40% 70%, rgba(232, 184, 75, 0.05) 0%, transparent 50%);
}

.meditations-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 1rem;
}

.meditation-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    border-left: 2px solid rgba(232, 184, 75, 0.15);
    transition: border-color 0.6s ease;
}

.meditation-item:hover {
    border-left-color: rgba(232, 184, 75, 0.5);
}

.meditation-marker {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
}

.meditation-marker svg {
    width: 100%;
    height: 100%;
}

.meditation-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.meditation-content p {
    font-size: 0.95rem;
    color: rgba(245, 240, 232, 0.75);
}

/* Archive section */
#archive {
    background: radial-gradient(ellipse at 60% 80%, rgba(74, 144, 217, 0.04) 0%, transparent 50%);
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

.archive-entry {
    text-align: center;
}

.archive-duotone {
    position: relative;
    border: 1px solid rgba(232, 184, 75, 0.15);
    padding: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.archive-duotone .duotone-image {
    height: 200px;
    transition: filter 0.8s ease;
}

.archive-entry:hover .duotone-image {
    filter: sepia(0.6) saturate(0.8) brightness(0.8) hue-rotate(20deg);
}

.archive-img-1 {
    background: linear-gradient(45deg, #1a1a2e 0%, #4a90d9 30%, #e8b84b 60%, #2a2a4e 100%);
}

.archive-img-2 {
    background: linear-gradient(135deg, #2a2a4e 0%, #e8b84b 35%, #4a90d9 65%, #1a1a2e 100%);
}

.archive-img-3 {
    background: linear-gradient(225deg, #1a1a2e 0%, #3a3a5e 25%, #e8b84b 50%, #4a90d9 75%, #1a1a2e 100%);
}

.archive-label {
    display: inline-block;
    font-family: 'Roboto Slab', serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #e8b84b;
    margin-bottom: 0.5rem;
}

.archive-text {
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.7);
    font-style: italic;
}

/* Footer */
#closing {
    min-height: 60vh;
    background: radial-gradient(ellipse at 50% 100%, rgba(232, 184, 75, 0.08) 0%, transparent 60%);
}

.footer-inner {
    text-align: center;
    max-width: 600px;
}

.footer-botanical {
    width: 200px;
    margin: 0 auto 2rem;
    opacity: 0.6;
}

.footer-botanical svg {
    width: 100%;
    height: auto;
}

.footer-quote {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-style: italic;
    color: rgba(245, 240, 232, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.footer-domain {
    font-family: 'Roboto Slab', serif;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.footer-year {
    font-family: 'Roboto Slab', serif;
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    color: rgba(108, 117, 125, 0.5);
}

/* Scroll-triggered reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.visible:nth-child(2) { transition-delay: 0.15s; }
.reveal.visible:nth-child(3) { transition-delay: 0.3s; }
.reveal.visible:nth-child(4) { transition-delay: 0.45s; }

/* Candle flicker animation on certain elements */
@keyframes candleFlicker {
    0%, 100% { opacity: 1; }
    10% { opacity: 0.95; }
    20% { opacity: 1; }
    30% { opacity: 0.97; }
    40% { opacity: 1; }
    50% { opacity: 0.93; }
    60% { opacity: 1; }
    70% { opacity: 0.96; }
    80% { opacity: 1; }
    90% { opacity: 0.98; }
}

.hero-title {
    animation: candleFlicker 4s ease-in-out infinite;
}

/* Selection styling */
::selection {
    background: rgba(232, 184, 75, 0.3);
    color: #f5f0e8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: rgba(232, 184, 75, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(232, 184, 75, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
    .botanical-margin {
        display: none;
    }

    .section {
        padding: 60px 24px;
    }

    .theories-grid {
        grid-template-columns: 1fr;
    }

    .archive-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-inner {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 40px 16px;
    }

    .meditation-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}