/* ronri.org - 論理 (Logic) */
/* Colors: #0F0F1A, #1A1A2E, #16213E, #E8DCC8, #C4B998, #D4A574, #B8860B, #7B9971 */

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    background-color: #0F0F1A;
    color: #E8DCC8;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

#scroll-container {
    position: relative;
}

/* Timeline Spine */
#timeline-spine {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spine-line {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #B8860B, transparent);
    left: 50%;
    transform: translateX(-50%);
}

.spine-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1A1A2E;
    border: 2px solid #B8860B;
    position: relative;
    z-index: 1;
    transition: background 0.4s ease, transform 0.3s ease;
    cursor: pointer;
}

.spine-marker.active {
    background: #B8860B;
    transform: scale(1.4);
}

/* Diagonal Sections */
.diagonal-section {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 4rem 6rem 6rem;
    clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
}

.diagonal-section:nth-child(odd) {
    background: #0F0F1A;
}

.diagonal-section:nth-child(even) {
    background: #1A1A2E;
}

.section-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* Typography */
.site-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #E8DCC8;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.site-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #B8860B;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.hero-tagline {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #C4B998;
    margin-top: 1.5rem;
    font-style: italic;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    color: #E8DCC8;
    letter-spacing: 0.02em;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #B8860B;
    margin-top: 1rem;
}

/* Hero Section */
#hero {
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.proof-tree-svg {
    width: 300px;
    height: 200px;
    margin: 0 auto 2rem;
    position: relative;
}

/* Floating Logical Symbols */
.logical-symbols-float {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.float-symbol {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    color: #B8860B;
    opacity: 0;
    animation: floatSymbol 8s ease-in-out infinite;
}

.float-symbol[data-delay="0"] { top: 15%; left: 10%; animation-delay: 0s; }
.float-symbol[data-delay="1"] { top: 25%; left: 85%; animation-delay: 1s; }
.float-symbol[data-delay="2"] { top: 60%; left: 5%; animation-delay: 2s; }
.float-symbol[data-delay="3"] { top: 70%; left: 90%; animation-delay: 3s; }
.float-symbol[data-delay="4"] { top: 40%; left: 15%; animation-delay: 4s; }
.float-symbol[data-delay="5"] { top: 80%; left: 75%; animation-delay: 5s; }
.float-symbol[data-delay="6"] { top: 10%; left: 70%; animation-delay: 6s; }
.float-symbol[data-delay="7"] { top: 50%; left: 50%; animation-delay: 7s; }

@keyframes floatSymbol {
    0%, 100% { opacity: 0; transform: translateY(0) rotate(0deg); }
    20% { opacity: 0.15; }
    50% { opacity: 0.25; transform: translateY(-30px) rotate(10deg); }
    80% { opacity: 0.15; }
}

/* Isometric Cards */
.iso-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.iso-card {
    background: #16213E;
    border: 1px solid rgba(184, 134, 11, 0.3);
    padding: 2.5rem;
    transform: skewY(-2deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    opacity: 0;
    transform: skewY(-2deg) translateY(40px);
}

.iso-card.revealed {
    opacity: 1;
    transform: skewY(-2deg) translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.iso-card:hover {
    transform: skewY(-2deg) translateY(-5px);
    box-shadow: 8px 8px 0 rgba(184, 134, 11, 0.2);
}

.iso-card > * {
    transform: skewY(2deg);
}

.card-symbol {
    font-family: 'Space Mono', monospace;
    font-size: 3rem;
    color: #B8860B;
    margin-bottom: 1rem;
    line-height: 1;
}

.iso-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #E8DCC8;
    margin-bottom: 0.75rem;
}

.iso-card p {
    color: #C4B998;
    font-size: 1rem;
    line-height: 1.7;
}

/* Proof Steps */
.proof-steps {
    max-width: 700px;
    margin: 0 auto;
}

.proof-step {
    display: grid;
    grid-template-columns: 3rem 1fr auto;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-left: 2px solid rgba(184, 134, 11, 0.3);
    margin-left: 1.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.proof-step.revealed {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    font-family: 'Space Mono', monospace;
    color: #7B9971;
    font-size: 0.9rem;
}

.step-content {
    font-family: 'Space Mono', monospace;
    color: #E8DCC8;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.step-rule {
    font-family: 'Source Serif 4', serif;
    color: #D4A574;
    font-size: 0.85rem;
    font-style: italic;
    text-align: right;
}

.proof-step.qed {
    border-left-color: #B8860B;
    margin-top: 1rem;
}

.proof-step.qed .step-content {
    font-size: 2rem;
    color: #B8860B;
}

/* Operators Grid */
.operators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.operator-tile {
    background: #0F0F1A;
    border: 1px solid rgba(184, 134, 11, 0.25);
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: scale(0.9);
}

.operator-tile.revealed {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.operator-tile:hover {
    border-color: #B8860B;
    transform: translateY(-3px);
}

.op-symbol {
    font-family: 'Space Mono', monospace;
    font-size: 3.5rem;
    color: #B8860B;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.op-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #E8DCC8;
    margin-bottom: 0.3rem;
}

.op-desc {
    font-size: 0.9rem;
    color: #C4B998;
    margin-bottom: 1.25rem;
}

/* Truth Tables */
.truth-table {
    display: inline-block;
    text-align: center;
}

.tt-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    padding: 0.25rem 0;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: #C4B998;
}

.tt-row span {
    min-width: 2rem;
}

.tt-header {
    color: #D4A574;
    border-bottom: 1px solid rgba(184, 134, 11, 0.3);
    padding-bottom: 0.4rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.tt-true {
    color: #7B9971;
}

.tt-false {
    color: #D4A574;
}

/* Conclusion Section */
.conclusion-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.conclusion-quote {
    margin-bottom: 3rem;
}

.conclusion-quote p {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #E8DCC8;
    font-style: italic;
    line-height: 1.4;
}

.conclusion-quote cite {
    display: block;
    margin-top: 1rem;
    font-family: 'Source Serif 4', serif;
    font-size: 0.95rem;
    color: #C4B998;
    font-style: normal;
}

.tombstone-symbol {
    font-size: 4rem;
    color: #B8860B;
    margin: 2rem 0;
    line-height: 1;
}

.conclusion-text {
    font-size: 1.1rem;
    color: #C4B998;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.final-symbols {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 1.3rem;
    color: #B8860B;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .diagonal-section {
        padding: 4rem 2rem 4rem 3rem;
        clip-path: polygon(0 1.5%, 100% 0, 100% 98.5%, 0 100%);
    }

    #hero {
        clip-path: polygon(0 0, 100% 0, 100% 97%, 0 100%);
    }

    #timeline-spine {
        left: 0.75rem;
    }

    .iso-cards-grid {
        grid-template-columns: 1fr;
    }

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

    .proof-step {
        grid-template-columns: 2rem 1fr;
        gap: 0.75rem;
    }

    .step-rule {
        grid-column: 1 / -1;
        text-align: left;
        padding-left: 2rem;
    }
}

@media (max-width: 480px) {
    .operators-grid {
        grid-template-columns: 1fr;
    }
}
