/* =========================================================
   nat-security.css
   Full-screen "NAT Security Assistant" visual deterrent
   overlay. Shown once per browsing session before the main
   site fades in. Same dark-ocean / cyan-glass language as
   the rest of the site (see water-orb.css, style.css).

   NOTE: this is a VISUAL DETERRENT ONLY, not a real CAPTCHA.
   See nat-security.js for the swappable verifyVisitor() hook
   that can later call Cloudflare Turnstile instead.
   ========================================================= */

.nsc-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000; /* above chatbot (9999), preloader/menus (10000-ish) and everything else */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.nsc-overlay[hidden] {
    display: none !important;
}

/* ---------- Backdrop: dark underwater gradient + bubbles ---------- */

.nsc-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 15%, rgba(0, 200, 255, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(0, 140, 220, 0.14) 0%, transparent 50%),
        linear-gradient(180deg, #01111f 0%, #041c30 45%, #06263f 100%);
    overflow: hidden;
}

.nsc-backdrop::before {
    /* slow drifting light-shaft, same "water-light" feel as the hero section */
    content: "";
    position: absolute;
    inset: -20%;
    background: conic-gradient(from 200deg at 50% 0%, transparent 0deg, rgba(103, 232, 249, 0.06) 40deg, transparent 90deg);
    animation: nsc-light-drift 14s linear infinite;
}

.nsc-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.nsc-bubble {
    position: absolute;
    bottom: -10%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.5), rgba(103, 232, 249, 0.08) 70%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: nsc-bubble-rise linear infinite;
    opacity: 0.55;
}

.nsc-bubble.b1 { left: 8%;  width: 14px; height: 14px; animation-duration: 9s;  animation-delay: 0s; }
.nsc-bubble.b2 { left: 22%; width: 8px;  height: 8px;  animation-duration: 7s;  animation-delay: 1.2s; }
.nsc-bubble.b3 { left: 40%; width: 18px; height: 18px; animation-duration: 11s; animation-delay: 0.4s; }
.nsc-bubble.b4 { left: 58%; width: 10px; height: 10px; animation-duration: 8s;  animation-delay: 2.4s; }
.nsc-bubble.b5 { left: 74%; width: 16px; height: 16px; animation-duration: 10s; animation-delay: 0.8s; }
.nsc-bubble.b6 { left: 88%; width: 9px;  height: 9px;  animation-duration: 7.5s; animation-delay: 1.8s; }

@keyframes nsc-bubble-rise {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    8%   { opacity: 0.55; }
    100% { transform: translateY(-115vh) translateX(12px); opacity: 0; }
}

@keyframes nsc-light-drift {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------- Glass panel ---------- */

.nsc-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(8, 28, 46, 0.62);
    border: 1px solid rgba(103, 232, 249, 0.28);
    border-radius: 22px;
    padding: 28px 26px 24px;
    text-align: center;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 30px 70px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(0, 180, 255, 0.16);
    animation: nsc-panel-in 0.55s cubic-bezier(.2, .9, .3, 1.1) both;
}

@keyframes nsc-panel-in {
    0%   { opacity: 0; transform: translateY(18px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.nsc-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.nsc-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 6px;
}

.nsc-brand-text {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #9fe4f7;
    opacity: 0.85;
}

.nsc-heading {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #fff;
    margin-bottom: 14px;
}

/* ---------- Mascot ---------- */

.nsc-mascot-wrap {
    position: relative;
    width: 132px;
    height: 132px;
    margin: 0 auto 14px;
}

.nsc-mascot-glow {
    position: absolute;
    inset: -14%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103, 232, 249, 0.35) 0%, transparent 68%);
    filter: blur(2px);
    animation: nsc-glow-pulse 3.2s ease-in-out infinite;
}

@keyframes nsc-glow-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 0.9;  transform: scale(1.06); }
}

.nsc-mascot {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    animation: nsc-mascot-bob 3.6s ease-in-out infinite;
    transform-origin: 50% 85%;
}

@keyframes nsc-mascot-bob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-4px) rotate(-1deg); }
}

.nsc-mascot .nsc-eye-blink {
    animation: nsc-blink 4.4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes nsc-blink {
    0%, 92%, 100% { transform: scaleY(1); }
    95%           { transform: scaleY(0.08); }
}

/* success state swaps expression */
.nsc-mascot[data-state="success"] .nsc-face-idle { opacity: 0; }
.nsc-mascot[data-state="success"] .nsc-face-happy { opacity: 1; }
.nsc-mascot .nsc-face-happy { opacity: 0; transition: opacity 0.25s ease; }
.nsc-mascot .nsc-face-idle { transition: opacity 0.25s ease; }

.nsc-speech {
    font-size: 1rem;
    font-weight: 700;
    color: #eafcff;
    margin: 0 0 6px;
}

.nsc-subtext {
    font-size: 0.86rem;
    color: #a9d6e8;
    line-height: 1.5;
    margin: 0 0 20px;
}

/* ---------- Button ---------- */

.nsc-verify-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #04202f;
    background: linear-gradient(135deg, #67e8f9, #22c1e8 55%, #0891b2);
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(6, 182, 212, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.nsc-verify-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(6, 182, 212, 0.45);
}

.nsc-verify-btn:active:not(:disabled) {
    transform: translateY(0);
}

.nsc-verify-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.nsc-verify-btn:disabled {
    cursor: progress;
    opacity: 0.75;
}

.nsc-btn-icon {
    font-size: 1rem;
}

.nsc-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(4, 32, 47, 0.35);
    border-top-color: #04202f;
    animation: nsc-spin 0.7s linear infinite;
    display: none;
}

.nsc-verify-btn[data-busy="true"] .nsc-spinner { display: inline-block; }
.nsc-verify-btn[data-busy="true"] .nsc-btn-icon,
.nsc-verify-btn[data-busy="true"] .nsc-btn-label { display: none; }

@keyframes nsc-spin {
    to { transform: rotate(360deg); }
}

.nsc-fineprint {
    margin: 12px 0 0;
    font-size: 0.72rem;
    color: #6ea3bd;
}

/* ---------- Success state ---------- */

.nsc-success {
    animation: nsc-fade-in 0.35s ease both;
}

@keyframes nsc-fade-in {
    0%   { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.nsc-success-check {
    width: 46px;
    height: 46px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.16);
    border: 1px solid rgba(74, 222, 128, 0.5);
    color: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
}

.nsc-success p {
    margin: 0 0 4px;
    color: #eafcff;
    font-weight: 700;
}

.nsc-success .nsc-welcome {
    color: #9fe4f7;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Overlay fade-out on close */
.nsc-overlay[data-closing="true"] {
    animation: nsc-overlay-out 0.5s ease both;
}

@keyframes nsc-overlay-out {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* Respect reduced-motion preference: keep the gate functional,
   drop the decorative animation only. */
@media (prefers-reduced-motion: reduce) {
    .nsc-backdrop::before,
    .nsc-bubble,
    .nsc-mascot,
    .nsc-mascot-glow,
    .nsc-panel,
    .nsc-overlay[data-closing="true"],
    .nsc-eye-blink {
        animation: none !important;
    }
}

@media (max-width: 480px) {
    .nsc-panel { padding: 24px 18px 20px; border-radius: 18px; }
    .nsc-mascot-wrap { width: 108px; height: 108px; }
}
