/*
===============================================================================
EQUATIONSINKALA.COM - RESPONSIVE CSS
===============================================================================
Production-ready responsive styles
Last Updated: January 2026
Author: Claude (for Zach)

BREAKPOINTS:
- 320px: Small phones
- 480px: Medium phones  
- 768px: Tablets
- 1024px: Small desktops
- 1200px+: Large desktops

USAGE:
Add this file AFTER your main styles in WordPress:
Appearance > Customize > Additional CSS (paste contents)
OR
wp-content/themes/big-brother/style.css (append to end)
===============================================================================
*/

/* =============================================================================
   BASE RESPONSIVE IMPROVEMENTS (All Devices)
   ============================================================================= */

/* Ensure all images are responsive by default */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Better box-sizing for all elements */
*, *::before, *::after {
    box-sizing: border-box;
}

/* =============================================================================
   FORM INPUTS - Replace Inline Styles
   ============================================================================= */

/* Newsletter Form Inputs */
.form-input {
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-input:focus {
    border-color: #5a67d8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
}

/* Submit Button Base */
.form-submit-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(76, 81, 191, 0.4);
    width: 100%;
    min-height: 44px; /* Accessibility requirement */
}

.form-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 81, 191, 0.5);
}

.form-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* =============================================================================
   NFT COLLECTION GRID - Replace Inline Styles
   ============================================================================= */

.nft-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.nft-stat-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* =============================================================================
   STATS SECTION - Replace Inline Grid Styles
   ============================================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto 50px;
}

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

.stat-number {
    font-size: 3em;
    font-weight: bold;
}

.stat-label {
    color: #4a5568;
    font-size: 1.1em;
}

/* =============================================================================
   TOUCH TARGET IMPROVEMENTS
   ============================================================================= */

/* All interactive elements need 44px minimum for accessibility */
button,
.cta-button,
.cta-button-outline,
.quiz-option,
.nav-links a,
a.article-link,
.quiz-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =============================================================================
   SMALL PHONES (320px - 479px)
   ============================================================================= */

@media (max-width: 479px) {
    /* Typography */
    header h1 {
        font-size: 1.5em !important;
        line-height: 1.2;
        padding: 0 10px;
    }
    
    header p {
        font-size: 1em !important;
    }
    
    .hero h2 {
        font-size: 1.3em !important;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 0.95em !important;
    }
    
    .hero .tagline {
        font-size: 1.1em !important;
    }
    
    /* Sections */
    section {
        padding: 40px 15px !important;
    }
    
    .calm-intro h3,
    .principles h3,
    .unique-approach h3,
    .path-selection h3,
    .featured-tools h3,
    .expectations h3,
    .additional-resources h3,
    .featured-content h3 {
        font-size: 1.4em !important;
    }
    
    .calm-intro p,
    .principles li,
    .unique-approach p {
        font-size: 1em !important;
    }
    
    /* Buttons - Stack vertically */
    .hero > div,
    .result-actions {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .cta-button,
    .cta-button-outline {
        width: 100% !important;
        max-width: 100% !important;
        padding: 14px 20px !important;
        font-size: 0.95em !important;
    }
    
    /* Cards - Always single column */
    .pathway,
    .tool-grid,
    .resource-grid,
    .featured-grid,
    .nft-preview-grid,
    .stats-grid,
    .nft-stat-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Path Cards */
    .path-card,
    .tool-card,
    .resource-card,
    .featured-article {
        padding: 20px !important;
    }
    
    .path-card h4,
    .tool-card h4,
    .resource-card h4 {
        font-size: 1.2em !important;
    }
    
    /* Newsletter Form */
    .form-input {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 12px !important;
    }
    
    .form-submit-btn {
        font-size: 1em !important;
        padding: 12px 20px !important;
    }
    
    /* Quiz Modal */
    .quiz-container {
        width: 95% !important;
        padding: 0 !important;
        max-height: 85vh !important;
    }
    
    .quiz-header {
        padding: 20px 15px !important;
    }
    
    .quiz-header h3 {
        font-size: 1.4em !important;
    }
    
    .quiz-body {
        padding: 20px 15px !important;
    }
    
    .quiz-question h4 {
        font-size: 1.2em !important;
        margin-bottom: 20px !important;
    }
    
    .quiz-option {
        padding: 14px 16px !important;
        font-size: 0.95em !important;
    }
    
    .quiz-btn {
        padding: 10px 20px !important;
        font-size: 0.95em !important;
    }
    
    /* Quiz Trigger Section */
    .quiz-trigger h3 {
        font-size: 1.5em !important;
    }
    
    .quiz-trigger p {
        font-size: 1em !important;
    }
    
    .quiz-start-btn {
        padding: 12px 30px !important;
        font-size: 1em !important;
    }
    
    /* Featured Articles */
    .article-content {
        padding: 20px !important;
    }
    
    .article-badge {
        font-size: 0.7em !important;
        padding: 6px 12px !important;
    }
    
    /* Expectations Grid */
    .expectations-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .expectation-item {
        font-size: 0.95em !important;
        padding: 12px !important;
    }
    
    /* Quote Section */
    .quote-section p:first-child {
        font-size: 1.2em !important;
    }
    
    .quote-section p:last-child {
        font-size: 1em !important;
    }
    
    /* Navigation */
    .nav-container {
        padding: 12px 15px !important;
    }
    
    .nav-logo {
        font-size: 1em !important;
    }
    
    .nav-logo span:last-child {
        display: none; /* Hide text, keep emoji on tiny screens */
    }
    
    /* Footer */
    footer {
        padding: 30px 15px !important;
    }
    
    footer strong {
        font-size: 1.1em !important;
    }
    
    footer p {
        font-size: 0.95em !important;
    }
    
    /* Details/Accordions */
    details {
        padding: 15px !important;
        margin: 15px 10px !important;
    }
    
    summary {
        font-size: 1em !important;
        padding: 8px !important;
    }
}

/* =============================================================================
   MEDIUM PHONES (480px - 767px)
   ============================================================================= */

@media (min-width: 480px) and (max-width: 767px) {
    /* Typography */
    header h1 {
        font-size: 1.8em !important;
    }
    
    .hero h2 {
        font-size: 1.6em !important;
    }
    
    /* Sections */
    section {
        padding: 50px 20px !important;
    }
    
    /* Cards - Still mostly single column but allow 2 if space permits */
    .pathway,
    .tool-grid,
    .resource-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    }
    
    .featured-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Stats can be 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }
    
    /* Buttons can be side-by-side if they fit */
    .cta-button,
    .cta-button-outline {
        max-width: 300px !important;
        margin: 10px auto !important;
    }
}

