/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    /* ── Core colours ─────────────────────────────────── */
    --color-bg: #0a0a0f;
    --color-bg-secondary: #141419;
    --color-bg-tertiary: #1a1a24;
    --color-card: #141417;
    --color-surface: #0f0f11;
    --color-text: #e4e4e7;
    --color-text-muted: #a1a1aa;
    --color-primary: #8b5cf6;
    --color-primary-hover: #7c3aed;
    --color-accent: #06b6d4;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-border: #27272a;

    /* ── Typography ───────────────────────────────────── */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-xs:   0.72rem;
    --text-sm:   0.82rem;
    --text-base: 0.875rem;
    --text-md:   0.95rem;
    --text-lg:   1.05rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;

    /* ── Spacing scale ────────────────────────────────── */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* ── Border-radius scale ──────────────────────────── */
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* ── Gradient tokens ──────────────────────────────── */
    --gradient-brand: linear-gradient(135deg, #8b5cf6, #06b6d4);
    --gradient-brand-rev: linear-gradient(135deg, #06b6d4, #8b5cf6);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #7c3aed);

    /* ── Overlay / tint colours ───────────────────────── */
    --overlay-purple-xs:  rgba(139,92,246,0.05);
    --overlay-purple-sm:  rgba(139,92,246,0.08);
    --overlay-purple-md:  rgba(139,92,246,0.15);
    --overlay-purple-lg:  rgba(139,92,246,0.25);
    --overlay-cyan-sm:    rgba(6,182,212,0.08);
    --overlay-cyan-md:    rgba(6,182,212,0.12);
    --overlay-success-sm: rgba(16,185,129,0.08);
    --overlay-success-md: rgba(16,185,129,0.12);
    --overlay-warning-sm: rgba(245,158,11,0.08);
    --overlay-danger-sm:  rgba(239,68,68,0.08);
    --overlay-white-xs:   rgba(255,255,255,0.04);
    --overlay-white-sm:   rgba(255,255,255,0.08);

    /* ── Shadow tokens ────────────────────────────────── */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-colored: 0 4px 18px rgba(139,92,246,0.35);
    --shadow-colored-lg: 0 6px 28px rgba(139,92,246,0.45);
    --shadow-glow: 0 0 0 3px rgba(139,92,246,0.15);
    --shadow-dropdown: 0 24px 60px rgba(0,0,0,0.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    overflow-x: hidden;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

/* Smooth scroll — only for users who haven't opted out */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Push footer to bottom on all pages */
body > *:not(footer):not(nav):not(.navbar):not(.nav-overlay):not(.nav-drawer):not(script):not(style) {
    flex-shrink: 0;
}
footer.footer { margin-top: auto; }

/* ── Accessibility: skip-to-content ────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    padding: var(--space-2) var(--space-5);
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    text-decoration: none;
    z-index: 9999;
    transition: top 0.15s ease;
    white-space: nowrap;
}
.skip-link:focus { top: var(--space-2); }

/* ── Focus ring ─────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.container {
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   Navigation — Premium Redesign
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8, 8, 12, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-family: 'Sora', 'Inter', sans-serif;
    overflow: visible;
}

/* Top gradient accent line */
.nav-accent-line {
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #8b5cf6 25%,
        #06b6d4 50%,
        #22c55e 75%,
        transparent 100%
    );
    opacity: 0.75;
}

.nav-inner {
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 58px;
    overflow: visible;
}

/* ── Brand ──────────────────────────────────────────── */
.nav-brand { flex-shrink: 0; }

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: opacity 0.2s;
}
.logo-link:hover { opacity: 0.85; }

.logo-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.logo-mark svg { width: 100%; height: 100%; }

.logo-text-group {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}
.logo-text {
    font-family: 'Sora', sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: #f4f4f5;
    white-space: nowrap;
    letter-spacing: -0.02em;
}
.logo-tag {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.6;
}

/* ── Trademark superscript in logo ── */
.logo-tm {
    font-size: 0.65rem;
    color: #a1a1aa;
    font-weight: 400;
    vertical-align: super;
    margin-left: -2px;
    line-height: 1;
}
.footer-brand .logo-tm {
    font-size: 0.85rem;
    color: #71717a;
    vertical-align: super;
    margin-left: 1px;
}
.logo-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2.4;
    color: var(--color-primary);
    filter: drop-shadow(0 0 6px rgba(139,92,246,0.5));
}

