@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Brand -- vivid, premium violet/indigo palette */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);

    /* Backgrounds -- deep, not just flat black */
    --bg: #030305;
    --bg-subtle: #0a0a0c;
    --bg-card: rgba(20, 20, 25, 0.7);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(10, 10, 12, 0.6);

    /* Text */
    --text-main: #f8fafc;
    --text-muted: #a8b5c4;
    --text-dark: #64748b;

    /* Accents */
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;

    /* Structural */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-glow: 0 0 40px -10px var(--primary-glow);
    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);

    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    line-height: 1.5;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(30, 41, 59, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    background: linear-gradient(to bottom right, #fff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

section {
    padding: 6rem 0;
    position: relative;
}

/* --- Helper Classes --- */
.text-gradient {
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 10px;
    left: 10px;
}

/* --- Components: Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px -5px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -5px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Form Error Message */
.form-error {
    color: var(--accent-error);
    margin-top: 1rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
}

/* Form Disclaimer */
.form-disclaimer {
    font-size: 0.8rem;
    color: var(--text-dark);
    margin-top: 1rem;
    text-align: center;
}

.form-disclaimer a {
    color: var(--text-muted);
    text-decoration: underline;
}

.form-disclaimer a:hover {
    color: var(--text-main);
}

/* Early Bird Hook - High-Impact Styling */
.early-bird-hook {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    margin: 2rem auto 1.5rem;
    padding: 1rem 1.75rem;
    max-width: 540px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    animation: hook-glow 1.5s ease-in-out infinite alternate;
}

.early-bird-hook .hook-icon {
    color: var(--accent-success);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.early-bird-hook .hook-text {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.4;
}

.early-bird-hook .hook-text strong {
    color: var(--accent-success);
}

@keyframes hook-glow {
    0% {
        box-shadow: 0 0 20px -5px rgba(16, 185, 129, 0.3);
    }
    100% {
        box-shadow: 0 0 30px -5px rgba(16, 185, 129, 0.6);
    }
}

/* --- Components: Input --- */
.input-group {
    display: flex;
    gap: 0.75rem;
    max-width: 480px;
    margin: 2rem auto 0;
    position: relative;
}

input[type="email"] {
    flex: 1;
    background: rgba(20, 20, 25, 0.6);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-full);
    padding: 0 1.5rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(20, 20, 25, 0.9);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* --- Header --- */
header {
    padding: 1.5rem 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

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

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--text-main);
}

/* --- Hero Section --- */
.hero {
    padding-top: 10rem;
    padding-bottom: 6rem;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: #818cf8;
    margin-bottom: 2rem;
    backdrop-filter: blur(4px);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: #818cf8;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(129, 140, 248, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(129, 140, 248, 0);
    }
}

.hero-sub {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.25rem;
}

/* --- Feature Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-smooth);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-card);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--primary);
}

/* --- Code/API Preview --- */
.code-preview {
    margin-top: 5rem;
    background: #0d0d0f;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    transform: perspective(1000px) rotateX(1deg);
    transition: transform 0.5s ease;
}

.code-preview:hover {
    transform: perspective(1000px) rotateX(0deg);
}

.window-bar {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--bg-card-border);
}

.window-dots {
    display: flex;
    gap: 6px;
    margin-right: 1rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #10b981;
}

.url-bar {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 0.75rem;
    text-align: center;
}

.terminal-content {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #a5b4fc;
    overflow-x: auto;
}

.k {
    color: #818cf8;
}

/* keyword */
.s {
    color: #a5f3fc;
}

/* string */
.f {
    color: #94a3b8;
}

/* function */
.c {
    color: #52525b;
}

/* comment */
.n {
    color: #38bdf8;
}

/* number */

/* --- Ticker / Live Prices --- */
.ticker-wrap {
    overflow: hidden;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll 20s linear infinite;
}

.price-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bg-card-border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    white-space: nowrap;
}

.price-pill .name {
    color: var(--text-muted);
}

.price-pill .price {
    color: var(--text-main);
    font-weight: 600;
}

.price-pill .change.up {
    color: var(--accent-success);
}

.price-pill .change.down {
    color: var(--accent-error);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 0.75rem));
    }
}

/* --- Pricing --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s var(--ease-smooth);
    display: flex;
    flex-direction: column;
}

.price-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-card);
}

.price-card.popular {
    border-color: var(--primary);
    background: linear-gradient(to bottom, rgba(99, 102, 241, 0.05), var(--bg-card));
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.plan-period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 2.5rem;
    flex: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.feature-item.included {
    color: var(--text-main);
}

.check-icon {
    color: var(--accent-success);
    flex-shrink: 0;
}

/* Scroll indicator - hidden on desktop */
.scroll-indicator {
    display: none;
}

