/* Design System & Global Styles */
:root {
    /* Colors - Dark Mode (Default) */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0; /* Increased brightness for readability */
    --accent: #0ea5e9;
    /* Electric Blue */
    --accent-hover: #38bdf8;
    --gradient-accent: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --gradient-hover: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
    --border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(30, 41, 59, 0.7);
    --header-bg: rgba(15, 23, 42, 0.8);
    --glass-blur: blur(12px);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.4);

    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155; /* Darkened for better contrast in light mode */
    --accent: #0284c7;
    --accent-hover: #0ea5e9;
    --gradient-accent: linear-gradient(135deg, #0284c7 0%, #6d28d9 100%);
    --gradient-hover: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --border: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.7);
    --header-bg: rgba(248, 250, 252, 0.8);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: clip;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

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

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.flex {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow);
    opacity: 1;
}

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline:hover {
    background: var(--gradient-accent);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow);
    opacity: 1;
}

/* Header Styles */
.header-wrapper {
    display: contents;
}

.top-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 3rem;
    background: #0f0510;
    max-width: 100%;
}

.support-text {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 500;
}

.pill-header {
    background: #0f0510;
    padding: 1rem 0 0 0;
    max-width: 100%;
    width: 100%;
    margin: 0;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas: 
        "logo actions"
        "nav nav";
    padding: 0 3rem;
    gap: 1.5rem 0;
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 1.5rem;
        gap: 1rem 0;
        grid-template-columns: 1fr auto;
        grid-template-areas: "logo actions";
    }
    .top-bar {
        padding: 0.5rem 1.5rem;
        justify-content: center;
    }
}

.logo {
    grid-area: logo;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    font-style: italic;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    display: inline-block;
    transition: transform 0.3s ease;
    margin: 0;
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.35rem;
    }
}

.logo:hover {
    transform: scale(1.05);
}

.header-actions {
    grid-area: actions;
}

nav {
    grid-area: nav;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: #fff;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Orange-red for active/hover */
.nav-link:hover,
.nav-link.active {
    color: #f45b36;
}

/* Magenta separators hidden in new design */
.nav-sep {
    display: none;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    gap: 0.8rem;
}

.desktop-lang {
    margin-right: 1rem;
}

.mobile-lang-container {
    display: none;
}

.lang-sep {
    opacity: 0.3;
}

@media (max-width: 768px) {
    .desktop-lang {
        display: none !important;
    }
    .mobile-lang-container {
        display: block;
        width: 100%;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .mobile-lang {
        justify-content: center;
        gap: 1.5rem;
        font-size: 1rem;
    }
}

/* Clean up done */

@media (max-width: 768px) {
    .lang-switcher {
        width: max-content;
        background: transparent;
        border: none;
        padding: 0.5rem 0;
    }
    
    .lang-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        padding-left: 1rem;
        margin-top: 0;
    }
}

/* Header Action Buttons */
.theme-toggle,
.mobile-toggle {
    background: none;
    border: none;
    color: #fff; /* Explicitly white because pill-header is always dark */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover,
.mobile-toggle:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* Mobile Nav */
.mobile-toggle {
    display: none;
}

.mobile-close {
    display: none;
}

@media (max-width: 768px) {
    nav {
        border-top: none;
        padding: 0;
        margin: 0;
        height: 0;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem 2rem;
        gap: 0; /* Reset desktop gap */
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 2000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu .nav-link {
        font-size: 1.25rem;
        padding: 1rem 0;
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-sep {
        display: none; /* Hide asterisks on mobile */
    }

    .mobile-toggle {
        display: block;
    }

    .mobile-close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 50%;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-close:hover {
        background: var(--accent);
        transform: rotate(90deg);
    }
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
}

.pricing-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    z-index: 10;
}

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

.badge {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: var(--accent);
    color: #fff;
    padding: 0.25rem 3rem;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: 700;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-features {
    margin: 2rem 0;
    text-align: left;
}

.pricing-features li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* Premium Glassmorphism FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.premium-faq-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-faq-item:hover {
    border-color: rgba(255, 15, 123, 0.5);
    box-shadow: 0 10px 30px -10px rgba(255, 15, 123, 0.2);
    transform: translateY(-2px);
}

.premium-faq-item[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(248, 155, 41, 0.5);
}

.premium-faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    list-style: none; /* Hide default triangle in WebKit */
}

/* Hide default triangle in other browsers */
.premium-faq-question::-webkit-details-marker {
    display: none;
}

.premium-faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.premium-faq-item[open] .premium-faq-question h3 {
    color: var(--accent);
}

.faq-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background-color: var(--text-primary);
    transform: translate(-50%, -50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.premium-faq-item[open] .faq-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.premium-faq-item[open] .faq-icon::before,
.premium-faq-item[open] .faq-icon::after {
    background-color: var(--accent);
}

.premium-faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    animation: faq-slide-down 0.4s ease-out forwards;
}

.premium-faq-answer ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.premium-faq-answer li {
    margin-bottom: 0.5rem;
}

@keyframes faq-slide-down {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

[data-theme="light"] .premium-faq-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .premium-faq-item:hover {
    border-color: rgba(255, 15, 123, 0.3);
    box-shadow: 0 10px 30px -10px rgba(255, 15, 123, 0.15);
}

[data-theme="light"] .premium-faq-item[open] {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(248, 155, 41, 0.4);
}

/* Blog Cards */

/* Extracted Utility Classes */
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mb-3 { margin-bottom: 3rem; }
.mt-3 { margin-top: 3rem; }
.hero-overline {
    font-weight: 700;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.hero-title {
    color: var(--text-primary);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}
.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}
.section-title {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    color: #fff;
}
.section-subtitle {
    color: #94a3b8;
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 95%;
}
.grid-2-col {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
}
.flex-wrap-gap {
    gap: 1rem;
    flex-wrap: wrap;
}
.btn-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 700;
}
.btn-secondary-outline {
    border: 2px solid var(--text-secondary);
    color: var(--text-primary);
}
.img-shadow-rounded {
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #fff;
}
.checklist-icon {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
}
.bg-secondary {
    background-color: var(--bg-secondary);
}
.step-card .step-num {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
}

.policy-wrapper {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
    padding: 0 1.5rem;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title.accent-title {
    color: var(--accent);
}

.flex-gap-1 {
    gap: 1rem;
}

.blog-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 1024px) {
    .blog-card {
        flex: 0 0 calc(50% - 1rem) !important;
    }
}

@media (max-width: 640px) {
    .blog-card {
        flex: 0 0 100% !important;
    }
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent);
}

.blog-img {
    height: 200px;
    background: #334155;
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    font-size: 1.25rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--accent);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade {
    animation: fadeIn 0.8s ease forwards;
}

.hidden {
    display: none !important;
}

/* Pricing Toggle Switch (Standardized) */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Reveal on Scroll Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* Screenshot Slider */
.screenshot-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1rem 0 2rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-secondary);
}
.screenshot-slider::-webkit-scrollbar {
    height: 8px;
}
.screenshot-slider::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}
.screenshot-slider::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}
.screenshot-slider img {
    flex: 0 0 auto;
    width: 250px;
    height: auto;
    border-radius: 12px;
    scroll-snap-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}
.screenshot-slider img:hover {
    transform: translateY(-5px);
}

/* Lang Link Default State */
.lang-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}
.lang-link:hover, .lang-link.active {
    color: var(--accent);
}
