/* perso.news - Blobitecture Deep Ocean */

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

:root {
    --deep-sapphire: #0f3460;
    --midnight-ink: #0a1931;
    --emerald: #046307;
    --emerald-dark: #03420a;
    --ruby: #9b1b30;
    --topaz: #d4a017;
    --amethyst: #6c3483;
    --pearl: #f0ece2;
    --opal: #b8c5d6;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--deep-sapphire);
    color: var(--pearl);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.72;
    overflow: hidden;
}

#scroll-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
}

/* === ZONES === */
.zone {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

.zone-surface {
    background: linear-gradient(180deg, #0f3460 0%, #0d2d52 100%);
}
.zone-thermocline {
    background: linear-gradient(180deg, #0d2d52 0%, #0b2544 100%);
}
.zone-meso {
    background: linear-gradient(180deg, #0b2544 0%, #0a1f3a 100%);
}
.zone-bathy {
    background: linear-gradient(180deg, #0a1f3a 0%, #0a1931 100%);
}
.zone-abyss {
    background: linear-gradient(180deg, #0a1931 0%, #070f1f 100%);
}

/* === BLOB MORPHING === */
@keyframes morph1 {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25%  { border-radius: 58% 42% 55% 45% / 45% 60% 40% 55%; }
    50%  { border-radius: 50% 50% 33% 67% / 55% 35% 65% 45%; }
    75%  { border-radius: 67% 33% 50% 50% / 35% 55% 45% 65%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

@keyframes morph2 {
    0%   { border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%; }
    33%  { border-radius: 55% 45% 40% 60% / 40% 55% 45% 60%; }
    66%  { border-radius: 45% 55% 60% 40% / 60% 45% 55% 40%; }
    100% { border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%; }
}

@keyframes morph3 {
    0%   { border-radius: 50% 50% 40% 60% / 45% 55% 50% 50%; }
    50%  { border-radius: 60% 40% 50% 50% / 55% 45% 45% 55%; }
    100% { border-radius: 50% 50% 40% 60% / 45% 55% 50% 50%; }
}

/* === HERO BLOB === */
.blob-hero {
    width: clamp(300px, 60vw, 520px);
    height: clamp(300px, 50vw, 420px);
    background: radial-gradient(ellipse at 30% 20%, rgba(15,52,96,0.6), transparent 60%), 
                linear-gradient(135deg, var(--deep-sapphire), var(--midnight-ink));
    border: 1px solid rgba(184,197,214,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: morph1 12s ease-in-out infinite;
    opacity: 0;
    transition: opacity 800ms ease;
    box-shadow: 0 30px 80px rgba(10,25,49,0.5);
}

.blob-hero.visible {
    opacity: 1;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 7vw, 5.5rem);
    color: var(--pearl);
    letter-spacing: 0.01em;
    text-align: center;
}

.hero-tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--opal);
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 600ms ease 600ms;
}

.blob-hero.visible .hero-tagline {
    opacity: 1;
}

.hero-counter {
    margin-top: 1.5rem;
    text-align: center;
}

.hero-counter .counter {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--pearl);
}

.counter-label {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    color: var(--opal);
    display: block;
    margin-top: 0.25rem;
}

/* === TANG FISH (cursor follow) === */
.fish-tang {
    position: fixed;
    pointer-events: none;
    z-index: 100;
    opacity: 0.8;
    transition: transform 0.2s ease-out;
    display: none;
}

@media (pointer: fine) {
    .fish-tang { display: block; }
}

/* === TOPIC STREAM CARDS === */
.topic-stream {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
    max-width: 780px;
    width: 90%;
    padding: 4vh 0;
}

.blob-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(10,25,49,0.4);
    transition: opacity 600ms ease, transform 600ms ease;
    opacity: 0;
    transform: translateY(30px);
}

.blob-card.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--rot));
}

.blob-emerald {
    background: linear-gradient(135deg, #046307, #03420a);
    animation: morph1 10s ease-in-out infinite;
    --rot: -2deg;
}

.blob-ruby {
    background: linear-gradient(135deg, #9b1b30, #7a1526);
    animation: morph2 11s ease-in-out infinite;
    --rot: 1.5deg;
}

.blob-topaz {
    background: linear-gradient(135deg, #d4a017, #b88a12);
    animation: morph3 9s ease-in-out infinite;
    --rot: 2deg;
}

.card-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--pearl);
    margin-bottom: 0.8rem;
}

.sparkline {
    width: 100%;
    height: 40px;
    margin-bottom: 0.8rem;
}

.card-counter {
    font-family: 'DM Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    color: var(--pearl);
}

.card-counter .counter-label {
    display: inline;
    font-family: 'Source Sans 3', sans-serif;
    color: rgba(240,236,226,0.7);
}

/* === TRENDING SECTION === */
.blob-wide {
    width: 90%;
    max-width: 900px;
    padding: 3rem 3.5rem;
    background: linear-gradient(135deg, rgba(15,52,96,0.9), rgba(10,25,49,0.95));
    border: 1px solid rgba(184,197,214,0.1);
    animation: morph2 14s ease-in-out infinite;
    box-shadow: 0 25px 70px rgba(10,25,49,0.5);
    position: relative;
}

.section-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 5.5vw, 4.8rem);
    color: var(--pearl);
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--opal);
    min-width: 130px;
    text-align: right;
    flex-shrink: 0;
}

