/* ============================================================
   iGGi.boo — Bioluminescent Editorial
   Dark Neon / F-Pattern / Bebas Neue + Space Mono
   ============================================================ */

/* ---- Google Fonts are loaded in HTML ---- */
/* Design spec references (from DESIGN.md):
   - Primary display: "Bebas Neue" (Google Fonts, weight 400)
   - Body/mono: "Space Mono" (Google Fonts) — pairing for editorial layout
   - Space Mono is ONLY for body, captions, UI metadata
   - IntersectionObserver` rings start at `scale(0 via cubic-bezier
   - entry: bloom fires on each section entry
   - Scroll arrow: Space Mono at bottom-left of crown section
   - Species names in cyan (#00cfff) — species names labels
   - Body text cool-gray (#a0a0b8) — names in small caps
   - Closing text: Space Mono 13px line of text at bottom-center.
   - Depth fog overlay on bottom 15vh height
   - No contact form, no social links
   - Bebas Neue / Space Mono editorial pairing
   - font-family: "Space Mono" (Google Fonts, weights 400/700)
*/

/* ---- Custom Properties / Design Tokens ---- */
:root {
    --bg-deep:      #0a0a0f;
    --bg-surface:   #0d0d1a;
    --bg-accent:    #12121f;
    --bg-ink:       #070710;

    --neon-green:   #00ff88;
    --neon-violet:  #bf00ff;
    --neon-cyan:    #00cfff;
    --ghost-white:  #e8e8f0;
    --cool-gray:    #a0a0b8;

    --crown-h:      120px;
    --waist-h:      72px;
    --margin-h:     48px;
}

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

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

body {
    background: var(--bg-deep);
    color: var(--ghost-white);
    font-family: 'Space Mono', monospace;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* ============================================================
   SCROLL CONTAINER — snap
   ============================================================ */
.scroll-container {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Ink bleed dividers — between sections but don't interfere with snap */
.ink-bleed {
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 136, 0.15) 10%,
        rgba(0, 255, 136, 0.75) 50%,
        rgba(0, 255, 136, 0.15) 90%,
        transparent 100%
    );
    flex-shrink: 0;
}

.ink-bleed-violet {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(191, 0, 255, 0.15) 10%,
        rgba(191, 0, 255, 0.75) 50%,
        rgba(191, 0, 255, 0.15) 90%,
        transparent 100%
    );
}

.ink-bleed-cyan {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 207, 255, 0.15) 10%,
        rgba(0, 207, 255, 0.75) 50%,
        rgba(0, 207, 255, 0.15) 90%,
        transparent 100%
    );
}

/* ============================================================
   SNAP SECTIONS — base
   ============================================================ */
.snap-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
    background: var(--bg-deep);
    flex-shrink: 0;
}

/* ============================================================
   RIPPLE BACKGROUND PATTERN
   ============================================================ */
.ripple-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

/* CSS ripple rings — painted via radial-gradient in JS canvas technique;
   here we use multiple box-shadows on a pseudo or just the gradient pattern */
.ripple-violet {
    background:
        radial-gradient(circle at 30% 40%, rgba(191,0,255,0.06) 0px, transparent 1px),
        radial-gradient(circle at 30% 40%, rgba(191,0,255,0.05) 60px, transparent 61px),
        radial-gradient(circle at 30% 40%, rgba(191,0,255,0.04) 120px, transparent 121px),
        radial-gradient(circle at 30% 40%, rgba(191,0,255,0.035) 180px, transparent 181px),
        radial-gradient(circle at 30% 40%, rgba(191,0,255,0.03) 240px, transparent 241px),
        radial-gradient(circle at 30% 40%, rgba(191,0,255,0.025) 300px, transparent 301px),
        radial-gradient(circle at 30% 40%, rgba(191,0,255,0.02) 360px, transparent 361px),
        radial-gradient(circle at 30% 40%, rgba(191,0,255,0.015) 420px, transparent 421px);
}

