/* ronri.org — Contemplative Rationalism */

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

:root {
    --bg-primary: #f5f0e8;
    --bg-accent: #e8dfd2;
    --text-primary: #2c2418;
    --text-secondary: #4a3f33;
    --text-tertiary: #a3917a;
    --accent-primary: #6b8f71;
    --accent-dark: #3d5c42;
    --line-border: #c4b8a8;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

/* Navigation Trigger - Breathing Circle */
.nav-trigger {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-tertiary);
    z-index: 100;
    cursor: pointer;
    animation: breathe 4s ease-in-out infinite;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-trigger:hover {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Sections - Full Bleed */
.section {
    width: 100vw;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.section-axiom { background: var(--bg-primary); }
.section-premise { background: var(--bg-accent); }
.section-derivation { background: var(--bg-primary); }
.section-conclusion { background: var(--bg-accent); }

/* Grid Layout */
.section-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    max-width: none;
    width: 100%;
    padding: clamp(2rem, 5vw, 6rem);
    align-items: center;
}

.section-content {
    grid-column: 2 / 7;
}

.section-premise .section-content {
    grid-column: 7 / 12;
}

.section-conclusion .section-content {
    grid-column: 7 / 12;
}

.botanical-container {
    grid-column: 8 / 12;
    display: flex;
    justify-content: center;
    align-items: center;
}

.botanical-container.botanical-left {
    grid-column: 2 / 6;
}

/* Typography */
h1 {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

h2 {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 1.2rem;
    max-width: 540px;
}

.annotation {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    font-size: 0.82rem;
    line-height: 1.6;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 1rem;
}

.logical-notation {
    font-family: 'Fira Mono', monospace;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-top: 1.5rem;
}

/* Botanical SVGs */
.botanical {
    width: 100%;
    max-width: 320px;
    height: auto;
}

.botanical .vein {
    stroke: var(--accent-primary);
    fill: none;
    stroke-linecap: round;
}

.botanical .vein.outline {
    stroke: var(--accent-primary);
    opacity: 0.6;
}

.coral .vein {
    stroke: var(--text-tertiary);
    opacity: 0.6;
}

/* Stroke animation */
.botanical .vein {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease-out;
}

.section.revealed .botanical .vein {
    stroke-dashoffset: 0;
}

/* Mon markers */
.mon-marker {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
}

/* Seal mark */
.seal-mark {
    position: absolute;
    bottom: 3rem;
    right: 3rem;
}

.seal-mark svg {
    width: 24px;
    height: 24px;
}

/* Word animation */
.word {
    display: inline-block;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 400ms cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 400ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

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

/* Ruled notebook lines behind text */
.section-content {
    background-image: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent calc(1.75rem - 0.5px),
        rgba(196, 184, 168, 0.14) calc(1.75rem - 0.5px),
        rgba(196, 184, 168, 0.14) 1.75rem
    );
    background-size: 100% 1.75rem;
    padding: 1rem 0;
}

/* Section transition parallax */
.section .botanical {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.fading .botanical {
    opacity: 0.15;
    transform: scale(1.03);
}

/* Responsive */
@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .section-content,
    .section-premise .section-content,
    .section-conclusion .section-content {
        grid-column: 1;
    }

    .botanical-container,
    .botanical-container.botanical-left {
        grid-column: 1;
        margin-top: 2rem;
    }
}
