@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Core Palette - Modern SaaS */
    --bg-main: #FAFAFD;
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 255, 255, 0.7);
    --primary: #6D4CFF;
    --primary-glow: rgba(109, 76, 255, 0.15);
    --glow-purple: rgba(109, 76, 255, 0.2);
    --glow-blue: rgba(91, 141, 239, 0.15);
    
    /* Secondary Accents */
    --mint: #3DD9B3;
    --mint-bg: #E9FFF8;
    --orange: #FFB547;
    --orange-bg: #FFF3E1;
    --blue: #5B8DEF;
    --blue-bg: #EDF4FF;
    
    /* Text */
    --text-main: #16152C;
    --text-muted: #64748B;
    --border: #E8EAF2;
    
    /* Layout */
    --radius-full: 100px;
    --radius-xl: 32px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-premium: 0 20px 40px -12px rgba(22, 21, 44, 0.08);
    --nav-shift: 36px; /* ~1cm horizontal nudge */
}

body.dark-theme {
    --bg-main: #0A0A14;
    --surface: #121220;
    --surface-glass: rgba(18, 18, 32, 0.7);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-premium: 0 40px 80px -20px rgba(0,0,0,0.6);
    --glow-purple: rgba(109, 76, 255, 0.15);
    --glow-blue: rgba(91, 141, 239, 0.1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Background Effects */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    pointer-events: none;
}

.glow-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, var(--glow-purple) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, var(--glow-blue) 0%, transparent 50%);
    z-index: -2;
    filter: blur(80px);
}

#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.intro-content {
    display: flex;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 4rem;
    color: var(--text-main);
}

.intro-smart {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.intro-schedulo {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--primary);
}

.intro-content.active .intro-smart { opacity: 1; transform: translateX(0); }
.intro-content.active .intro-schedulo { opacity: 1; transform: translateX(10px); }

/* Typography Typewriter */
.typewriter {
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100px;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    background: transparent;
}

body.dark-theme nav {
    background: transparent;
}