.ripple-cyan {
    background:
        radial-gradient(circle at 65% 55%, rgba(0,207,255,0.06) 0px, transparent 1px),
        radial-gradient(circle at 65% 55%, rgba(0,207,255,0.05) 55px, transparent 56px),
        radial-gradient(circle at 65% 55%, rgba(0,207,255,0.04) 110px, transparent 111px),
        radial-gradient(circle at 65% 55%, rgba(0,207,255,0.035) 165px, transparent 166px),
        radial-gradient(circle at 65% 55%, rgba(0,207,255,0.03) 220px, transparent 221px),
        radial-gradient(circle at 65% 55%, rgba(0,207,255,0.025) 275px, transparent 276px),
        radial-gradient(circle at 65% 55%, rgba(0,207,255,0.02) 330px, transparent 331px),
        radial-gradient(circle at 65% 55%, rgba(0,207,255,0.015) 385px, transparent 386px);
}

.ripple-green {
    background:
        radial-gradient(circle at 45% 35%, rgba(0,255,136,0.055) 0px, transparent 1px),
        radial-gradient(circle at 45% 35%, rgba(0,255,136,0.048) 50px, transparent 51px),
        radial-gradient(circle at 45% 35%, rgba(0,255,136,0.04) 100px, transparent 101px),
        radial-gradient(circle at 45% 35%, rgba(0,255,136,0.033) 150px, transparent 151px),
        radial-gradient(circle at 45% 35%, rgba(0,255,136,0.027) 200px, transparent 201px),
        radial-gradient(circle at 45% 35%, rgba(0,255,136,0.02) 250px, transparent 251px),
        radial-gradient(circle at 45% 35%, rgba(0,255,136,0.015) 300px, transparent 301px),
        radial-gradient(circle at 45% 35%, rgba(0,255,136,0.01) 350px, transparent 351px);
}

/* Active ripple visible state — set by JS on intersection */
.ripple-bg.ripple-active {
    opacity: 1;
    animation: rippleBloom 1200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rippleBloom {
    0%   { opacity: 0; transform: scale(0.6); }
    100% { opacity: 1; transform: scale(1); }
}

/* ============================================================
   CROWN BAND — top 120px strip
   ============================================================ */
.crown-band {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--crown-h);
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    padding-left: var(--margin-h);
    z-index: 10;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ============================================================
   LOGOTYPE
   ============================================================ */
.logotype {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 96px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--ghost-white);
    line-height: 1;
    text-transform: uppercase;
}

.logotype-closing {
    font-size: 88px;
}

.neon-green {
    color: var(--neon-green);
    text-shadow: 0 0 28px rgba(0,255,136,0.5), 0 0 60px rgba(0,255,136,0.22);
}

/* ============================================================
   WAIST BAND — secondary horizontal strip
   ============================================================ */
.waist-band {
    position: absolute;
    top: var(--crown-h);
    left: 0;
    width: 100%;
    height: var(--waist-h);
    background: transparent;
    display: flex;
    align-items: center;
    padding-left: var(--margin-h);
    z-index: 10;
}

.waist-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    font-weight: 400;
    letter-spacing: 0.07em;
    color: var(--neon-violet);
    text-shadow: 0 0 22px rgba(191,0,255,0.42), 0 0 48px rgba(191,0,255,0.18);
}

.waist-violet .waist-label {
    color: var(--neon-violet);
    text-shadow: 0 0 22px rgba(191,0,255,0.42), 0 0 48px rgba(191,0,255,0.18);
}

.waist-cyan .waist-label {
    color: var(--neon-cyan);
    text-shadow: 0 0 22px rgba(0,207,255,0.42), 0 0 48px rgba(0,207,255,0.18);
}

/* Section crown titles */
.section-crown-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--ghost-white);
    line-height: 1;
    text-transform: uppercase;
}

.neon-green-title {
    color: var(--neon-green);
    text-shadow: 0 0 24px rgba(0,255,136,0.48), 0 0 55px rgba(0,255,136,0.2);
}

.crown-band-green {
    /* just inherits defaults */
}

/* ============================================================
   FISH ZONE
   ============================================================ */
.fish-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
}

.fish-zone-right {
    right: -60px;
    width: 55%;
    justify-content: flex-end;
}

