/* ==========================================================================
   AQUATIC FX — Shared Animated Underwater Design System
   NAT Fish Farm
   Adds: floating bubbles, light caustics, cyan glows, wavy section
   dividers, floating particles and slow gradient shifts.
   Purely presentational — does not alter any text/content.
   ========================================================================== */

:root {
    --aqua-deep: #071a2d;
    --aqua-mid: #0a2540;
    --aqua-cyan: #00b4ff;
    --aqua-cyan-soft: rgba(0, 180, 255, 0.35);
    --aqua-glow: rgba(34, 211, 238, 0.25);
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    overflow-x: hidden;
    background-color: var(--aqua-deep);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(0, 180, 255, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(0, 180, 255, 0.08) 0%, transparent 55%);
    background-attachment: fixed;
    animation: aqua-body-shift 22s ease-in-out infinite;
}

@keyframes aqua-body-shift {
    0%, 100% { background-position: 0% 0%, 100% 100%; }
    50%      { background-position: 8% 4%, 92% 96%; }
}

/* --------------------------------------------------------------------
   Fixed full-page effects layer (bubbles, caustics, particles, glows)
   Injected by aquatic-fx.js — sits behind all real content.
   -------------------------------------------------------------------- */
#aqua-fx {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Everything that already exists on the page should render above the fx layer */
main, section, footer, .footer, #nat-preloader, #offline-banner {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   NAVBAR — Floating Control Panel
   ========================================================================== */
header {
    position: sticky;
    top: 16px;
    z-index: 500;

    max-width: 1300px;
    width: calc(100% - 32px);
    margin: 16px auto 0;

    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);

    background: rgba(7, 26, 45, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(0, 180, 255, 0.05);

    transition: background 0.3s ease, box-shadow 0.3s ease, top 0.3s ease, border-radius 0.3s ease;
}

header.aqua-scrolled {
    background: rgba(5, 16, 30, 0.8);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 180, 255, 0.14);
}

/* Logo in a rounded glass/card container */
.corner-logo {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.corner-logo:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 6px 22px rgba(0, 180, 255, 0.35);
}

/* Nav links: glass hover + animated cyan underline */
.nav-menu a:hover {
    background: rgba(0, 180, 255, 0.16);
    transform: translateY(-2px);
}

