/* =====================================================
   logic.day — Street-style formal logic
   Colors: #0b1a2e, #e8a849, #f4665c, #061220, #3dd6f5, #1a6b8a, #5a7a92, #c8dce8, #0f2440
   Fonts: Bebas Neue, Source Sans 3, Fira Code
   ===================================================== */

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

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

body {
    background: #061220;
    color: #c8dce8;
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Noise Canvas Overlay */
#noise-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    mix-blend-mode: overlay;
}

/* =====================================================
   SPLIT-SCREEN ARCHITECTURE
   ===================================================== */

.split-container {
    display: grid;
    grid-template-columns: 55% 4px 1fr;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.column {
    overflow-y: auto;
    height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: #1a6b8a #0b1a2e;
}

.column::-webkit-scrollbar {
    width: 6px;
}

.column::-webkit-scrollbar-track {
    background: #0b1a2e;
}

.column::-webkit-scrollbar-thumb {
    background: #1a6b8a;
    border-radius: 3px;
}

/* Premise Panel (Left) */
.column-premise {
    background: #0b1a2e;
    position: relative;
}

.column-premise::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(61, 214, 245, 0.015) 2px,
            rgba(61, 214, 245, 0.015) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Conclusion Panel (Right) */
.column-conclusion {
    background: #061220;
    position: relative;
}

.column-conclusion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(232, 168, 73, 0.015) 2px,
            rgba(232, 168, 73, 0.015) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Column Divider */
.column-divider {
    background: #0b1a2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.divider-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, transparent, #3dd6f5, transparent);
    opacity: 0.5;
}

.divider-symbol {
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    color: #3dd6f5;
    padding: 1rem 0;
    text-shadow: 0 0 20px rgba(61, 214, 245, 0.6);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(61, 214, 245, 0.3); }
    50% { text-shadow: 0 0 30px rgba(61, 214, 245, 0.8), 0 0 60px rgba(61, 214, 245, 0.3); }
}

/* =====================================================
   ZONE BASE STYLES
   ===================================================== */

.zone {
    padding: 3rem 2.5rem;
    position: relative;
    z-index: 2;
    border-bottom: 1px solid rgba(61, 214, 245, 0.08);
}

.zone:last-child {
    border-bottom: none;
}

/* =====================================================
   STENCIL / DISPLAY TYPOGRAPHY
   ===================================================== */

.stencil-text {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.05;
}

.zone-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.05;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #c8dce8;
    margin-bottom: 1.5rem;
}

/* =====================================================
   HERO ZONE
   ===================================================== */

.zone-hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 3rem;
}

.street-sign-hero {
    margin-bottom: 2rem;
    animation: sign-swing 4s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes sign-swing {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

.sign-hero-svg {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(61, 214, 245, 0.2));
}

.domain-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 7vw, 6.5rem);
    letter-spacing: 0.08em;
    line-height: 1.05;
    color: #c8dce8;
    position: relative;
}

.title-logic {
    color: #3dd6f5;
    text-shadow: 0 0 40px rgba(61, 214, 245, 0.3), 3px 3px 0 rgba(11, 26, 46, 0.8);
}

.title-dot {
    color: #f4665c;
    text-shadow: 0 0 30px rgba(244, 102, 92, 0.5);
}

.title-day {
    color: #e8a849;
    text-shadow: 0 0 40px rgba(232, 168, 73, 0.3), 3px 3px 0 rgba(11, 26, 46, 0.8);
}

.tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    font-style: italic;
    color: #5a7a92;
    margin-top: 1rem;
    letter-spacing: 0.02em;
}

.drip-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #f4665c, #f4665c 70%, transparent);
    margin-top: 2rem;
    position: relative;
    border-radius: 2px;
}

.drip-line::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 4px;
    width: 3px;
    height: 20px;
    background: linear-gradient(to bottom, #f4665c, transparent);
    border-radius: 0 0 2px 2px;
}

/* =====================================================
   ZONE HEADERS
   ===================================================== */

