/*
 * HabbitArc Website Styles
 * Serene Blue Theme - Based on Color Psychology Research
 * Blue promotes trust, calm, reliability, and professionalism
 */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Primary Colors - Serene Blue Palette */
    --color-primary: #1a5fb4;
    --color-primary-dark: #0d3b7a;
    --color-primary-light: #3584e4;
    --color-accent: #62a0ea;
    --color-accent-light: #99c1f1;
    
    /* Neutral Colors */
    --color-bg-light: #f6f8fa;
    --color-bg-white: #ffffff;
    --color-bg-dark: #0d1117;
    --color-bg-dark-secondary: #161b22;
    
    /* Text Colors */
    --color-text-dark: #1f2328;
    --color-text-muted: #57606a;
    --color-text-light: #ffffff;
    --color-text-light-muted: #8b949e;
    
    /* Semantic Colors */
    --color-success: #2da44e;
    --color-warning: #bf8700;
    --color-error: #cf222e;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #1a5fb4 0%, #3584e4 50%, #62a0ea 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(246,248,250,0.9));
    --gradient-dark: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(26, 95, 180, 0.3);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', var(--font-sans);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
    color: var(--color-primary-dark);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-dark);
}

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

p {
    margin-bottom: var(--space-md);
}

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

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-4xl) 0;
}

.section-dark {
    background: var(--gradient-dark);
    color: var(--color-text-light);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--color-text-light);
}

.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.flex {
    display: flex;
    gap: var(--space-md);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-hero);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    color: var(--color-text-dark);
    font-weight: 500;
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-dark);
    margin: 6px 0;
    transition: all var(--transition-fast);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-hero);
    color: var(--color-text-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    color: var(--color-text-light);
}

.btn-secondary {
    background: var(--color-bg-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-text-light);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--color-text-light);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    padding-top: 72px;
}

.hero::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");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-text {
    color: var(--color-text-light);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.15);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 280px;
    height: 580px;
    background: #1a1a2e;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    text-align: center;
    padding: var(--space-xl);
}

.phone-screen .app-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-hero);
    border-radius: 20px;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
    background: var(--color-bg-white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

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

.feature-card {
    background: var(--color-bg-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

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

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(26, 95, 180, 0.1), rgba(53, 132, 228, 0.1));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
}

.feature-card h3 {
    margin-bottom: var(--space-sm);
}

.feature-card p {
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats {
    background: var(--gradient-dark);
    color: var(--color-text-light);
}

.stat-item {
    text-align: center;
    padding: var(--space-xl);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--color-accent-light);
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 1rem;
    color: var(--color-text-light-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta {
    background: var(--color-bg-light);
    text-align: center;
}

.cta-box {
    background: var(--gradient-hero);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-xl);
    color: var(--color-text-light);
}

.cta-box h2 {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.cta-box p {
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto var(--space-xl);
}

.app-store-badge {
    height: 54px;
    transition: transform var(--transition-base);
}

.app-store-badge:hover {
    transform: scale(1.05);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
}

.footer-brand p {
    color: var(--color-text-light-muted);
    font-size: 0.875rem;
}

.footer-links h4 {
    color: var(--color-text-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--color-text-light-muted);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-text-light);
}

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

.footer-bottom p {
    color: var(--color-text-light-muted);
    font-size: 0.875rem;
    margin: 0;
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--color-text-light-muted);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--color-primary);
    color: var(--color-text-light);
}

/* ============================================
   LEGAL PAGES (Privacy, Terms)
   ============================================ */
.legal-page {
    padding-top: 120px;
    min-height: 100vh;
}

.legal-header {
    background: var(--gradient-hero);
    color: var(--color-text-light);
    padding: var(--space-3xl) 0;
    margin-bottom: var(--space-3xl);
}

.legal-header h1 {
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

.legal-header .last-updated {
    opacity: 0.8;
    font-size: 0.875rem;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-4xl);
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.legal-content p,
.legal-content li {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.legal-content ul,
.legal-content ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.legal-content ul li,
.legal-content ol li {
    margin-bottom: var(--space-sm);
}

/* ============================================
   SUPPORT PAGE
   ============================================ */
.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
}

.faq-section h3 {
    margin-bottom: var(--space-xl);
}

.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: var(--space-lg) 0;
}

.faq-question {
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    color: var(--color-text-muted);
    display: none;
    padding-top: var(--space-sm);
}

.faq-item.active .faq-answer {
    display: block;
}

.contact-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.contact-card h3 {
    margin-bottom: var(--space-md);
}

.contact-card p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.contact-email {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ============================================
   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-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.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; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .phone-mockup {
        width: 240px;
        height: 500px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .support-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg-white);
        flex-direction: column;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .section {
        padding: var(--space-3xl) 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        max-width: none;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .phone-mockup {
        width: 200px;
        height: 420px;
    }
}

