/* css/global.css */

/* Core Variables & Tokens */
:root {
    --bg-dark: #000000;
    --color-charcoal: #0A0A0A;
    --color-cyan: #00F2FF;
    --color-purple: #8A2BE2;
    --color-grey: #A1A1A1;
    --color-amber: #FF9900;
    --font-headers: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* General Reset & Layout */
html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 75px 0 0 0; /* Dock offset for persistent header */
    font-family: var(--font-body);
    color: #ffffff;
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
}

/* High-Performance Canvas for Cosmic Starfield */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headers);
    margin: 0;
}

/* Glowing text effect for H1 */
.glow-text {
    background: linear-gradient(135deg, #ffffff 0%, var(--color-grey) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.15);
}

/* Premium Glassmorphic Container */
.glass-container {
    background: linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.7)) padding-box,
                linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(138, 43, 226, 0.2)) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.85), 
                inset 0 1px 0 rgba(255, 255, 255, 0.05),
                0 0 40px rgba(0, 242, 255, 0.06),
                0 0 40px rgba(138, 43, 226, 0.06);
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* Utility Hidden State */
.hidden {
    display: none !important;
}

/* Entry animations (replaces the old animate.css CDN dependency) */
.fade-in-up {
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

.fade-in {
    animation: fadeIn 0.6s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 28px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .fade-in {
        animation: none;
    }
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.02) 25%, 
        rgba(0, 242, 255, 0.08) 50%, 
        rgba(255,255,255,0.02) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 6px;
    color: transparent !important;
    text-shadow: none !important;
    min-width: 140px;
    display: inline-block;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   BUTTONS SYSTEM (Google Stitch Premium Redesign)
   ========================================================================== */

/* Button Action Row Container */
.action-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-shrink: 0;
    margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   1. PRIMARY ACTION (Neon Cyan with Pulse Glow & Digital Block Glitch Loop)
   -------------------------------------------------------------------------- */
.btn-stitch-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-cyan) !important;
    text-decoration: none;
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-headers);
    font-weight: 800;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.01);
    border: 2px solid var(--color-cyan);
    z-index: 2;
    cursor: pointer;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-sizing: border-box;
    transition: color 250ms linear, 
                border-color 300ms linear, 
                box-shadow 300ms ease, 
                transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base interactive text arrows */
.btn-stitch-primary .arrow {
    margin-left: 0.6rem;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-stitch-primary .arrow-left {
    margin-right: 0.6rem;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-stitch-primary:hover {
    color: #0A0A0A !important;
    border-color: var(--color-cyan);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5),
                0 0 10px rgba(0, 242, 255, 0.3);
    transform: translateY(-1.5px);
}

.btn-stitch-primary:hover .arrow {
    transform: translateX(6px);
}

.btn-stitch-primary:hover .arrow-left {
    transform: translateX(-6px);
}

/* Liquid fill - base leading wave */
.btn-stitch-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -15%; width: 130%; height: 100%;
    background: linear-gradient(90deg, #00d2ff, var(--color-cyan));
    z-index: -1;
    transform: skewX(-20deg) scaleX(0);
    transform-origin: left;
    transition: transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 4px;
}

/* Liquid fill - secondary trailing dynamic wave */
.btn-stitch-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -15%; width: 130%; height: 100%;
    background: rgba(255, 255, 255, 0.15);
    z-index: -1;
    transform: skewX(-20deg) scaleX(0);
    transform-origin: left;
    transition: transform 250ms cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-delay: 50ms;
    border-radius: 4px;
}

.btn-stitch-primary:hover::before,
.btn-stitch-primary:hover::after {
    transform: skewX(-20deg) scaleX(1.15);
}


/* --------------------------------------------------------------------------
   2. SECONDARY ACTION (Outline Capsule with Double-Layered Liquid Fill)
   -------------------------------------------------------------------------- */
