/* ═══════════════════════════════════════════════
   shared.css  –  Design system for all nxlink pages
   ═══════════════════════════════════════════════ */

/* ── CSS Variables – Dark (default) ── */
:root,
[data-theme="dark"] {
    --primary-blue: #3b82f6;
    --primary-blue-hover: #2563eb;
    --teal-badge: #06b6d4;
    --card-bg: rgba(15, 23, 42, 0.75);
    --card-border: rgba(59, 130, 246, 0.15);
    --card-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
    --text-dark: #f1f5f9;
    --text-muted: #94a3b8;
    --text-heading: #ffffff;
    --nav-bg: rgba(8, 14, 31, 0.88);
    --nav-border: rgba(59, 130, 246, 0.12);
    --input-bg: rgba(30, 41, 59, 0.8);
    --input-border: rgba(100, 116, 139, 0.4);
    --input-text: #e2e8f0;
    --table-border: rgba(51, 65, 85, 0.5);
    --table-row-alt: rgba(30, 41, 59, 0.4);
    --footer-bg: rgba(5, 10, 25, 0.92);
    --footer-border: rgba(59, 130, 246, 0.1);
    --toggle-bg: rgba(30, 41, 59, 0.9);
    --mode-inactive-bg: rgba(30, 41, 59, 0.6);
    --mode-inactive-color: #3b82f6;
    --mode-inactive-border: rgba(59, 130, 246, 0.4);
    --bg-sphere1: rgba(59, 130, 246, 0.18);
    --bg-sphere2: rgba(139, 92, 246, 0.15);
    --bg-sphere3: rgba(6, 182, 212, 0.12);
}

/* ── CSS Variables – Light ── */
[data-theme="light"] {
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
    --teal-badge: #0891b2;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(37, 99, 235, 0.1);
    --card-shadow: 0 8px 40px rgba(37, 99, 235, 0.1);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-heading: #0f172a;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-border: rgba(148, 163, 184, 0.25);
    --input-bg: rgba(248, 250, 252, 0.9);
    --input-border: rgba(148, 163, 184, 0.5);
    --input-text: #1e293b;
    --table-border: rgba(226, 232, 240, 0.9);
    --table-row-alt: rgba(248, 250, 252, 0.6);
    --footer-bg: rgba(15, 23, 42, 0.97);
    --footer-border: rgba(255, 255, 255, 0.06);
    --toggle-bg: rgba(226, 232, 240, 0.9);
    --mode-inactive-bg: #ffffff;
    --mode-inactive-color: #2563eb;
    --mode-inactive-border: rgba(37, 99, 235, 0.4);
    --bg-sphere1: rgba(59, 130, 246, 0.1);
    --bg-sphere2: rgba(139, 92, 246, 0.08);
    --bg-sphere3: rgba(6, 182, 212, 0.07);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
::-webkit-scrollbar { display: none !important; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0; padding: 0;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: color 0.35s ease;
}
a { text-decoration: none; }

/* ── Animated Background ── */
.bg-canvas {
    position: fixed; inset: 0; z-index: -1;
    overflow: hidden; transition: background 0.5s ease;
}
[data-theme="dark"] .bg-canvas {
    background: radial-gradient(ellipse at 20% 20%, #0d1b3e 0%, #060b1a 50%, #050911 100%);
}
[data-theme="light"] .bg-canvas {
    background: radial-gradient(ellipse at 20% 20%, #e8f0fe 0%, #f0f4ff 50%, #ffffff 100%);
}
.bg-sphere {
    position: absolute; border-radius: 50%;
    filter: blur(80px);
    animation: floatSphere 14s ease-in-out infinite;
}
.bg-sphere-1 { width: 520px; height: 520px; background: var(--bg-sphere1); top: -120px; left: -120px; animation-delay: 0s; }
.bg-sphere-2 { width: 420px; height: 420px; background: var(--bg-sphere2); top: 40%; right: -100px; animation-delay: -5s; }
.bg-sphere-3 { width: 360px; height: 360px; background: var(--bg-sphere3); bottom: -80px; left: 30%; animation-delay: -9s; }
@keyframes floatSphere {
    0%, 100% { transform: translateY(0px) scale(1); }
    33%       { transform: translateY(-40px) scale(1.05); }
    66%       { transform: translateY(20px) scale(0.97); }
}
.bg-grid {
    position: absolute; inset: 0; opacity: 0.03;
    background-image:
        linear-gradient(rgba(255,255,255,0.8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.8) 1px, transparent 1px);
    background-size: 48px 48px;
}
[data-theme="light"] .bg-grid {
    opacity: 0.055;
    background-image:
        linear-gradient(rgba(0,0,0,0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.4) 1px, transparent 1px);
}

/* ── Navbar ── */
.nav-header {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.12);
    transition: background 0.35s ease, border-color 0.35s ease;
}
.brand-logo {
    display: flex; align-items: center; gap: 9px;
    font-weight: 800; font-size: 1.1rem;
    color: var(--text-heading); white-space: nowrap; flex-shrink: 0;
    transition: color 0.3s;
}
.brand-logo:hover { opacity: 0.88; }
.logo-icon {
    width: 30px; height: 30px; border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: white;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    flex-shrink: 0;
}
.home-link {
    text-decoration: none; color: var(--text-muted);
    font-size: 0.85rem; font-weight: 600;
    white-space: nowrap; flex-shrink: 0;
    margin-left: 16px; margin-right: auto;
    display: flex; align-items: center; gap: 5px;
    transition: color 0.2s;
}
.home-link:hover { color: var(--primary-blue); }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Theme Toggle */
.theme-toggle {
    background: var(--toggle-bg);
    border: 1px solid var(--input-border);
    border-radius: 50px;
    cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    font-size: 0.78rem; font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    transition: all 0.25s ease;
    white-space: nowrap; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.theme-toggle:hover { border-color: var(--primary-blue); color: var(--primary-blue); transform: scale(1.04); }
.theme-toggle .toggle-icon { font-size: 0.95rem; transition: transform 0.4s ease; }
.theme-toggle:hover .toggle-icon { transform: rotate(20deg); }

/* ── Page Hero ── */
.page-main {
    flex: 1;
    padding: 0 16px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.page-hero {
    text-align: center;
    padding: 60px 16px 48px;
    max-width: 680px;
    width: 100%;
    animation: heroIn 0.6s ease both;
}
@keyframes heroIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
    color: #60a5fa;
    font-size: 0.8rem; font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.04em;
}
.hero-title {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: 1rem; color: var(--text-muted);
    line-height: 1.7; margin-bottom: 0;
    font-weight: 400;
}
.last-updated {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 18px;
    font-size: 0.8rem; color: var(--text-muted);
    font-weight: 500;
}

/* ── Glass Card ── */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 36px 32px;
    width: 100%;
    max-width: 900px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    transition: background 0.35s ease, border-color 0.35s ease;
    animation: cardIn 0.5s ease both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (max-width:576px) { .glass-card { padding: 24px 18px; border-radius: 16px; } }

/* ── Section Title ── */
.section-title {
    font-size: 1.3rem; font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 28px; text-align: center;
    letter-spacing: -0.01em;
}

/* ══════════════════════
   ABOUT page
══════════════════════ */
.stats-strip {
    display: flex; align-items: center; flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    padding: 28px 20px;
    width: 100%; max-width: 720px;
    margin-bottom: 28px;
    box-shadow: var(--card-shadow);
}
.stat-item { text-align: center; padding: 0 32px; }
.stat-number {
    font-size: 1.8rem; font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.07em; }
.stat-divider { width: 1px; height: 48px; background: var(--table-border); }
@media (max-width:560px) {
    .stats-strip { flex-direction: column; gap: 20px; }
    .stat-divider { width: 48px; height: 1px; }
}

.content-section {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px; width: 100%; max-width: 900px; margin-bottom: 24px;
}
@media (max-width:600px) { .content-section { grid-template-columns: 1fr; } }

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 28px 24px;
    backdrop-filter: blur(14px);
    transition: border-color 0.2s, transform 0.2s;
    animation: cardIn 0.5s ease both;
}
.content-card:nth-child(2) { animation-delay: 0.1s; }
.content-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-3px); }
.card-icon-wrap {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: white;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.content-card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-heading); margin-bottom: 10px; }
.content-card-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; margin: 0; }

