:root {
    --water-bg: #082130;
    --water-bg-mid: #0f3048;
    --water-surface: #ffffff;
    --water-border: #bad6e2;
    --water-ink-on-card: #0c2535;
    --water-ink-on-bg: #c5e3ef;
    --water-ink-soft: #8bbfd3;
    --water-accent: #0cbfbc;
    --water-accent-strong: #0899a0;
    --water-pipe-line: rgba(12, 191, 188, 0.12);
    --water-pipe-joint: rgba(12, 191, 188, 0.26);
    --water-nav-height: 56px;
    --water-footer-height: 44px;
}

/* ---------- BODY / BACKGROUND ---------- */
body {
    color: #1f2937;
    min-height: 100vh;
    background-color: var(--water-bg-mid);
    background-image:
        /* Pipe grid */
        linear-gradient(var(--water-pipe-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--water-pipe-line) 1px, transparent 1px),
        /* Depth gradient */
        linear-gradient(160deg, var(--water-bg) 0%, var(--water-bg-mid) 60%, #113d55 100%);
    background-size: 60px 60px, 60px 60px, 100% 100%;
    background-attachment: fixed;
}

/* ---------- NAVBAR ---------- */
.water-navbar {
    background: linear-gradient(90deg, #03111b 0%, #061926 55%, #082130 100%) !important;
    border-bottom: 1px solid rgba(12, 191, 188, 0.18);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.water-brand-badge {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    background: rgba(12, 191, 188, 0.18) !important;
    color: var(--water-accent) !important;
    border: 1px solid rgba(12, 191, 188, 0.32) !important;
}

/* ---------- FOOTER ---------- */
.fttx-footer {
    border-top: 1px solid rgba(12, 191, 188, 0.16);
    background: #03111b;
    color: var(--water-ink-soft);
}

.fttx-footer a {
    color: var(--water-ink-soft);
}

/* ---------- HOME FIXED VIEWPORT LAYOUT ---------- */
body[data-page="home"] {
    overflow-y: hidden;
    overflow-x: hidden;
}

body[data-page="home"] .home-main {
    margin-top: calc(var(--water-nav-height) - 24px);
    height: calc(100vh - var(--water-nav-height) - var(--water-footer-height));
    display: flex;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

body[data-page="home"] .water-home-wrap {
    min-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

body[data-page="home"] #demo-modules {
    margin-bottom: 0;
}

body[data-page="home"] .water-subsite-strip {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

body[data-page="home"] .fttx-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    min-height: var(--water-footer-height);
}

.navbar .nav-link.active {
    font-weight: 600;
}

/* ---------- HOME HERO ---------- */
.water-home-wrap {
    position: relative;
    color: var(--water-ink-on-bg);
}

.water-home-glow {
    position: absolute;
    inset: -1.5rem -1.5rem auto -1.5rem;
    height: 320px;
    background:
        radial-gradient(ellipse 75% 65% at 70% 35%, rgba(12, 191, 188, 0.22), transparent 70%),
        radial-gradient(ellipse 45% 70% at 5% 55%, rgba(14, 100, 190, 0.16), transparent 70%);
    border-radius: 1.2rem;
    pointer-events: none;
}

.water-hero-title {
    line-height: 1.02;
    max-width: 16ch;
    color: #ffffff;
}

.water-hero-body {
    color: var(--water-ink-on-bg);
}

.water-hero-actions {
    min-height: 52px;
}

.water-hint {
    color: var(--water-ink-soft);
}

/* ---------- LANGUAGE SELECTOR ---------- */
.water-lang-prefix {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--water-accent);
}

/* ---------- BADGES / PILLS ---------- */
.water-pill {
    background: rgba(12, 191, 188, 0.18);
    color: #0dd9d6;
    border: 1px solid rgba(12, 191, 188, 0.35);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.water-tag-fttx {
    background: rgba(255, 255, 255, 0.08);
    color: #a0c4d8;
    border: 1px solid rgba(160, 196, 216, 0.28);
}

.water-tag-wild {
    background: rgba(255, 255, 255, 0.08);
    color: #8fd4a0;
    border: 1px solid rgba(143, 212, 160, 0.28);
}

/* ---------- BUTTONS ---------- */
.btn-water {
    color: #fff;
    border-color: var(--water-accent);
    background: linear-gradient(135deg, var(--water-accent) 0%, #1189bf 100%);
}

.btn-water:hover,
.btn-water:focus {
    color: #fff;
    border-color: var(--water-accent-strong);
    background: linear-gradient(135deg, var(--water-accent-strong) 0%, #0d6fa3 100%);
}

/* ---------- CARDS ---------- */
.water-card-soft {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--water-border) !important;
    color: var(--water-ink-on-card);
}

.water-card-title {
    color: var(--water-ink-on-card);
}

.water-card-soft p,
.water-card-soft .small,
.water-card-soft .text-secondary,
.water-card-tile p,
.water-card-tile .small,
.water-card-tile .text-secondary {
    color: #324a5a !important;
}

.water-card-tile {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--water-border) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(12, 191, 188, 0.10);
    color: var(--water-ink-on-card);
    animation: none;
}

.water-photo-ready {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.water-photo-ready::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0.92) 100%);
    pointer-events: none;
}

.water-photo-ready .card-body {
    position: relative;
    z-index: 1;
}

.water-flow-1,
.water-flow-2,
.water-flow-3,
.water-flow-4 {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
}

.water-flow-1 { animation: waterFlowStep 0.9s 0.30s ease-out both; }
.water-flow-2 { animation: waterFlowStep 0.9s 1.10s ease-out both; }
.water-flow-3 { animation: waterFlowStep 0.9s 1.90s ease-out both; }
.water-flow-4 { animation: waterFlowStep 0.9s 2.70s ease-out both; }

@keyframes waterFlowStep {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
        box-shadow: 0 0 0 rgba(12, 191, 188, 0);
    }
    55% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(12, 191, 188, 0.10), 0 0 0 3px rgba(12, 191, 188, 0.08);
    }
}

@keyframes waterRise {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ---------- SCOPE ICONS ---------- */
.water-scope-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(12, 191, 188, 0.12);
    border: 1.5px solid rgba(12, 191, 188, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--water-accent-strong);
    flex-shrink: 0;
}

/* ---------- MODULE ICONS ---------- */
.water-module-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(12, 191, 188, 0.12);
    border: 1.5px solid rgba(12, 191, 188, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--water-accent-strong);
}

/* ---------- PIPE DIVIDER ---------- */
.water-pipe-divider {
    line-height: 0;
}

.water-pipe-divider svg {
    width: 100%;
    height: 24px;
    overflow: visible;
}

/* ---------- SUBSITE STRIP ---------- */
.water-subsite-strip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(12, 191, 188, 0.16);
    border-radius: 0.65rem;
}

@media (max-width: 991.98px) {
    :root {
        --water-footer-height: 42px;
    }

    .water-home-glow {
        height: 200px;
    }

    .water-hero-title {
        max-width: none;
    }
}

