/* =============================================
   rironbusou.net - Logical Armament
   Frutiger Aero aesthetic + formal argument structure
   ============================================= */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #F0F4FF;
    color: #1A1D2E;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.72;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* =============================================
   Aurora Background
   ============================================= */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #00E5FF 0%, #76FF03 40%, #F0F4FF 70%, #FF1493 100%);
    background-size: 400% 400%;
    animation: auroraShift 45s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes auroraShift {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 0% 50%; }
    100% { background-position: 0% 0%; }
}

/* Dot Grid Overlay */
.dot-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(circle, #1A1D2E 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
}

/* =============================================
   Floating Orbs (Vista/Aero decorative spheres)
   ============================================= */
.orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(40px);
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 35% 35%, rgba(0, 229, 255, 0.4), rgba(0, 229, 255, 0.05));
    top: 10%;
    right: -5%;
    animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at 35% 35%, rgba(118, 255, 3, 0.35), rgba(118, 255, 3, 0.05));
    bottom: 20%;
    left: -3%;
    animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at 40% 30%, rgba(255, 20, 147, 0.25), rgba(255, 20, 147, 0.03));
    top: 60%;
    right: 10%;
    animation: orbFloat3 30s ease-in-out infinite;
}

.orb-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle at 30% 40%, rgba(0, 229, 255, 0.2), rgba(118, 255, 3, 0.1));
    top: 35%;
    left: 15%;
    animation: orbFloat4 22s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 40px); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(25px, -35px); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -25px); }
}

@keyframes orbFloat4 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, 20px); }
}

/* =============================================
   Floating Navigation Pill
   ============================================= */
.nav-pill {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 3px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.nav-pill.visible {
    opacity: 1;
}

.nav-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: #1A1D2E;
}

.qed-indicator {
    position: relative;
    width: 60px;
    height: 20px;
    border-radius: 10px;
    background: rgba(26, 29, 46, 0.1);
    overflow: hidden;
}

.qed-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: linear-gradient(90deg, #00E5FF, #76FF03);
    transition: width 0.3s ease;
}

.qed-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 500;
    color: #1A1D2E;
    z-index: 1;
    opacity: 0.7;
}

/* =============================================
   Main Argument Chain
   ============================================= */
.argument-chain {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* =============================================
   Opening Section
   ============================================= */
.opening {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.opening-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.site-title {
    position: relative;
    display: inline-block;
}

.title-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    letter-spacing: 0.02em;
    color: #1A1D2E;
    display: block;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, #1A1D2E 0%, #1A1D2E 55%, transparent 55%, transparent 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Aero reflection stripe on title */
.title-reflection {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    letter-spacing: 0.02em;
    display: block;
    position: absolute;
    bottom: -0.35em;
    left: 0;
    width: 100%;
    transform: scaleY(-1);
    background: linear-gradient(180deg, rgba(26, 29, 46, 0.2) 0%, transparent 60%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 1;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
}

.subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: #1A1D2E;
    opacity: 0.6;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

.logic-gate-icon {
    margin-top: 20px;
    animation: gateFloat 3s ease-in-out infinite, gatePulse 2s ease-in-out infinite;
}

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

@keyframes gatePulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.7)); }
}

/* =============================================
   Propositions Container
   ============================================= */
.propositions {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3rem, 6vh, 5rem);
    padding-bottom: 120px;
}

/* =============================================
   Connector Lines
   ============================================= */
.connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.connector-line {
    width: 2px;
    height: 48px;
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.1), rgba(0, 229, 255, 0.5), rgba(0, 229, 255, 0.1));
    border-radius: 1px;
}

.connector-line.intensified {
    height: 64px;
    background: linear-gradient(180deg, rgba(255, 20, 147, 0.2), rgba(0, 229, 255, 0.6), rgba(255, 20, 147, 0.2));
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.connector-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(0, 229, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.connector-marker span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    color: #1A1D2E;
    opacity: 0.7;
}

.conclusion-marker {
    width: 42px;
    height: 42px;
    border-color: rgba(118, 255, 3, 0.6);
    background: rgba(255, 255, 255, 0.8);
}

.conclusion-marker span {
    font-weight: 500;
    color: #1A1D2E;
    opacity: 0.9;
}

/* =============================================
   Proposition Cards (Glass Panels)
   ============================================= */
.proposition-card {
    width: 100%;
    max-width: 720px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.04);
    display: flex;
    overflow: hidden;
    position: relative;
    /* Bounce-enter initial state */
    opacity: 0;
    transform: translateY(60px) scale(0.92);
    transition: box-shadow 0.35s ease;
}