.nav-menu a::after {
    background: var(--aqua-cyan, #00b4ff);
    box-shadow: 0 0 6px rgba(0, 180, 255, 0.6);
}

.nav-menu a:hover::after {
    width: 60%;
}

/* Active page indicator — filled pill + full-width glowing cyan line */
.nav-menu a.active {
    background: rgba(0, 180, 255, 0.20);
    color: #eafcff;
}

.nav-menu a.active::after {
    width: 65%;
    background: linear-gradient(90deg, transparent, var(--aqua-cyan, #00b4ff), transparent);
    box-shadow: 0 0 10px rgba(0, 180, 255, 0.9);
    animation: aqua-active-underline 2.4s ease-in-out infinite;
}

@keyframes aqua-active-underline {
    0%, 100% { opacity: 0.75; }
    50%      { opacity: 1; }
}

.language-btn:hover {
    background: rgba(0, 180, 255, 0.35);
}

/* Hamburger -> X animation */
.hamburger span {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.aqua-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.aqua-open span:nth-child(2) { opacity: 0; }
.hamburger.aqua-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Better mobile menu animation */
@media (max-width: 768px) {
    .nav-menu {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 68px;
        right: 0;
        left: 0;
        width: auto;

        background: rgba(5, 16, 30, 0.92);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        padding: 10px;
        gap: 4px;

        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active {
        max-height: 480px;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-menu li {
        width: 100%;
        opacity: 0;
        transform: translateY(-6px);
    }

    .nav-menu.active li {
        animation: aqua-nav-item-in 0.35s ease forwards;
    }

    .nav-menu.active li:nth-child(1) { animation-delay: 0.04s; }
    .nav-menu.active li:nth-child(2) { animation-delay: 0.08s; }
    .nav-menu.active li:nth-child(3) { animation-delay: 0.12s; }
    .nav-menu.active li:nth-child(4) { animation-delay: 0.16s; }
    .nav-menu.active li:nth-child(5) { animation-delay: 0.20s; }
    .nav-menu.active li:nth-child(6) { animation-delay: 0.24s; }
    .nav-menu.active li:nth-child(7) { animation-delay: 0.28s; }

    .nav-menu a {
        display: block;
        text-align: center;
    }
}

@keyframes aqua-nav-item-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .nav-menu a.active::after {
        animation: none !important;
    }
}

/* --------------------------- Light Caustics --------------------------- */
.aqua-caustics {
    position: absolute;
    inset: -10%;
    background:
        repeating-linear-gradient(
            115deg,
            rgba(0, 180, 255, 0.05) 0px,
            rgba(0, 180, 255, 0.05) 2px,
            transparent 2px,
            transparent 60px
        ),
        repeating-linear-gradient(
            65deg,
            rgba(103, 232, 249, 0.045) 0px,
            rgba(103, 232, 249, 0.045) 2px,
            transparent 2px,
            transparent 90px
        );
    mix-blend-mode: screen;
    opacity: 0.55;
    animation: aqua-caustics-drift 26s linear infinite;
    will-change: transform;
}

.aqua-caustics.aqua-caustics-2 {
    animation-duration: 38s;
    animation-direction: reverse;
    opacity: 0.35;
    filter: blur(1px);
}

@keyframes aqua-caustics-drift {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
    50%  { transform: translate3d(-3%, 2%, 0) rotate(1deg); }
    100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

/* ----------------------------- Cyan Glows ------------------------------ */
.aqua-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    background: radial-gradient(circle, var(--aqua-glow) 0%, transparent 70%);
    animation: aqua-glow-pulse 9s ease-in-out infinite;
    will-change: transform, opacity;
}

.aqua-glow-a { top: -8%;  left: -6%;  width: 38vw; height: 38vw; animation-delay: 0s; }
.aqua-glow-b { bottom: -10%; right: -8%; width: 42vw; height: 42vw; animation-delay: 3s; background: radial-gradient(circle, rgba(0, 180, 255, 0.22) 0%, transparent 70%); }
.aqua-glow-c { top: 35%; right: 15%; width: 24vw; height: 24vw; animation-delay: 5.5s; opacity: 0.35; }

@keyframes aqua-glow-pulse {
    0%, 100% { transform: scale(1) translateY(0); opacity: 0.35; }
    50%      { transform: scale(1.18) translateY(-15px); opacity: 0.6; }
}

/* ------------------------------- Bubbles ------------------------------- */
.aqua-bubble {
    position: absolute;
    bottom: -10%;
    left: var(--bx, 50%);
    width: var(--bs, 14px);
    height: var(--bs, 14px);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), rgba(0, 180, 255, 0.12) 60%, rgba(0, 180, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 6px rgba(0, 180, 255, 0.25);
    opacity: 0;
    animation: aqua-bubble-rise var(--bd, 12s) linear infinite;
    animation-delay: var(--bdelay, 0s);
    will-change: transform, opacity;
}

@keyframes aqua-bubble-rise {
    0%   { transform: translate3d(0, 0, 0) scale(0.8); opacity: 0; }
    8%   { opacity: 0.85; }
    50%  { transform: translate3d(calc(var(--bsway, 20px) * 1), -55vh, 0) scale(1); }
    92%  { opacity: 0.5; }
    100% { transform: translate3d(0, -115vh, 0) scale(1.05); opacity: 0; }
}

/* ------------------------------ Particles ------------------------------ */
.aqua-particle {
    position: absolute;
    top: var(--py, 50%);
    left: var(--px, 50%);
    width: var(--ps, 3px);
    height: var(--ps, 3px);
    border-radius: 50%;
    background: rgba(103, 232, 249, 0.55);
    box-shadow: 0 0 4px rgba(103, 232, 249, 0.6);
    opacity: 0;
    animation: aqua-particle-float var(--pd, 14s) ease-in-out infinite;
    animation-delay: var(--pdelay, 0s);
    will-change: transform, opacity;
}

@keyframes aqua-particle-float {
    0%   { transform: translate3d(0, 0, 0); opacity: 0; }
    15%  { opacity: 0.7; }
    50%  { transform: translate3d(var(--psway, 24px), -28px, 0); opacity: 0.9; }
    85%  { opacity: 0.4; }
    100% { transform: translate3d(0, -55px, 0); opacity: 0; }
}

/* --------------------------- Fish Silhouettes --------------------------- */
.aqua-fish {
    position: absolute;
    top: var(--fy, 50%);
    width: var(--fsize, 40px);
    height: auto;
    fill: rgba(103, 232, 249, 0.5);
    opacity: var(--fopacity, 0.08);
    filter: blur(0.3px);
    will-change: transform;
}

.aqua-fish-right {
    left: -12%;
    animation: aqua-fish-swim-right var(--fdur, 40s) linear infinite;
    animation-delay: var(--fdelay, 0s);
}

.aqua-fish-left {
    right: -12%;
    transform: scaleX(-1);
    animation: aqua-fish-swim-left var(--fdur, 40s) linear infinite;
    animation-delay: var(--fdelay, 0s);
}

@keyframes aqua-fish-swim-right {
    0%   { transform: translate3d(0, 0, 0); }
    50%  { transform: translate3d(59vw, -18px, 0); }
    100% { transform: translate3d(124vw, 0, 0); }
}

@keyframes aqua-fish-swim-left {
    0%   { transform: translate3d(0, 0, 0) scaleX(-1); }
    50%  { transform: translate3d(-59vw, 18px, 0) scaleX(-1); }
    100% { transform: translate3d(-124vw, 0, 0) scaleX(-1); }
}

/* ---------------------------- Ripple Circles ---------------------------- */
.aqua-ripple {
    position: absolute;
    top: var(--ry, 50%);
    left: var(--rx, 50%);
    width: var(--rsize, 160px);
    height: var(--rsize, 160px);
    margin: calc(var(--rsize, 160px) / -2) 0 0 calc(var(--rsize, 160px) / -2);
    border-radius: 50%;
    border: 1px solid rgba(0, 180, 255, 0.22);
    opacity: 0;
    animation: aqua-ripple-expand var(--rdur, 10s) ease-out infinite;
    animation-delay: var(--rdelay, 0s);
    will-change: transform, opacity;
}

@keyframes aqua-ripple-expand {
    0%   { transform: scale(0.15); opacity: 0; }
    10%  { opacity: 0.28; }
    70%  { opacity: 0.08; }
    100% { transform: scale(1); opacity: 0; }
}

/* --------------------------- Wavy Dividers ------------------------------ */
.aqua-wave-divider {
    position: relative;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.aqua-wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 4px);
    height: 60px;
}

.aqua-wave-divider .aqua-wave-back {
    fill: rgba(0, 180, 255, 0.10);
    animation: aqua-wave-scroll-slow 18s linear infinite;
}

.aqua-wave-divider .aqua-wave-front {
    fill: var(--aqua-deep);
    margin-top: -58px;
    animation: aqua-wave-scroll-fast 10s linear infinite reverse;
}

.aqua-wave-divider.aqua-wave-top .aqua-wave-front {
    fill: var(--aqua-deep);
}

@keyframes aqua-wave-scroll-slow {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes aqua-wave-scroll-fast {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Subtle animated cyan edge-glow + gradient wash for every <section> so
   panels read as glass tanks rather than flat rectangles. */
section {
    background-image: linear-gradient(180deg, rgba(0, 180, 255, 0.035) 0%, transparent 18%, transparent 82%, rgba(0, 180, 255, 0.035) 100%);
}

section::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 120px rgba(0, 180, 255, 0.05);
    opacity: 0.8;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    body, .aqua-caustics, .aqua-glow, .aqua-bubble, .aqua-particle,
    .aqua-fish, .aqua-ripple,
    .aqua-wave-divider .aqua-wave-back, .aqua-wave-divider .aqua-wave-front {
        animation: none !important;
    }
}

@media (max-width: 768px) {
    .aqua-glow-a, .aqua-glow-b { width: 60vw; height: 60vw; }
    .aqua-glow-c { display: none; }
    .aqua-ripple { display: none; }
}