/* Code expand button - hidden on desktop */
.code-expand-btn {
    display: none;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--bg-card-border);
    padding: 4rem 0;
    margin-top: 6rem;
    text-align: center;
    color: var(--text-dark);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none;
    }

    .badge-dot {
        animation: none;
    }

    .btn,
    .feature-card,
    .price-card,
    .code-preview {
        transition: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
        gap: 1rem;
    }

    .input-group input[type="email"] {
        min-height: 56px;
        height: 56px;
        padding: 1rem 1.25rem;
        font-size: 1.1rem;
        border-radius: var(--radius-md);
        width: 100%;
    }

    .input-group .btn {
        min-height: 56px;
        height: 56px;
        border-radius: var(--radius-md);
        font-size: 1.1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    /* Collapsible code preview on mobile */
    .code-preview {
        margin: 2rem -1.5rem 0;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        transform: none;
    }

    .code-preview .terminal-content {
        max-height: 100px;
        overflow: hidden;
        position: relative;
        padding: 1rem;
        font-size: 0.8rem;
    }

    .code-preview .terminal-content::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40px;
        background: linear-gradient(transparent, #0d0d0f);
        pointer-events: none;
    }

    .code-preview.expanded .terminal-content {
        max-height: none;
    }

    .code-preview.expanded .terminal-content::after {
        display: none;
    }

    .code-expand-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.75rem;
        background: rgba(99, 102, 241, 0.1);
        border: none;
        border-top: 1px solid var(--bg-card-border);
        color: var(--primary);
        font-family: inherit;
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.2s;
    }

    .code-expand-btn:hover {
        background: rgba(99, 102, 241, 0.15);
    }

    .code-expand-btn svg {
        transition: transform 0.2s;
    }

    .code-preview.expanded .code-expand-btn svg {
        transform: rotate(180deg);
    }

    .main-nav {
        display: none;
    }

    /* Horizontal slider for feature cards */
    .features-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding: 1rem 0 1.5rem;
        margin: 2rem -1.5rem 0;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .features-grid::-webkit-scrollbar {
        display: none;
    }

    .features-grid .feature-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        min-width: 280px;
    }

    /* Horizontal slider for pricing cards */
    .pricing-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding: 1.5rem 0 1.5rem;
        margin: 2rem -1.5rem 0;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .pricing-grid::-webkit-scrollbar {
        display: none;
    }

    .pricing-grid .price-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        min-width: 280px;
    }

    /* Scroll hint indicator */
    .features-grid::after,
    .pricing-grid::after {
        content: '';
        flex: 0 0 1px;
    }

    /* Scroll indicator dots */
    .scroll-indicator {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .scroll-indicator .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--bg-card-border);
        transition: background 0.2s;
    }

    .scroll-indicator .dot.active {
        background: var(--primary);
    }
}

@media (max-width: 400px) {
    .nav-wrapper .btn-secondary {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .logo span {
        display: none;
    }
}

/* Privacy Policy Page */
.privacy-hero {
    padding-top: 6rem;
    padding-bottom: 2rem;
    text-align: center;
}

.privacy-header {
    max-width: 600px;
    margin: 0 auto;
}

.privacy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.privacy-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.privacy-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.privacy-updated {
    font-size: 0.875rem;
    color: var(--text-dark);
}

.privacy-body {
    padding-top: 2rem;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.privacy-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s var(--ease-smooth);
}

.privacy-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.privacy-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    color: var(--primary);
}

.privacy-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.privacy-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.privacy-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.privacy-card ul {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    padding-left: 1.25rem;
}

.privacy-card li {
    margin-bottom: 0.5rem;
}

.privacy-card a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s var(--ease-smooth);
}

.privacy-card a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.privacy-email a {
    font-size: 1.1rem;
    font-weight: 500;
}

.privacy-footer-note {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-card-border);
}

.privacy-footer-note p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.privacy-footer-note p:last-child {
    margin-bottom: 0;
}

.privacy-back {
    text-align: center;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .privacy-hero {
        padding-top: 4rem;
    }

    .privacy-header h1 {
        font-size: 2rem;
    }

    .privacy-subtitle {
        font-size: 1rem;
    }

    .privacy-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .privacy-card {
        padding: 1.25rem;
    }
}