/* ============================================
   AI Backtester — Website Styles
   (c) 2026 Abhi AlgoForge
   ============================================ */

:root {
    --primary: #ea580c;
    --primary-light: #f97316;
    --primary-dark: #c2410c;
    --primary-bg: rgba(234, 88, 12, 0.08);
    --text: #1a1a2e;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-login {
    background: var(--primary);
    color: white !important;
    border-radius: var(--radius);
    padding: 8px 20px;
}

.nav-login:hover {
    background: var(--primary-light) !important;
    color: white !important;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---- Hero ---- */
.hero {
    padding: 100px 0 80px;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
    overflow: hidden;
}

.hero-content-centered {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    color: var(--text);
}

.hero-tagline {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 600px;
    text-align: center;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    justify-content: center;
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Screenshot Carousel — Horizontal Row */
.carousel-row {
    position: relative;
    width: 100%;
    height: 480px;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.carousel-slide {
    position: absolute;
    width: 680px;
    transition: transform 1s cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
                filter 0.8s ease;
    cursor: pointer;
    will-change: transform, opacity;
}

/* Center — active slide */
.carousel-slide.active {
    transform: translateX(0) translateZ(0) scale(1);
    opacity: 1;
    z-index: 10;
}

/* Right side — adjacent only */
.carousel-slide.right-1 {
    transform: translateX(340px) translateZ(-180px) scale(0.52);
    opacity: 0.25;
    z-index: 5;
}

.carousel-slide.right-2 {
    transform: translateX(340px) translateZ(-250px) scale(0.4);
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}

/* Left side — adjacent, tucked behind */
.carousel-slide.left-1 {
    transform: translateX(-340px) translateZ(-180px) scale(0.52);
    opacity: 0.25;
    z-index: 5;
}

.carousel-slide.left-2 {
    transform: translateX(-340px) translateZ(-250px) scale(0.4);
    opacity: 0;
    z-index: 6;
    pointer-events: none;
}

/* Far away — hidden */
.carousel-slide.far-away {
    transform: translateX(0) translateZ(-300px) scale(0.5);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* Slide caption */
.slide-caption {
    text-align: center;
    margin-top: 16px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.carousel-slide.active .slide-caption {
    opacity: 1;
}

.screenshot-frame {
    background: #1e1e2e;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    width: 100%;
}

.screenshot-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #16161e;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28ca41; }

.screenshot-title {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-left: 8px;
}

.screenshot-img {
    width: 100%;
    display: block;
}

/* Carousel dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    z-index: 20;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.25);
}

.carousel-dot:hover {
    background: var(--primary-light);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-alt);
    border-color: var(--text-light);
}

.btn-disabled {
    background: var(--bg-alt);
    color: var(--text-light);
    cursor: not-allowed;
    border: 1px solid var(--border);
}

.btn-full {
    width: 100%;
}

/* ---- Section Headers ---- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ---- Features ---- */
.features {
    padding: 30px 0 100px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    margin-bottom: 16px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: 12px;
    color: var(--primary);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ---- How It Works ---- */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-alt);
}

.steps {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.step-content em {
    color: var(--text);
    font-style: italic;
}

/* ---- Pricing ---- */
.pricing {
    padding: 100px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    padding: 40px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.pricing-features {
    flex: 1;
}

.pricing-card .btn {
    margin-top: auto;
}

.pricing-card:hover {
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(234, 88, 12, 0.12);
    transform: scale(1.04);
}

.pricing-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 18px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.pricing-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.pricing-period {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 28px;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
}

.pricing-features li {
    padding: 10px 0;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    padding-left: 30px;
}

.pricing-features li.included {
    color: var(--text-secondary);
}

.pricing-features li.included::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
    font-size: 1rem;
}

.pricing-features li.excluded {
    color: #b0b0b0;
    text-decoration: line-through;
    text-decoration-color: #d4d4d4;
}

.pricing-features li.excluded::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: 700;
    font-size: 1rem;
}

.topup-info {
    text-align: center;
    margin-top: 32px;
    padding: 16px 24px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* ---- Download ---- */
.download {
    padding: 100px 0;
    background: var(--bg-alt);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.download-card {
    padding: 40px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.download-card.active {
    border-color: var(--primary);
}

.download-card.active:hover {
    box-shadow: var(--shadow-lg);
}

.download-card.disabled {
    opacity: 0.6;
}

.download-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text);
}

.download-card.disabled .download-icon {
    color: var(--text-light);
}

.download-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.download-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.download-size {
    display: block;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.system-requirements {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.system-requirements h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.system-requirements ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.system-requirements li {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---- About ---- */
.about {
    padding: 100px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-detail {
    padding: 24px;
    background: var(--bg-alt);
    border-radius: var(--radius);
}

.about-detail h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 8px;
}

.about-detail p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* ---- Legal ---- */
.legal {
    padding: 100px 0;
    background: var(--bg-alt);
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.legal-card h3 {
    padding: 24px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-alt);
}

.legal-text {
    padding: 32px;
    max-height: 400px;
    overflow-y: auto;
}

.legal-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-text ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    padding-left: 20px;
    margin-bottom: 16px;
}

/* ---- Footer ---- */
.footer {
    padding: 60px 0 32px;
    background: var(--text);
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer .logo {
    color: white;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    font-size: 0.9rem;
    color: #94a3b8;
    text-decoration: none;
    padding: 4px 0;
    transition: var(--transition);
}

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

.footer-bottom {
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-disclaimer {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #475569;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .hero h1 { font-size: 2.6rem; }
    .carousel-row { height: 380px; }
    .carousel-slide { width: 480px; }
    .carousel-slide.right-1 { transform: translateX(360px) translateZ(-120px) scale(0.6); opacity: 0.3; }
    .carousel-slide.left-1 { transform: translateX(-360px) translateZ(-120px) scale(0.6); opacity: 0.3; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-card.featured { transform: none; }
    .download-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .nav-links.open { display: flex; }
    .mobile-toggle { display: flex; }

    .hero { padding: 100px 0 60px; }
    .hero h1 { font-size: 2.1rem; }
    .hero-tagline { font-size: 1.2rem; }
    .hero-stats { gap: 24px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .carousel-row { height: 260px; }
    .carousel-slide { width: 320px; }
    .carousel-slide.right-1 { transform: translateX(250px) translateZ(-80px) scale(0.55); opacity: 0.25; }
    .carousel-slide.left-1 { transform: translateX(-250px) translateZ(-80px) scale(0.55); opacity: 0.25; }

    .features-grid,
    .pricing-grid,
    .download-grid { grid-template-columns: 1fr; }

    .about-content { grid-template-columns: 1fr; gap: 32px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    .section-header h2 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.7rem; }
    .hero-subtitle { font-size: 1rem; }
    .container { padding: 0 16px; }
}