.bar-track {
    flex: 1;
    height: 36px;
    position: relative;
}

.bar {
    height: 100%;
    width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    clip-path: polygon(0% 10%, 5% 0%, 95% 5%, 100% 15%, 98% 85%, 93% 100%, 3% 95%, 0% 80%);
}

.bar-emerald { background: linear-gradient(90deg, #046307, #03420a); }
.bar-ruby { background: linear-gradient(90deg, #9b1b30, #7a1526); }
.bar-topaz { background: linear-gradient(90deg, #d4a017, #b88a12); }
.bar-amethyst { background: linear-gradient(90deg, #6c3483, #5b2c6f); }
.bar-emerald-alt { background: linear-gradient(90deg, #03420a, #046307); }

.bar-value {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    color: var(--pearl);
    white-space: nowrap;
}

.fish-puffer {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    animation: puffer-float 4s ease-in-out infinite;
}

@keyframes puffer-float {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.15) translateY(-5px); }
}

/* === HOW IT WORKS === */
.how-it-works {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4vh;
    max-width: 780px;
    width: 90%;
    position: relative;
    padding: 6vh 0;
}

.connector-lines {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.step-blob {
    background: linear-gradient(135deg, rgba(15,52,96,0.85), rgba(10,25,49,0.9));
    border: 1px solid rgba(184,197,214,0.1);
    padding: 2rem 2.5rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 15px 50px rgba(10,25,49,0.4);
}

#step-1 { animation: morph1 9s ease-in-out infinite; }
#step-2 { animation: morph2 10s ease-in-out infinite; }
#step-3 { animation: morph3 11s ease-in-out infinite; }

.step-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--pearl);
}

.step-text .counter {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    color: var(--topaz);
}

/* Fish animations */
@keyframes swim-right {
    0%   { transform: translateX(-15px) rotate(-2deg); }
    50%  { transform: translateX(15px) rotate(2deg); }
    100% { transform: translateX(-15px) rotate(-2deg); }
}

@keyframes swim-hover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.fish {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
}

.fish-angel { animation: swim-right 7s ease-in-out infinite; }
.fish-clown { animation: swim-hover 5s ease-in-out infinite; right: -45px; }
.fish-angel-2 { animation: swim-right 8s ease-in-out infinite; }

/* === ABYSSAL ZONE === */
.abyss-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 780px;
    position: relative;
    min-height: 60vh;
}

.search-blob {
    background: linear-gradient(135deg, rgba(15,52,96,0.85), rgba(10,25,49,0.9));
    border: 1px solid rgba(108,52,131,0.3);
    padding: 2rem 3rem;
    width: 100%;
    max-width: 500px;
    animation: morph2 10s ease-in-out infinite;
    z-index: 2;
}

.search-input {
    width: 100%;
    background: rgba(10,25,49,0.6);
    border: 1px solid rgba(108,52,131,0.4);
    border-radius: 30px;
    padding: 0.9rem 1.5rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: var(--pearl);
    outline: none;
    animation: search-glow 3s ease-in-out infinite;
}

.search-input::placeholder {
    color: var(--opal);
    opacity: 0.7;
}

@keyframes search-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(108,52,131,0.3), inset 0 0 15px rgba(108,52,131,0.2); }
    50%      { box-shadow: 0 0 30px rgba(108,52,131,0.6), inset 0 0 15px rgba(108,52,131,0.3); }
}

.micro-blob-field {
    position: relative;
    width: 100%;
    height: 30vh;
    margin-top: 3vh;
    z-index: 1;
}

.micro-blob {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.75rem;
    color: var(--pearl);
    opacity: 0.7;
    animation: float-blob var(--dur) ease-in-out infinite;
    animation-delay: var(--delay);
    border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
}

@keyframes float-blob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Manta */
.fish-manta {
    position: absolute;
    bottom: 15%;
    animation: manta-glide 30s linear infinite;
    opacity: 0.5;
    z-index: 0;
}

@keyframes manta-glide {
    0%   { left: -150px; }
    100% { left: calc(100vw + 50px); }
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .bar-label {
        min-width: 80px;
        font-size: 0.75rem;
    }
    .blob-wide {
        padding: 2rem 1.5rem;
    }
    .fish {
        display: none;
    }
}