.btn-stitch-secondary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-purple) !important;
    text-decoration: none;
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-headers);
    font-weight: 800;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.01);
    border: 2px solid var(--color-purple);
    z-index: 2;
    cursor: pointer;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-sizing: border-box;
    transition: color 250ms linear, 
                border-color 300ms linear, 
                box-shadow 300ms ease, 
                transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-stitch-secondary .arrow-left {
    margin-right: 0.6rem;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Liquid fill - base leading wave */
.btn-stitch-secondary::before {
    content: '';
    position: absolute;
    top: 0; left: -15%; width: 130%; height: 100%;
    background: linear-gradient(90deg, #8A2BE2, #a855f7);
    z-index: -1;
    transform: skewX(-20deg) scaleX(0);
    transform-origin: left;
    transition: transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 4px;
}

/* Liquid fill - secondary trailing dynamic wave */
.btn-stitch-secondary::after {
    content: '';
    position: absolute;
    top: 0; left: -15%; width: 130%; height: 100%;
    background: rgba(255, 255, 255, 0.12);
    z-index: -1;
    transform: skewX(-20deg) scaleX(0);
    transform-origin: left;
    transition: transform 250ms cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-delay: 50ms;
    border-radius: 4px;
}

.btn-stitch-secondary:hover {
    color: #ffffff !important;
    border-color: #a855f7;
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.5), 
                0 0 10px rgba(138, 43, 226, 0.3);
    transform: translateY(-1.5px);
}

.btn-stitch-secondary:hover::before,
.btn-stitch-secondary:hover::after {
    transform: skewX(-20deg) scaleX(1.15);
}

.btn-stitch-secondary:hover .arrow-left {
    transform: translateX(-6px);
}

/* --------------------------------------------------------------------------
   3. CYBER BUTTON (Chamfered Corner Octagon with Scanning Stripe)
   -------------------------------------------------------------------------- */
.btn-stitch-cyber {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-amber) !important;
    text-decoration: none;
    padding: 1.1rem 2.5rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.08em;
    background: transparent;
    cursor: pointer;
    z-index: 2;
    overflow: hidden;
    box-sizing: border-box;
    text-transform: uppercase;
    transition: color 300ms ease, 
                text-shadow 300ms ease, 
                transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Perfect cyber octagon clipping shape */
    clip-path: polygon(
        12px 0%, 
        calc(100% - 12px) 0%, 
        100% 12px, 
        100% calc(100% - 12px), 
        calc(100% - 12px) 100%, 
        12px 100%, 
        0% calc(100% - 12px), 
        0% 12px
    );
}

/* Double layered background borders */
.btn-stitch-cyber::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-amber);
    z-index: -2;
    clip-path: inherit;
    transition: background 300ms ease;
}

.btn-stitch-cyber::after {
    content: '';
    position: absolute;
    top: 1.5px; left: 1.5px; right: 1.5px; bottom: 1.5px;
    background: #0A0A0A;
    z-index: -1;
    clip-path: polygon(
        11px 0%, 
        calc(100% - 11px) 0%, 
        100% 11px, 
        100% calc(100% - 11px), 
        calc(100% - 11px) 100%, 
        11px 100%, 
        0% calc(100% - 11px), 
        0% 11px
    );
    transition: background 300ms ease;
}

/* Linear laser scan sweep */
.cyber-scan {
    position: absolute;
    top: 0;
    left: -20px;
    width: 6px;
    height: 100%;
    background: var(--color-amber);
    box-shadow: 0 0 15px var(--color-amber), 
                0 0 5px var(--color-amber);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.btn-stitch-cyber:hover {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.7);
    transform: translateY(-1.5px);
}

.btn-stitch-cyber:hover::after {
    background: rgba(255, 153, 0, 0.04);
}

.btn-stitch-cyber:hover .cyber-scan {
    opacity: 0.9;
    animation: cyber-scan-loop 800ms linear infinite;
}

@keyframes cyber-scan-loop {
    0% {
        left: -10%;
    }
    100% {
        left: 110%;
    }
}

/* --------------------------------------------------------------------------
   4. LOADING STATE (Outline Capsule with Flowing Data Progress Stream)
   -------------------------------------------------------------------------- */
.btn-stitch-loading {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-cyan) !important;
    border: 2px solid var(--color-cyan);
    background: transparent;
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-headers);
    font-weight: 800;
    cursor: wait;
    overflow: hidden;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.05rem;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.btn-stitch-loading::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; bottom: 4px;
    width: 65%; /* Representing standard loading progress bar scale */
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.3), var(--color-cyan));
    border-radius: 50px;
    box-shadow: 0 0 10px var(--color-cyan);
    animation: loading-bar-stream 1.5s infinite linear;
}

@keyframes loading-bar-stream {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(180%);
    }
}

/* --------------------------------------------------------------------------
   5. SUCCESS STATE (Green Outline with Cubic-Bezier Expanding Ripple Rings)
   -------------------------------------------------------------------------- */
.btn-stitch-success {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4ade80 !important; /* Premium Emerald/Mint Success green */
    border: 2px solid #4ade80;
    background: rgba(74, 222, 128, 0.03);
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-headers);
    font-weight: 800;
    font-size: 1.05rem;
    overflow: hidden;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: border-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 300ms cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-stitch-success::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    background: transparent;
    border: 2px solid rgba(74, 222, 128, 0.75);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    pointer-events: none;
}

.btn-stitch-success:hover {
    border-color: #22c55e;
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.4),
                0 0 10px rgba(74, 222, 128, 0.2);
    transform: translateY(-1px);
}

