/* Mobile-First Design - Full Screen Utilization */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Base mobile styles - Full screen edge-to-edge */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.5;
    color: #111;
    background: #fff;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-overflow-scrolling: touch;
}

/* Full-width container - no margins on mobile */
.container {
    background: #fff;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* Typography - Optimized for mobile readability */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: #111;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 1rem;
}

/* Mobile-optimized buttons - Full width on mobile */
button, .btn {
    background: #007AFF;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    width: 100%;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button:active, .btn:active {
    transform: scale(0.98);
    background: #0051D5;
}

/* Links */
a {
    color: #007AFF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists - Clean mobile design */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Progressive Enhancement: 375px+ (iPhone SE and up) */
@media (min-width: 375px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.625rem;
    }
}

/* Progressive Enhancement: 480px+ (Large phones) */
@media (min-width: 480px) {
    body {
        font-size: 17px;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Buttons side-by-side on larger screens */
    button, .btn {
        display: inline-block;
        width: auto;
        min-width: 140px;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Progressive Enhancement: 768px+ (Tablets) */
@media (min-width: 768px) {
    body {
        font-size: 18px;
    }
    
    .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    h3 {
        font-size: 1.625rem;
    }
    
    button, .btn {
        padding: 12px 32px;
        font-size: 17px;
    }
    
    button:hover, .btn:hover {
        background: #0051D5;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
    }
}

/* Progressive Enhancement: 1024px+ (Desktop) */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        padding: 0 40px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
}

/* Progressive Enhancement: 1440px+ (Large Desktop) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    body {
        font-size: 19px;
    }
    
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
*:focus {
    outline: 3px solid #007AFF;
    outline-offset: 2px;
}


/* Print styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    button, .btn {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #000;
        color: #fff;
    }
    
    .container {
        background: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #fff;
    }
    
    button, .btn {
        background: #0A84FF;
    }
    
    button:active, .btn:active {
        background: #0051D5;
    }
    
    a {
        color: #0A84FF;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    body {
        background: #fff;
        color: #000;
    }
    
    button, .btn {
        border: 2px solid #000;
    }
    
    *:focus {
        outline: 4px solid #000;
    }
}