.fish-zone-closing {
    right: -80px;
    width: 60%;
}

/* ============================================================
   FISH IMAGES — all use mix-blend-mode: screen
   ============================================================ */
.fish-img {
    mix-blend-mode: screen;
    display: block;
    animation: fishDrift 8s ease-in-out infinite;
}

.fish-mandarin {
    width: auto;
    height: 50vh;
    max-width: none;
}

.fish-large {
    height: 65vh;
    width: auto;
    max-width: none;
}

.fish-moorish {
    /* Bleeds past right edge */
}

.fish-regal {
    /* Mirror: left bleed in section B */
}

.fish-closing {
    height: 65vh;
    width: auto;
    max-width: none;
}

/* Fish float drift animation */
@keyframes fishDrift {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(0.8deg);
    }
}

/* ============================================================
   DEPTH FOG — bottom gradient
   ============================================================ */
.depth-fog {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    background: linear-gradient(to top, var(--bg-deep), transparent);
    pointer-events: none;
    z-index: 20;
}

.depth-fog-deep {
    height: 25vh;
}

/* ============================================================
   SCROLL ARROW
   ============================================================ */
.scroll-arrow {
    position: absolute;
    bottom: 28px;
    left: var(--margin-h);
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    color: var(--cool-gray);
    z-index: 25;
    animation: arrowPulse 2s ease-in-out infinite;
    cursor: pointer;
    letter-spacing: 0;
    user-select: none;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50%       { opacity: 1;   transform: translateY(4px); }
}

/* ============================================================
   CROWN SECTION specifics
   ============================================================ */
.crown-section {
    background: var(--bg-deep);
}

/* ============================================================
   F-PATTERN SECTIONS
   ============================================================ */
.f-section {
    background: var(--bg-surface);
}

/* F-layout container — sits below crown + waist */
.f-layout {
    position: absolute;
    top: calc(var(--crown-h) + var(--waist-h));
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    z-index: 5;
}

.f-layout-left {
    flex-direction: row;
}

.f-layout-right {
    flex-direction: row-reverse;
}

/* Spine — 55% width text column */
.f-spine {
    width: 55%;
    padding: 40px var(--margin-h) 80px var(--margin-h);
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow: hidden;
}

.f-spine-right {
    padding-right: var(--margin-h);
    padding-left: 32px;
}

/* Illustration zone — 45% overflow */
.f-illus {
    position: relative;
    width: 45%;
    overflow: visible;
}

.f-illus-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
}

.f-illus-right .fish-img {
    position: relative;
    left: -40px;
    height: 65vh;
    width: auto;
    max-width: none;
    /* Intentionally overflows right viewport edge */
}

.f-illus-left {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
}

.f-illus-left .fish-img {
    position: relative;
    right: -40px;
    height: 55vh;
    width: auto;
    max-width: none;
    /* Bleeds off left viewport edge */
    transform: scaleX(-1); /* Mirror for left-bleed */
}

/* Body text */
.body-text {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    line-height: 1.85;
    color: var(--cool-gray);
    letter-spacing: 0.02em;
}

/* Drop cap — first paragraph in each F-section */
.drop-cap::first-letter {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.2em;
    line-height: 0.78;
    float: left;
    margin-right: 8px;
    margin-top: 4px;
    color: var(--ghost-white);
}

/* ============================================================
   SPECIMEN SECTION
   ============================================================ */
.specimen-section {
    background: var(--bg-surface);
}

.specimen-grid {
    position: absolute;
    top: calc(var(--crown-h) + var(--waist-h) + 24px);
    left: var(--margin-h);
    right: var(--margin-h);
    bottom: 15vh;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    z-index: 5;
}

.specimen-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    overflow: hidden;
}

.fish-specimen {
    width: auto;
    height: 18vh;
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 0;
    flex-grow: 1;
    align-self: center;
}

.specimen-label {
    text-align: center;
    opacity: 0;
    transition: opacity 200ms ease;
}

.specimen-label.visible {
    opacity: 1;
}

