/* ============================================================
    CSS CUSTOM PROPERTIES — Dark / Light theme tokens
    ============================================================ */
:root {
    --bg: #fafafa;
    --bg2: #f5f5f5;
    --surface: #ffffff;
    --surface2: #ebebeb;
    --accent: #171717;
    --accent2: #0070f3;
    --accent3: #7928ca;
    --text: #171717;
    --text-muted: #4d4d4d;
    --border: #ebebeb;
    --glow: 0px 1px 2px rgba(0,0,0,0.05), 0px 2px 4px rgba(0,0,0,0.05);
    --glow2: 0px 2px 4px rgba(0,0,0,0.06), 0px 8px 16px -8px rgba(0,0,0,0.06);
    --glow3: 0px 2px 4px rgba(121, 40, 202, 0.06), 0px 8px 16px -8px rgba(121, 40, 202, 0.06);
    --nav-h: 64px;
    --radius: 8px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg: #0a0a0a;
    --bg2: #111111;
    --surface: #000000;
    --surface2: #222222;
    --accent: #ffffff;
    --accent2: #0070f3;
    --accent3: #a855f7;
    --text: #ffffff;
    --text-muted: #888888;
    --border: #333333;
    --glow: 0px 1px 2px rgba(0,0,0,0.4);
    --glow2: 0px 2px 8px rgba(0,0,0,0.4);
    --glow3: 0px 2px 8px rgba(168, 85, 247, 0.4);
}

/* ============================================================
       RESET & BASE
       ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-feature-settings: "ss01", "ss02";
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.4s, color 0.4s;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ============================================================
       ANIMATED PARTICLE CANVAS — fixed background
       ============================================================ */
#bg-canvas {
    display: none;
}

/* ============================================================
       NAVIGATION BAR
       ============================================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.4s, box-shadow 0.4s;
}

[data-theme="dark"] nav {
    background: rgba(10, 10, 10, 0.8);
}

/* Nav shadow class added by JavaScript on scroll */
nav.scrolled {
    box-shadow: var(--glow);
}

/* Logo */
.nav-logo {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.nav-logo span {
    color: var(--text-muted);
}

/* Desktop links */
.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 100px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background-color: var(--bg2);
}

/* Right-side controls */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme toggle button */
.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text);
}

.theme-btn:hover {
    border-color: var(--accent);
    box-shadow: var(--glow);
}

/* Hamburger button (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    display: block;
    transition: all 0.2s;
}

/* Mobile drawer */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 5%;
    z-index: 99;
    flex-direction: column;
    gap: 1.2rem;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.mobile-menu a:hover {
    color: var(--accent);
}

/* ============================================================
       PAGE HERO
       ============================================================ */
.page-hero {
    padding-top: calc(var(--nav-h) + 5rem);
    padding-bottom: 3.5rem;
    padding-left: 5%;
    padding-right: 5%;
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 1rem;
    display: block;
}

.page-hero h1 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 600;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 1.2rem;
    color: var(--text);
}

.page-hero h1 em {
    font-style: normal;
    color: var(--accent3);
}

.page-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 2rem;
}

/* Staggered entrance animation for hero children */
.page-hero>* {
    animation: fadeUp 0.75s ease both;
}

.page-hero>*:nth-child(1) {
    animation-delay: 0.05s;
}

.page-hero>*:nth-child(2) {
    animation-delay: 0.15s;
}

.page-hero>*:nth-child(3) {
    animation-delay: 0.25s;
}

.page-hero>*:nth-child(4) {
    animation-delay: 0.35s;
}

.page-hero>*:nth-child(5) {
    animation-delay: 0.45s;
}

/* ============================================================
       PRICING SECTION
       ============================================================ */
.pricing-section {
    padding: 1rem 5% 7rem;
    position: relative;
    z-index: 1;
}

/* Three-column grid, collapses on mobile */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

/* ── PRICING CARD base ──────────────────────────────── */
.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 32px;

    /* Scroll-reveal: starts invisible */
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.65s ease,
        transform 0.65s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

/* Visible state triggered by IntersectionObserver */
.pricing-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover lift + glow effect */
.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--glow2);
    border-color: var(--accent);
    z-index: 2;
}

/* Visible + hover combined so transition is smooth */
.pricing-card.visible:hover {
    transform: translateY(-8px);
}

