/* ============================================
   ListifyAI - Shared Styles (All Pages)
   Design System matching Flutter App
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Backgrounds - matching Flutter app */
    --bg-primary: #262624;
    --bg-deep: #0A0E1A;
    --bg-card: #2A2A2A;
    --bg-card-hover: #323230;
    --bg-card-dark: #30302E;
    --bg-darkest: #1A1A1A;

    /* Brand - Sage Green (Tamara Green) */
    --brand: #7C8870;
    --brand-start: #7B8C7A;
    --brand-end: #5B6B5A;
    --brand-active: #5ED65E;
    --brand-glow: rgba(124, 136, 112, 0.25);

    /* Status */
    --status-success: #52C41A;
    --status-warning: #FFA940;
    --status-error: #FF4D4F;
    --status-info: #40A9FF;

    /* Text hierarchy */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.54);
    --text-gray: #6B7280;
    --text-sage: #B8C5B8;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-strong: rgba(255, 255, 255, 0.2);

    /* Radius - matching Flutter */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-xxl: 24px;
    --radius-pill: 50px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;
    --space-3xl: 32px;
    --space-4xl: 48px;
    --space-5xl: 64px;
    --space-6xl: 80px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul { list-style: none; }

/* ---------- Typography ---------- */
h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.15;
}
h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
}
h3 {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 700;
    letter-spacing: -0.2px;
    line-height: 1.3;
}
h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ---------- Utility ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xxl);
}

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-sage { color: var(--text-sage); }
.text-brand { color: var(--brand); }
.text-center { text-align: center; }

/* ---------- Navigation (Shared) ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 var(--space-xxl);
    background: rgba(38, 38, 36, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(38, 38, 36, 0.97);
}

.nav-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.375rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-start), var(--brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-logo-dot {
    width: 8px;
    height: 8px;
    background: var(--brand);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 8px 20px;
    background: var(--brand);
    color: white !important;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--brand-glow);
}

.nav-cta::after { display: none !important; }

/* Mobile menu button */
.nav-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

/* Mobile overlay */
.nav-mobile-overlay {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(38, 38, 36, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.nav-mobile-overlay.active {
    display: flex;
}

.nav-mobile-overlay a {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
}

.nav-mobile-overlay .nav-cta {
    padding: 14px 40px;
    font-size: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
    color: white;
    box-shadow: 0 4px 20px var(--brand-glow);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 32px rgba(124, 136, 112, 0.35);
}

.btn-glass {
    background: var(--glass-bg);
    color: white;
    border: 1px solid var(--glass-border-strong);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ---------- Cards ---------- */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xxl);
    padding: var(--space-xxl);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 136, 112, 0.3);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.solid-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-xxl);
    padding: var(--space-xxl);
    transition: all 0.3s ease;
}

.solid-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* ---------- Section Titles ---------- */
.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-header .badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(124, 136, 112, 0.15);
    border: 1px solid rgba(124, 136, 112, 0.25);
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--brand);
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

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

/* ---------- Footer (Shared) ---------- */
.site-footer {
    background: var(--bg-darkest);
    padding: var(--space-4xl) var(--space-xxl) var(--space-xxl);
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
}

.footer-brand p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-top: var(--space-sm);
    max-width: 260px;
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--brand);
}

.footer-bottom {
    max-width: 1200px;
    margin: var(--space-3xl) auto 0;
    padding-top: var(--space-xxl);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* stagger delays */
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }
.reveal-d6 { transition-delay: 0.6s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --space-xxl: 16px;
    }

    .navbar {
        height: 56px;
        padding: 0 var(--space-lg);
    }

    .nav-links { display: none; }
    .nav-menu-btn { display: block; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xxl);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
}
