/* ==========================================================
   yome.tube — Styles
   Seapunk / Sci-fi HUD / Organic Blob / Z-Pattern
   ========================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --deep-trench:      #0A1A1E;
    --deep-teal:        #0F2A32;
    --dark-brine:       #152E38;
    --bone-cream:       #F2EDE4;
    --seafoam-pale:     #C8DDD8;
    --ivory-mist:       #EAE4D8;
    --biolum-aqua:      #52C8B4;
    --coral-signal:     #E87E6B;
    --pale-teal-wire:   #2A6A70;
    --muted-seagrass:   #3D7A72;

    --font-display:     'Instrument Sans', 'Inter', sans-serif;
    --font-mono:        'Space Mono', monospace;
    --font-body:        'Nunito', sans-serif;
}

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    background-color: var(--deep-trench);
    color: var(--bone-cream);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ---------- Cursor Follow Field ---------- */
#cursor-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(
        circle 300px at var(--cx, 50%) var(--cy, 50%),
        rgba(82, 200, 180, 0.06) 0%,
        transparent 70%
    );
    transition: background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- SVG Grid Overlay ---------- */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ---------- Navigation ---------- */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    background: rgba(10, 26, 30, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(42, 106, 112, 0.3);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--bone-cream);
    text-transform: uppercase;
}

.nav-coords {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(82, 200, 180, 0.6);
    letter-spacing: 1px;
    animation: drift-horizontal 20s ease-in-out infinite alternate;
}

@keyframes drift-horizontal {
    0%   { transform: translateX(0); }
    100% { transform: translateX(20px); }
}

.coord-sep {
    color: rgba(42, 106, 112, 0.5);
}

.coord-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(82, 200, 180, 0.6);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--seafoam-pale);
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--biolum-aqua);
}

/* ---------- Sections ---------- */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: radial-gradient(ellipse at 30% 40%, var(--deep-teal) 0%, var(--deep-trench) 70%);
    scroll-snap-align: start;
}

/* Alternating section depth */
#section-847 {
    background: radial-gradient(ellipse at 70% 50%, var(--dark-brine) 0%, var(--deep-trench) 65%);
}

#section-1493 {
    background: radial-gradient(ellipse at 25% 60%, var(--deep-teal) 0%, var(--deep-trench) 70%);
}

#section-2847 {
    background: radial-gradient(ellipse at 60% 30%, var(--dark-brine) 0%, var(--deep-trench) 65%);
}

/* ---------- Scan Lines (CRT raster) ---------- */
.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(82, 200, 180, 0.03) 2px,
        rgba(82, 200, 180, 0.03) 4px
    );
}

/* ---------- Depth Label ---------- */
.depth-label {
    position: absolute;
    top: 80px;
    right: 40px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(82, 200, 180, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 10;
}

/* ---------- Depth Numeral (background) ---------- */
.depth-numeral {
    position: absolute;
    bottom: -0.1em;
    right: -0.05em;
    font-family: var(--font-mono);
    font-size: clamp(140px, 22vw, 280px);
    font-weight: 700;
    color: rgba(82, 200, 180, 0.06);
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    user-select: none;
    letter-spacing: -4px;
}

/* ---------- Sonar Rings ---------- */
.sonar-cluster {
    position: absolute;
    top: 35vh;
    left: 6vw;
    z-index: 2;
    width: 480px;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sonar-cluster.sonar-small {
    position: relative;
    top: auto;
    left: auto;
    width: 320px;
    height: 320px;
    margin: 0 auto;
}

.sonar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--pale-teal-wire);
}

.sonar-ring-1 {
    width: 200px;
    height: 200px;
    animation: sonar-pulse 4s ease-out infinite;
    animation-delay: 0s;
}

.sonar-ring-2 {
    width: 320px;
    height: 320px;
    animation: sonar-pulse 6s ease-out infinite;
    animation-delay: 0.5s;
}

.sonar-ring-3 {
    width: 480px;
    height: 480px;
    animation: sonar-pulse 8s ease-out infinite;
    animation-delay: 1.0s;
}

@keyframes sonar-pulse {
    0%   { opacity: 0.8; transform: scale(0.9); }
    100% { opacity: 0;   transform: scale(1.4); }
}

/* ---------- Glow Nodes ---------- */
.glow-node {
    position: absolute;
    border-radius: 50%;
    background: var(--biolum-aqua);
    animation: glow-appear 4s ease-in-out infinite;
}