/* ── FEATURED card (Professional) ─────────────────── */
.pricing-card.featured {
    background: var(--accent);
    color: var(--surface);
    border-color: var(--accent);
    box-shadow: var(--glow2);
    
    /* Variables override for featured card to ensure correct text contrast in both light/dark */
    --card-muted: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.15);
    
    /* Push it slightly above siblings on desktop */
    margin-top: -1.2rem;
    margin-bottom: -1.2rem;
}

[data-theme="dark"] .pricing-card.featured {
    --card-muted: rgba(0, 0, 0, 0.7);
    --card-border: rgba(0, 0, 0, 0.15);
}

.pricing-card.featured:hover {
    transform: translateY(-12px);
    box-shadow: var(--glow2);
    border-color: var(--accent);
}

.pricing-card.featured.visible:hover {
    transform: translateY(-12px);
}

/* ── ADVANCED card ─────────────────────────────────── */
.pricing-card.advanced:hover {
    border-color: var(--accent);
}

/* ── CARD HEADER ───────────────────────────────────── */
.card-header {
    padding: 0 0 1.5rem 0;
    position: relative;
}

/* Featured badge */
.featured-badge {
    position: absolute;
    top: 1.3rem;
    right: 1.3rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--surface);
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    font-weight: 700;
}

/* Tier icon */
.tier-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.1rem;
    border: 1px solid var(--border);
    background: var(--bg2);
    transition: all var(--transition);
}

.pricing-card:hover .tier-icon {
    background: var(--border);
}

.pricing-card.featured .tier-icon {
    background: var(--card-border);
    border-color: transparent;
}

/* Tier name */
.tier-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.pricing-card.featured .tier-name {
    color: var(--card-muted);
}

/* Tier headline */
.tier-headline {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    letter-spacing: -0.6px;
}

