/* blockchain.day - The Tidal Ledger */
/* Colors: #05101E #0A2647 #0B1D3A #B8D8E0 #21C5C7 #D4A843 #E0F7FA #1B7A7D */

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

html, body {
    overflow-x: auto;
    overflow-y: hidden;
    height: 100vh;
    width: 100vw;
    background: #05101E;
    color: #E0F7FA;
    font-family: "Space Grotesk", sans-serif;
    scrollbar-width: none;
}

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

/* Scroll Container - 5 Panel Horizontal Grid */
#scroll-container {
    display: grid;
    grid-template-columns: repeat(5, 100vw);
    height: 100vh;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
#scroll-container::-webkit-scrollbar { display: none; }

/* Panels */
.panel {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.panel-content {
    max-width: 900px;
    width: 90%;
    z-index: 2;
    position: relative;
}

/* Panel 1 - Genesis: Pre-Dawn Deep Blue */
.panel-1 {
    background: linear-gradient(135deg, #05101E 0%, #0B1D3A 40%, #0A2647 100%);
}

/* Panel 2 - Consensus: Dawn Breaking */
.panel-2 {
    background: linear-gradient(135deg, #0A2647 0%, #0B1D3A 30%, #1B7A7D 100%);
}

/* Panel 3 - Transparency: Sun-Struck Teal */
.panel-3 {
    background: linear-gradient(135deg, #1B7A7D 0%, #21C5C7 50%, #1B7A7D 100%);
}

/* Panel 4 - Immutability: Golden Hour */
.panel-4 {
    background: linear-gradient(135deg, #0B1D3A 0%, #1B7A7D 40%, #0A2647 100%);
}

/* Panel 5 - Horizon: Twilight Phosphorescence */
.panel-5 {
    background: linear-gradient(135deg, #0A2647 0%, #05101E 60%, #0B1D3A 100%);
}

/* Hero Title */
.hero-title {
    font-family: "Outfit", sans-serif;
    font-size: clamp(4rem, 10vw, 9rem);
    font-variation-settings: "wght" 200;
    color: #E0F7FA;
    letter-spacing: -0.02em;
    line-height: 1;
    cursor: default;
    transition: font-variation-settings 600ms cubic-bezier(0.23, 1, 0.32, 1);
    margin-bottom: 1rem;
}

.hero-title:hover {
    font-variation-settings: "wght" 700;
}

.tld {
    color: #21C5C7;
}

.hero-subtitle {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: #B8D8E0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 3rem;
    opacity: 0.7;
}

/* Genesis Block */
.genesis-block {
    margin-bottom: 3rem;
}

.block-hash {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(33, 197, 199, 0.15);
    border-radius: 4px;
    background: rgba(5, 16, 30, 0.5);
}

.hash-label {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #21C5C7;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hash-value {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(0.6rem, 1.2vw, 0.85rem);
    color: #B8D8E0;
    opacity: 0.6;
    word-break: break-all;
    line-height: 1.6;
}

/* Scroll Hint */
.scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.5;
    animation: pulseHint 3s ease-in-out infinite;
}

.scroll-hint-text {
    font-family: "Inter", sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: #B8D8E0;
    letter-spacing: 0.05em;
}

.scroll-arrow {
    width: 40px;
    height: 20px;
    animation: slideRight 2s ease-in-out infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

@keyframes slideRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* Section Titles */
.section-title {
    font-family: "Outfit", sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-variation-settings: "wght" 300;
    color: #E0F7FA;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-description {
    font-family: "Source Sans 3", "Space Grotesk", sans-serif;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    font-weight: 300;
    color: #B8D8E0;
    line-height: 1.7;
    max-width: 42ch;
    margin-bottom: 2.5rem;
    opacity: 0.85;
}

/* Panel 2 - Consensus */
.consensus-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.node-viz {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    justify-items: center;
}

.node {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #21C5C7;
    opacity: 0.15;
    animation: nodePulse 3s ease-in-out infinite;
    position: relative;
}

.node::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid #21C5C7;
    opacity: 0;
    animation: nodeRing 3s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

@keyframes nodeRing {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 0.3; transform: scale(1.2); }
}

.consensus-data {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(33, 197, 199, 0.1);
}

.data-key {
    font-family: "Inter", sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #B8D8E0;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-val {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    font-weight: 400;
    color: #21C5C7;
}

/* Panel 3 - Transparency / Ledger */
.ledger-display {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ledger-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 0.8fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(5, 16, 30, 0.3);
    background: rgba(5, 16, 30, 0.2);
    transition: background 300ms ease;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
}

.ledger-row:hover {
    background: rgba(5, 16, 30, 0.45);
}

.ledger-row:first-child {
    border-radius: 4px 4px 0 0;
}

.ledger-row:last-child {
    border-radius: 0 0 4px 4px;
    border-bottom: none;
}

.ledger-block {
    color: #E0F7FA;
    font-weight: 500;
}

.ledger-time {
    color: #B8D8E0;
    opacity: 0.7;
}

.ledger-txns {
    color: #21C5C7;
}

.ledger-size {
    color: #B8D8E0;
    opacity: 0.5;
    text-align: right;
}

/* Panel 4 - Immutability */
.immutability-viz {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.block-chain-visual {
    display: flex;
    align-items: center;
    gap: 0;
}

.chain-block {
    width: 140px;
    height: 100px;
    border: 1px solid rgba(212, 168, 67, 0.3);
    border-radius: 6px;
    background: rgba(5, 16, 30, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 400ms ease, box-shadow 400ms ease;
}

.chain-block:hover {
    border-color: #D4A843;
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.15);
}

.block-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.block-num {
    font-family: "Outfit", sans-serif;
    font-size: 1.5rem;
    font-variation-settings: "wght" 400;
    color: #D4A843;
}

.block-nonce {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    color: #B8D8E0;
    opacity: 0.4;
}

.chain-connector {
    width: 60px;
    height: 10px;
}

.chain-connector svg {
    width: 100%;
    height: 100%;
}

.immutability-stat {
    text-align: center;
}

.stat-number {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    color: #D4A843;
}

.stat-unit {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #D4A843;
    opacity: 0.7;
}

.stat-label {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: #B8D8E0;
    opacity: 0.5;
    margin-top: 0.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Panel 5 - Horizon */
.horizon-cta {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 4rem;
}

.current-block {
    text-align: center;
}

.block-label {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #B8D8E0;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
}

.block-height {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    color: #21C5C7;
}

.horizon-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.horizon-link {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: #B8D8E0;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(33, 197, 199, 0.25);
    border-radius: 3px;
    transition: all 400ms ease;
    letter-spacing: 0.04em;
}

.horizon-link:hover {
    color: #E0F7FA;
    border-color: #21C5C7;
    background: rgba(33, 197, 199, 0.08);
    box-shadow: 0 0 15px rgba(33, 197, 199, 0.1);
}

.horizon-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.footer-text {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    color: #B8D8E0;
    opacity: 0.35;
    letter-spacing: 0.1em;
}

.footer-divider {
    color: #21C5C7;
    opacity: 0.2;
    font-size: 0.7rem;
}

/* Particle Field */
#particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 500vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: #21C5C7;
    pointer-events: none;
}

/* Chain Links */
#chain-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 500vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.chain-link {
    position: absolute;
    width: 120px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
}

.chain-link-1 { left: calc(100vw - 60px); }
.chain-link-2 { left: calc(200vw - 60px); }
.chain-link-3 { left: calc(300vw - 60px); }
.chain-link-4 { left: calc(400vw - 60px); }

/* Navigation Dots */
#panel-nav {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(33, 197, 199, 0.4);
    background: transparent;
    cursor: pointer;
    transition: all 400ms ease;
    padding: 0;
}

.nav-dot:hover {
    border-color: #21C5C7;
    background: rgba(33, 197, 199, 0.2);
}

.nav-dot.active {
    background: #21C5C7;
    border-color: #21C5C7;
    box-shadow: 0 0 8px rgba(33, 197, 199, 0.4);
}

/* Panel reveal animations */
.panel-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease, transform 800ms ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .consensus-grid { grid-template-columns: 1fr; gap: 2rem; }
    .ledger-row { grid-template-columns: 1fr 1fr; gap: 0.5rem; font-size: 0.7rem; }
    .block-chain-visual { flex-direction: column; }
    .chain-connector { transform: rotate(90deg); }
    .horizon-links { flex-direction: column; align-items: center; }
}