.info-section { max-width: 900px; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width:600px) { .steps-grid { grid-template-columns: 1fr; } }

.step-item { text-align: center; }
.step-num {
    font-size: 2rem; font-weight: 800;
    background: linear-gradient(135deg,#3b82f6,#8b5cf6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 10px;
}
.step-title { font-size: 0.95rem; font-weight: 700; color: var(--text-heading); margin-bottom: 8px; }
.step-desc { font-size: 0.84rem; color: var(--text-muted); line-height: 1.65; margin: 0; }

.values-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.value-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.18);
    color: var(--text-dark);
    font-size: 0.85rem; font-weight: 600;
    transition: all 0.2s;
}
.value-chip:hover { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.35); transform: translateY(-2px); }
.value-chip i { color: var(--primary-blue); }

/* ══════════════════════
   LEGAL pages (Terms / Privacy)
══════════════════════ */
.legal-container {
    max-width: 900px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 36px;
    align-items: start;
}
@media (max-width:720px) { .legal-container { grid-template-columns: 1fr; } }

.toc {
    position: sticky; top: 80px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 20px 18px;
    backdrop-filter: blur(10px);
}
@media (max-width:720px) { .toc { position: static; } }
.toc-title {
    font-size: 0.78rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.07em; margin-bottom: 12px;
    display: flex; align-items: center; gap: 6px;
}
.toc-list {
    margin: 0; padding-left: 18px;
    display: flex; flex-direction: column; gap: 7px;
}
.toc-list li a {
    font-size: 0.82rem; color: var(--text-muted);
    transition: color 0.2s;
}
.toc-list li a:hover { color: var(--primary-blue); }

