/* ============ LIGHT THEME (DEFAULT) ============ */
:root,
[data-theme="light"] {
    --bg: #fcfaf6;
    --surface: #fffefb;
    --surface-alt: #f6f2e9;
    --surface-warm: #faf7ef;
    --text: #0f0c08;
    --text-secondary: #1a1510;
    --text-tertiary: #2a221a;
    --text-muted: #3d3328;
    --text-light: #4a3f33;
    --border: #c8bfae;
    --border-light: #ddd4c4;
    --border-subtle: #ede5d5;
    --accent: #1b3d6b;
    --accent-soft: #e9eff7;
    --accent-light: #c5d5ed;
    --accent-dark: #0f2442;
    --gold: #7d5e10;
    --gold-soft: #fdf5e0;
    --gold-light: #f0e0b8;
    --teal: #155e53;
    --teal-soft: #eaf6f3;
    --rose: #8b2836;
    --rose-soft: #fdf1f3;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 28px rgba(0,0,0,0.07),0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 16px 44px rgba(0,0,0,0.09),0 3px 12px rgba(0,0,0,0.05);
    --shadow-xl: 0 30px 70px rgba(0,0,0,0.14),0 6px 20px rgba(0,0,0,0.06);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.05),0 10px 32px rgba(0,0,0,0.08);
    --header-bg: rgba(255,254,251,0.88);
    --header-bg-scrolled: rgba(255,254,251,0.96);
    --card-bg: rgba(255,254,251,0.92);
    --card-border: rgba(255,254,251,0.55);
    --input-bg: rgba(248,249,252,0.6);
    --input-border: rgba(200,208,224,0.6);
    --btn-primary-bg: var(--accent);
    --btn-primary-text: #fff;
    --btn-primary-hover: var(--accent-dark);
    --btn-outline-bg: rgba(255,255,255,0.5);
    --btn-outline-border: rgba(200,208,224,0.5);
    --btn-outline-hover-bg: rgba(255,255,255,0.7);
    --tab-bg: rgba(240,242,248,0.7);
    --tab-active-bg: #ffffff;
    --tab-active-shadow: rgba(27,61,107,0.16);
    --tab-inactive-text: #7a7a9a;
    --divider-gradient: linear-gradient(90deg, transparent, #d8dce8, transparent);
    --toast-bg: rgba(255,255,255,0.85);
    --toast-border: rgba(255,255,255,0.7);
    --toast-shadow: 0 12px 40px rgba(0,0,0,0.1);
    --scrollbar-thumb: #c5bcaa;
    --scrollbar-thumb-hover: #a09580;
    --theme-toggle-bg: #f0ebe0;
    --theme-toggle-hover: #e5ddd0;
    --theme-toggle-icon: #5a4a30;
    --font-serif: 'Crimson Text', 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --popular-badge-bg: linear-gradient(135deg, #1b3d6b, #3a5f8a);
    --popular-badge-text: #fff;
    --active-badge-bg: #0f2442;
    --active-badge-text: #fff;
    --feature-icon-color: #155e53;
    --expand-color: var(--accent);
    --faq-bg: var(--surface-warm);
    --faq-border: var(--border-subtle);
    --blob-1: radial-gradient(circle, #c5d5ed, #1b3d6b);
    --blob-2: radial-gradient(circle, #f0e0b8, #7d5e10);
    --blob-3: radial-gradient(circle, #eaf6f3, #155e53);
}

/* ============ DARK THEME ============ */
[data-theme="dark"] {
    --bg: #1a1815;
    --surface: #1f1c18;
    --surface-alt: #252118;
    --surface-warm: #28231a;
    --text: #e8e0d2;
    --text-secondary: #d5ccbc;
    --text-tertiary: #c2b8a5;
    --text-muted: #a89880;
    --text-light: #9a8a72;
    --border: #5a4d3a;
    --border-light: #4a4030;
    --border-subtle: #3d3426;
    --accent: #6b9bd2;
    --accent-soft: #1e2d3f;
    --accent-light: #3a5a7a;
    --accent-dark: #8ab8e8;
    --gold: #c9a030;
    --gold-soft: #2a2210;
    --gold-light: #4a3a18;
    --teal: #4db8ac;
    --teal-soft: #1a2a26;
    --rose: #c4606e;
    --rose-soft: #2a1a1d;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.12);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.18);
    --shadow-md: 0 8px 28px rgba(0,0,0,0.22),0 1px 4px rgba(0,0,0,0.14);
    --shadow-lg: 0 16px 44px rgba(0,0,0,0.26),0 3px 12px rgba(0,0,0,0.16);
    --shadow-xl: 0 30px 70px rgba(0,0,0,0.34),0 6px 20px rgba(0,0,0,0.20);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.14),0 10px 32px rgba(0,0,0,0.20);
    --header-bg: rgba(31,28,24,0.88);
    --header-bg-scrolled: rgba(31,28,24,0.96);
    --card-bg: rgba(31,28,24,0.92);
    --card-border: rgba(255,254,251,0.08);
    --input-bg: rgba(40,35,28,0.6);
    --input-border: rgba(74,64,48,0.6);
    --btn-primary-bg: var(--accent);
    --btn-primary-text: #0f0c08;
    --btn-primary-hover: var(--accent-dark);
    --btn-outline-bg: rgba(40,35,28,0.5);
    --btn-outline-border: rgba(90,77,58,0.5);
    --btn-outline-hover-bg: rgba(50,44,34,0.7);
    --tab-bg: rgba(40,35,28,0.7);
    --tab-active-bg: #2a2520;
    --tab-active-shadow: rgba(107,155,210,0.16);
    --tab-inactive-text: #8a7a65;
    --divider-gradient: linear-gradient(90deg, transparent, #5a4d3a, transparent);
    --toast-bg: rgba(40,35,28,0.85);
    --toast-border: rgba(90,77,58,0.5);
    --toast-shadow: 0 12px 40px rgba(0,0,0,0.4);
    --scrollbar-thumb: #4a3d30;
    --scrollbar-thumb-hover: #5a4d3a;
    --theme-toggle-bg: #2a2520;
    --theme-toggle-hover: #353028;
    --theme-toggle-icon: #d5c8a0;
    --popular-badge-bg: linear-gradient(135deg, #6b9bd2, #8ab8e8);
    --popular-badge-text: #0f0c08;
    --active-badge-bg: #8ab8e8;
    --active-badge-text: #0f0c08;
    --feature-icon-color: #4db8ac;
    --expand-color: var(--accent);
    --faq-bg: var(--surface-alt);
    --faq-border: var(--border-subtle);
    --blob-1: radial-gradient(circle, #3a5a7a, #6b9bd2);
    --blob-2: radial-gradient(circle, #4a3a18, #c9a030);
    --blob-3: radial-gradient(circle, #1a2a26, #4db8ac);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease;
}
body {
    font-family: var(--font-serif);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
    letter-spacing: 0.003em;
    font-weight: 400;
}
::-webkit-scrollbar {
    width: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Mini Header (fixed) */
.mini-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid transparent;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
}
.mini-header.scrolled {
    border-bottom-color: var(--border-light);
    box-shadow: var(--shadow-xs);
    background: var(--header-bg-scrolled);
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.28rem;
    letter-spacing: -0.01em;
    font-family: var(--font-sans);
    transition: color 0.3s ease;
}
.header-logo .logo-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.header-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
    font-family: var(--font-sans);
    font-size: 0.88rem;
}
.header-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}
.header-nav a:hover {
    color: var(--accent);
}
.theme-toggle-btn {
    background: var(--theme-toggle-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    flex-shrink: 0;
    color: var(--theme-toggle-icon);
    position: relative;
    overflow: hidden;
}
.theme-toggle-btn:hover {
    background: var(--theme-toggle-hover);
    transform: scale(1.06);
    box-shadow: var(--shadow-sm);
}
.theme-toggle-btn:active {
    transform: scale(0.94);
    transition: transform 0.15s ease;
}
.theme-toggle-btn .icon-sun,
.theme-toggle-btn .icon-moon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.theme-toggle-btn .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}
.theme-toggle-btn .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}
[data-theme="dark"] .theme-toggle-btn .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}
[data-theme="dark"] .theme-toggle-btn .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ============ TOAST (messages) ============ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 22px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
}
.toast {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.82rem;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(130%);
    transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
    color: var(--text);
}
.toast.show {
    transform: translateX(0);
}
.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }
.toast.info { border-left: 4px solid var(--accent); }
.toast.warning { border-left: 4px solid #f59e0b; }
.toast__icon { flex-shrink: 0; display: flex; align-items: center; }
.toast__close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px;
    border-radius: 4px;
    transition: 0.2s;
}
.toast__close:hover { color: var(--text); }

@media (max-width: 540px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: calc(100vw - 20px);
    }
    .toast {
        font-size: 0.75rem;
        padding: 12px 16px;
    }
}

/* Main container */
.container {
    margin-top: 90px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 40px;
}

/* Branding */
.brand {
    text-align: center;
    margin-bottom: 20px;
}
.brand__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.2rem;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1;
    transition: color 0.4s ease;
}
.brand__name .accent {
    color: var(--accent);
    font-style: italic;
}
.brand__subtitle {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 6px;
    letter-spacing: 0.3px;
    font-style: italic;
    transition: color 0.4s ease;
}

