/* genpatsu.io - Nuclear Risk Assessment Briefing */
/* Colors: #E8A317 (amber), #F0EDE8 (off-white), #1B1F23 (near-black), #4ADE80 (safe green), #2D3748 (dark slate), #4A5568 (mid slate), #B0ADA8 (warm gray), #6B7280 (neutral gray), #EF4444 (danger red) */

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

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    background-color: #1B1F23;
    color: #F0EDE8;
    font-family: 'Commissioner', Georgia, serif;
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    left: 0;
    top: 0;
    width: 4px;
    height: 100vh;
    background: rgba(75, 85, 99, 0.2);
    z-index: 1000;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: #E8A317;
    transition: height 0.15s ease-out;
}

.progress-notch {
    position: absolute;
    left: 0;
    width: 12px;
    height: 2px;
    background: #4A5568;
    transform: translateY(-1px);
    transition: background 0.3s ease;
}

.progress-notch.active {
    background: #E8A317;
}

/* Section Indicator */
.section-indicator {
    position: fixed;
    left: 24px;
    bottom: 40px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    z-index: 1000;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #6B7280;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section-indicator.visible {
    opacity: 1;
}

.section-indicator-number {
    font-size: 18px;
    font-weight: 500;
    color: #E8A317;
    font-family: 'Space Grotesk', sans-serif;
}

.section-indicator-divider {
    color: #4A5568;
}

/* Panels */
.panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 80px 60px 40px;
}

.panel-content {
    max-width: 1200px;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.panel-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
#section-0 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#section-0 .panel-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-motif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.15;
    pointer-events: none;
}

.concentric-svg {
    width: 100%;
    height: 100%;
    animation: slowRotate 120s linear infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.hero-kicker {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.25em;
    color: #6B7280;
    margin-bottom: 24px;
    font-weight: 400;
}

.hero-title {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 80px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.05;
    color: #F0EDE8;
    margin-bottom: 24px;
}

.hero-title-dot {
    color: #E8A317;
}

.hero-subtitle {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 18px;
    font-weight: 300;
    color: #B0ADA8;
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.meta-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #4A5568;
    padding: 6px 12px;
    border: 1px solid #2D3748;
}

.scroll-cue {
    position: absolute;
    bottom: -120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 1s ease 1.5s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { cy: 12; }
    50% { cy: 28; }
}

.scroll-cue-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.3em;
    color: #4A5568;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.section-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #E8A317;
    letter-spacing: 0.05em;
}

.section-line {
    flex: 0 0 60px;
    height: 1px;
    background: #2D3748;
}

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #6B7280;
}

/* Panel Typography */
.panel-title {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.01em;
    color: #F0EDE8;
    margin-bottom: 32px;
}

.panel-title.centered {
    text-align: center;
}

.panel-body {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.7;
    color: #B0ADA8;
    margin-bottom: 40px;
}

.panel-body.centered {
    text-align: center;
}

.panel-body.narrow {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.split-left {
    padding-right: 20px;
}

.split-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.reactor-diagram {
    width: 100%;
    max-width: 350px;
    height: auto;
}

/* Data Block */
.data-block {
    border-top: 1px solid #2D3748;
    padding-top: 24px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid rgba(45, 55, 72, 0.5);
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: #6B7280;
}

.data-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #F0EDE8;
}

.data-unit {
    font-size: 14px;
    font-weight: 400;
    color: #6B7280;
}

/* Containment Layers */
.containment-layers {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 800px;
    margin: 0 auto;
}

.layer {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 32px;
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid rgba(45, 55, 72, 0.3);
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.layer.visible {
    opacity: 1;
    transform: translateX(0);
}

.layer-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1.5px solid #E8A317;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer-1 .layer-ring {
    width: 30px;
    height: 30px;
    border-color: #EF4444;
    margin: 0 auto;
}

.layer-2 .layer-ring {
    width: 40px;
    height: 40px;
    border-color: #EF4444;
    margin: 0 auto;
}

.layer-3 .layer-ring {
    width: 50px;
    height: 50px;
    border-color: #E8A317;
    margin: 0 auto;
}

.layer-4 .layer-ring {
    width: 60px;
    height: 60px;
    border-color: #E8A317;
    margin: 0 auto;
}

.layer-5 .layer-ring {
    width: 70px;
    height: 70px;
    border-color: #4ADE80;
    margin: 0 auto;
}

.layer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.layer-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #E8A317;
    letter-spacing: 0.05em;
}

.layer-name {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #F0EDE8;
    line-height: 1.2;
}

.layer-desc {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 15px;
    font-weight: 300;
    color: #6B7280;
    line-height: 1.5;
}

/* Risk Chart */
.risk-chart {
    margin: 48px 0 32px;
}

.risk-bar-group {
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: flex-end;
    height: 300px;
    padding-bottom: 60px;
    position: relative;
}

.risk-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 80px;
    height: 100%;
    justify-content: flex-end;
}