/* ── Desktop nav menu ───────────────────────────────── */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.18s;
    white-space: nowrap;
    padding: 0.45rem 0.75rem;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Sora', 'Inter', sans-serif;
    letter-spacing: -0.01em;
}
.nav-link:hover,
.nav-link.active,
.nav-dropdown.open > .nav-link { color: #f4f4f5; background: rgba(255,255,255,0.05); }

/* ── Active page indicator (set via Jinja2 endpoint matching) ── */
.nav-link--active,
.nav-link--active:hover {
    color: #f4f4f5 !important;
    background: var(--overlay-purple-sm) !important;
    position: relative;
}
.nav-link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}
/* Active dropdown child */
.nav-dropdown-item--active {
    background: var(--overlay-purple-sm);
    color: #a78bfa !important;
}

/* ── Semantic nav link colour helpers ───────────────── */
.nav-link--signals   { color: #10b981; font-weight: 600; }
.nav-link--community { color: #06b6d4; font-weight: 600; }
.nav-link--ai        { color: #a78bfa; font-weight: 600; }
.nav-link--bold      { font-weight: 600; }

.nav-link-plain { padding: 0.45rem 0.75rem; }

/* ── Dropdown ───────────────────────────────────────── */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.dropdown-chevron {
    transition: transform 0.22s cubic-bezier(.4,0,.2,1);
    flex-shrink: 0;
    opacity: 0.6;
}
.nav-dropdown.open .dropdown-chevron,
.nav-dropdown:hover .dropdown-chevron { transform: rotate(180deg); opacity: 1; }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 230px;
    background: #0f0f14;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(139,92,246,0.08);
    z-index: 2000;
    animation: navDropIn 0.18s cubic-bezier(.4,0,.2,1);
}
.nav-dropdown.open > .nav-dropdown-menu,
.nav-dropdown:hover > .nav-dropdown-menu { display: flex; flex-direction: column; }

/* Markets mega dropdown: two columns */
.nav-dropdown-markets {
    min-width: 460px;
    flex-direction: row !important;
    gap: 0;
    padding: 0.5rem;
}
.dropdown-col { flex: 1; display: flex; flex-direction: column; gap: 1px; padding: 0.25rem; }
.dropdown-col-divider { width: 1px; background: rgba(255,255,255,0.06); margin: 0.5rem 0; }
.dropdown-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #52525b;
    padding: 0.4rem 0.6rem 0.25rem;
}

@keyframes navDropIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    border-radius: 9px;
    text-decoration: none;
    color: #a1a1aa;
    transition: background 0.14s, color 0.14s;
    font-size: 0.84rem;
}
.nav-dropdown-item:hover { background: rgba(255,255,255,0.05); color: #f4f4f5; }

.nav-dropdown-icon-wrap {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.icon-purple { background: rgba(139,92,246,0.15); color: #a78bfa; }
.icon-green  { background: rgba(34,197,94,0.12);  color: #4ade80; }
.icon-cyan   { background: rgba(6,182,212,0.12);  color: #22d3ee; }
.icon-amber  { background: rgba(245,158,11,0.12); color: #fbbf24; }
.icon-rose   { background: rgba(244,63,94,0.12);  color: #fb7185; }

.nav-dropdown-icon-wrap svg { width: 16px; height: 16px; }

.nav-dropdown-label { font-weight: 600; color: #e4e4e7; font-size: 0.84rem; line-height: 1.3; }
.nav-dropdown-desc  { font-size: 0.71rem; color: #71717a; margin-top: 1px; line-height: 1.3; }

/* ── Right side ─────────────────────────────────────── */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Market status widget */
.nav-market-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
}
.nav-ist-clock {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    color: #71717a;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.nav-session-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: all 0.3s;
}
.badge-open    { background: rgba(34,197,94,0.12);  color: #22c55e; }
.badge-preopen { background: rgba(245,158,11,0.12); color: #f59e0b; }
.badge-closed  { background: rgba(255,255,255,0.05); color: #52525b; }

.session-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.session-dot.open    { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.25); animation: dotPulse 1.5s infinite; }
.session-dot.preopen { background: #f59e0b; }
.session-dot.closed  { background: #52525b; }

@keyframes dotPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50%      { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

/* Auth buttons */
.nav-auth-group { display: flex; align-items: center; gap: 0.5rem; }

.nav-btn-ghost {
    font-family: 'Sora', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #d4d4d8;
    text-decoration: none;
    padding: 0.42rem 0.9rem;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    transition: all 0.18s;
    white-space: nowrap;
}
.nav-btn-ghost:hover { color: #f4f4f5; border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }

.nav-btn-primary {
    font-family: 'Sora', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    padding: 0.42rem 1.1rem;
    border-radius: 7px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: 1px solid rgba(139,92,246,0.6);
    transition: all 0.18s;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(139,92,246,0.35);
    letter-spacing: 0.01em;
}
.nav-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(139,92,246,0.5); }

.nav-avatar-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(6,182,212,0.2));
    border: 1.5px solid rgba(139,92,246,0.4);
    color: #e4e4e7;
    font-family: 'Sora', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.nav-avatar-btn:hover { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }

/* ── Hamburger ──────────────────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 8px;
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 1101;
    margin-left: auto;
    transition: border-color 0.2s;
}
.nav-hamburger:hover { border-color: rgba(139,92,246,0.5); }
.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #a1a1aa;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s, background 0.2s;
    transform-origin: center;
}
.nav-hamburger:hover span { background: #e4e4e7; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Overlay ─────────────────────────────────────────── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.nav-overlay.open {
    display: block;
    opacity: 1;
}

/* ── Mobile Drawer ───────────────────────────────────── */
.nav-drawer {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(300px, 85vw);
    background: #111118;
    border-left: 1px solid rgba(139,92,246,0.25);
    box-shadow: -8px 0 32px rgba(0,0,0,0.6);
    z-index: 1100;
    flex-direction: column;
    padding: 0 0 2rem;
    gap: 0;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
@media (max-width: 768px) {
    .nav-drawer {
        display: flex;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
    }
    .nav-drawer.open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 0.5rem;
}
.drawer-ist {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: #52525b;
}

.drawer-item {
    display: block;
    padding: 0.7rem 1.25rem;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    font-family: 'Sora', sans-serif;
}
.drawer-item:hover, .drawer-item.active {
    background: rgba(139,92,246,0.08);
    color: #e4e4e7;
}
.drawer-item.drawer-child {
    font-size: 0.84rem;
    padding-left: 2.25rem;
    color: #71717a;
}
.drawer-item.drawer-child:hover { color: #a1a1aa; }

.drawer-group { border-bottom: 1px solid rgba(255,255,255,0.04); }
.drawer-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.25rem;
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Sora', 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.drawer-group-toggle:hover { background: rgba(255,255,255,0.03); color: #e4e4e7; }
.drawer-chevron { transition: transform 0.2s; flex-shrink: 0; opacity: 0.5; }
.drawer-group.open .drawer-chevron { transform: rotate(180deg); opacity: 1; }
.drawer-group-items { display: none; }
.drawer-group.open .drawer-group-items { display: block; }

.drawer-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1.25rem;
}
.drawer-auth .btn { text-align: center; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .nav-market-status { display: none; }
}

@media (max-width: 768px) {
    .nav-inner { padding: 0 1rem; flex-wrap: nowrap !important; flex-direction: row !important; }
    .nav-menu    { display: none !important; }
    .nav-right   { display: none !important; width: 0 !important; overflow: hidden !important; }
    .nav-market-status { display: none !important; }
    .nav-hamburger { display: flex !important; margin-left: auto; }
}

@media (max-width: 380px) {
    .logo-text { font-size: 0.9rem; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); opacity: 0.92; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}
.btn-outline:hover { background: var(--color-bg-secondary); border-color: var(--color-primary); }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; min-height: 48px; }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; min-height: 34px; }
.btn-full { width: 100%; }

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(139,92,246,0.15) 0%, transparent 70%);
}
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 4rem 1rem;
    width: 100%;
}
.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(139,92,246,0.1);
    border: 1px solid var(--color-primary);
    border-radius: 2rem;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}
.hero-title {
    font-size: clamp(1.9rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Features Section
   ============================================ */
.features-section { padding: 5rem 0; background-color: var(--color-bg-secondary); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 700; margin-bottom: 1rem; }
.section-description { font-size: 1.05rem; color: var(--color-text-muted); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.2s;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--color-primary); box-shadow: var(--shadow-xl); }
.feature-icon { width: 2.75rem; height: 2.75rem; margin-bottom: 1.25rem; }
.feature-icon svg { width: 100%; height: 100%; color: var(--color-primary); }
.feature-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.6rem; }
.feature-description { color: var(--color-text-muted); line-height: 1.6; font-size: 0.95rem; }

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works-section { padding: 5rem 0; }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.step-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.75rem;
    text-align: center;
}
.step-number {
    font-size: 2.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}
.step-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.6rem; }
.step-description { color: var(--color-text-muted); line-height: 1.6; font-size: 0.9rem; }

/* ============================================
   Tech Stack Section
   ============================================ */
.tech-stack-section { padding: 5rem 0; background-color: var(--color-bg-secondary); }
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.875rem;
    margin-top: 2.5rem;
}
.tech-badge {
    padding: 0.65rem 1.25rem;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 2rem;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   Footer
   ============================================ */
.footer { padding: 2.5rem 0; border-top: 1px solid var(--color-border); }

/* Single centered column — no more nested footer-container / footer-content */
.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-brand .logo-icon { width: 24px; height: 24px; color: var(--color-primary); }
.footer-brand .logo-text { font-size: 1rem; font-weight: 700; }

.footer-nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    padding: 0;
    margin: 0;
    justify-content: center;
}
.footer-nav-links li { display: inline; }
.footer-nav-links a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}
.footer-nav-links a:hover { color: var(--color-text); text-decoration: underline; }

.footer-disclaimer {
    font-size: 0.75rem;
    color: #6b7280;
    max-width: 640px;
    line-height: 1.6;
    margin: 0;
}

.footer-text { color: var(--color-text-muted); font-size: 0.85rem; margin: 0; }
/* ── Footer social links ── */
.footer-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.85rem;
    border-radius: 20px;
    border: 1px solid #27272a;
    color: #71717a;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    white-space: nowrap;
}
.footer-social-link:hover         { border-color: #52525b; color: #e4e4e7; background: #18181b; }
.footer-social-link svg            { flex-shrink: 0; }
.footer-social-link[aria-label="LinkedIn"]:hover  { border-color: #0077b5; color: #0a9fde; }
.footer-social-link[aria-label="Instagram"]:hover { border-color: #e1306c; color: #f56040; }
.footer-social-link[aria-label="X (Twitter)"]:hover { border-color: #e4e4e7; color: #e4e4e7; }

/* ── Footer SEBI notice ── */
.footer-sebi {
    font-size: 0.7rem;
    color: #52525b;
    text-align: center;
    margin: 0;
    padding: 0.4rem 0.6rem;
    border: 1px solid #27272a;
    border-radius: 6px;
    max-width: 640px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .footer-social { gap: 0.5rem; }
    .footer-social-link span { display: none; }
    .footer-social-link { padding: 0.45rem 0.55rem; border-radius: 50%; }
}


/* ============================================
   Chart Container
   ============================================ */
.chart-container {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.chart-title { font-size: 1.25rem; font-weight: 600; }
.chart-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chart-canvas { width: 100%; height: 400px; }

/* ============================================
   Form Elements
   ============================================ */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--color-text); }
.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s;
    -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ============================================
   Alerts & Messages
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid var(--color-success); color: var(--color-success); }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid var(--color-warning); color: var(--color-warning); }
.alert-danger  { background: rgba(239,68,68,0.1);  border: 1px solid var(--color-danger);  color: var(--color-danger); }

/* ============================================
   Contact Page
   ============================================ */
.contact-page { min-height: calc(100vh - 80px); padding: 4rem 0; }
.contact-header { text-align: center; margin-bottom: 3rem; }
.page-title { font-size: clamp(2rem, 5vw, 4rem); font-weight: 700; margin-bottom: 1rem; }
.page-description { font-size: 1.05rem; color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }
.contact-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    overflow: hidden;
}
.card-header { padding: 1.75rem; border-bottom: 1px solid var(--color-border); }
.card-title { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.4rem; }
.card-description { color: var(--color-text-muted); font-size: 0.95rem; }
.card-content { padding: 1.75rem; }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-input.error, .form-textarea.error { border-color: var(--color-danger); }
.error-message { display: block; color: var(--color-danger); font-size: 0.85rem; margin-top: 0.25rem; }
.success-alert {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(16,185,129,0.1); border: 1px solid var(--color-success);
    border-radius: 0.75rem; margin-bottom: 1.5rem;
}
.alert-icon { flex-shrink: 0; width: 1.75rem; height: 1.75rem; display: flex; align-items: center; }
.alert-icon svg { width: 100%; height: 100%; color: var(--color-success); }
.alert-content { flex: 1; }
.alert-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--color-success); }
.alert-description { color: var(--color-text-muted); font-size: 0.95rem; }