/* Billing toggle */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 30px 0 40px;
    background: var(--tab-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px;
    border-radius: 9999px;
    border: 1px solid var(--border-subtle);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.billing-option {
    padding: 10px 24px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tab-inactive-text);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    user-select: none;
    font-family: var(--font-sans);
}
.billing-option.active {
    background: var(--tab-active-bg);
    color: var(--accent-dark);
    box-shadow: 0 4px 12px var(--tab-active-shadow);
}
.save-badge {
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 6px;
    letter-spacing: 0.2px;
}

/* Plans grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.plan-card {
    background: var(--card-bg);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 32px 28px;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.plan-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border);
}
.plan-card.popular {
    border: 2px solid var(--accent-light);
    box-shadow: var(--shadow-lg);
}
.popular-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--popular-badge-bg);
    color: var(--popular-badge-text);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: var(--font-sans);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.active-plan-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--active-badge-bg);
    color: var(--active-badge-text);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: var(--font-sans);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2;
}

.plan-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    font-family: var(--font-sans);
    transition: color 0.4s ease;
}
.plan-price {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text);
    margin: 12px 0 4px;
    letter-spacing: -1px;
    line-height: 1;
    font-family: var(--font-display);
    transition: color 0.4s ease;
}
.plan-price .currency {
    font-size: 1.2rem;
    vertical-align: super;
    font-weight: 600;
    margin-right: 2px;
}
.plan-price .period {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
    font-family: var(--font-serif);
    transition: color 0.4s ease;
}
.plan-desc {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    line-height: 1.5;
    font-style: italic;
    font-family: var(--font-serif);
    transition: color 0.4s ease;
}

.feature-list {
    list-style: none;
    margin-bottom: 20px;
    flex: 1;
}
.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-sans);
    transition: color 0.4s ease, border-color 0.4s ease;
}
.feature-list li:last-child {
    border-bottom: none;
}
.feature-icon {
    color: var(--feature-icon-color);
    flex-shrink: 0;
    margin-top: 2px;
    transition: color 0.4s ease;
}

.expand-features {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--expand-color);
    margin: 8px 0 16px;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s;
    font-family: var(--font-sans);
}
.expand-features:hover {
    opacity: 0.8;
}

.hidden-features {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.hidden-features.expanded {
    max-height: 500px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 9999px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none;
    width: 100%;
    letter-spacing: -0.2px;
    margin-top: auto;
}
.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    box-shadow: 0 8px 28px rgba(27,61,107,0.3);
}
[data-theme="dark"] .btn-primary {
    box-shadow: 0 8px 28px rgba(107,155,210,0.3);
}
.btn-primary:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(15,36,66,0.35);
}
.btn-outline {
    background: var(--btn-outline-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--accent-dark);
    border: 2px solid var(--btn-outline-border);
    box-shadow: none;
    font-weight: 600;
}
.btn-outline:hover {
    border-color: var(--accent-light);
    background: var(--btn-outline-hover-bg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.btn-disabled-static {
    pointer-events: none;
    opacity: 0.65;
    background: var(--btn-outline-bg);
    color: var(--text-muted);
    border: 2px solid var(--border-subtle);
}

/* FAQ section */
.faq-section {
    margin-top: 70px;
    text-align: center;
}
.faq-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
    letter-spacing: -0.02em;
    transition: color 0.4s ease;
}
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}
.faq-item {
    background: var(--faq-bg);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid var(--faq-border);
    border-radius: 18px;
    padding: 20px;
    text-align: left;
    transition: all 0.2s;
}
.faq-item h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text);
    transition: color 0.4s ease;
}
.faq-item p {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.5;
    font-style: italic;
    transition: color 0.4s ease;
}

