/* ==================== DARK THEME (Default) ==================== */
:root {
    --bg-color: #0f0f0e;
    --bg-secondary: #1a1a18;
    --bg-tertiary: #242422;
    --text-main: #f0eeeb;
    --text-muted: #9a9893;
    --accent: #d97757;
    --border: #2e2e2a;
    --border-light: #242422;
    --whatsapp: #4a9d6e;
    --whatsapp-hover: #3d8a5e;
    --card-bg: #1a1a18;
    --card-border: #2e2e2a;
    --setup-bg: #0a0a09;
    --setup-text: #f0eeeb;
    --setup-text-muted: rgba(240, 238, 235, 0.6);
    --input-bg: #242422;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.5);
}

/* ==================== LIGHT THEME ==================== */
[data-theme="light"] {
    --bg-color: #fbfaf8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f4f1;
    --text-main: #1d1d1b;
    --text-muted: #63625e;
    --accent: #d97757;
    --border: #e5e2da;
    --border-light: #f0eeeb;
    --whatsapp: #4a9d6e;
    --whatsapp-hover: #3d8a5e;
    --card-bg: #ffffff;
    --card-border: #e5e2da;
    --setup-bg: #111110;
    --setup-text: #fbfaf8;
    --setup-text-muted: rgba(251, 250, 248, 0.6);
    --input-bg: #f5f4f1;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.1);
}

/* ==================== SYSTEM THEME ==================== */
@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        --bg-color: #0f0f0e;
        --bg-secondary: #1a1a18;
        --bg-tertiary: #242422;
        --text-main: #f0eeeb;
        --text-muted: #9a9893;
        --accent: #d97757;
        --border: #2e2e2a;
        --border-light: #242422;
        --whatsapp: #25D366;
        --whatsapp-hover: #2de378;
        --card-bg: #1a1a18;
        --card-border: #2e2e2a;
        --setup-bg: #0a0a09;
        --setup-text: #f0eeeb;
        --setup-text-muted: rgba(240, 238, 235, 0.6);
        --input-bg: #242422;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
        --shadow-lg: 0 20px 40px rgba(0,0,0,0.5);
    }
}

/* ==================== BASE STYLES ==================== */
body {
    background-color: var(--bg-color);
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.serif-heading {
    font-family: "Source Serif 4", Georgia, serif;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.noise-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.015;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 50;
}

[data-theme="dark"] .noise-bg,
[data-theme="system"] .noise-bg {
    opacity: 0.03;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.product-shadow {
    box-shadow: var(--shadow-lg);
}

.micro-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.theme-toggle-btn {
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    color: var(--text-muted);
}

.theme-toggle-btn:hover {
    color: var(--text-main);
}

.theme-toggle-btn.active {
    background: rgba(74, 157, 110, 0.1);
    color: var(--whatsapp);
    box-shadow: inset 0 0 0 1px rgba(74, 157, 110, 0.3);
}

.theme-toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile Menu */
#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

#mobile-menu .theme-toggle-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}

#mobile-menu .theme-toggle-btn.active {
    background: rgba(74, 157, 110, 0.15);
    color: var(--whatsapp);
    border-color: rgba(74, 157, 110, 0.4);
}

/* Mobile Menu Button Animation */
#mobile-menu-btn span {
    transition: all 0.3s ease;
}

/* ==================== SETUP SECTION (Always dark) ==================== */
.setup-section {
    background-color: var(--setup-bg);
    color: var(--setup-text);
}

.blueprint-grid {
    background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.wireframe-grid {
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 8px;
    height: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 3px solid var(--card-bg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 3px solid var(--card-bg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.step-number {
    font-family: "Source Serif 4", serif;
    font-style: italic;
}

/* ==================== HERO VISUAL ==================== */
.hero-visual-frame {
    border: 1px solid var(--border);
    position: relative;
    background: var(--card-bg);
    border-radius: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.animate-spin-slow {
    animation: spin 12s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== CARDS ==================== */
.hosting-card,
.dev-card {
    background: var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.hosting-card:hover,
.dev-card:hover {
    transform: translateY(-4px);
}

/* ==================== WHATSAPP ANIMATION ==================== */
a[href^="https://wa.me/"]:hover svg {
    animation: whatsapp-bounce 0.5s ease;
}

@keyframes whatsapp-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* ==================== SERVICE CARD ==================== */
#services .group:hover svg {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    display: inline-flex;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    padding: 3px;
    border: 1px solid var(--border);
    gap: 2px;
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0;
}

.theme-toggle-btn:hover {
    color: var(--text-main);
    background: var(--border-light);
}

.theme-toggle-btn.active {
    background: rgba(74, 157, 110, 0.15);
    color: var(--whatsapp);
    box-shadow: inset 0 0 0 1px rgba(74, 157, 110, 0.3);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== HEADER ==================== */
.sticky-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    padding: 8px;
}

.sticky-wrap.hide-up {
    transform: translateY(calc(-100% - 16px));
}

#coming-soon-banner {
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

header {
    background: var(--bg-color);
    border-radius: 16px;
    transition: background-color 0.3s ease;
}

header .nav-link {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

header .nav-link:hover {
    color: var(--text-main);
}

body {
    padding-top: 120px;
}

/* ==================== FOOTER ==================== */
footer {
    border-color: var(--border);
}

/* ==================== PRICING TOGGLE ==================== */
.toggle-container {
    display: inline-flex;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    padding: 4px;
    border: 1px solid var(--border);
}

.toggle-btn {
    padding: 12px 32px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    border: none;
    background: transparent;
}

.toggle-btn.active {
    background: var(--text-main);
    color: var(--bg-color);
    box-shadow: var(--shadow-md);
}

.toggle-btn:hover:not(.active) {
    color: var(--text-main);
}

/* ==================== GRAY UTILITY CLASSES ==================== */
.bg-gray-50 {
    background-color: var(--bg-tertiary) !important;
}

.text-gray-300 {
    color: var(--border) !important;
}

.border-gray-100 {
    border-color: var(--border) !important;
}

.bg-zinc-100 {
    background-color: var(--bg-tertiary) !important;
}

.bg-gray-100 {
    background-color: var(--bg-tertiary) !important;
}

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

.text-white {
    color: #ffffff !important;
}

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

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

.border-white\/10 {
    border-color: rgba(255,255,255,0.1) !important;
}

.text-white\/60 {
    color: var(--setup-text-muted) !important;
}

.text-white\/40 {
    color: rgba(251,250,248,0.4) !important;
}

.text-white\/30 {
    color: rgba(251,250,248,0.3) !important;
}

.text-white\/20 {
    color: rgba(251,250,248,0.2) !important;
}

/* ==================== PROSE / LEGAL PAGES ==================== */
.prose h2 {
    color: var(--text-main);
}

.prose p {
    color: var(--text-muted);
}