.glow-node-1 {
    width: 8px;
    height: 8px;
    top: calc(50% - 100px);
    left: 50%;
    box-shadow: 0 0 16px 4px var(--biolum-aqua);
    animation-delay: 0s;
}

.glow-node-2 {
    width: 12px;
    height: 12px;
    top: 50%;
    left: calc(50% + 130px);
    box-shadow: 0 0 20px 5px var(--biolum-aqua);
    animation-delay: 1.4s;
}

.glow-node-3 {
    width: 6px;
    height: 6px;
    top: calc(50% + 110px);
    left: calc(50% - 80px);
    box-shadow: 0 0 12px 3px var(--biolum-aqua);
    animation-delay: 2.8s;
}

@keyframes glow-appear {
    0%   { opacity: 0; transform: scale(0.6); }
    30%  { opacity: 0.9; transform: scale(1); }
    70%  { opacity: 0.9; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.6); }
}

/* ---------- Hero Headline (top-right z-pattern) ---------- */
.hero-headline {
    position: absolute;
    top: 18vh;
    right: 8vw;
    z-index: 10;
    max-width: 520px;
    text-align: right;
}

.display-heading {
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 96px);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bone-cream);
    line-height: 1.05;
}

.sub-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--seafoam-pale);
    margin-top: 16px;
    letter-spacing: 1px;
}

/* ---------- Data Tag Clusters ---------- */
.data-tag-cluster {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-tags {
    position: absolute;
    bottom: 22vh;
    right: 10vw;
    z-index: 10;
    align-items: flex-end;
}

.data-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--seafoam-pale);
    letter-spacing: 1.5px;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.data-tag:hover {
    opacity: 1;
    color: var(--biolum-aqua);
}

.active-tag {
    color: var(--biolum-aqua);
    opacity: 1;
    animation: blink-tag 2s ease-in-out infinite;
}

@keyframes blink-tag {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0.3; }
}

/* ---------- Section Layout (60/40 split) ---------- */
.section-layout {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 60px;
    min-height: 100vh;
    padding: 120px 60px 60px;
    align-items: center;
}

.content-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.visual-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

/* ---------- Section Reveal ---------- */
.section-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-reveal p {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-reveal.revealed p:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.08s; }
.section-reveal.revealed p:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.16s; }
.section-reveal.revealed p:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
.section-reveal.revealed p:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.32s; }

/* ---------- Section Heading ---------- */
.section-heading {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bone-cream);
    line-height: 1.05;
    margin-bottom: 32px;
}

/* ---------- Body Text ---------- */
.body-text {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    color: var(--seafoam-pale);
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 580px;
}

/* ---------- CTA Command ---------- */
.cta-command {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--biolum-aqua);
    text-decoration: none;
    text-transform: uppercase;
    margin-top: 32px;
    padding: 12px 24px;
    border: 1px solid rgba(82, 200, 180, 0.3);
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.cta-command:hover {
    border-color: var(--biolum-aqua);
    background: rgba(82, 200, 180, 0.06);
}

/* ---------- Archive List ---------- */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.archive-item {
    border-left: 1px solid rgba(42, 106, 112, 0.4);
    padding-left: 24px;
    transition: border-color 0.3s ease;
}

.archive-item:hover {
    border-color: var(--biolum-aqua);
}

.archive-meta {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(82, 200, 180, 0.5);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.archive-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--bone-cream);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.archive-desc {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ivory-mist);
    opacity: 0.6;
    letter-spacing: 1px;
}

/* ---------- Visual tags (stacked) ---------- */
.visual-tags {
    margin-top: 20px;
}

.stacked-tags {
    gap: 14px;
}

/* ---------- Terminal Block ---------- */
.terminal-block {
    margin-top: 32px;
    padding: 20px 24px;
    border: 1px solid rgba(42, 106, 112, 0.4);
    background: rgba(15, 42, 50, 0.5);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--biolum-aqua);
    letter-spacing: 1px;
    opacity: 0.8;
}

.terminal-blink {
    animation: cursor-blink 1.2s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 0.8; }
    50%       { opacity: 0.1; }
}

/* ---------- Organic Blobs ---------- */
.blob {
    position: absolute;
    z-index: 0;
    opacity: 0.18;
    background: var(--muted-seagrass);
}

