/* Mobile-First Homepage Styles for BookKei */

/* CSS Variables - BookKei Brand Colors */
:root {
    --bookkei-primary: #667eea;
    --bookkei-primary-dark: #5568d3;
    --bookkei-secondary: #764ba2;
    --bookkei-success: #28a745;
    --bookkei-success-dark: #218838;
    --bookkei-accent: #20c997;
    --bookkei-text: #1a202c;
    --bookkei-text-light: #4a5568;
    --bookkei-text-muted: #718096;
    --bookkei-border: #e2e8f0;
    --bookkei-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --bookkei-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --bookkei-radius: 12px;
    --bookkei-radius-lg: 16px;
    --bookkei-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Mobile Styles */
* {
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
}

body {
    font-size: 16px; /* Optimal for mobile readability */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch-Friendly Elements */
a, button, .btn, .nav-link {
    min-height: 44px; /* iOS recommended touch target */
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Typography */
h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}

h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 600;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Mobile Container */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Mobile Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--bookkei-radius);
    transition: var(--bookkei-transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bookkei-primary) 0%, var(--bookkei-secondary) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--bookkei-primary-dark) 0%, var(--bookkei-secondary) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--bookkei-shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--bookkei-success) 0%, var(--bookkei-accent) 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--bookkei-success-dark) 0%, var(--bookkei-accent) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--bookkei-shadow-lg);
}

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

.btn-outline-primary:hover {
    background: var(--bookkei-primary);
    color: white;
    border-color: var(--bookkei-primary);
}

/* Mobile Cards */
.card {
    border-radius: var(--bookkei-radius-lg);
    border: 1px solid var(--bookkei-border);
    box-shadow: var(--bookkei-shadow);
    transition: var(--bookkei-transition);
}

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

/* Mobile Spacing */
.section {
    padding: 2rem 0;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

/* Mobile Navigation Improvements */
.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

/* Mobile Forms */
.form-control {
    font-size: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--bookkei-radius);
    border: 2px solid var(--bookkei-border);
    min-height: 48px;
}

.form-control:focus {
    border-color: var(--bookkei-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Mobile-Optimized Sections */
.hero-section {
    padding: 2rem 0 3rem;
    text-align: center;
}

.features-section {
    padding: 3rem 0;
}

.feature-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--bookkei-radius-lg);
    background: white;
    box-shadow: var(--bookkei-shadow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--bookkei-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--bookkei-primary) 0%, var(--bookkei-secondary) 100%);
    color: white;
}

/* Mobile Footer */
.footer {
    padding: 2rem 0 6rem; /* Extra padding for sticky CTA */
}

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

/* Focus Styles */
a:focus,
button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--bookkei-primary);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Tablet Breakpoint (768px and up) */
@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .hero-section {
        padding: 4rem 0 5rem;
    }

    .feature-card {
        padding: 2rem;
    }

    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .footer {
        padding: 3rem 0 1rem;
    }
}

/* Desktop Breakpoint (992px and up) */
@media (min-width: 992px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .section {
        padding: 5rem 0;
    }

    .hero-section {
        padding: 5rem 0 6rem;
    }

    /* Remove mobile-specific padding on desktop */
    .footer {
        padding: 4rem 0 2rem;
    }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Animation Utilities */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--bookkei-primary) 0%, var(--bookkei-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--bookkei-primary) 0%, var(--bookkei-secondary) 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--bookkei-success) 0%, var(--bookkei-accent) 100%);
}