nav.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-theme nav.scrolled {
    background: rgba(10, 10, 20, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #E8EAF2;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

body.dark-theme .theme-toggle {
    border-color: rgba(255, 255, 255, 0.1);
    color: #CBD5E1;
}

.theme-toggle:hover {
    background: rgba(109, 76, 255, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

.nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 0;
}

.logo {
    display: flex;
    flex-direction: column;
    gap: 0px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: calc(-1 * var(--nav-shift));
}

.logo-icon {
    display: none;
}

.logo small {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    flex: 1;
    justify-content: center;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.nav-inner > div:last-child {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
    transform: translateX(var(--nav-shift));
}

@media (max-width: 1024px) {
    .nav-inner {
        gap: 24px;
        padding: 0 24px;
    }

    .nav-links {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .nav-inner {
        gap: 12px;
        padding: 0 16px;
    }

    .nav-links {
        gap: 16px;
        font-size: 0.9rem;
    }
}

.zoi-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.zoi-bubble {
    display: none;
    width: min(360px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

.zoi-bubble.open { display: block; }

.zoi-header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(109, 76, 255, 0.12), rgba(61, 217, 179, 0.10));
    border-bottom: 1px solid var(--border);
}

.zoi-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-main);
}

.zoi-status {
    font-size: 12px;
    color: var(--text-muted);
}

.zoi-messages {
    height: 320px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, rgba(250,250,253,0.94), rgba(245,246,255,0.96));
}

body.dark-theme .zoi-messages {
    background: linear-gradient(180deg, rgba(18,18,32,0.94), rgba(12,12,22,0.98));
}

.zoi-message {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.zoi-message.user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.zoi-message.bot {
    align-self: flex-start;
    background: rgba(109, 76, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(109, 76, 255, 0.12);
    border-bottom-left-radius: 6px;
}

.zoi-composer {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.zoi-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 14px;
    background: var(--surface);
    color: var(--text-main);
    font-size: 14px;
}

.zoi-send {
    width: auto;
    padding: 12px 16px;
    border-radius: 999px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.zoi-launcher {
    width: 120px;
    height: 120px;
    border-radius: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.zoi-launcher img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 100%;
}

.zoi-launcher:hover {
    transform: scale(1.1);
    filter: brightness(0.9);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
}

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

/* Buttons */
.btn {
    padding: 16px 36px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: inline-block;
    cursor: pointer;
    border: none;
    text-align: center;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #7A5CFF 0%, var(--primary) 100%);
    color: white;
    box-shadow: 0 14px 32px rgba(109, 76, 255, 0.28), 0 1px 0 rgba(255, 255, 255, 0.22) inset;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 52px rgba(109, 76, 255, 0.42), 0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-main);
    border: 1px solid rgba(109, 76, 255, 0.18);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 22px rgba(22, 21, 44, 0.06);
}

.btn-outline:hover {
    background: var(--surface);
    border-color: rgba(109, 76, 255, 0.45);
    color: var(--primary);
    box-shadow: 0 16px 34px rgba(109, 76, 255, 0.14);
}

body.dark-theme .btn-outline {
    background: rgba(18, 18, 32, 0.82);
    color: #F8FAFC;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

body.dark-theme .btn-outline:hover {
    background: rgba(28, 28, 44, 0.96);
    border-color: rgba(124, 92, 255, 0.55);
    color: #FFFFFF;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

body.dark-theme .btn-primary {
    box-shadow: 0 16px 34px rgba(40, 29, 92, 0.55), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

body.dark-theme .btn-primary:hover {
    box-shadow: 0 22px 56px rgba(40, 29, 92, 0.72), 0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

/* Hero Section */
.hero {
    padding: 220px 0 160px;
    text-align: center;
}

.hero h1 {
    font-size: 5.5rem;
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -0.04em;
    color: var(--text-main);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 48px;
}

/* Card Styling */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.card {
    background: var(--surface);
    padding: 48px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-12px);
    border-color: rgba(109, 93, 251, 0.3);
    background: var(--surface-light);
    box-shadow: var(--shadow-dark);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(109, 93, 251, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 28px;
}

/* Device Mockups */
.mockup-container {
    background: rgba(255,255,255,0.02);
    border-radius: 40px;
    padding: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-dark);
    position: relative;
}

.mockup-img {
    width: 100%;
    border-radius: 30px;
    display: block;
}

.mockup-overlay {
    position: absolute;
    width: 200px; /* Properly sized for realism */
    bottom: -40px;
    right: -30px;
    z-index: 10;
    filter: drop-shadow(0 40px 60px rgba(0,0,0,0.5));
}

/* Mobile Ecosystem Section Styles */
.ecosystem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.ecosystem-visual {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.app-frame {
    width: 240px;
    background: #000;
    border-radius: 40px;
    padding: 8px;
    border: 4px solid #1A1A1A;
    box-shadow: 0 40px 80px rgba(0,0,0,0.4);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-frame:hover {
    transform: translateY(-15px) rotate(-2deg);
}

.app-frame.offset {
    margin-top: 60px;
}

.app-frame.offset:hover {
    transform: translateY(-15px) rotate(2deg);
}

.app-frame img {
    width: 100%;
    border-radius: 32px;
    display: block;
}

/* Reveal on Scroll */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Form */
.form-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 18px 24px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
}

select.form-input,
select.form-input option {
    color: var(--text-main);
}

select.form-input option {
    background: var(--surface);
}

.form-input:focus {
    border-color: var(--primary);
}

/* CTA Section Dynamic Theme */
.cta-banner {
    background: var(--cta-bg);
    color: var(--cta-text);
    border-radius: var(--radius-xl);
    padding: 100px;
    text-align: center;
    border: 1px solid var(--border);
}

.cta-banner h2 {
    color: inherit;
    background: none;
    -webkit-text-fill-color: initial;
}

.cta-banner p {
    color: inherit;
    opacity: 0.8;
}

.cta-banner .btn-primary {
    background: #FFFFFF;
    color: var(--primary);
}

.cta-banner .btn-primary:hover {
    background: #F8FAFC;
    transform: translateY(-5px);
}

footer {
    padding: 120px 0 60px;
    border-top: 1px solid var(--border);
    background: linear-gradient(to bottom, transparent, rgba(109, 93, 251, 0.05));
}