.zone-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sign-small {
    width: 80px;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

/* =====================================================
   SYLLOGISM BLOCK
   ===================================================== */

.syllogism-block {
    background: rgba(15, 36, 64, 0.6);
    border: 1px solid rgba(61, 214, 245, 0.1);
    border-left: 3px solid #3dd6f5;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 0 4px 4px 0;
}

.premise-line, .conclusion-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.line-marker {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #5a7a92;
    min-width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.logic-code {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: #3dd6f5;
    background: rgba(61, 214, 245, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    display: inline-block;
}

.inference-bar {
    height: 2px;
    background: linear-gradient(to right, #e8a849, #e8a849 80%, transparent);
    margin: 0.75rem 0;
    position: relative;
}

.inference-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 0;
    height: 0;
    border-left: 8px solid #e8a849;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.conclusion-line .line-marker {
    color: #e8a849;
    font-size: 1.1rem;
}

.conclusion-line .logic-code {
    color: #e8a849;
    background: rgba(232, 168, 73, 0.08);
    font-weight: 500;
}

/* =====================================================
   STREET COMMENTARY
   ===================================================== */

.street-commentary {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    font-style: italic;
    color: #5a7a92;
    line-height: 1.7;
    padding-left: 1rem;
    border-left: 2px solid rgba(90, 122, 146, 0.3);
    margin-top: 1rem;
}

/* =====================================================
   TRUTH TABLE
   ===================================================== */

.truth-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.truth-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.truth-table th {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: #c8dce8;
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 2px solid #3dd6f5;
    background: rgba(15, 36, 64, 0.5);
}

.truth-table td {
    text-align: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(61, 214, 245, 0.08);
    transition: background 0.2s ease;
}

.truth-table tr:hover td {
    background: rgba(61, 214, 245, 0.05);
}

.val-true {
    color: #3dd6f5;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(61, 214, 245, 0.3);
}

.val-false {
    color: #f4665c;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(244, 102, 92, 0.3);
}

/* =====================================================
   LAW BLOCK (De Morgan's)
   ===================================================== */

.law-block {
    margin-bottom: 1.5rem;
}

.law-formula {
    padding: 1rem 0;
    text-align: center;
    position: relative;
}

.law-formula .logic-code {
    font-size: 1.15rem;
    padding: 0.5rem 1.5rem;
    background: rgba(61, 214, 245, 0.06);
    border: 1px solid rgba(61, 214, 245, 0.15);
    border-radius: 4px;
    display: inline-block;
}

.law-formula + .law-formula::before {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background: #5a7a92;
    margin: 0 auto 1rem;
}

/* =====================================================
   QUANTIFIER CARDS
   ===================================================== */

.quantifier-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.q-card {
    background: rgba(15, 36, 64, 0.5);
    border: 1px solid rgba(61, 214, 245, 0.1);
    border-radius: 6px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.q-card:hover {
    border-color: rgba(232, 168, 73, 0.4);
    transform: translateY(-2px);
}

.q-symbol {
    font-family: 'Fira Code', monospace;
    font-size: 2.5rem;
    color: #e8a849;
    text-shadow: 0 0 20px rgba(232, 168, 73, 0.3);
}

.q-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    color: #c8dce8;
}

.q-reads {
    font-family: 'Source Sans 3', sans-serif;
    font-style: italic;
    color: #5a7a92;
    font-size: 0.9rem;
}

.q-card .logic-code {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* =====================================================
   CONCLUSION HERO
   ===================================================== */

.zone-conclusion-hero {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3rem;
}

.conclusion-title {
    font-size: clamp(2.5rem, 5vw, 5rem);
    color: #e8a849;
    text-shadow: 0 0 40px rgba(232, 168, 73, 0.3), 3px 3px 0 rgba(6, 18, 32, 0.8);
    margin-bottom: 1.5rem;
}

.torn-paper-edge {
    height: 20px;
    background: linear-gradient(135deg, #061220 33.33%, transparent 33.33%),
                linear-gradient(225deg, #061220 33.33%, transparent 33.33%);
    background-size: 20px 20px;
    background-color: rgba(232, 168, 73, 0.06);
    margin-bottom: 1.5rem;
    position: relative;
}

.conclusion-intro {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.1rem;
    color: #c8dce8;
    line-height: 1.7;
    max-width: 500px;
}

/* =====================================================
   OPERATOR GRID
   ===================================================== */

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

.operator-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.operator-card:hover {
    transform: translateY(-4px);
}

.operator-card:hover .operator-sign {
    filter: drop-shadow(0 4px 20px rgba(61, 214, 245, 0.3));
}

.operator-sign {
    width: 80px;
    height: auto;
    transition: filter 0.3s ease;
}

.op-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: #c8dce8;
}

.op-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    color: #5a7a92;
}

/* =====================================================
   PROOF PLAYGROUND
   ===================================================== */

.proof-interface {
    background: rgba(15, 36, 64, 0.4);
    border: 1px solid rgba(61, 214, 245, 0.1);
    border-radius: 6px;
    padding: 2rem;
}

.proof-input-group {
    margin-bottom: 1.25rem;
}

.proof-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: #5a7a92;
    display: block;
    margin-bottom: 0.4rem;
}

.proof-input {
    width: 100%;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(6, 18, 32, 0.8);
    border: 1px solid rgba(61, 214, 245, 0.2);
    border-radius: 4px;
    color: #3dd6f5;
    outline: none;
    transition: border-color 0.3s ease;
}

.proof-input:focus {
    border-color: #3dd6f5;
}

.proof-input::placeholder {
    color: rgba(90, 122, 146, 0.5);
}

.proof-operator-select {
    margin-bottom: 1.5rem;
}

.proof-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.proof-btn {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    background: rgba(6, 18, 32, 0.8);
    border: 1px solid rgba(61, 214, 245, 0.2);
    border-radius: 4px;
    color: #5a7a92;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 48px;
    text-align: center;
}

.proof-btn:hover {
    border-color: #3dd6f5;
    color: #3dd6f5;
}

.proof-btn.active {
    border-color: #3dd6f5;
    color: #3dd6f5;
    background: rgba(61, 214, 245, 0.1);
    box-shadow: 0 0 15px rgba(61, 214, 245, 0.15);
}

.proof-result {
    padding: 1.5rem;
    background: rgba(6, 18, 32, 0.6);
    border-radius: 4px;
    text-align: center;
}

.result-inference-bar {
    height: 2px;
    background: linear-gradient(to right, transparent, #e8a849, transparent);
    margin-bottom: 1rem;
}

.result-output {
    font-family: 'Fira Code', monospace;
    font-size: 1.4rem;
    color: #e8a849;
    text-shadow: 0 0 20px rgba(232, 168, 73, 0.3);
    display: block;
}

/* =====================================================
   FALLACY CARDS
   ===================================================== */

.fallacy-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fallacy-card {
    background: rgba(15, 36, 64, 0.3);
    border: 1px solid rgba(244, 102, 92, 0.15);
    border-left: 3px solid #f4665c;
    border-radius: 0 6px 6px 0;
    overflow: hidden;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.fallacy-card:hover {
    border-color: rgba(244, 102, 92, 0.4);
}

.fallacy-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.fallacy-x {
    font-size: 1.5rem;
    color: #f4665c;
    text-shadow: 0 0 10px rgba(244, 102, 92, 0.4);
    flex-shrink: 0;
}

.fallacy-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    color: #c8dce8;
    font-weight: 400;
}

.fallacy-body {
    padding: 0 1.5rem 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.fallacy-card.expanded .fallacy-body {
    max-height: 200px;
    padding: 0.5rem 1.5rem 1.25rem;
}

.fallacy-explanation {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    color: #5a7a92;
    font-style: italic;
    margin-top: 0.75rem;
    line-height: 1.6;
}

/* =====================================================
   AXIOM LIST
   ===================================================== */

.axiom-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.axiom-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(15, 36, 64, 0.3);
    border: 1px solid rgba(232, 168, 73, 0.1);
    border-radius: 6px;
    position: relative;
    transition: border-color 0.3s ease;
}

.axiom-item:hover {
    border-color: rgba(232, 168, 73, 0.3);
}

.axiom-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #e8a849;
    text-shadow: 0 0 15px rgba(232, 168, 73, 0.2);
    line-height: 1;
}

.axiom-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: #c8dce8;
    line-height: 1.6;
}

.axiom-item .logic-code {
    align-self: flex-start;
}

/* =====================================================
   FOOTER
   ===================================================== */

.zone-footer {
    border-bottom: none;
    padding: 4rem 2.5rem;
}

.footer-content {
    text-align: center;
}

.footer-symbol {
    font-family: 'Fira Code', monospace;
    font-size: 3rem;
    color: #3dd6f5;
    text-shadow: 0 0 30px rgba(61, 214, 245, 0.4);
    margin-bottom: 1rem;
}

.footer-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    color: #5a7a92;
    letter-spacing: 0.02em;
}

.footer-drip {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #f4665c, transparent);
    margin: 1.5rem auto 0;
}

/* =====================================================
   ANIMATIONS — SCROLL REVEAL
   ===================================================== */

.zone {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.zone-hero {
    opacity: 1;
    transform: none;
}

.zone-conclusion-hero {
    opacity: 1;
    transform: none;
}

/* Staggered animation for operator cards */
.operator-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.zone-operators.visible .operator-card:nth-child(1) { transition-delay: 0.05s; }
.zone-operators.visible .operator-card:nth-child(2) { transition-delay: 0.1s; }
.zone-operators.visible .operator-card:nth-child(3) { transition-delay: 0.15s; }
.zone-operators.visible .operator-card:nth-child(4) { transition-delay: 0.2s; }
.zone-operators.visible .operator-card:nth-child(5) { transition-delay: 0.25s; }
.zone-operators.visible .operator-card:nth-child(6) { transition-delay: 0.3s; }

.zone-operators.visible .operator-card {
    opacity: 1;
    transform: translateY(0);
}

/* Truth table row highlight animation */
.truth-table tbody tr {
    transition: background 0.3s ease;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .split-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .column {
        height: auto;
        overflow-y: visible;
    }

    .column-divider {
        flex-direction: row;
        padding: 1rem 2rem;
    }

    .divider-line {
        width: auto;
        height: 2px;
        flex: 1;
    }

    .divider-symbol {
        padding: 0 1rem;
    }

    body {
        overflow: auto;
        height: auto;
    }

    .zone-hero {
        min-height: 60vh;
        padding: 3rem 1.5rem;
    }

    .zone-conclusion-hero {
        min-height: 30vh;
    }

    .zone {
        padding: 2rem 1.5rem;
    }

    .operator-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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