/* Hero blobs */
.blob-hero-1 {
    width: 520px;
    height: 420px;
    top: 20%;
    left: -80px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite, float-slow 12s ease-in-out infinite;
    animation-delay: 0s, 0s;
}

.blob-hero-2 {
    width: 320px;
    height: 380px;
    bottom: 10%;
    right: 15%;
    border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
    animation: morph 10s ease-in-out infinite, float-slow 16s ease-in-out infinite;
    animation-delay: -4s, -3s;
    opacity: 0.12;
}

/* 847 blobs */
.blob-847-1 {
    width: 440px;
    height: 360px;
    top: 30%;
    right: 5%;
    border-radius: 30% 70% 60% 40% / 50% 40% 60% 50%;
    animation: morph 9s ease-in-out infinite, float-slow 14s ease-in-out infinite;
    animation-delay: -2s, -5s;
}

.blob-847-2 {
    width: 280px;
    height: 320px;
    bottom: 15%;
    left: 5%;
    border-radius: 70% 30% 40% 60% / 30% 60% 40% 70%;
    animation: morph 11s ease-in-out infinite, float-slow 18s ease-in-out infinite;
    animation-delay: -6s, -8s;
    opacity: 0.1;
}

/* 1493 blobs */
.blob-1493-1 {
    width: 500px;
    height: 400px;
    top: 10%;
    right: -60px;
    border-radius: 50% 50% 30% 70% / 40% 60% 40% 60%;
    animation: morph 12s ease-in-out infinite, float-slow 15s ease-in-out infinite;
    animation-delay: -3s, -2s;
    opacity: 0.14;
}

.blob-1493-2 {
    width: 300px;
    height: 350px;
    bottom: 20%;
    left: 10%;
    border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
    animation: morph 7s ease-in-out infinite, float-slow 20s ease-in-out infinite;
    animation-delay: -1s, -7s;
    opacity: 0.1;
}

/* 2847 blobs */
.blob-2847-1 {
    width: 600px;
    height: 480px;
    top: 20%;
    left: -100px;
    border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
    animation: morph 13s ease-in-out infinite, float-slow 17s ease-in-out infinite;
    animation-delay: -5s, -4s;
    opacity: 0.15;
}

.blob-2847-2 {
    width: 360px;
    height: 300px;
    bottom: 10%;
    right: 10%;
    border-radius: 30% 70% 60% 40% / 70% 30% 70% 30%;
    animation: morph 9s ease-in-out infinite, float-slow 13s ease-in-out infinite;
    animation-delay: -7s, -1s;
    opacity: 0.12;
}

@keyframes morph {
    0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50%  { border-radius: 50% 50% 50% 50% / 40% 70% 30% 60%; }
    75%  { border-radius: 40% 60% 40% 60% / 60% 40% 60% 40%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@keyframes float-slow {
    0%   { transform: translateY(0px) translateX(0px); }
    33%  { transform: translateY(-18px) translateX(10px); }
    66%  { transform: translateY(8px) translateX(-8px); }
    100% { transform: translateY(0px) translateX(0px); }
}

/* ---------- Footer ---------- */
#footer {
    position: relative;
    background: var(--deep-trench);
    border-top: 1px solid rgba(42, 106, 112, 0.3);
    padding: 32px 60px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--bone-cream);
    text-transform: uppercase;
}

.footer-coords {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-signal {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--biolum-aqua);
    letter-spacing: 2px;
    opacity: 0.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .section-layout {
        grid-template-columns: 1fr;
        padding: 100px 32px 60px;
    }

    .sonar-cluster {
        width: 260px;
        height: 260px;
        top: auto;
        left: auto;
        position: relative;
    }

    .sonar-ring-1 { width: 120px; height: 120px; }
    .sonar-ring-2 { width: 190px; height: 190px; }
    .sonar-ring-3 { width: 260px; height: 260px; }

    .hero-headline {
        top: 15vh;
        right: 5vw;
        max-width: 85vw;
    }

    .display-heading {
        font-size: clamp(36px, 10vw, 60px);
    }

    .nav-coords {
        display: none;
    }

    .depth-numeral {
        font-size: clamp(80px, 20vw, 140px);
    }
}

@media (max-width: 600px) {
    #nav {
        padding: 14px 20px;
    }

    .nav-links {
        display: none;
    }

    .hero-tags {
        bottom: 12vh;
        right: 5vw;
    }

    #footer {
        padding: 24px 20px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
