/* ================================================================
   ExtremeTrades.ai — Landing Page
   ================================================================ */
:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d29;
    --bg-card: #222536;
    --bg-card-hover: #262a3d;
    --text-primary: #e4e6eb;
    --text-secondary: #8b8fa3;
    --text-muted: #5e6275;
    --accent: #4f7df9;
    --accent-hover: #3d6ae8;
    --accent-glow: rgba(79, 125, 249, 0.4);
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #2d3148;
    --border-light: #363b52;
    --gradient-hero: linear-gradient(135deg, #4f7df9 0%, #9333ea 50%, #22c55e 100%);
    --gradient-accent: linear-gradient(135deg, #4f7df9 0%, #7c3aed 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(79, 125, 249, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================================
   NAV
   ================================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15, 17, 23, 0.7);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.nav.scrolled {
    border-bottom-color: var(--border);
    background: rgba(15, 17, 23, 0.85);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gradient-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(79, 125, 249, 0.5);
}

.brand-logo svg { width: 18px; height: 18px; color: #fff; }

.brand-name {
    background: linear-gradient(135deg, #e4e6eb 0%, #8b8fa3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 14px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 125, 249, 0.4);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 125, 249, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-light);
}

.btn-lg {
    padding: 15px 32px;
    font-size: 1rem;
}

.btn-arrow {
    transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 1200px;
    background: radial-gradient(circle, rgba(79, 125, 249, 0.18) 0%, rgba(147, 51, 234, 0.08) 35%, transparent 65%);
    filter: blur(80px);
    animation: pulse 8s ease-in-out infinite alternate;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(79, 125, 249, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 125, 249, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center top, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center top, black 30%, transparent 70%);
}

@keyframes pulse {
    0% { transform: translateX(-50%) scale(1); opacity: 0.7; }
    100% { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(79, 125, 249, 0.1);
    border: 1px solid rgba(79, 125, 249, 0.25);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

h1.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    max-width: 900px;
    margin: 0 auto 20px;
    background: linear-gradient(180deg, #fff 0%, #a8acc1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title .gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hero-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 60px;
}

/* Hero product preview */
.hero-preview {
    max-width: 1000px;
    margin: 40px auto 0;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.preview-window {
    padding: 0;
}

.preview-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.preview-titlebar .dots {
    display: flex;
    gap: 6px;
}

.preview-titlebar .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.preview-titlebar .dot.r { background: #ef4444; }
.preview-titlebar .dot.y { background: #f59e0b; }
.preview-titlebar .dot.g { background: #22c55e; }

.preview-url {
    margin-left: 12px;
    padding: 4px 12px;
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', Menlo, monospace;
}

.preview-body {
    padding: 24px;
    background: var(--bg-primary);
    min-height: 360px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.preview-card {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: left;
}

.preview-card .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.preview-card .value {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'SF Mono', Menlo, monospace;
}

.preview-card .value.pos { color: var(--success); }
.preview-card .value.neg { color: var(--danger); }

.preview-chart {
    height: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.preview-chart svg { width: 100%; height: 100%; }

.chart-line {
    fill: none;
    stroke: var(--success);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.5));
}

.chart-area {
    fill: url(#chartGrad);
    opacity: 0.5;
}

/* ================================================================
   LOGO CLOUD / STATS
   ================================================================ */
.stats-section {
    padding: 20px 0 60px;
    border-bottom: 1px solid var(--border);
}

.stats-label {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 28px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-item .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ================================================================
   SECTION
   ================================================================ */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    font-weight: 600;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #fff 0%, #a8acc1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ================================================================
   FEATURES
   ================================================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 125, 249, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-md);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(79, 125, 249, 0.1);
    border: 1px solid rgba(79, 125, 249, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--accent);
}

.feature-card.variant-success .feature-icon {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.feature-card.variant-warning .feature-icon {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.feature-card.variant-danger .feature-icon {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.feature-desc {
    font-size: 0.93rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ================================================================
   HOW IT WORKS
   ================================================================ */
.steps-section {
    background: linear-gradient(180deg, transparent 0%, rgba(79, 125, 249, 0.03) 50%, transparent 100%);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
}

.step-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: relative;
    transition: transform 0.25s, border-color 0.25s;
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(79, 125, 249, 0.4);
}

.step-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Webhook example */
.webhook-example {
    max-width: 800px;
    margin: 48px auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.code-tab {
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-radius: 6px;
    font-family: 'SF Mono', Menlo, monospace;
}

.code-tab.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.code-block {
    padding: 20px 24px;
    font-family: 'SF Mono', Menlo, Monaco, monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-primary);
    overflow-x: auto;
}

.code-block .key { color: #7dd3fc; }
.code-block .str { color: #86efac; }
.code-block .var { color: #fbbf24; }
.code-block .comment { color: var(--text-muted); font-style: italic; }

/* ================================================================
   USE CASES
   ================================================================ */
.usecases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.usecase-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: border-color 0.25s, transform 0.25s;
}

.usecase-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.usecase-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--gradient-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 125, 249, 0.3);
}

.usecase-icon svg { width: 24px; height: 24px; }

.usecase-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.usecase-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ================================================================
   SECURITY
   ================================================================ */
.security-section {
    position: relative;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.security-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: transform 0.25s, border-color 0.25s;
}

.security-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-light);
}

.security-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    margin-bottom: 16px;
}

.security-icon svg { width: 26px; height: 26px; }

.security-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.security-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ================================================================
   FINAL CTA
   ================================================================ */
.final-cta {
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.final-cta-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 72px 40px;
    background:
        radial-gradient(circle at top, rgba(79, 125, 249, 0.15), transparent 70%),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.final-cta-inner::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.final-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #fff 0%, #a8acc1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.final-cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-primary); }

/* ================================================================
   SCROLL REVEAL
   ================================================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .security-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .preview-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .container { padding: 0 18px; }
    .hero { padding: 130px 0 60px; }
    .section { padding: 70px 0; }
    .final-cta { padding: 80px 0; }
    .final-cta-inner { padding: 52px 24px; }

    .features-grid { grid-template-columns: 1fr; }
    .usecases-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .security-grid { grid-template-columns: 1fr; gap: 14px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .nav-link.hide-sm { display: none; }

    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { width: 100%; }

    .footer-inner { flex-direction: column; text-align: center; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
