/* ============================================================
   NextStepApi — Global Design System
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    --primary:        #0F4C75;
    --primary-light:  #1B6CA8;
    --accent:         #00B4D8;
    --accent-light:   #90E0EF;
    --accent-dark:    #0096C7;
    --success:        #06D6A0;
    --warning:        #F77F00;
    --danger:         #F72585;
    --purple:         #9B5DE5;

    --text-primary:   #0D1B2A;
    --text-secondary: #4A5568;
    --text-muted:     #718096;
    --text-white:     #FFFFFF;

    --bg-white:       #FFFFFF;
    --bg-light:       #F0F7FA;
    --bg-card:        #FFFFFF;
    --bg-footer:      #0A1628;
    --bg-hero:        linear-gradient(135deg, #0F4C75 0%, #1B6CA8 50%, #00B4D8 100%);

    --border-color:   #E2EBF0;
    --border-radius:  12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 32px;

    --shadow-sm:   0 2px 8px rgba(15,76,117,0.08);
    --shadow-md:   0 4px 20px rgba(15,76,117,0.12);
    --shadow-lg:   0 8px 40px rgba(15,76,117,0.16);
    --shadow-glow: 0 0 30px rgba(0,180,216,0.3);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading:  'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

    --navbar-height: 72px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-white);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; padding: 0; margin: 0; }

/* ── Page Loader ────────────────────────────────────────────── */
#page-loader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-footer);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.loader-ring {
    width: 56px; height: 56px;
    border: 3px solid rgba(0,180,216,0.2);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
}

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

/* ── Navbar ─────────────────────────────────────────────────── */
.nsa-navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--navbar-height);
    background: transparent;
    transition: var(--transition);
}

.nsa-navbar.scrolled {
    background: rgba(10, 22, 40, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,180,216,0.15);
    box-shadow: var(--shadow-md);
}

.nsa-navbar.light {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--navbar-height);
}

.nav-logo {
    display: flex; align-items: center; gap: 10px;
}

.logo-img { height: 36px; width: auto; object-fit: contain; }

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
}

.logo-text.dark { color: var(--text-primary); }
.logo-accent { color: var(--accent); }

.nav-links {
    display: flex; align-items: center; gap: 4px;
    list-style: none; padding: 0; margin: 0;
}

.nav-links .nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-links .nav-link:hover,
.nav-links .nav-link.active {
    color: var(--text-white);
    background: rgba(0,180,216,0.15);
}

.nav-links .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 16px; height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* Light navbar link overrides */
.nsa-navbar.light .nav-links .nav-link { color: var(--text-secondary); }
.nsa-navbar.light .nav-links .nav-link:hover,
.nsa-navbar.light .nav-links .nav-link.active { color: var(--primary); background: rgba(15,76,117,0.08); }
.nsa-navbar.light .logo-text { color: var(--text-primary); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

.btn-login {
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    transition: var(--transition);
}
.btn-login:hover { background: rgba(255,255,255,0.1); color: #fff; }

.nsa-navbar.light .btn-login { color: var(--primary); border-color: var(--border-color); }
.nsa-navbar.light .btn-login:hover { background: var(--bg-light); }

.btn-signup {
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    border-radius: 8px;
    transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 15px rgba(0,180,216,0.3);
}
.btn-signup:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,180,216,0.4); color: #fff; }
.btn-signup i { font-size: 0.75rem; transition: transform 0.3s; }
.btn-signup:hover i { transform: translateX(3px); }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text-white);
    border-radius: 2px;
    transition: var(--transition);
}
.nsa-navbar.light .nav-hamburger span { background: var(--text-primary); }

/* Mobile menu */
.mobile-menu {
    display: none;
    background: rgba(10,22,40,0.98);
    backdrop-filter: blur(20px);
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(0,180,216,0.15);
}
.mobile-menu.open { display: block; }
.mobile-menu ul li a {
    display: block;
    padding: 12px 0;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.2s;
}
.mobile-menu ul li a:hover { color: var(--accent); }
.mobile-cta { margin-top: 16px; }

/* ── Section Utilities ──────────────────────────────────────── */
.section-label {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0,180,216,0.1);
    color: var(--accent-dark);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    border: 1px solid rgba(0,180,216,0.2);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Gradient Text ──────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-nsa-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0,180,216,0.3);
    white-space: nowrap;
}
.btn-nsa-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,180,216,0.4); color: #fff; }
.btn-nsa-primary:active { transform: translateY(0); }

.btn-nsa-outline {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-nsa-outline:hover { background: var(--primary); color: white; transform: translateY(-2px); }

.btn-nsa-light {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px;
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}
.btn-nsa-light:hover { background: rgba(255,255,255,0.25); color: white; transform: translateY(-2px); }

/* ── Cards ──────────────────────────────────────────────────── */
.nsa-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.nsa-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0,180,216,0.3);
}
.nsa-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.nsa-card:hover::before { transform: scaleX(1); }