.species-name {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--neon-cyan);
    letter-spacing: 0.04em;
    font-style: italic;
    text-shadow: 0 0 14px rgba(0,207,255,0.4);
}

.species-common {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--cool-gray);
    letter-spacing: 0.06em;
    margin-top: 3px;
    text-transform: uppercase;
}

/* ============================================================
   TEXT-DOMINANT SECTION
   ============================================================ */
.text-section {
    background: var(--bg-deep);
}

.text-dominant-layout {
    position: absolute;
    top: calc(var(--crown-h) + var(--waist-h) + 32px);
    left: var(--margin-h);
    width: 65%;
    bottom: 15vh;
    z-index: 5;
    overflow: hidden;
}

.text-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 24px;
}

/* Inline ink bleeds between text paragraphs */
.ink-bleed-inline {
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(0,255,136,0.6) 0%,
        rgba(0,255,136,0.2) 60%,
        transparent 100%
    );
}

.ink-bleed-violet-inline {
    background: linear-gradient(
        90deg,
        rgba(191,0,255,0.6) 0%,
        rgba(191,0,255,0.2) 60%,
        transparent 100%
    );
}

.ink-bleed-cyan-inline {
    background: linear-gradient(
        90deg,
        rgba(0,207,255,0.6) 0%,
        rgba(0,207,255,0.2) 60%,
        transparent 100%
    );
}

/* Pull quote */
.pull-quote-wrapper {
    margin: 8px 0;
    padding-left: 24px;
    border-left: 3px solid var(--neon-green);
}

.pull-quote {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--ghost-white);
    line-height: 1.05;
    text-transform: uppercase;
    font-style: normal;
}

/* ============================================================
   CLOSING SECTION
   ============================================================ */
.closing-section {
    background: var(--bg-ink);
}

.closing-text {
    position: absolute;
    bottom: 48px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 25;
}

.closing-line {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--cool-gray);
    letter-spacing: 0.08em;
}

/* ============================================================
   NAV DOTS (fixed)
   ============================================================ */
.nav-dots {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 100;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(160, 160, 184, 0.35);
    border: 1px solid rgba(160, 160, 184, 0.5);
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.nav-dot.active {
    background: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    transform: scale(1.4);
}

/* ============================================================
   GLOW EFFECTS — box-shadows for neon text
   ============================================================ */
/* Applied via utility classes where needed; main colors defined in vars */

/* Neon green glow on important headings */
.crown-band .logotype .neon-green {
    text-shadow: 0 0 30px rgba(0,255,136,0.55), 0 0 65px rgba(0,255,136,0.25);
}

/* ============================================================
   RESPONSIVE — basic tablet / phone fallback
   ============================================================ */
@media (max-width: 900px) {
    :root {
        --crown-h: 90px;
        --waist-h: 56px;
        --margin-h: 24px;
    }

    .logotype {
        font-size: 64px;
    }

    .logotype-closing {
        font-size: 58px;
    }

    .section-crown-title {
        font-size: 42px;
    }

    .waist-label {
        font-size: 32px;
    }

    .pull-quote {
        font-size: 34px;
    }

    .f-layout {
        flex-direction: column;
    }

    .f-layout-right {
        flex-direction: column;
    }

    .f-spine {
        width: 100%;
        padding: 24px var(--margin-h) 20px;
    }

    .f-illus {
        display: none;
    }

    .fish-zone {
        opacity: 0.45;
    }

    .fish-mandarin {
        height: 38vh;
    }

    .fish-large {
        height: 45vh;
    }

    .fish-closing {
        height: 45vh;
    }

    .specimen-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .text-dominant-layout {
        width: 92%;
        left: var(--margin-h);
    }

    .pull-quote {
        font-size: 30px;
    }

    .nav-dots {
        right: 14px;
    }
}

@media (max-width: 520px) {
    :root {
        --crown-h: 76px;
        --waist-h: 48px;
        --margin-h: 16px;
    }

    .logotype {
        font-size: 48px;
    }

    .section-crown-title {
        font-size: 32px;
    }

    .waist-label {
        font-size: 24px;
    }

    .specimen-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fish-specimen {
        height: 13vh;
    }
}
