@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,700;0,900;1,900&family=Oswald:wght@500;700&family=Space+Grotesk:wght@400;500&display=swap');

:root {
    --bg-dark:        #05020a;
    --primary-purple: #7a22ff;
    --neon-purple:    #a162ff;
    --text-white:     #ffffff;
    --text-muted:     #b3a7c4;
}

* { -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
}

/* ════════════════════════════════════════════
   LOADING SCREEN
   ════════════════════════════════════════════ */
#fhg-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at 50% 45%, #170736 0%, var(--bg-dark) 75%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#fhg-loader.fhg-loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.fhg-loader-wordmark {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--text-white);
    margin-bottom: 2.25rem;
}
.fhg-loader-wordmark span {
    color: var(--neon-purple);
    text-shadow: 0 0 14px rgba(161, 98, 255, 0.5);
}

.fhg-loader-bar-track {
    width: min(320px, 80vw);
    height: 6px;
    border-radius: 999px;
    background: rgba(122, 34, 255, 0.12);
    border: 1px solid rgba(122, 34, 255, 0.2);
    overflow: hidden;
    position: relative;
}

.fhg-loader-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-purple), var(--neon-purple), #d4b8ff);
    box-shadow: 0 0 12px rgba(161, 98, 255, 0.7);
    transition: width 0.25s ease-out;
    position: relative;
}

.fhg-loader-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 24px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.6));
    filter: blur(2px);
}