.risk-bar-fill {
    width: 40px;
    height: 0%;
    background: linear-gradient(to top, #E8A317, rgba(232, 163, 23, 0.4));
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transition: height 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px 2px 0 0;
}

.risk-bar-fill.animated {
    height: var(--risk-height);
}

[data-risk='cdf'] .risk-bar-fill {
    background: linear-gradient(to top, #E8A317, rgba(232, 163, 23, 0.3));
}

[data-risk='lerf'] .risk-bar-fill {
    background: linear-gradient(to top, #E8A317, rgba(232, 163, 23, 0.2));
}

[data-risk='auto'] .risk-bar-fill {
    background: linear-gradient(to top, #EF4444, rgba(239, 68, 68, 0.4));
}

[data-risk='lightning'] .risk-bar-fill {
    background: linear-gradient(to top, #6B7280, rgba(107, 114, 128, 0.4));
}

[data-risk='asteroid'] .risk-bar-fill {
    background: linear-gradient(to top, #4ADE80, rgba(74, 222, 128, 0.2));
}

.risk-bar-value {
    position: absolute;
    top: -28px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #F0EDE8;
    white-space: nowrap;
}

.risk-bar-value sup {
    font-size: 10px;
}

.risk-bar-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: #6B7280;
    text-align: center;
    line-height: 1.4;
}

.risk-scale {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #2D3748;
}

.risk-scale-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: #4A5568;
    white-space: nowrap;
}

.risk-scale-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #2D3748, transparent);
}

.risk-footnote {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 16px;
}

.footnote-marker {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 14px;
    color: #E8A317;
    line-height: 1.4;
}

.footnote-text {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 13px;
    font-weight: 300;
    color: #4A5568;
    line-height: 1.5;
    max-width: 600px;
}

/* Event Tree */
.event-tree {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 48px 0 40px;
    flex-wrap: wrap;
}

.event-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 24px;
    border: 1px solid #2D3748;
    background: rgba(27, 31, 35, 0.8);
    min-width: 180px;
}

.event-initiator {
    border-color: #E8A317;
}

.node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #E8A317;
    margin-bottom: 4px;
}

.node-dot.success {
    background: #4ADE80;
}

.node-dot.failure {
    background: #EF4444;
}

.node-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: #F0EDE8;
    text-align: center;
}

.node-sublabel {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 13px;
    font-weight: 300;
    color: #6B7280;
    text-align: center;
}

.node-probability {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #E8A317;
    margin-top: 4px;
}

.event-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 40px;
}

.branch-line {
    width: 40px;
    height: 1px;
    background: #4A5568;
    position: relative;
}

.branch-line::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 6px solid #4A5568;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
}

.event-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-success {
    border-color: rgba(74, 222, 128, 0.3);
}

.event-failure {
    border-color: rgba(239, 68, 68, 0.3);
}

.event-failure.final {
    border-color: #EF4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.cascade-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(232, 163, 23, 0.05);
    border-left: 2px solid #E8A317;
    margin-top: 32px;
    font-family: 'Commissioner', Georgia, serif;
    font-size: 15px;
    font-weight: 300;
    color: #B0ADA8;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto 40px;
    padding-left: 40px;
}

.timeline-line {
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, #2D3748, #4A5568, #2D3748);
}

.timeline-event {
    position: relative;
    padding: 0 0 48px 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-event.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    left: -4px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #E8A317;
    background: #1B1F23;
}

.timeline-dot.warning {
    border-color: #E8A317;
}

.timeline-dot.danger {
    border-color: #EF4444;
    background: #EF4444;
}

.timeline-year {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #E8A317;
    display: block;
    margin-bottom: 8px;
}

.timeline-title {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #F0EDE8;
    line-height: 1.2;
    margin-bottom: 12px;
}

.timeline-desc {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 15px;
    font-weight: 300;
    color: #B0ADA8;
    line-height: 1.6;
    margin-bottom: 16px;
}

.timeline-data {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.timeline-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: #6B7280;
    padding: 4px 10px;
    border: 1px solid #2D3748;
}

.timeline-tag.danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

.timeline-conclusion {
    margin-top: 20px;
}

/* Conclusion */
.conclusion-motif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    opacity: 0.1;
    pointer-events: none;
}

.hex-grid-svg {
    width: 100%;
    height: 100%;
}

#section-6 .panel-content {
    position: relative;
    text-align: center;
}

.conclusion-text {
    margin-bottom: 60px;
}

.conclusion-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-bottom: 80px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #F0EDE8;
    line-height: 1;
}

.stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #6B7280;
    max-width: 200px;
    text-align: center;
}

.conclusion-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 40px;
    border-top: 1px solid #2D3748;
}

.footer-domain {
    font-family: 'Commissioner', Georgia, serif;
    font-size: 16px;
    font-weight: 700;
    color: #4A5568;
    letter-spacing: 0.05em;
}

.footer-note {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #4A5568;
}

.footer-class {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    color: #2D3748;
}

/* Responsive */
@media (max-width: 900px) {
    .panel {
        padding: 40px 24px 40px 24px;
    }

    .hero-title {
        font-size: 48px;
    }

    .panel-title {
        font-size: 36px;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-motif {
        width: 350px;
        height: 350px;
    }

    .conclusion-stats {
        flex-direction: column;
        gap: 32px;
    }

    .risk-bar-group {
        gap: 20px;
        height: 220px;
    }

    .event-tree {
        flex-direction: column;
    }

    .event-branch {
        transform: rotate(90deg);
        width: auto;
        height: 40px;
    }

    .hero-meta {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 36px;
    }

    .panel-title {
        font-size: 28px;
    }

    .data-value {
        font-size: 22px;
    }

    .stat-number {
        font-size: 36px;
    }

    .conclusion-stats {
        gap: 24px;
    }

    .containment-layers .layer {
        grid-template-columns: 60px 1fr;
        gap: 16px;
    }
}
