/**
 * Tygash Landing Page — impeccable.style design system
 * Dark mode default, light mode via body.landing-light
 * Overrides Bootstrap 5.3 with impeccable.style tokens
 */

/* ── Bootstrap Overrides (Dark Mode Default) ──────────────────────── */

/* Reset & Base */
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* ── Navigation ───────────────────────────────────────────────────── */
.navbar {
    backdrop-filter: blur(12px);
    background: rgba(12, 10, 8, 0.92) !important;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: none;
    transition: box-shadow var(--duration-state) var(--ease-default);
    padding: 0.75rem 0;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent) !important;
    letter-spacing: -0.01em;
}

.navbar-brand i {
    color: var(--accent) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: var(--text-sm);
    margin: 0 0.25rem;
    color: var(--gray-400) !important;
    padding: 10px 16px;
    border-radius: var(--radius);
    transition: color var(--duration-state) var(--ease-default),
                background var(--duration-state) var(--ease-default);
}

.navbar-nav .nav-link:hover {
    transform: none;
    color: var(--white) !important;
    background: var(--dark-light);
}

.navbar .btn-outline-light {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gray-300) !important;
    font-size: 0.8125rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all var(--duration-state) var(--ease-default);
}

.navbar .btn-outline-light:hover {
    background: var(--dark-light);
    color: var(--white) !important;
    border-color: var(--gray-500);
}

.navbar .btn-light {
    background: var(--accent);
    border: none;
    color: #faf9f7 !important;
    font-size: 0.8125rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all var(--duration-state) var(--ease-default);
}

.navbar .btn-light:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.25);
}

.navbar-toggler {
    border-color: var(--border);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%239c9690' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Hero Section ─────────────────────────────────────────────────── */
.hero-section {
    background: var(--bg-primary);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 600px;
    background: radial-gradient(ellipse at top center, rgba(249, 115, 22, 0.06) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    color: var(--text-primary);
    font-size: var(--text-3xl);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.text-gradient {
    color: var(--accent);
    font-weight: 700;
}

.hero-content .lead {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.hero-stats .stat-item {
    padding: 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.hero-stats h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--accent) !important;
    font-weight: 700;
}

.hero-stats small {
    color: var(--text-muted) !important;
    font-size: 0.75rem;
}

.hero-actions .btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 9999px;
    transition: all var(--duration-state) var(--ease-default);
    font-size: var(--text-sm);
}

.hero-actions .btn-primary,
.hero-actions .btn-lg.btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #faf9f7 !important;
}

.hero-actions .btn-primary:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.hero-actions .btn-outline-primary {
    background: transparent !important;
    border: 1px solid var(--border) !important;
    color: var(--gray-300) !important;
}

.hero-actions .btn-outline-primary:hover {
    background: var(--dark-light) !important;
    color: var(--white) !important;
    border-color: var(--gray-500) !important;
}

.hero-badges .badge {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    margin-right: 0.375rem;
    margin-bottom: 0.375rem;
    font-weight: 500;
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border);
}

