/* bcd.day - Digital Reef Contemplation */
/* Colors: #1E1A14, #2A2018, #3D3228, #5A8F7A, #8B7D6B, #C45D3E, #D4A872, #E8DCC8 */

:root {
    --deep-dark: #1E1A14;
    --dark-brown: #2A2018;
    --mid-brown: #3D3228;
    --reef-green: #5A8F7A;
    --warm-stone: #8B7D6B;
    --coral-red: #C45D3E;
    --amber-current: #D4A872;
    --light-cream: #E8DCC8;
}

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

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

body {
    background: var(--deep-dark);
    color: var(--light-cream);
    font-family: 'Libre Baskerville', Georgia, serif;
    overflow: hidden;
}

/* Scroll Container */
#scroll-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    position: relative;
}

/* Diagonal Sections */
.diagonal-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10vh 8vw;
    margin-top: -8vh;
    overflow: hidden;
}

.diagonal-section:first-child {
    margin-top: 0;
}

.diagonal-section {
    scroll-snap-align: start;
}

/* Section backgrounds with diagonal clip-paths */
#section-genesis {
    background: linear-gradient(165deg, var(--deep-dark) 0%, var(--dark-brown) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    z-index: 5;
}

#section-reef {
    background: linear-gradient(195deg, var(--dark-brown) 0%, #1a2a22 100%);
    clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
    z-index: 4;
}

#section-consensus {
    background: linear-gradient(165deg, var(--mid-brown) 0%, var(--deep-dark) 100%);
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    z-index: 3;
}

#section-ledger {
    background: linear-gradient(195deg, var(--dark-brown) 0%, #2a1a14 100%);
    clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
    z-index: 2;
}

#section-contemplation {
    background: linear-gradient(165deg, var(--deep-dark) 0%, #0d0a07 100%);
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
    z-index: 1;
}

/* Section Content */
.section-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Typography */
.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 4.5vw;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--light-cream);
    margin-bottom: 2rem;
}

.title-accent {
    color: var(--amber-current);
}

.contemplation-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 2.0;
    color: var(--light-cream);
    opacity: 0.85;
    max-width: 600px;
    margin-bottom: 3rem;
}

/* Data Readouts */
.data-readout {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    font-family: 'IBM Plex Mono', monospace;
}

.data-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--reef-green);
    text-transform: uppercase;
}

.data-value {
    font-size: 28px;
    font-weight: 400;
    color: var(--amber-current);
    font-variant-numeric: tabular-nums;
}

.data-value.monospace {
    font-size: 16px;
    letter-spacing: 0.05em;
}

/* Coral Dividers */
.coral-divider {
    position: absolute;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 40px;
    opacity: 0.3;
}

.coral-divider::before,
.coral-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    background: var(--coral-red);
    border-radius: 50% 50% 0 0;
}

.coral-divider::before {
    left: 20%;
    width: 3px;
    height: 30px;
    transform: rotate(-8deg);
}

.coral-divider::after {
    right: 20%;
    width: 3px;
    height: 24px;
    transform: rotate(12deg);
}

/* Terminal Prompt */
.terminal-prompt {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    color: var(--reef-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
}

.prompt-symbol {
    color: var(--reef-green);
    opacity: 0.7;
}

.prompt-text {
    color: var(--amber-current);
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--reef-green);
}

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

/* Fish Canvas */
#fish-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
    overflow: visible;
}

/* Scroll Progress */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 200;
    background: rgba(30, 26, 20, 0.5);
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--reef-green), var(--amber-current));
    transition: width 0.15s ease-out;
}

/* Section Navigation */
#section-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 200;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--warm-stone);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-dot:hover {
    border-color: var(--amber-current);
    background: rgba(212, 168, 114, 0.3);
}

.nav-dot.active {
    background: var(--amber-current);
    border-color: var(--amber-current);
    transform: scale(1.3);
}

/* Fish animations */
.fish-group {
    transition: opacity 0.4s ease;
}

.fish-body {
    fill: var(--amber-current);
}

.fish-tail {
    fill: var(--amber-current);
}

.fish-eye {
    fill: var(--deep-dark);
}

.fish-connection {
    stroke: var(--amber-current);
    stroke-width: 0.5;
    opacity: 0;
}

.fish-connection.active {
    animation: connectionPulse 1.4s ease-in-out forwards;
}

@keyframes connectionPulse {
    0% { opacity: 0; }
    14% { opacity: 0.25; }
    71% { opacity: 0.25; }
    100% { opacity: 0; }
}

/* Ambient glow effects */
.diagonal-section::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(90, 143, 122, 0.08) 0%, transparent 70%);
    pointer-events: none;
    top: 30%;
    right: 10%;
    animation: ambientDrift 12s ease-in-out infinite;
}

@keyframes ambientDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, 15px) scale(1.1); }
    66% { transform: translate(15px, -10px) scale(0.95); }
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 8vw;
    }
    
    .contemplation-text {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .diagonal-section {
        padding: 10vh 6vw;
    }
    
    #section-nav {
        right: 1rem;
    }
    
    .data-value {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 10vw;
    }
    
    .contemplation-text {
        font-size: 15px;
    }
    
    #section-nav {
        right: 0.5rem;
        gap: 1rem;
    }
    
    .nav-dot {
        width: 8px;
        height: 8px;
    }
}
