/* Import Google Fonts - Outfit for headings, Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM & SYSTEM TOKENS --- */
:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-main: #070913;
    --bg-secondary: #0c0f1d;
    --bg-card: rgba(18, 22, 41, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Branding Colors (Gamma-like gradients) */
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary: #ec4899; /* Pink/Magenta */
    --secondary-glow: rgba(236, 72, 153, 0.15);
    --accent: #06b6d4; /* Cyan */
    --accent-glow: rgba(6, 182, 212, 0.15);
    
    --gradient-hero: linear-gradient(135deg, #818cf8 0%, #ec4899 50%, #22d3ee 100%);
    --gradient-card-border: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.3) 100%);
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Layout Variables */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode Variables Override */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.75);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(99, 102, 241, 0.2);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary-glow: rgba(99, 102, 241, 0.08);
    --secondary-glow: rgba(236, 72, 153, 0.08);
    --accent-glow: rgba(6, 182, 212, 0.08);
    
    --gradient-hero: linear-gradient(135deg, #4f46e5 0%, #db2777 50%, #0891b2 100%);
    --gradient-card-border: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(219, 39, 119, 0.15) 100%);
    
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- BASIC RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Background glows for a high-end ambient feel */
.ambient-glow-1 {
    position: absolute;
    width: 45vw;
    height: 45vw;
    top: -15vw;
    left: -10vw;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.ambient-glow-2 {
    position: absolute;
    width: 50vw;
    height: 50vw;
    top: 50vh;
    right: -15vw;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.ambient-glow-3 {
    position: absolute;
    width: 40vw;
    height: 40vw;
    bottom: -10vw;
    left: 10vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- TYPOGRAPHY UTILITIES --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- HEADER & NAVIGATION --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(7, 9, 19, 0.7);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

[data-theme="light"] header {
    background-color: rgba(248, 250, 252, 0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo svg {
    color: var(--primary);
    width: 28px;
    height: 28px;
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.75rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient-hero);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Theme Switcher Button */
.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-glow);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.5s ease;
}

/* Toggle Sun/Moon display */
.theme-toggle-btn .sun-icon { display: none; }
.theme-toggle-btn .moon-icon { display: block; }

[data-theme="light"] .theme-toggle-btn .sun-icon { display: block; }
[data-theme="light"] .theme-toggle-btn .moon-icon { display: none; }

/* --- HERO SECTION --- */
.hero {
    padding: 6rem 2rem 3rem;
    text-align: center;
    position: relative;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 99px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

[data-theme="light"] .badge {
    background: rgba(79, 70, 229, 0.06);
    color: #4f46e5;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-hero);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

/* --- MAIN CONTAINER --- */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
    position: relative;
}

section {
    padding: 5rem 0;
    scroll-margin-top: 80px;
}

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

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- PRESENTATION WRAPPER (BROWSER MOCKUP) --- */
.presentation-container {
    max-width: 950px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.presentation-container:hover {
    border-color: var(--border-hover);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Browser Mockup Top Bar */
.browser-header {
    background: rgba(18, 22, 41, 0.8);
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

[data-theme="light"] .browser-header {
    background: rgba(226, 232, 240, 0.5);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.browser-address-bar {
    flex-grow: 1;
    background: rgba(7, 9, 19, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="light"] .browser-address-bar {
    background: white;
}

.browser-address-bar svg {
    color: var(--success);
    width: 12px;
    height: 12px;
}

/* Embedded Presentation Aspect Ratio Box */
.iframe-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Action bar below presentation */
.presentation-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(12, 15, 29, 0.6);
    border-top: 1px solid var(--border-color);
}

[data-theme="light"] .presentation-actions {
    background: rgba(241, 245, 249, 0.6);
}

@media (max-width: 600px) {
    .presentation-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .presentation-actions .btn {
        justify-content: center;
    }
}

/* --- DASHBOARD SECTION --- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: var(--transition-smooth);
}

.kpi-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.kpi-card:hover::before {
    background: var(--gradient-hero);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.kpi-card:nth-child(2) .kpi-icon {
    color: var(--secondary);
    background: rgba(236, 72, 153, 0.1);
}

.kpi-card:nth-child(3) .kpi-icon {
    color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
}

.kpi-card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.kpi-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
}

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

.chart-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.chart-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-card h3 svg {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
}

/* --- CALCULATOR SECTION --- */
.calc-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 900px) {
    .calc-container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.calc-title h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.calc-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 500;
}

.slider-val {
    font-weight: 700;
    color: var(--primary);
}

.app-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: var(--border-color);
    outline: none;
    transition: background 0.3s;
}

.app-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: transform 0.2s, background 0.2s;
}

.app-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--secondary);
}

/* Custom coloring for different slider thumbs */
#calc-instagram::-webkit-slider-thumb { background: var(--secondary); }
#calc-tiktok::-webkit-slider-thumb { background: var(--text-primary); border: 2px solid var(--accent); }
#calc-youtube::-webkit-slider-thumb { background: var(--danger); }
#calc-whatsapp::-webkit-slider-thumb { background: var(--success); }

/* Results Side */
.calc-results {
    background: rgba(7, 9, 19, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}

[data-theme="light"] .calc-results {
    background: rgba(255, 255, 255, 0.5);
}

.result-metric {
    text-align: center;
}

.result-metric h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.result-total-hours {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.25rem;
}

.result-total-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.percentage-bar-wrapper {
    margin: 1.5rem 0;
}

.percentage-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.percentage-val {
    font-weight: 700;
    color: var(--text-primary);
}

.bar-container {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 99px;
    overflow: hidden;
}

.bar-fill {
    width: 0%;
    height: 100%;
    background: var(--gradient-hero);
    border-radius: 99px;
    transition: width 0.5s ease-out;
}

/* Comparison Widget */
.calc-comparison {
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    font-size: 0.9rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.calc-comparison.warning {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.1);
}

.calc-comparison.success {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.1);
}

.comp-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.calc-comparison.warning .comp-badge {
    background: var(--danger);
    color: white;
}

.calc-comparison.success .comp-badge {
    background: var(--success);
    color: white;
}

.comp-text {
    color: var(--text-secondary);
}

.comp-text span {
    font-weight: 700;
    color: var(--text-primary);
}

/* --- METHODOLOGY & DETAILS --- */
.methodology-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

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

.methodology-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

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

.methodology-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.methodology-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.methodology-list li svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.methodology-list li strong {
    color: var(--text-primary);
}

/* Sample Card Visual */
.sample-visual-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    position: relative;
}

.sample-number {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
    font-family: 'Outfit', sans-serif;
}

.sample-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.sample-stats-mini {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.mini-stat h5 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.mini-stat p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 3rem 2rem;
    text-align: center;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo svg {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.footer-credits {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-credits a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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