.hero-badges .badge-accent {
    background: var(--accent-subtle) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Code Example / Dashboard Preview */
.hero-image {
    position: relative;
    z-index: 2;
}

.browser-mockup {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow var(--duration-state) var(--ease-default);
}

.browser-mockup:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.browser-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.browser-buttons {
    display: flex;
    gap: 0.375rem;
    margin-right: 0.75rem;
}

.btn-close-mockup,
.btn-minimize-mockup,
.btn-maximize-mockup {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.btn-close-mockup { background: var(--error); }
.btn-minimize-mockup { background: var(--warning); }
.btn-maximize-mockup { background: var(--success); }

.browser-url {
    background: var(--bg-primary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.75rem;
    flex: 1;
    border: 1px solid var(--border-subtle);
}

.browser-content {
    background: var(--dark);
    position: relative;
    padding: 1.25rem;
}

.browser-content pre {
    margin: 0;
    color: var(--gray-300);
    font-size: 0.8125rem;
    line-height: 1.6;
    font-family: var(--font-mono);
    white-space: pre;
    overflow-x: auto;
}

.browser-content .code-keyword { color: var(--accent); }
.browser-content .code-string { color: #86EFAC; }
.browser-content .code-flag { color: #93C5FD; }
.browser-content .code-url { color: #FCA5A5; }
.browser-content .code-comment { color: var(--gray-500); font-style: italic; }

/* ── Features Section ─────────────────────────────────────────────── */
.features-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.features-section h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.features-section .lead {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    transition: border-color var(--duration-state) var(--ease-default);
    border: 1px solid var(--border);
}

.feature-card:hover {
    border-color: var(--accent);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-subtle);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.125rem;
    color: var(--accent);
}

.feature-card h4 {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

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

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 0.75rem;
}

.feature-list li {
    padding: 0.1875rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.feature-list li::before {
    content: '\2713';
    color: var(--accent);
    font-weight: 600;
    margin-right: 0.5rem;
}

/* ── Code Example / API Section ───────────────────────────────────── */
.pricing-section {
    padding: 4rem 0;
    background: var(--bg-secondary) !important;
}

.pricing-section h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.pricing-section .lead {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ── Pricing Section ──────────────────────────────────────────────── */
#pricing {
    background: var(--bg-primary);
}

.pricing-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--duration-state) var(--ease-default);
    height: 100%;
    border: 1px solid var(--border);
}

.pricing-card:hover {
    border-color: var(--accent);
}

.pricing-card.featured {
    border: 2px solid var(--accent);
    position: relative;
}

.pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #faf9f7;
    padding: 0.375rem 1.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    letter-spacing: 0.03em;
}

.pricing-header {
    padding: 1.5rem 1.5rem 0.75rem;
    text-align: center;
    position: relative;
}

.pricing-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pricing-body {
    padding: 0 1.5rem 1.5rem;
}

.price-display {
    text-align: center;
    margin-bottom: 0.75rem;
}

.price-display .currency {
    font-size: 1.25rem;
    vertical-align: top;
    color: var(--text-muted);
}

.price-display .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.price-display .period {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.pricing-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
}

.pricing-features li {
    padding: 0.375rem 0;
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.pricing-features li i {
    margin-right: 0.625rem;
    font-size: 1rem;
}

.pricing-features li i.text-success,
.pricing-features li .fa-circle-check {
    color: var(--accent) !important;
}

.pricing-features li i.text-muted,
.pricing-features li .fa-circle-minus {
    color: var(--text-muted) !important;
}

.pricing-cta {
    margin-top: 1.25rem;
    text-align: center;
}

.pricing-cta .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #faf9f7;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all var(--duration-state) var(--ease-default);
}

.pricing-cta .btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.25);
}

.pricing-cta .btn-outline-primary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gray-300);
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all var(--duration-state) var(--ease-default);
}

.pricing-cta .btn-outline-primary:hover {
    background: var(--dark-light);
    border-color: var(--gray-500);
    color: var(--white);
}

/* ── Comparison Table ─────────────────────────────────────────────── */
.comparison-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.comparison-section h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.comparison-section .lead {
    color: var(--text-secondary);
}

.comparison-table {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.table {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.table thead th {
    background: var(--dark-medium);
    color: var(--white);
    font-weight: 600;
    border: none;
    padding: 1rem;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: var(--border);
    font-size: 0.8125rem;
    background: var(--bg-secondary);
}

.table tbody tr:hover td {
    background: var(--bg-tertiary);
}

.table tbody td .text-success,
.table tbody td.text-success {
    color: var(--accent) !important;
}

.table tbody td .text-danger,
.table tbody td.text-danger {
    color: var(--error) !important;
}

/* ── CTA Section ──────────────────────────────────────────────────── */
.cta-section {
    background: var(--dark-medium) !important;
    color: var(--white);
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
}

.cta-section .lead {
    font-size: 0.9375rem;
    color: var(--gray-400);
}

.cta-section .btn-light {
    background: var(--accent);
    color: #faf9f7 !important;
    border: none;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    border-radius: 9999px;
    font-size: var(--text-sm);
    transition: all var(--duration-state) var(--ease-default);
}

.cta-section .btn-light:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.25);
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
    background: var(--dark);
    color: var(--white);
    border-top: 1px solid var(--border-subtle);
}

.footer h5,
.footer h6 {
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: 600;
}

