/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme */
    --bg-primary: linear-gradient(135deg, #ffffff 0%, #ecfeff 50%, #cffafe 100%);
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --accent: #0891b2;
    --accent-hover: #0e7490;
    --accent-light: #22d3ee;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(6, 182, 212, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #111827 0%, #164e63 50%, #134e4a 100%);
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --accent: #22d3ee;
    --accent-hover: #67e8f9;
    --accent-light: #06b6d4;
    --card-bg: rgba(17, 24, 39, 0.8);
    --card-border: rgba(34, 211, 238, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app {
    min-height: 100vh;
    background: var(--bg-primary);
    transition: background 0.3s ease;
}

/* Header */
.header {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
    background: var(--card-bg);
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.sun-icon { display: none; }
.moon-icon { display: block; }

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

/* Main / Hero */
.main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.hero {
    text-align: center;
    padding: 2rem 0 4rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.highlight {
    color: var(--accent);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 42rem;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Features */
.features {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Demo Section */
.demo-section {
    padding: 4rem 0;
    text-align: center;
}

.demo-notice {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.demo-notice a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.demo-notice a:hover {
    text-decoration: underline;
}

.demo-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.demo-btn.primary {
    background: var(--accent);
    color: white;
}

.demo-btn.primary:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.demo-btn.secondary {
    background: var(--card-bg);
    border: 2px solid var(--accent);
    color: var(--accent);
}

.demo-btn.secondary:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

/* Contacts */
.contacts {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1rem;
    text-align: center;
}

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

.contact-link {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid var(--accent);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--accent);
    color: white;
}

/* Preview Banner */
.preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.preview-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-text {
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Offset for fixed banner */
.app {
    padding-top: 2.5rem;
}

/* Footer */
.footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--card-border);
}

.demo-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

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

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

.animate-fade-in-delay {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 0.2s;
}

.animate-fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 0.4s;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

/* Responsive */

/* Tablet */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        padding: 1.5rem 0 3rem;
    }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
    .preview-banner {
        padding: 0.4rem 0.75rem;
    }

    .preview-text {
        font-size: 0.75rem;
    }

    .app {
        padding-top: 2.2rem;
    }

    .header {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-list {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .main {
        padding: 2rem 1rem;
    }

    .hero {
        padding: 1rem 0 2.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .features {
        padding: 2.5rem 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .demo-section {
        padding: 2.5rem 0;
    }

    .demo-buttons {
        flex-direction: column;
        align-items: center;
    }

    .demo-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .contacts {
        padding: 2.5rem 1rem;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .preview-banner {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .preview-badge {
        font-size: 0.65rem;
    }

    .preview-text {
        font-size: 0.7rem;
        text-align: center;
    }

    .app {
        padding-top: 3rem;
    }

    .header {
        justify-content: center;
        text-align: center;
    }

    .logo {
        width: 100%;
        text-align: center;
        font-size: 1.4rem;
    }

    .nav {
        width: 100%;
    }

    .nav-list {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .feature-card h4 {
        font-size: 1.1rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    .demo-notice {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .footer {
        padding: 1rem;
    }

    .footer p {
        font-size: 0.85rem;
    }
}

/* Smooth transitions for theme switch */
.app,
.header,
.nav-link,
.feature-card,
.footer,
.demo-btn,
.contact-link,
.preview-banner {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