/* ============================================
   Demo Page
   ============================================ */
.demo-container { min-height: calc(100vh - 80px); padding: 3rem 0; }
.demo-header { text-align: center; margin-bottom: 2rem; }
.demo-title { font-size: clamp(2rem, 5vw, 4rem); font-weight: 700; margin-bottom: 1rem; }
.demo-description { font-size: 1.05rem; color: var(--color-text-muted); max-width: 700px; margin: 0 auto; }
.demo-notice {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(6,182,212,0.1); border: 1px solid var(--color-accent);
    border-radius: 0.75rem; margin-bottom: 2rem; color: var(--color-text);
}
.demo-notice svg { width: 1.4rem; height: 1.4rem; color: var(--color-accent); flex-shrink: 0; }
.demo-controls { display: flex; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; align-items: center; }
.demo-cta {
    margin-top: 3.5rem; padding: 2.5rem;
    background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(6,182,212,0.1) 100%);
    border: 1px solid var(--color-border); border-radius: 1rem; text-align: center;
}
.cta-content { max-width: 600px; margin: 0 auto; }
.cta-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 1rem; }
.cta-description { font-size: 1.05rem; color: var(--color-text-muted); margin-bottom: 1.75rem; }
.cta-buttons { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; }

/* ============================================
   Pattern Matching
   ============================================ */