.footer p.text-muted,
.footer .text-muted {
    color: var(--gray-500) !important;
    font-size: 0.8125rem;
}

.footer a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color var(--duration-state) var(--ease-default);
}

.footer a:hover {
    color: var(--white);
}

.footer ul li {
    margin-bottom: 0.375rem;
}

.social-links a {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    text-align: center;
    line-height: 32px;
    transition: background var(--duration-state) var(--ease-default);
    font-size: var(--text-sm);
    color: var(--gray-400);
}

.social-links a:hover {
    background: var(--dark-medium);
    color: var(--white);
}

/* ── Badge Overrides ──────────────────────────────────────────────── */
.badge.bg-success,
.badge.bg-info,
.badge.bg-warning {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border);
}

/* ── Bootstrap Utility Overrides ──────────────────────────────────── */
.bg-light {
    background-color: var(--bg-secondary) !important;
}

.bg-primary {
    background-color: var(--dark) !important;
}

.bg-dark {
    background-color: var(--dark) !important;
}

.text-white {
    color: var(--white) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.fw-bold {
    font-weight: 700 !important;
}

/* ── Mode Toggle (fixed bottom-left) ──────────────────────────────── */
#modeToggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 900;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    padding: 0;
    opacity: 0.7;
    transition: opacity var(--duration-state) var(--ease-default),
                background var(--duration-state) var(--ease-default),
                color var(--duration-state) var(--ease-default);
}

#modeToggle:hover {
    opacity: 1;
    background: var(--dark-medium);
    color: var(--white);
}

/* ── Light Mode Overrides ─────────────────────────────────────────── */
body.landing-light .navbar {
    background: rgba(250, 249, 247, 0.92) !important;
    border-bottom-color: var(--border);
}

body.landing-light .navbar-brand {
    color: var(--accent) !important;
}

body.landing-light .navbar-nav .nav-link {
    color: var(--text-secondary) !important;
}

body.landing-light .navbar-nav .nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(0, 0, 0, 0.04);
}

body.landing-light .navbar .btn-outline-light {
    color: var(--text-secondary) !important;
    border-color: var(--border);
}

body.landing-light .navbar .btn-outline-light:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary) !important;
}

body.landing-light .navbar .btn-light {
    background: var(--accent);
    color: #faf9f7 !important;
}

body.landing-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%234a4540' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.landing-light .hero-actions .btn-primary {
    color: #faf9f7 !important;
}

body.landing-light .pricing-card.featured::before {
    color: #faf9f7;
}

body.landing-light .pricing-cta .btn-primary {
    color: #faf9f7;
}

body.landing-light .cta-section {
    background: var(--bg-tertiary) !important;
    border-color: var(--border);
}

body.landing-light .cta-section h2 {
    color: var(--text-primary);
}

body.landing-light .cta-section .lead {
    color: var(--text-secondary);
}

body.landing-light .cta-section .btn-light {
    background: var(--accent);
    color: #faf9f7 !important;
}

body.landing-light #modeToggle {
    background: var(--bg-tertiary);
    border-color: var(--border);
    color: var(--text-secondary);
}

body.landing-light #modeToggle:hover {
    background: var(--border);
    color: var(--text-primary);
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    html, body { overflow-x: hidden !important; max-width: 100vw; }

    .hero-section {
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: var(--text-2xl);
    }

    .hero-stats .row {
        text-align: center;
    }

    .hero-actions {
        text-align: center;
    }

    .hero-actions .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .browser-mockup {
        margin-top: 2rem;
    }

    .feature-card {
        margin-bottom: 1rem;
    }

    .pricing-card {
        margin-bottom: 1rem;
    }

    .price-display .amount {
        font-size: 2rem;
    }

    .comparison-table {
        font-size: 0.8125rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.625rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: var(--text-xl);
    }

    .hero-stats h3 {
        font-size: 1.25rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .feature-icon i {
        font-size: 1rem;
    }

    .price-display .amount {
        font-size: 1.75rem;
    }
}

/* ── Print ────────────────────────────────────────────────────────── */
@media print {
    .navbar,
    .hero-section,
    .cta-section,
    .footer,
    #modeToggle {
        display: none !important;
    }

    .features-section,
    #pricing,
    .comparison-section {
        page-break-inside: avoid;
    }
}