.legal-body { min-width: 0; }
.legal-section { margin-bottom: 40px; }
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 {
    font-size: 1.1rem; font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--table-border);
    padding-bottom: 10px;
}
.section-num {
    font-size: 0.72rem; font-weight: 700;
    background: linear-gradient(135deg,#3b82f6,#8b5cf6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    letter-spacing: 0.05em;
}
.legal-section p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 12px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { color: var(--primary-blue); }
.legal-section a:hover { text-decoration: underline; }

.legal-list { padding-left: 20px; margin: 10px 0; }
.legal-list li { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.65; }
.legal-list li strong { color: var(--text-dark); }

.alert-box {
    border-radius: 10px; padding: 12px 16px;
    font-size: 0.85rem; font-weight: 500;
    display: flex; align-items: flex-start; gap: 10px;
    margin: 16px 0;
}
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); color: #f59e0b; }
.alert-info    { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); color: #60a5fa; }
.alert-box i { margin-top: 1px; flex-shrink: 0; }

/* Data table (Privacy) */
.data-table { border-radius: 10px; overflow: hidden; border: 1px solid var(--table-border); margin: 14px 0 16px; }
.dt-row { display: grid; grid-template-columns: 1fr 1.5fr 0.7fr; gap: 0; }
.dt-header { background: rgba(59,130,246,0.08); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.dt-row > div { padding: 10px 14px; border-bottom: 1px solid var(--table-border); font-size: 0.84rem; color: var(--text-dark); }
.dt-row:last-child > div { border-bottom: none; }
.dt-row:not(.dt-header):nth-child(even) > div { background: var(--table-row-alt); }
@media (max-width: 520px) { .dt-row { grid-template-columns: 1fr 1fr; } .dt-row > div:nth-child(3) { display: none; } }

.badge-yes { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.25); padding: 2px 8px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; }
.badge-no  { background: rgba(245,158,11,0.12);  color: #f59e0b; border: 1px solid rgba(245,158,11,0.25);  padding: 2px 8px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; }

/* Contact info box */
.contact-info-box {
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 10px; padding: 16px 18px;
    margin-top: 12px;
}
.ci-item { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 8px; }
.ci-item:last-child { margin-bottom: 0; }
.ci-item i { color: var(--primary-blue); }
.ci-item a { color: var(--primary-blue); }

/* Privacy Summary Cards */
.privacy-summary {
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 16px; width: 100%; max-width: 900px; margin-bottom: 28px;
}
@media (max-width: 720px) { .privacy-summary { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .privacy-summary { grid-template-columns: 1fr; } }

.summary-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px; padding: 22px 16px;
    text-align: center; backdrop-filter: blur(12px);
    transition: border-color 0.2s, transform 0.2s;
    animation: cardIn 0.5s ease both;
}
.summary-card:nth-child(2) { animation-delay: 0.07s; }
.summary-card:nth-child(3) { animation-delay: 0.14s; }
.summary-card:nth-child(4) { animation-delay: 0.21s; }
.summary-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-3px); }
.sc-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: white; margin: 0 auto 12px;
}
.sc-title { font-size: 0.88rem; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.sc-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.55; }

/* ══════════════════════
   FOOTER
══════════════════════ */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #94a3b8;
    padding: 40px 24px 28px;
    transition: background 0.35s ease;
}
.footer-inner { max-width: 960px; margin: 0 auto; }
.footer-top {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px; margin-bottom: 36px;
}
.footer-brand .brand-logo-footer {
    display: flex; align-items: center; gap: 9px;
    font-weight: 800; font-size: 1rem; color: #ffffff;
    margin-bottom: 12px; text-decoration: none;
}
.footer-brand .logo-icon-sm {
    width: 28px; height: 28px; border-radius: 7px;
    background: linear-gradient(135deg,#3b82f6,#8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: white; flex-shrink: 0;
}
.footer-brand p { font-size: 0.82rem; color: #64748b; line-height: 1.65; margin: 0; }
.footer-col h4 {
    font-size: 0.76rem; font-weight: 700; color: #e2e8f0;
    text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
    color: #64748b; font-size: 0.83rem; text-decoration: none;
    transition: color 0.2s; display: flex; align-items: center; gap: 6px;
}
.footer-col ul li a:hover { color: #3b82f6; }
.footer-divider { border: none; border-top: 1px solid var(--footer-border); margin: 0 0 20px; }
.footer-bottom {
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-bottom .copyright { font-size: 0.8rem; color: #475569; }
.footer-bottom .copyright a { color: #3b82f6; }
.footer-bottom .copyright a:hover { text-decoration: underline; }
.footer-badges { display: flex; gap: 8px; }
.footer-badge-pill {
    font-size: 0.72rem; font-weight: 700; padding: 3px 10px;
    border-radius: 50px; background: rgba(59,130,246,0.12);
    color: #60a5fa; border: 1px solid rgba(59,130,246,0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 576px) {
    .nav-header { padding: 10px 14px; gap: 8px; }
    .brand-logo { font-size: 0.9rem; }
    .home-link { margin-left: 8px; font-size: 0.8rem; }
    .theme-toggle .toggle-label { display: none; }
    .theme-toggle { padding: 6px 10px; }
    .page-hero { padding: 40px 12px 32px; }
    .footer-top { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