/* Price */
.price-wrap {
    display: flex;
    align-items: flex-end;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.price-currency {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.pricing-card.featured .price-currency {
    color: var(--card-muted);
}

.price-amount {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -2px;
    line-height: 1;
    transition: all 0.4s ease;
}

.price-period {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.pricing-card.featured .price-period {
    color: var(--card-muted);
}

/* Short description */
.tier-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.pricing-card.featured .tier-desc {
    color: var(--card-muted);
    border-top-color: var(--card-border);
}

/* ── FEATURES LIST ─────────────────────────────────── */
.card-features {
    padding: 1.5rem 0;
    flex: 1;
}

.features-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pricing-card.featured .features-label {
    color: var(--card-muted);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.pricing-card.featured .feature-item {
    color: var(--card-muted);
}

/* Check icon wrapper */
.check-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    background: var(--bg2);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.check-icon svg {
    color: var(--text);
}

.pricing-card.featured .check-icon {
    background: var(--card-border);
    border-color: transparent;
}

.pricing-card.featured .check-icon svg {
    color: var(--surface);
}

/* Crossed-out unavailable features */
.feature-item.unavailable {
    opacity: 0.35;
}

.feature-item.unavailable .check-icon {
    background: transparent;
    border-color: var(--border);
}

.pricing-card.featured .feature-item.unavailable .check-icon {
    border-color: var(--card-border);
}

.feature-item.unavailable .check-icon svg {
    color: var(--text-muted);
}

.pricing-card.featured .feature-item.unavailable .check-icon svg {
    color: var(--card-muted);
}

/* Highlight text inside feature items */
.feature-item strong {
    color: var(--text);
    font-weight: 500;
}

.pricing-card.featured .feature-item strong {
    color: var(--surface);
}

/* ── CARD FOOTER / CTA ─────────────────────────────── */
.card-footer {
    padding: 1.5rem 0 0 0;
}

/* Select Plan button */
.btn-select {
    width: 100%;
    height: 48px;
    border-radius: 100px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
    /* Default (Starter) style */
    background: var(--surface);
    color: var(--text);
}

/* Starter hover */
.btn-select:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Featured (Professional) button — solid accent fill */
.pricing-card.featured .btn-select {
    background: var(--surface);
    color: var(--accent);
    border-color: transparent;
}

.pricing-card.featured .btn-select:hover {
    background: var(--bg2);
    color: var(--accent);
}

/* Click ripple feedback */
.btn-select:active {
    transform: scale(0.98);
}

/* ── Selected state (after clicking) ─────────────── */
.btn-select.selected {
    background: var(--bg2);
    color: var(--text-muted);
    border-color: var(--border);
    pointer-events: none;
}

.pricing-card.featured .btn-select.selected {
    background: var(--card-border);
    color: var(--card-muted);
    border-color: transparent;
}

/* Money-back note */
.money-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pricing-card.featured .money-back {
    color: var(--card-muted);
}

.money-back svg {
    color: var(--text-muted);
}

.pricing-card.featured .money-back svg {
    color: var(--card-muted);
}

/* ============================================================
       COMPARISON TABLE
       ============================================================ */
.compare-section {
    padding: 0 5% 7rem;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header .section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: block;
}

.section-header h2 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 600;
    letter-spacing: -1.28px;
    color: var(--text);
}

.compare-table {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}

.compare-table th,
.compare-table td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    letter-spacing: -0.28px;
    color: var(--text-muted);
}

.compare-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0px;
    text-transform: uppercase;
    color: var(--text);
    background: var(--bg2);
}

.compare-table th.featured-col {
    color: var(--accent);
    background: var(--border);
}

.compare-table td:first-child {
    text-align: left;
    color: var(--text);
    font-weight: 500;
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table tr:hover td {
    background: var(--bg2);
}

/* Check / X icons in table */
.tbl-check {
    color: var(--accent);
    font-weight: 500;
    font-size: 1rem;
}

.tbl-x {
    color: var(--text-muted);
    opacity: 0.3;
    font-size: 1rem;
}

.tbl-featured-cell {
    background: var(--bg2);
}

/* ============================================================
       FAQ ACCORDION
       ============================================================ */
.faq-section {
    padding: 0 5% 7rem;
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
}

.faq-list {
    margin-top: 2.5rem;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.35rem 0;
    cursor: pointer;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.975rem;
    font-weight: 500;
    color: var(--text);
    transition: color var(--transition);
    user-select: none;
}

.faq-q:hover {
    color: var(--accent);
}

.faq-icon {
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-a p {
    padding-bottom: 1.4rem;
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 0.92rem;
}

.faq-item.open .faq-a {
    max-height: 300px;
}

/* ============================================================
       CTA STRIP
       ============================================================ */
.cta-strip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4rem 3.5rem;
    text-align: center;
    margin: 0 5% 7rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: var(--glow2);
}

.cta-strip h2 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -1.28px;
    margin-bottom: 1rem;
    color: var(--text);
}

.cta-strip h2 em {
    font-style: normal;
    color: var(--accent2);
}

.cta-strip p {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 2.5rem;
    font-size: 16px;
    line-height: 1.6;
}

.cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 0px 24px;
    height: 48px;
    border-radius: 100px;
    background: var(--accent);
    color: var(--bg);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--text-muted);
}

.btn-outline {
    padding: 0px 24px;
    height: 48px;
    border-radius: 100px;
    background: transparent;
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
       FOOTER
       ============================================================ */
footer {
    padding: 2.5rem 5%;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

footer span {
    color: var(--accent);
}

/* ============================================================
       TOAST NOTIFICATION
       ============================================================ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    padding: 0.9rem 1.3rem;
    font-size: 0.85rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.35s ease, toastOut 0.35s 2.6s ease forwards;
    max-width: 300px;
}

.toast .toast-icon {
    color: var(--accent);
    font-size: 1.1rem;
}

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

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

/* ============================================================
       KEYFRAMES
       ============================================================ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ============================================================
       RESPONSIVE
       ============================================================ */
@media (max-width: 960px) {

    /* Three → two columns */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        align-items: start;
    }

    /* Featured card loses its vertical offset on tablet */
    .pricing-card.featured {
        margin-top: 0;
        margin-bottom: 0;
        grid-column: 1 / -1;
        /* spans full row */
    }
}

@media (max-width: 640px) {

    /* Stack everything vertically */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        grid-column: auto;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .page-hero {
        padding-top: calc(var(--nav-h) + 3rem);
    }

    .page-hero h1 {
        letter-spacing: -1px;
    }

    .cta-strip {
        padding: 3rem 1.5rem;
    }

    .compare-table {
        font-size: 0.78rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.8rem 0.8rem;
    }
}