.btn-stitch-success:hover::before {
    animation: success-ripple 1s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

@keyframes success-ripple {
    0% {
        width: 10px; height: 10px;
        border-width: 6px;
        opacity: 1;
    }
    100% {
        width: 250px; height: 250px;
        border-width: 1px;
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   GLOBAL CARDS SYSTEM (Google Stitch Premium Matching Cards)
   -------------------------------------------------------------------------- */
.stitch-card {
    background: rgba(10, 10, 10, 0.45);
    border-radius: 20px;
    padding: 1.25rem 2.5rem; /* Reduced premium card padding top/bottom */
    margin-bottom: 1.25rem; /* Reduced premium card gaps */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.02);
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                background 0.3s ease;
    position: relative;
}

.stitch-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 242, 255, 0.25);
    box-shadow: 0 15px 35px rgba(0, 242, 255, 0.06),
                0 0 15px rgba(0, 242, 255, 0.02);
    background: rgba(15, 15, 15, 0.65);
}

/* Card typography & layouts */
.stitch-card .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.stitch-card .card-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.stitch-card h2 {
    font-family: var(--font-headers);
    font-size: 1.45rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.stitch-card .card-text {
    font-size: 0.98rem;
    line-height: 1.7;
    color: #cccccc;
    margin: 0 0 1.25rem 0;
}

/* Highlight state for Double NAT warning alert */
.stitch-card.double-nat-pulse {
    border-color: rgba(255, 153, 0, 0.4) !important;
    background: rgba(255, 153, 0, 0.03) !important;
    animation: doubleNatCardPulse 2s ease-in-out infinite alternate !important;
}

.stitch-card.double-nat-pulse:hover {
    background: rgba(255, 153, 0, 0.06) !important;
}

@keyframes doubleNatCardPulse {
    0% {
        border-color: rgba(255, 153, 0, 0.25);
        box-shadow: 0 0 15px rgba(255, 153, 0, 0.05);
    }
    100% {
        border-color: var(--color-amber);
        box-shadow: 0 0 35px rgba(255, 153, 0, 0.25);
    }
}

/* Footer Style */
footer {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: #555555;
    z-index: 10;
    box-sizing: border-box;
}

footer .brand-text {
    color: #888888;
    font-weight: 600;
    font-family: var(--font-headers);
    transition: color 0.3s ease;
}

footer:hover .brand-text {
    color: var(--color-cyan);
}

/* ==========================================================================
   PERSISTENT HEADER (Google Stitch Inspired Branding & Navigation)
   ========================================================================== */
.stitch-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(5, 5, 5, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6),
                0 0 30px rgba(0, 242, 255, 0.02);
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.85rem;
    transition: transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.header-logo-link:hover {
    transform: translateY(-1px);
}

.header-logo-svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 6px rgba(0, 242, 255, 0.5));
    transition: filter 300ms ease;
}

.header-logo-link:hover .header-logo-svg {
    filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.8));
}

.header-title {
    font-family: var(--font-headers);
    display: flex;
    align-items: center;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.header-title .brand-name {
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    transition: text-shadow 300ms ease;
}

.header-title .brand-suffix {
    font-weight: 500;
    color: var(--color-cyan);
    text-shadow: 0 0 12px rgba(0, 242, 255, 0.4);
    transition: text-shadow 300ms ease;
}

.header-logo-link:hover .brand-name {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.header-logo-link:hover .brand-suffix {
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.7);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-headers);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-grey);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color 250ms linear, text-shadow 250ms ease;
}

/* Sliding active indicator underline */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-cyan), var(--color-purple));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.5);
}

.nav-link:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Active Link State */
.nav-link.active {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.nav-link.active::after {
    transform: scaleX(1);
    background: var(--color-cyan);
    box-shadow: 0 0 10px var(--color-cyan);
}

/* Navigation display settings */
.mobile-nav {
    display: none;
}
.desktop-nav {
    display: inline;
}

/* Responsive Header */
@media (max-width: 768px) {
    .mobile-nav {
        display: inline;
    }
    .desktop-nav {
        display: none;
    }
    .stitch-header {
        padding: 0 1.5rem;
        height: 65px;
    }
    body {
        padding: 85px 0.5rem 1.5rem 0.5rem;
        align-items: center;
    }
    .header-logo-svg {
        width: 32px;
        height: 32px;
    }
    .header-title {
        font-size: 1.1rem;
    }
    .header-right {
        gap: 1rem;
    }
    .nav-link {
        font-size: 0.75rem;
        letter-spacing: 0.04em;
    }
}

@media (max-width: 480px) {
    .stitch-header {
        padding: 0 0.85rem;
    }
    .header-logo-link {
        gap: 0.5rem;
    }
    .header-logo-svg {
        width: 28px;
        height: 28px;
    }
    .header-title {
        font-size: 1rem;
    }
    .header-right {
        gap: 0.55rem;
    }
    .nav-link {
        font-size: 0.68rem;
        letter-spacing: 0.02em;
    }
}