.pattern-row td { padding: 12px 14px; border-bottom: 1px solid #27272a; }
.pattern-row:last-child td { border-bottom: none; }
.label { color: #a1a1aa; text-align: left; font-weight: 500; width: 50%; }
.value { color: #e4e4e7; text-align: right; font-weight: 600; }
.pattern-row:hover td { background: rgba(255,255,255,0.02); }
.loginBtn { display: block !important; visibility: visible !important; opacity: 1 !important; min-height: 44px !important; }

/* ============================================
   RESPONSIVE — Tablet (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .nav-menu { gap: 1.1rem; }
}

/* ============================================
   RESPONSIVE — Mobile (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }

    /* Nav */
    .nav-menu    { display: none; }
    .nav-actions { display: none; }
    .nav-hamburger { display: flex; }

    /* Hero */
    .hero-section { min-height: 80vh; }
    .hero-content { padding: 2.5rem 0.5rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-cta .btn { width: 100%; max-width: 320px; }

    /* Grids */
    .features-grid { grid-template-columns: 1fr; }
    .steps-grid    { grid-template-columns: 1fr; }

    /* Chart */
    .chart-canvas { height: clamp(250px, 50vh, 400px); }

    /* Footer (auth pages) */
    .footer-content { flex-direction: column; text-align: center; }
    .footer-nav-links { gap: 0.35rem 0.85rem; }

    /* Contact */
    .contact-page { padding: 2rem 0; }
    .card-header, .card-content { padding: 1.25rem; }

    /* Demo */
    .demo-container { padding: 2rem 0; }
    .demo-controls { flex-direction: column; width: 100%; }
    .control-select, .timeframe-toggle, .demo-controls .btn { width: 100%; }
    .demo-cta { padding: 2rem 1.25rem; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .cta-buttons .btn { width: 100%; max-width: 320px; }

    /* Navbar */
    .navbar { padding: 0.65rem 0; }
    .logo-text { font-size: 1rem; }

    /* Hero */
    .hero-section { min-height: auto; padding: 3rem 0 2rem; }
}

/* ============================================
   RESPONSIVE — Small Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .steps-grid { grid-template-columns: 1fr; }
    .tech-badge { font-size: 0.82rem; padding: 0.5rem 1rem; }

    /* Prevent sticky hover states on touch devices */
    .feature-card:hover { transform: none; }
    .btn-primary:hover  { transform: none; }
}
/* Footer is handled by footer.css (linked via _navbar.html) */

/* ============================================
   HOMEPAGE ADDITIONS — Hero Social Proof, Value Strip,
   Pattern Showcase, Comparison, Testimonials, CTA
   ============================================ */

/* Hero social proof */
.hero-social-proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #9ca3af);
    justify-content: center;
}
.proof-item { color: var(--text-secondary, #9ca3af); }
.proof-divider { color: var(--border-color, #2d2d3a); }

/* Value strip */
.value-strip-section {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color, #1e1e2e);
    border-bottom: 1px solid var(--border-color, #1e1e2e);
    background: rgba(255,255,255,0.015);
}
.value-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.value-strip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 2.5rem;
}
.value-number {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.value-label {
    font-size: 0.78rem;
    color: var(--text-secondary, #9ca3af);
    margin-top: 0.2rem;
    text-align: center;
}
.value-strip-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color, #2d2d3a);
}
@media (max-width: 600px) {
    .value-strip { gap: 0; }
    .value-strip-item { padding: 0.6rem 1.2rem; }
    .value-strip-divider { display: none; }
}

/* Pattern showcase */
.pattern-showcase-section {
    padding: 5rem 0;
    background: rgba(139, 92, 246, 0.02);
}
.pattern-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.pattern-category {
    background: var(--card-bg, #13131a);
    border: 1px solid var(--border-color, #1e1e2e);
    border-radius: 16px;
    padding: 1.5rem;
}
.bullish-category { border-left: 3px solid #22c55e; }
.bearish-category { border-left: 3px solid #ef4444; }
.neutral-category { border-left: 3px solid #f59e0b; }
.category-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.category-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bullish-dot { background: #22c55e; }
.bearish-dot { background: #ef4444; }
.neutral-dot { background: #f59e0b; }
.category-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    margin: 0;
}
.pattern-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.pattern-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color, #2d2d3a);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-secondary, #9ca3af);
    text-decoration: none;
    transition: all 0.15s ease;
}
.pattern-tag:hover {
    border-color: #8b5cf6;
    color: #c4b5fd;
    background: rgba(139,92,246,0.08);
}
.pattern-more {
    background: rgba(139,92,246,0.08);
    border-color: rgba(139,92,246,0.3);
    color: #a78bfa;
}

/* Comparison table */
.comparison-section {
    padding: 5rem 0;
}
.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color, #1e1e2e);
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.comparison-table th, .comparison-table td {
    padding: 0.9rem 1.2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color, #1e1e2e);
    color: var(--text-secondary, #9ca3af);
}
.comparison-table th {
    font-weight: 600;
    background: rgba(255,255,255,0.02);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.comparison-table td:first-child,
.comparison-table th:first-child {
    text-align: left;
    color: var(--text-primary, #e2e8f0);
    font-weight: 500;
}
.comparison-table .highlight-col {
    background: rgba(139,92,246,0.05);
    color: #a78bfa;
    font-weight: 600;
    border-left: 1px solid rgba(139,92,246,0.2);
    border-right: 1px solid rgba(139,92,246,0.2);
}
.comparison-table th.highlight-col {
    background: rgba(139,92,246,0.12);
    color: #c4b5fd;
}
.comparison-table tr:last-child td { border-bottom: none; }

/* Testimonials */
.testimonials-section {
    padding: 5rem 0;
    background: rgba(6,182,212,0.02);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial-card {
    background: var(--card-bg, #13131a);
    border: 1px solid var(--border-color, #1e1e2e);
    border-radius: 16px;
    padding: 1.5rem;
}
.testimonial-stars { color: #f59e0b; font-size: 0.9rem; margin-bottom: 0.8rem; }
.testimonial-text {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary, #9ca3af);
    margin-bottom: 1rem;
    font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 0.7rem; }
.testimonial-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.testimonial-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary, #e2e8f0); }
.testimonial-role { font-size: 0.75rem; color: var(--text-secondary, #6b7280); }

/* Home CTA section */
.home-cta-section {
    padding: 5rem 0 6rem;
}
.home-cta-box {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(6,182,212,0.04));
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 24px;
    padding: 3rem 2rem;
}
.home-cta-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}
.home-cta-desc {
    color: var(--text-secondary, #9ca3af);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}