/* ── Icon Box ────────────────────────────────────────────────── */
.icon-box {
    width: 56px; height: 56px;
    border-radius: var(--border-radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.icon-box-lg {
    width: 72px; height: 72px;
    border-radius: var(--border-radius-lg);
    font-size: 1.75rem;
}

/* ── Badges ─────────────────────────────────────────────────── */
.nsa-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 100px;
    letter-spacing: 0.03em;
}

/* ── Animations ─────────────────────────────────────────────── */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.float-anim { animation: float 4s ease-in-out infinite; }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,180,216,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(0,180,216,0); }
}
.pulse-glow { animation: pulse-glow 2s infinite; }

/* ── Footer ─────────────────────────────────────────────────── */
.nsa-footer {
    position: relative;
    margin-top: 80px;
}

.footer-wave {
    margin-bottom: -2px;
}
.footer-wave svg { width: 100%; height: auto; display: block; }

.footer-body {
    background: var(--bg-footer);
    padding: 60px 0 0;
}

.footer-logo {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
}

.footer-desc {
    color: rgba(255,255,255,0.55);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-heading {
    color: var(--text-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.footer-links li a {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    transition: color 0.2s;
    display: block;
    padding: 4px 0;
}
.footer-links li a:hover { color: var(--accent); }

.footer-socials { display: flex; gap: 8px; }

.social-btn {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.6);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    font-size: 0.875rem;
    border: 1px solid rgba(255,255,255,0.1);
}
.social-btn:hover { background: var(--accent); color: white; border-color: transparent; transform: translateY(-2px); }

.footer-newsletter {
    display: flex;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    overflow: hidden;
}
.footer-newsletter input {
    flex: 1;
    background: rgba(255,255,255,0.07);
    border: none; outline: none;
    padding: 10px 14px;
    color: white;
    font-size: 0.8rem;
    font-family: var(--font-body);
}
.footer-newsletter input::placeholder { color: rgba(255,255,255,0.35); }
.footer-newsletter button {
    padding: 10px 14px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.footer-newsletter button:hover { background: var(--accent-dark); }

.footer-badges { display: flex; flex-direction: column; gap: 6px; }
.badge-item {
    color: rgba(255,255,255,0.45);
    font-size: 0.75rem;
    display: flex; align-items: center; gap: 6px;
}
.badge-item i { color: var(--success); }

.footer-divider {
    border-color: rgba(255,255,255,0.08);
    margin: 40px 0 20px;
}

.footer-bottom {
    padding-bottom: 28px;
    display: flex; align-items: center; justify-content: space-between;
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
    flex-wrap: wrap; gap: 8px;
}

/* ── Scroll to Top ──────────────────────────────────────────── */
.scroll-top {
    position: fixed;
    bottom: 28px; right: 28px;
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 999;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ── Code Block ─────────────────────────────────────────────── */
.code-block {
    background: #0D1B2A;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,180,216,0.15);
    overflow: hidden;
}
.code-block-header {
    padding: 12px 16px;
    background: rgba(0,180,216,0.08);
    border-bottom: 1px solid rgba(0,180,216,0.15);
    display: flex; align-items: center; justify-content: space-between;
}
.code-block-title { color: var(--accent); font-size: 0.8rem; font-weight: 700; font-family: monospace; }
.code-dots { display: flex; gap: 5px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #FF5F57; }
.code-dots span:nth-child(2) { background: #FEBC2E; }
.code-dots span:nth-child(3) { background: #28C840; }
.code-block pre {
    padding: 20px;
    color: #90E0EF;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}

/* ── Stat Box ────────────────────────────────────────────────── */
.stat-box { text-align: center; }
.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.stat-label { color: var(--text-secondary); font-size: 0.875rem; margin-top: 4px; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.nsa-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.nsa-breadcrumb a { color: var(--accent-dark); font-weight: 500; }
.nsa-breadcrumb a:hover { text-decoration: underline; }
.nsa-breadcrumb span { color: var(--text-muted); }
.nsa-breadcrumb .current { color: var(--text-primary); font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .nav-links, .nav-cta { display: none; }
    .nav-hamburger { display: flex; }
    .logo-text { font-size: 1rem; }
}

@media (max-width: 575.98px) {
    :root { --navbar-height: 64px; }
    .section-title { font-size: 1.6rem; }
    .btn-nsa-primary, .btn-nsa-outline, .btn-nsa-light { padding: 12px 22px; font-size: 0.875rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .scroll-top { bottom: 16px; right: 16px; }
}