.proposition-card.visible {
    animation: bounceEnter 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Aero reflection stripe on cards */
.proposition-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 33%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
    z-index: 1;
}

.proposition-card:hover {
    box-shadow:
        0 12px 48px rgba(0, 229, 255, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(0, 229, 255, 0.1);
}

@keyframes bounceEnter {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.92);
    }
    70% {
        opacity: 1;
        transform: translateY(-8px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Card Margin (annotation strip) */
.card-margin {
    width: 60px;
    min-width: 60px;
    padding: 24px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-right: 1px solid rgba(0, 229, 255, 0.15);
    background: rgba(240, 244, 255, 0.3);
}

.step-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: #00E5FF;
    letter-spacing: 0.05em;
}

.step-type {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    font-weight: 400;
    color: #1A1D2E;
    opacity: 0.4;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Card Content */
.card-content {
    flex: 1;
    padding: 32px 28px;
    position: relative;
    z-index: 2;
}

.proposition-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    letter-spacing: 0.02em;
    color: #1A1D2E;
    line-height: 1.2;
    margin-bottom: 16px;
}

.proposition-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw + 0.5rem, 1.2rem);
    line-height: 1.72;
    color: #1A1D2E;
    opacity: 0.85;
}

/* Visual elements inside cards */
.argument-block-visual,
.speech-bubble-visual,
.convergence-visual {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    opacity: 0.7;
}

.argument-block-visual svg,
.speech-bubble-visual svg,
.convergence-visual svg {
    animation: iconOscillate 6s ease-in-out infinite;
}

@keyframes iconOscillate {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(5deg); }
}

/* =============================================
   Gate Dividers
   ============================================= */
.gate-divider {
    display: flex;
    justify-content: center;
    opacity: 0.6;
    animation: iconOscillate 8s ease-in-out infinite;
}

/* =============================================
   Synthesis Card (wider, intensified)
   ============================================= */
.synthesis-card {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 229, 255, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* =============================================
   Conclusion Card (oversized, double border)
   ============================================= */
.conclusion-card {
    max-width: 880px;
    border: 2px solid rgba(0, 229, 255, 0.3);
    outline: 2px solid rgba(118, 255, 3, 0.15);
    outline-offset: 4px;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background: rgba(255, 255, 255, 0.75);
    box-shadow:
        0 16px 64px rgba(0, 229, 255, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.conclusion-title {
    font-size: clamp(2rem, 4vw, 3rem);
}

.conclusion-body {
    font-weight: 400;
    font-size: clamp(1.05rem, 1.2vw + 0.5rem, 1.3rem);
}

/* QED Stamp */
.qed-stamp {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qed-stamp.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.qed-stamp svg {
    filter: drop-shadow(0 4px 12px rgba(0, 229, 255, 0.3));
}

/* =============================================
   Marginalia (ghost annotations in margins)
   ============================================= */
.marginalia {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.margin-note {
    position: absolute;
    left: clamp(10px, 3vw, 60px);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #1A1D2E;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    white-space: nowrap;
}

.margin-note.active {
    opacity: 0.15;
    transform: translateX(0);
}

.margin-note[data-for="1"] { top: 20%; }
.margin-note[data-for="2"] { top: 35%; }
.margin-note[data-for="3"] { top: 50%; }
.margin-note[data-for="4"] { top: 65%; }
.margin-note[data-for="5"] { top: 78%; }

/* =============================================
   Aqua-style Scrollbar
   ============================================= */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(240, 244, 255, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00E5FF, #76FF03);
    border-radius: 10px;
    border: 2px solid rgba(240, 244, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00E5FF, #FF1493);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .propositions {
        padding: 0 16px;
    }

    .card-margin {
        width: 44px;
        min-width: 44px;
        padding: 16px 4px;
    }

    .card-content {
        padding: 24px 20px;
    }

    .step-type {
        font-size: 0.5rem;
    }

    .conclusion-card {
        max-width: 100%;
        outline-offset: 2px;
    }

    .marginalia {
        display: none;
    }

    .nav-pill {
        padding: 8px 16px;
        gap: 10px;
    }

    .nav-title {
        font-size: 0.75rem;
    }

    .qed-indicator {
        width: 48px;
    }
}

@media (max-width: 480px) {
    .title-text {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .title-reflection {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .proposition-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .conclusion-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
}
