/**
 * Zuco Design System
 *
 * Shared styles for all Zuco landing pages.
 * Brand: Playful Premium (Soft Orange + Soft Blue)
 *
 * Usage: <link rel="stylesheet" href="/css/zuco.css">
 */

/* ========================================
   CSS Reset
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   Brand Colors (from app_colors.dart)
   ======================================== */
:root {
    /* Brand Colors */
    --zuco-primary: #F4A261;          /* Soft Orange - CTAs, warmth */
    --zuco-primary-hover: #E8956A;
    --zuco-secondary: #457B9D;         /* Soft Blue - Trust, accents */
    --zuco-secondary-hover: #3A6A89;
    --zuco-tertiary: #1D3557;          /* Deep Navy - Headers, text */

    /* Semantic Colors */
    --zuco-success: #2A9D8F;           /* Soft Teal */
    --zuco-warning: #F4A261;           /* Same as primary */
    --zuco-error: #E76F51;             /* Terra Cotta */
    --zuco-star: #E9C46A;              /* Golden Amber */

    /* Light Theme (default) */
    --bg: #FDF9F6;                /* Soft peachy cream */
    --bg-accent: #F5F0EC;
    --surface: #FFFFFF;
    --surface-elevated: #F0EBE6;
    --surface-tinted: #FFF8F2;
    --text: #1D3557;              /* Deep Navy */
    --text-muted: #5A6978;
    --text-light: #8D9AA8;
    --border: #E8ECF0;
    --divider: #E8ECF0;
    --shadow-color: rgba(232, 168, 124, 0.1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #F4A261 0%, #E76F51 100%);
    --gradient-secondary: linear-gradient(135deg, #457B9D 0%, #1D3557 100%);
    --gradient-warm: linear-gradient(135deg, #FDF9F6 0%, #FFF8F2 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px var(--shadow-color);
    --shadow-xl: 0 20px 25px -5px var(--shadow-color);
    --shadow-glow: 0 0 60px rgba(244, 162, 97, 0.2);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   Dark Theme
   ======================================== */
[data-theme="dark"] {
    --bg: #0F1419;                /* Deep navy-black */
    --bg-accent: #192028;
    --surface: #192028;
    --surface-elevated: #252D38;
    --surface-tinted: #2A3442;
    --text: #FFFFFF;
    --text-muted: #9EAAB8;
    --text-light: #6E7A88;
    --border: #2A3442;
    --divider: #2A3442;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --gradient-warm: linear-gradient(135deg, #0F1419 0%, #192028 100%);
}

/* ========================================
   Base Styles
   ======================================== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.25rem); }

p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

a {
    color: var(--zuco-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--zuco-secondary-hover);
}

/* ========================================
   Layout
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
}

@media (max-width: 768px) {
    section {
        padding: 64px 0;
    }
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-normal);
}

[data-theme="dark"] .nav {
    background: rgba(15, 20, 25, 0.9);
}

.nav.scrolled {
    padding: 12px 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.logo span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

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

.nav-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-cta .nav-link {
        display: none;
    }

    .nav-cta {
        gap: 12px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
}

/* ========================================
   Theme Toggle
   ======================================== */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    background: var(--zuco-primary);
    color: white;
    border-color: var(--zuco-primary);
}

.theme-toggle .sun,
.theme-toggle .moon {
    width: 20px;
    height: 20px;
}

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

.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: flex; }

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

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg), 0 0 30px var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 40px var(--shadow-glow);
    color: white;
}

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

.btn-secondary:hover {
    background: var(--surface-elevated);
    border-color: var(--zuco-secondary);
}

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

.btn-outline:hover {
    background: var(--text);
    color: var(--surface);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.125rem;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* ========================================
   Store Buttons
   ======================================== */
.store-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--zuco-primary);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-normal);
    max-width: 155px;
}

.store-btn:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .store-btn {
    background: var(--zuco-primary);
}

[data-theme="dark"] .store-btn:hover {
    background: var(--primary-hover);
}

.store-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.store-btn-text {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.store-btn-text small {
    font-size: 0.625rem;
    opacity: 0.9;
    display: block;
    line-height: 1;
}

.store-btn-text strong {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .store-buttons {
        flex-direction: column;
        width: 100%;
    }

    .store-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 32px;
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.75rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

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

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-label {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(244, 162, 97, 0.15);
    color: var(--zuco-primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

[data-theme="dark"] .section-label {
    background: rgba(244, 162, 97, 0.2);
}

.section-header h2 {
    margin-bottom: 16px;
}

/* ========================================
   Trust Section
   ======================================== */
.trust {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .trust {
    background: var(--surface);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
}

.trust-item {
    text-align: center;
}

.trust-icon {
    width: 64px;
    height: 64px;
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.75rem;
}

.trust-item h3 {
    margin-bottom: 8px;
}

.trust-item p {
    font-size: 0.95rem;
}

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

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

/* ========================================
   Steps / How It Works
   ======================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.step {
    position: relative;
    text-align: center;
    padding: 32px 24px;
}

.step::after {
    content: '';
    position: absolute;
    top: 50px;
    right: -16px;
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, var(--zuco-primary) 0%, transparent 100%);
}

.step:last-child::after {
    display: none;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 0 30px rgba(244, 162, 97, 0.3);
}

.step h3 {
    margin-bottom: 12px;
}

.step p {
    font-size: 0.95rem;
}

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

    .step::after {
        display: none;
    }
}

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

/* ========================================
   Features
   ======================================== */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    gap: 16px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(244, 162, 97, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

[data-theme="dark"] .feature-icon {
    background: rgba(244, 162, 97, 0.2);
}

.feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 0.95rem;
}

/* ========================================
   Testimonials
   ======================================== */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.testimonial-card {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.testimonial-stars {
    color: var(--zuco-star);
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.author-name {
    font-weight: 600;
    color: var(--text);
}

.author-location {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

/* ========================================
   CTA Section
   ======================================== */
.cta {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.cta h2 {
    color: white;
    margin-bottom: 16px;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta .store-buttons {
    justify-content: center;
}

.cta .store-btn {
    background: white;
    color: var(--zuco-primary);
}

.cta .store-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--zuco-primary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--zuco-tertiary);
    color: white;
    padding: 64px 0 32px;
}

[data-theme="dark"] .footer {
    background: var(--surface);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
    font-size: 0.95rem;
}

.footer-links h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-area-heading {
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 12px;
    display: block;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 8px 0;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background var(--transition-fast);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--zuco-primary); }
.text-secondary { color: var(--zuco-secondary); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--zuco-primary); }
.bg-secondary { background: var(--zuco-secondary); }
.bg-surface { background: var(--surface); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }
.py-4 { padding-top: 32px; padding-bottom: 32px; }
.py-5 { padding-top: 48px; padding-bottom: 48px; }

.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Legal Pages
   ======================================== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

.legal-content h1 {
    margin-bottom: 16px;
}

.legal-content .last-updated {
    color: var(--text-muted);
    margin-bottom: 48px;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 48px;
    margin-bottom: 16px;
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-content p {
    margin-bottom: 16px;
}

.legal-content ul, .legal-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.legal-content a {
    color: var(--zuco-secondary);
}

.legal-content a:hover {
    text-decoration: underline;
}
