/* bcd.day - Blockchain Day */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0d1117;
    --bg-tertiary: #0f1419;
    --neon-cyan: #00e5ff;
    --electric-lime: #e0ff4f;
    --text-primary: #c8d0d8;
    --text-secondary: #7a8a9a;
    --text-tertiary: #3a4a5a;
    --border: #1a2a3a;
    --alert: #ff3366;
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Azeret Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.75;
}

/* Genesis Block */
.genesis-block {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
}

.genesis-line {
    width: 80%;
    max-width: 800px;
    height: 60px;
    margin-bottom: 30px;
}

.chain-draw {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: chainDraw 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

@keyframes chainDraw {
    to { stroke-dashoffset: 0; }
}

.node-circle {
    fill: none;
    stroke: var(--neon-cyan);
    stroke-width: 1.5;
    opacity: 0;
}

.node-circle.visible {
    animation: nodeAppear 0.5s ease-out forwards;
}

@keyframes nodeAppear {
    0% { opacity: 0; r: 4; }
    60% { opacity: 1; r: 14; }
    100% { opacity: 1; r: 12; }
}

.node-circle:hover {
    fill: rgba(0, 229, 255, 0.15);
}

.genesis-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 10vw, 96px);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--electric-lime);
    opacity: 0;
    transition: opacity 1s ease 2.5s;
}

.genesis-title.visible {
    opacity: 1;
}

.genesis-subtitle {
    font-family: 'Azeret Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--neon-cyan);
    opacity: 0;
    transition: opacity 0.8s ease 3s;
}

.genesis-subtitle.visible {
    opacity: 1;
}

/* Hash Chain Corridor */
.hash-corridor {
    min-height: 150vh;
    display: flex;
    background: var(--bg-secondary);
    clip-path: polygon(0 0, 100% 3%, 100% 97%, 0 100%);
    position: relative;
}

.corridor-left {
    flex: 0 0 40%;
    overflow: hidden;
    position: relative;
    border-right: 1px solid var(--border);
}

.hash-rain {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hash-rain-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    animation: hashScroll 30s linear infinite;
}

.hash-rain-inner span {
    font-family: 'Azeret Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-tertiary);
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hash-highlight {
    color: var(--neon-cyan) !important;
    opacity: 0.4;
}

@keyframes hashScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.corridor-right {
    flex: 1;
    padding: 15vh 8vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8vh;
}

.corridor-text {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.corridor-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.corridor-text p {
    font-family: 'Azeret Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.accent-lime {
    color: var(--electric-lime);
}

/* Diagonal Slashes */
.diagonal-slash {
    height: 60px;
    position: relative;
    z-index: 10;
}

.slash-lr {
    background: var(--bg-primary);
    clip-path: polygon(0 0, 100% 100%, 100% 0);
    margin-top: -30px;
}

.slash-rl {
    background: var(--bg-primary);
    clip-path: polygon(0 100%, 100% 0, 0 0);
    margin-top: -30px;
}

/* Merkle Garden */
.merkle-garden {
    min-height: 150vh;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15vh 5vw;
    position: relative;
}

.dot-grid-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle 1px, rgba(122, 138, 154, 0.03) 100%, transparent 100%);
    background-size: 40px 40px;
    pointer-events: none;
}

.merkle-tree {
    width: min(90vw, 800px);
    height: auto;
}

.merkle-branch {
    stroke: var(--neon-cyan);
    stroke-width: 1.5;
    opacity: 0.6;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.4s ease-out;
}

.merkle-branch.drawn {
    stroke-dashoffset: 0;
}

.merkle-node {
    fill: none;
    stroke: var(--neon-cyan);
    stroke-width: 1.5;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.merkle-node.visible {
    opacity: 0.8;
}

.merkle-node:hover {
    fill: rgba(0, 229, 255, 0.15);
}

.merkle-label {
    font-family: 'Azeret Mono', monospace;
    font-size: 9px;
    fill: var(--text-secondary);
    text-anchor: middle;
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.merkle-label.visible {
    opacity: 0.7;
}

/* Node Map */
.node-map {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 12vh 8vw;
}

.section-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(36px, 5vw, 48px);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 8vh;
}

.node-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.node-card {
    perspective: 800px;
    height: 200px;
    cursor: pointer;
}

.node-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-out;
}

.node-card:hover .node-card-inner {
    transform: rotateY(180deg);
}

.node-card-front, .node-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.node-card-back {
    transform: rotateY(180deg);
    background: var(--bg-secondary);
}

.node-card-back p {
    font-family: 'Azeret Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.node-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    margin-bottom: 16px;
}

.node-indicator.active {
    background: var(--electric-lime);
    box-shadow: 0 0 8px rgba(224, 255, 79, 0.4);
    animation: indicatorPulse 2s ease-in-out infinite;
}

.node-indicator-back {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--electric-lime);
    margin-top: 16px;
    animation: indicatorPulse 2s ease-in-out infinite;
}

.node-indicator-back.unconfirmed {
    background: var(--alert);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.4);
}

@keyframes indicatorPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.card-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card-hash {
    font-family: 'Azeret Mono', monospace;
    font-size: 12px;
    color: var(--neon-cyan);
    opacity: 0.6;
    letter-spacing: 0.04em;
}

/* Consensus Footer */
.consensus-footer {
    min-height: 40vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10vh 5vw;
}

.hash-mine {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-align: center;
    word-break: break-all;
    max-width: 90vw;
}

.footer-line {
    width: 60%;
    max-width: 500px;
    height: 1px;
    background: var(--border);
    margin: 30px 0;
}

.footer-meta {
    font-family: 'Azeret Mono', monospace;
    font-size: 12px;
    color: var(--text-tertiary);
    letter-spacing: 0.06em;
}

/* Chain line section dividers */
.chain-divider {
    width: 100%;
    height: 1px;
    background: var(--neon-cyan);
    opacity: 0.1;
}

/* Responsive */
@media (max-width: 768px) {
    .hash-corridor {
        flex-direction: column;
    }

    .corridor-left {
        flex: none;
        height: 30vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

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

    .node-card {
        height: 180px;
    }
}
