/* Enhanced Mobile Optimizations for BEAUT Landing Page */
/* Perfect mobile experience for 320px-480px screens */

/* ===== CORE MOBILE VARIABLES ===== */
:root {
    --mobile-touch-target: 48px;
    --mobile-safe-area: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    --mobile-container-padding: 16px;
    --mobile-section-padding: 40px 0;
    --mobile-border-radius: 12px;
    --mobile-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --mobile-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== UNIVERSAL MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Enhanced container padding with safe areas */
    .container {
        padding-left: max(var(--mobile-container-padding), env(safe-area-inset-left));
        padding-right: max(var(--mobile-container-padding), env(safe-area-inset-right));
        max-width: 100vw;
    }
    
    /* Minimum font size for readability */
    * {
        font-size: max(14px, 1em);
    }
    
    /* Enhanced touch targets */
    .btn, 
    .header-nav-link, 
    .header-mobile-nav-link, 
    .theme-toggle,
    .pricing-btn,
    .faq-toggle,
    .testimonial-card,
    .feature-card {
        min-height: var(--mobile-touch-target);
        min-width: var(--mobile-touch-target);
        padding: 12px 16px;
        border-radius: var(--mobile-border-radius);
        transition: var(--mobile-transition);
    }
    
    /* Improved button styling */
    .btn {
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0.5px;
        box-shadow: var(--mobile-shadow);
        border: none;
        position: relative;
        overflow: hidden;
    }
    
    .btn:active {
        transform: scale(0.98);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }
    
    /* Enhanced focus states for accessibility */
    .btn:focus,
    .header-nav-link:focus,
    .header-mobile-nav-link:focus {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }
    
    /* Better image handling */
    img {
        max-width: 100%;
        height: auto;
        border-radius: var(--mobile-border-radius);
    }
    
    /* Improved text wrapping */
    .hero-title,
    .pricing-title,
    .features-title,
    .testimonials-title,
    .faq-title {
        word-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
    }
    
    /* Enhanced form elements */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: var(--mobile-border-radius);
        padding: 12px 16px;
        border: 1px solid var(--glass-border);
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
    }
    
    /* Better scrolling */
    .hero, .section {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* ===== HEADER MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    .header {
        padding-top: env(safe-area-inset-top);
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        border-bottom: 1px solid var(--glass-border);
    }
    
    .header-container {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .header-logo {
        font-size: 18px;
        font-weight: 700;
        gap: 8px;
    }
    
    .header-logo img {
        width: 28px;
        height: 28px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-actions .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }
    
    .theme-icon {
        width: 18px;
        height: 18px;
    }
    
    /* Enhanced mobile menu */
    .header-mobile-toggle {
        width: 40px;
        height: 40px;
        padding: 8px;
        border-radius: 50%;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        border: 1px solid var(--glass-border);
    }
    
    .header-mobile-toggle span {
        width: 20px;
        height: 2px;
        border-radius: 1px;
    }
    
    .header-mobile-nav {
        padding: 20px 16px;
        padding-top: calc(20px + env(safe-area-inset-top));
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
        max-height: 85vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .header-mobile-nav-link {
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 8px;
        border-radius: var(--mobile-border-radius);
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        border: 1px solid var(--glass-border);
        transition: var(--mobile-transition);
    }
    
    .header-mobile-nav-link:active {
        transform: scale(0.98);
        background: var(--button-active);
    }
}

/* ===== HERO SECTION MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    .hero {
        padding-top: calc(80px + env(safe-area-inset-top));
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    .hero-container {
        padding: 0 16px;
        gap: 32px;
        text-align: center;
    }
    
    .hero-badge {
        font-size: 12px;
        padding: 8px 16px;
        margin-bottom: 16px;
        white-space: normal;
        text-align: center;
        line-height: 1.4;
    }
    
    .hero-title {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 16px;
        font-weight: 700;
    }
    
    .hero-subtitle {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 24px;
        color: var(--text-secondary);
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        margin-bottom: 32px;
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        width: 100%;
        max-width: 280px;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 25px;
        min-height: 48px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
        justify-content: center;
    }
    
    .hero-stat {
        min-width: 80px;
    }
    
    .hero-stat-number {
        font-size: 24px;
        font-weight: 700;
    }
    
    .hero-stat-label {
        font-size: 12px;
        line-height: 1.3;
    }
    
    /* Mobile-optimized phone gallery */
    .hero-phones-gallery {
        gap: 6px;
        max-width: 320px;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
    
    .hero-phone {
        width: 70px;
        height: 140px;
        border-radius: 20px;
    }
    
    .hero-phone:hover {
        transform: translateY(-3px) scale(1.02);
    }
}

/* ===== PRICING SECTION MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    .pricing {
        padding: 40px 0;
    }
    
    .pricing-container {
        padding: 0 16px;
    }
    
    .pricing-header {
        margin-bottom: 32px;
    }
    
    .pricing-title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .pricing-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .pricing-card {
        padding: 24px 20px;
        margin: 0;
        border-radius: var(--mobile-border-radius);
    }
    
    .pricing-main-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .pricing-token-info {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 24px;
    }
    
    .pricing-name {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .pricing-price {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .pricing-period {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .pricing-features {
        margin-bottom: 24px;
    }
    
    .pricing-features li {
        padding: 8px 0;
        font-size: 14px;
        line-height: 1.4;
        padding-left: 20px;
    }
    
    .pricing-btn {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 600;
        min-height: 48px;
        border-radius: 25px;
    }
    
    /* Token benefits optimization */
    .token-benefits {
        gap: 8px;
    }
    
    .token-benefit {
        padding: 12px 16px;
        min-height: 48px;
        border-radius: var(--mobile-border-radius);
        font-size: 14px;
        line-height: 1.4;
    }
    
    .token-benefit-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    .token-benefit span:last-child {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* ===== FEATURES SECTION MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    .features {
        padding: 40px 0;
    }
    
    .features-container {
        padding: 0 16px;
    }
    
    .features-header {
        margin-bottom: 32px;
    }
    
    .features-title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .features-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 20px;
        border-radius: var(--mobile-border-radius);
        min-height: 120px;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }
    
    .feature-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .feature-description {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* ===== TESTIMONIALS SECTION MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    .testimonials {
        padding: 40px 0;
    }
    
    .testimonials-container {
        padding: 0 16px;
    }
    
    .testimonials-header {
        margin-bottom: 32px;
    }
    
    .testimonials-title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .testimonials-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .testimonial-card {
        padding: 20px;
        border-radius: var(--mobile-border-radius);
        min-height: 120px;
    }
    
    .testimonial-content {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 16px;
    }
    
    .testimonial-author {
        font-size: 14px;
        font-weight: 600;
    }
    
    .testimonial-role {
        font-size: 12px;
        color: var(--text-secondary);
    }
}

/* ===== FAQ SECTION MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    .faq {
        padding: 40px 0;
    }
    
    .faq-container {
        padding: 0 16px;
    }
    
    .faq-header {
        margin-bottom: 32px;
    }
    
    .faq-title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .faq-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .faq-grid {
        gap: 12px;
    }
    
    .faq-item {
        border-radius: var(--mobile-border-radius);
        overflow: hidden;
    }
    
    .faq-toggle {
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        min-height: 48px;
    }
    
    .faq-content {
        padding: 0 20px 20px;
        font-size: 14px;
        line-height: 1.5;
    }
}

/* ===== FOOTER MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-container {
        padding: 0 16px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 20px;
    }
    
    .footer-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .footer-links {
        gap: 8px;
    }
    
    .footer-link {
        padding: 8px 0;
        font-size: 14px;
        min-height: 32px;
    }
    
    .footer-bottom {
        padding-top: 20px;
        margin-top: 20px;
        font-size: 12px;
    }
}

/* ===== EXTRA SMALL SCREENS (320px-360px) ===== */
@media (max-width: 360px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        max-width: 240px;
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .pricing-card {
        padding: 20px 16px;
    }
    
    .pricing-title {
        font-size: 20px;
    }
    
    .pricing-price {
        font-size: 28px;
    }
    
    .feature-card,
    .testimonial-card {
        padding: 16px;
    }
    
    .faq-toggle {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* ===== LANDSCAPE ORIENTATION OPTIMIZATIONS ===== */
@media (max-width: 480px) and (orientation: landscape) {
    .hero {
        min-height: 70vh;
        padding-top: calc(60px + env(safe-area-inset-top));
    }
    
    .hero-container {
        gap: 20px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        max-width: 160px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .section {
        padding: 30px 0;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== REDUCED MOTION FOR 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;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (any-hover: none) {
    .hover-lift:hover {
        transform: none;
    }
    
    .hover-scale:hover {
        transform: none;
    }
    
    .btn:active,
    .header-nav-link:active,
    .header-mobile-nav-link:active {
        transform: scale(0.95);
    }
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .footer,
    .btn,
    .theme-toggle,
    .header-mobile-toggle {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 20px 0;
    }
    
    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
        page-break-inside: avoid;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
} 