/* =============================================================================
   TABLETS (768px - 1023px)
   ============================================================================= */

@media (min-width: 768px) and (max-width: 1023px) {
    /* Container */
    .container {
        max-width: 900px;
    }
    
    /* Typography */
    header h1 {
        font-size: 2em;
    }
    
    .hero h2 {
        font-size: 1.8em;
    }
    
    /* Cards - 2 columns */
    .pathway,
    .tool-grid,
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* NFT Grid - 2 columns */
    .nft-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Stats - 3 columns */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Quiz */
    .quiz-container {
        width: 85%;
    }
}

/* =============================================================================
   MOBILE NAVIGATION (All screens < 769px)
   ============================================================================= */

@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block !important;
        padding: 10px;
        font-size: 1.5em;
        background: none;
        border: none;
        color: #2d3748;
        cursor: pointer;
    }
    
    /* Hide nav links by default */
    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        gap: 10px;
        z-index: 1001;
    }
    
    /* Show nav when active */
    .nav-links.active {
        display: flex !important;
    }
    
    /* Full width links */
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 12px;
        border-radius: 6px;
    }
    
    .nav-links a:hover {
        background: #f7fafc;
    }
    
    /* CTA button in nav */
    .nav-cta {
        margin-top: 10px;
    }
}

/* =============================================================================
   LANDSCAPE PHONES (Special handling)
   ============================================================================= */

@media (max-height: 500px) and (orientation: landscape) {
    /* Quiz modal needs to be scrollable */
    .quiz-container {
        max-height: 85vh !important;
        overflow-y: auto !important;
    }
    
    .quiz-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
    }
    
    /* Reduce spacing */
    section {
        padding: 30px 20px !important;
    }
}

/* =============================================================================
   SMALL DESKTOPS (1024px - 1199px)
   ============================================================================= */

@media (min-width: 1024px) and (max-width: 1199px) {
    .container {
        max-width: 1000px;
    }
    
    /* Cards - 3 columns */
    .pathway,
    .tool-grid,
    .featured-grid,
    .nft-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .resource-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================================================
   LARGE DESKTOPS (1200px+)
   ============================================================================= */

@media (min-width: 1200px) {
    /* Ensure container doesn't get too wide */
    .container {
        max-width: 1200px;
    }
    
    /* Hero section max width for readability */
    .hero p {
        max-width: 900px;
    }
    
    /* Quiz modal stays reasonable size */
    .quiz-container {
        max-width: 650px;
    }
}

/* =============================================================================
   HIGH RESOLUTION DISPLAYS
   ============================================================================= */

@media (min-resolution: 192dpi), (-webkit-min-device-pixel-ratio: 2) {
    /* Ensure images look sharp on retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* =============================================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================================= */

/* Keyboard focus indicators */
*:focus-visible {
    outline: 3px solid #5a67d8;
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #5a67d8;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Ensure sufficient color contrast */
.quiz-option:focus,
.cta-button:focus,
button:focus {
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.4);
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    /* Hide non-essential elements */
    #wpadminbar,
    nav,
    .mobile-menu-toggle,
    .quiz-trigger,
    .quiz-modal,
    footer,
    #subscribe {
        display: none !important;
    }
    
    /* Ensure content is readable */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    /* Prevent page breaks inside elements */
    .path-card,
    .tool-card,
    .featured-article {
        page-break-inside: avoid;
    }
    
    /* Show URLs for links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* =============================================================================
   WORDPRESS ADMIN BAR ADJUSTMENTS
   ============================================================================= */

@media (max-width: 782px) {
    /* WordPress admin bar is taller on mobile */
    html {
        margin-top: 46px !important;
    }
    
    nav {
        top: 46px;
    }
}

@media (min-width: 783px) {
    nav {
        top: 32px;
    }
}

/* =============================================================================
   BROWSER-SPECIFIC FIXES
   ============================================================================= */

/* iOS Safari - Prevent zoom on input focus */
@supports (-webkit-touch-callout: none) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Firefox - Smooth scrolling */
@-moz-document url-prefix() {
    html {
        scroll-behavior: smooth;
    }
}

/* =============================================================================
   REDUCED MOTION (Accessibility)
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================================================
   DARK MODE PREPARATION (Optional - for future use)
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if desired
    Example:
    body {
        background: #1a202c;
        color: #e2e8f0;
    }
    */
}

/* =============================================================================
   END OF RESPONSIVE STYLES
   ============================================================================= */