/* Background blobs */
.bg-svg-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.bg-blob {
    position: absolute;
    opacity: 0.5;
    filter: blur(70px);
    animation: floatBlob 16s infinite alternate ease-in-out;
}
.bg-blob--1 {
    width: 500px;
    height: 500px;
    top: -12%;
    left: -10%;
    background: var(--blob-1);
    animation-delay: 0s;
}
.bg-blob--2 {
    width: 400px;
    height: 400px;
    bottom: -15%;
    right: -8%;
    background: var(--blob-2);
    animation-delay: -5s;
}
.bg-blob--3 {
    width: 300px;
    height: 300px;
    top: 60%;
    left: 60%;
    background: var(--blob-3);
    animation-delay: -10s;
}
@keyframes floatBlob {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(40px, -30px) rotate(10deg) scale(1.08); }
}

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat linear infinite;
    opacity: 0;
}
@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(0) scale(0); }
    10% { opacity: 0.6; }
    30% { opacity: 0.4; }
    70% { opacity: 0.1; }
    100% { opacity: 0; transform: translateY(-400px) scale(1.2); }
}

@media (max-width: 700px) {
    .brand__name { font-size: 1.8rem; }
    .plan-price { font-size: 2.2rem; }
    .mini-header { padding: 0 1.2rem; }
    .header-nav { display: none; }
}