.fhg-loader-pct {
    margin-top: 0.65rem;
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.fhg-loader-tip {
    margin-top: 2rem;
    max-width: 420px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
    min-height: 3.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s ease;
}
.fhg-loader-tip.fhg-tip--fade { opacity: 0; }

.fhg-loader-tip-label {
    color: var(--neon-purple);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    margin-right: 0.4em;
}

@media (max-width: 575.98px) {
    .fhg-loader-wordmark { font-size: 0.95rem; letter-spacing: 2px; margin-bottom: 1.75rem; }
    .fhg-loader-tip  { font-size: 0.875rem; max-width: 320px; margin-top: 1.5rem; }
}

/* ── NAVBAR ── */
.fhg-navbar {
    background: rgba(5, 2, 10, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(122, 34, 255, 0.15);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.brand-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.brand-text-block {
    display: flex;
    flex-direction: column;
    font-family: 'Oswald', sans-serif;
    line-height: 0.9;
}

.brand-line         { font-weight: 700; font-size: 1.1rem; color: var(--text-white); letter-spacing: 0.5px; }
.brand-line--mid    { color: var(--primary-purple); }
.brand-line--bot    { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 2px; }

.nav-link {
    font-family: 'Oswald', sans-serif;
    color: var(--text-muted) !important;
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--neon-purple) !important;
    text-shadow: 0 0 10px rgba(161, 98, 255, 0.4);
}

.social-icon {
    color: var(--text-white);
    font-size: 1.25rem;
    transition: transform 0.2s, color 0.2s;
}
.social-icon:hover {
    color: var(--neon-purple);
    transform: translateY(-2px);
}

/* ── HERO CORE ── */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: radial-gradient(circle at 75% 50%, #170736 0%, var(--bg-dark) 70%);
    overflow: hidden;
}

#interactive-space {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: all;
    /* pan-y (not none): lets vertical swipes scroll the page normally —
       this canvas covers the whole hero, which is taller than the
       viewport on mobile, so touch-action: none here was blocking
       scrolling almost everywhere in the hero. Pinch/double-tap zoom
       is still suppressed; tap-based interactions (head tap) are
       unaffected since taps aren't a panning gesture. */
    touch-action: pan-y;
}

.hero-container {
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.hero-row {
    min-height: 100vh;
}

.hero-content {
    pointer-events: auto;
}

/* ── TYPOGRAPHY ── */
.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: calc(2.5rem + 2vw);
    line-height: 1.05;
    letter-spacing: -1px;
}

.hero-title-accent {
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    color: var(--neon-purple);
    text-shadow: 0 0 20px rgba(161, 98, 255, 0.3);
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── BUTTONS ── */
.btn-hero-primary {
    background: var(--primary-purple);
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 5px 20px rgba(122, 34, 255, 0.4);
    transition: all 0.2s ease;
}
.btn-hero-primary:hover {
    background: var(--neon-purple);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(161, 98, 255, 0.6);
    color: var(--text-white);
}

.btn-hero-ghost {
    color: var(--text-white);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.btn-hero-ghost:hover { color: var(--neon-purple); }

.trailer-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--primary-purple);
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--primary-purple);
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.btn-hero-ghost:hover .trailer-play {
    background: var(--primary-purple);
    color: var(--text-white);
    transform: scale(1.05);
}

/* ════════════════════════════════════════════
   FLOATING HEAD + LIQUID
   The liquid-container spans the full hero so the
   canvas-drawn fluid covers the whole bottom area.
   The head's `transform` is fully owned by JS
   (physics-driven bob + collision with the fluid),
   so positioning here uses left/margin only —
   never `transform` — to avoid the two fighting.
   ════════════════════════════════════════════ */
.liquid-container {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 55%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.liquid-surface { display: none; }

.floating-head-element {
    position: absolute;
    bottom: 0;
    left: 38%;
    width: 420px;
    height: auto;
    object-fit: contain;
    object-position: -15px center;
    filter: drop-shadow(0 0 35px rgba(122, 34, 255, 0.5))
            drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
    transform-origin: center bottom;
    pointer-events: auto;
    cursor: grab;
    z-index: 6;
    touch-action: none;
    will-change: transform;
}

.floating-head-element:active { cursor: grabbing; }

/* ── MOBILE ──
   The hero grows taller than the viewport so text and the
   head/liquid stage each get their own uncluttered zone instead
   of overlapping in a single min-vh-100 centered row. */
@media (max-width: 991.98px) {
    .hero-section {
        background: radial-gradient(circle at center 65%, #170736 0%, var(--bg-dark) 100%);
        min-height: 100vh;
        min-height: 100svh;
        height: 148vh;
        height: 148svh;
    }
    .hero-row {
        min-height: 0;
        align-items: flex-start;
    }
    .hero-container {
        padding-top: 96px;
    }
    .hero-content {
        text-align: center;
    }
    .hero-ctas {
        justify-content: center;
    }

    /* Head + liquid get a dedicated stage in the lower ~42% of the
       taller hero, well clear of the text block above it. */
    .liquid-container {
        width: 100%;
        height: 42%;
        bottom: 0;
        right: 0;
    }
    .floating-head-element {
        left: 50%;
        margin-left: -130px;
        bottom: 0;
        width: 260px;
    }
    .head-tap-hint {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        height: 152vh;
        height: 152svh;
    }
    .hero-container {
        padding-top: 84px;
    }
    .floating-head-element {
        width: 200px;
        margin-left: -100px;
    }
}

.head-tap-hint {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 4%;
    transform: translateX(-50%);
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(122, 34, 255, 0.14);
    border: 1px solid rgba(122, 34, 255, 0.3);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.85;
    animation: tapHintFade 3.5s ease-in-out 1.5s 1 forwards;
}

@keyframes tapHintFade {
    0%, 70%  { opacity: 0.85; }
    100%     { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .floating-head-element { transition: none; }
}

/* ════════════════════════════════════════════
   UNDERWATER SECTION
   Sits directly beneath the hero's liquid. As the
   page scrolls past the hero, this section scrolls
   into view — the head/text are simply off-screen
   above, no extra hide logic needed.
   ════════════════════════════════════════════ */
.underwater-section {
    position: relative;
    width: 100%;
    height: 200vh;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0a0316 10%, #120628 28%, #1c0a3d 55%, #170736 80%, var(--bg-dark) 100%);
    overflow: hidden;
}

#underwater-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* pan-y, not none — same reasoning as #interactive-space: this
       canvas spans the full 200vh section, so blocking all touch
       actions here blocks scrolling through most of the section. */
    touch-action: pan-y;
}

.underwater-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(122, 34, 255, 0.16) 0%, rgba(5,2,10,0) 35%),
        linear-gradient(180deg, rgba(5,2,10,0) 0%, rgba(5,2,10,0.55) 100%);
}

.underwater-hint {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: fit-content;
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(122, 34, 255, 0.14);
    border: 1px solid rgba(122, 34, 255, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.underwater-hint.is-visible { opacity: 0.9; }

.underwater-catch-counter {
    position: fixed;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--text-white);
    background: rgba(5, 2, 10, 0.5);
    border: 1px solid rgba(161, 98, 255, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.underwater-catch-counter.is-visible { opacity: 1; }
.underwater-catch-counter i { color: var(--neon-purple); font-size: 0.9rem; }

@media (max-width: 575.98px) {
    .underwater-hint { top: 90px; font-size: 0.7rem; }
    .underwater-catch-counter { top: 134px; font-size: 0.8rem; }
}