/* ============================================================================
   ENHANCED COMPREHENSIVE MOBILE-FIRST RESPONSIVE DESIGN
   ============================================================================ */

/* ============================================================================
   MOBILE FIRST (320px - 767px)
   ============================================================================ */

/* Base mobile styles are in base.css, header.css, etc. */
/* Additional mobile-specific overrides */

/* Extra small screens (320px - 479px) */
@media (max-width: 479px) {
    :root {
        --container-padding-mobile: 0.75rem;
        --section-padding-mobile: 2rem;
    }
    
    .container {
        padding: 0 var(--container-padding-mobile);
    }
    
    .nav {
        padding: 0 var(--container-padding-mobile);
    }
    
    .main-container {
        padding: calc(var(--header-height-mobile) + 1.5rem) var(--container-padding-mobile) 1.5rem;
    }

    .hero-badge {
        padding: 0.5rem 0.875rem;
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }

    .cards-grid {
        gap: 0.75rem;
    }
    
    .card-header {
        padding: 1.25rem;
        gap: 0.75rem;
        min-height: 90px;
    }
    
    .card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
        border-radius: 14px;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .card-summary {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .card-body-content {
        padding: 0 1.25rem 1.25rem;
        padding-top: 1.25rem;
    }

    .platform-details {
        gap: 0.5rem;
    }
    
    .detail-item {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .detail-icon {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .detail-title {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }
    
    .detail-description {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .architecture-visual {
        padding: 1.25rem;
        min-height: 220px;
        margin: 1rem 0;
    }
    
    .arch-layer {
        font-size: 0.65rem;
        padding: 0.5rem;
        margin: 0.375rem 0;
        max-width: 250px;
    }

    .tokenomics-grid {
        gap: 0.5rem;
    }
    
    .token-card {
        padding: 1rem;
    }
    
    .token-card h4 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        gap: 0.375rem;
    }
    
    .token-detail {
        padding: 0.375rem 0;
    }
    
    .token-label,
    .token-value {
        font-size: 0.75rem;
    }

    .documentation-center {
        padding: 1.25rem;
        margin: 1rem 0;
    }
    
    .documentation-center h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .documentation-center p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        padding: 0;
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        min-height: var(--touch-target-min);
        gap: 0.375rem;
    }
    
    .cta-buttons {
        gap: 0.5rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-brand h3 {
        font-size: 1.125rem;
    }
    
    .footer-brand p {
        font-size: 0.8rem;
        line-height: 1.6;
    }
    
    .footer-bottom {
        font-size: 0.75rem;
        gap: 0.75rem;
    }
    
    .footer-link {
        font-size: 0.75rem;
    }
}

/* Standard mobile screens (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .main-container {
        padding: calc(var(--header-height-mobile) + 2rem) var(--container-padding-mobile) 2rem;
    }

    .hero-section {
        margin-bottom: 2.5rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
        margin-bottom: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .cards-grid {
        gap: 1rem;
    }
    
    .card-header {
        padding: 1.5rem;
        min-height: 100px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .card-summary {
        font-size: 0.875rem;
    }

    .detail-item {
        padding: 1.25rem;
    }
    
    .detail-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 1rem;
    }
    
    .detail-title {
        font-size: 1rem;
    }
    
    .detail-description {
        font-size: 0.85rem;
    }

    .architecture-visual {
        min-height: 250px;
        padding: 1.5rem;
    }
    
    .arch-layer {
        font-size: 0.75rem;
        padding: 0.75rem;
        max-width: 280px;
    }

    .token-card {
        padding: 1.25rem;
    }

    .documentation-center {
        padding: 1.5rem;
    }
    
    .documentation-center h4 {
        font-size: 1.125rem;
    }
    
    .documentation-center p {
        font-size: 0.9rem;
    }

    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============================================================================
   TABLET (768px - 1023px)
   ============================================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .main-container {
        padding: calc(var(--header-height-tablet) + 3rem) var(--container-padding-tablet) 3rem;
        max-width: 800px;
    }
    
    .hero-section {
        margin-bottom: 3rem;
        padding: 0 1rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
        gap: 6px;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 6vw, 3.25rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 3rem;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .cards-grid {
        gap: 1.5rem;
        max-width: 700px;
    }
    
    .card-header {
        padding: 2rem;
        min-height: 120px;
        gap: 1.25rem;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        border-radius: 18px;
    }
    
    .card-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .card-summary {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .card-body-content {
        padding: 0 2rem 2rem;
        padding-top: 2rem;
    }

    /* Tablet: 2 columns for platform details */
    .platform-details {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
    
    .detail-item {
        padding: 1.5rem;
    }
    
    .detail-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .detail-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .detail-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .architecture-visual {
        min-height: 280px;
        padding: 2rem;
        margin: 2rem 0;
    }
    
    .arch-layer {
        font-size: 0.8rem;
        padding: 0.875rem;
        margin: 0.5rem 0;
        max-width: 320px;
    }

    /* Tablet: 2 columns for tokenomics */
    .tokenomics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
    
    .token-card {
        padding: 1.5rem;
    }
    
    .token-card h4 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
        gap: 0.75rem;
    }
    
    .token-detail {
        padding: 0.75rem 0;
    }
    
    .token-label,
    .token-value {
        font-size: 0.85rem;
    }

    .documentation-center {
        padding: 2rem;
        margin: 2rem 0;
    }
    
    .documentation-center h4 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .documentation-center p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Tablet: Horizontal buttons */
    .documentation-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .btn {
        width: auto;
        min-width: 180px;
        padding: 1.125rem 2rem;
        font-size: 1rem;
    }

    .footer {
        padding: 3.5rem 0 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: left;
    }
    
    .footer-brand h3 {
        font-size: 1.375rem;
    }
    
    .footer-brand p {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        font-size: 0.85rem;
    }
}

/* ============================================================================
   SMALL DESKTOP (1024px - 1279px)
   ============================================================================ */

@media (min-width: 1024px) and (max-width: 1279px) {
    .main-container {
        max-width: 1000px;
        padding: calc(var(--header-height-desktop) + 4rem) var(--container-padding-desktop) 4rem;
    }
    
    .hero-section {
        margin-bottom: 4rem;
    }
    
    .hero-badge {
        font-size: 0.875rem;
        padding: 0.75rem 1.5rem;
        gap: 8px;
    }
    
    .hero-title {
        font-size: clamp(3rem, 6vw, 3.75rem);
        margin-bottom: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 4rem;
        max-width: 650px;
        margin-left: auto;
        margin-right: auto;
    }

    .cards-grid {
        gap: 2rem;
        max-width: 900px;
    }
    
    .card-header {
        padding: 2.5rem;
        min-height: 140px;
        gap: 1.5rem;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
        border-radius: 20px;
    }
    
    .card-title {
        font-size: 1.375rem;
        margin-bottom: 0.75rem;
    }
    
    .card-summary {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .card-body-content {
        padding: 0 2.5rem 2.5rem;
        padding-top: 2.5rem;
    }

    /* Small desktop: 3 columns for platform details */
    .platform-details {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.5rem;
    }
    
    .detail-item {
        padding: 1.75rem;
    }
    
    .detail-icon {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
    }
    
    .detail-title {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .detail-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .architecture-visual {
        min-height: 320px;
        padding: 2.5rem;
        margin: 3rem 0;
    }
    
    .arch-layer {
        font-size: 0.875rem;
        padding: 1rem;
        margin: 0.75rem 0;
        max-width: 380px;
    }

    /* Small desktop: 3 columns for tokenomics */
    .tokenomics-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.5rem;
    }
    
    .token-card {
        padding: 1.75rem;
    }
    
    .token-card h4 {
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
        gap: 0.75rem;
    }
    
    .token-detail {
        padding: 0.875rem 0;
    }
    
    .token-label,
    .token-value {
        font-size: 0.875rem;
    }

    .documentation-center {
        padding: 2.5rem;
        margin: 3rem 0;
    }
    
    .documentation-center h4 {
        font-size: 1.375rem;
        margin-bottom: 1rem;
    }
    
    .documentation-center p {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }

    .btn {
        min-width: 200px;
        padding: 1.25rem 2.5rem;
        font-size: 1rem;
        gap: 0.75rem;
    }

    .cta-section {
        margin-top: 4rem;
    }

    .footer {
        padding: 4rem 0 2rem;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 3rem;
    }
    
    .footer-brand {
        max-width: 400px;
    }
    
    .footer-brand h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-brand p {
        font-size: 1rem;
        line-height: 1.7;
    }
}

/* ============================================================================
   LARGE DESKTOP (1280px - 1535px)
   ============================================================================ */

@media (min-width: 1280px) and (max-width: 1535px) {
    .main-container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: clamp(3.5rem, 6vw, 4rem);
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
        max-width: 700px;
    }

    .cards-grid {
        max-width: 1000px;
    }
    
    .platform-details {
        gap: 2rem;
    }
    
    .detail-item {
        padding: 2rem;
    }
    
    .detail-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .detail-title {
        font-size: 1.25rem;
    }
    
    .detail-description {
        font-size: 1rem;
    }

    .architecture-visual {
        min-height: 350px;
        padding: 3rem;
    }
    
    .arch-layer {
        font-size: 0.9rem;
        padding: 1.25rem;
        max-width: 420px;
    }

    .tokenomics-grid {
        gap: 2rem;
    }
    
    .token-card {
        padding: 2rem;
    }
    
    .token-card h4 {
        font-size: 1.25rem;
        margin-bottom: 1.75rem;
    }
    
    .token-detail {
        padding: 1rem 0;
    }
    
    .token-label,
    .token-value {
        font-size: 0.9rem;
    }

    .documentation-center {
        padding: 3rem;
    }
    
    .documentation-center h4 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .documentation-center p {
        font-size: 1.25rem;
        margin-bottom: 2rem;
    }

    .btn {
        min-width: 220px;
        padding: 1.375rem 2.75rem;
        font-size: 1.125rem;
    }
}

/* ============================================================================
   EXTRA LARGE DESKTOP (1536px+)
   ============================================================================ */

@media (min-width: 1536px) {
    .main-container {
        max-width: 1400px;
    }
    
    .hero-badge {
        font-size: 1rem;
        padding: 0.875rem 1.75rem;
    }
    
    .hero-title {
        font-size: 4.5rem;
        margin-bottom: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
        max-width: 800px;
        margin-bottom: 5rem;
    }

    .cards-grid {
        max-width: 1200px;
        gap: 2.5rem;
    }
    
    .card-header {
        padding: 3rem;
        min-height: 160px;
    }
    
    .card-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .card-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .card-summary {
        font-size: 1.125rem;
    }
    
    .card-body-content {
        padding: 0 3rem 3rem;
        padding-top: 3rem;
    }

    .platform-details {
        gap: 2.5rem;
    }
    
    .detail-item {
        padding: 2.5rem;
    }
    
    .detail-icon {
        width: 55px;
        height: 55px;
        font-size: 1.375rem;
        margin-bottom: 2rem;
    }
    
    .detail-title {
        font-size: 1.375rem;
        margin-bottom: 1rem;
    }
    
    .detail-description {
        font-size: 1.125rem;
        line-height: 1.7;
    }

    .architecture-visual {
        min-height: 400px;
        padding: 3.5rem;
        margin: 4rem 0;
    }
    
    .arch-layer {
        font-size: 1rem;
        padding: 1.5rem;
        margin: 1rem 0;
        max-width: 480px;
    }

    .tokenomics-grid {
        gap: 2.5rem;
    }
    
    .token-card {
        padding: 2.5rem;
    }
    
    .token-card h4 {
        font-size: 1.375rem;
        margin-bottom: 2rem;
        gap: 1rem;
    }
    
    .token-detail {
        padding: 1.25rem 0;
    }
    
    .token-label,
    .token-value {
        font-size: 1rem;
    }

    .documentation-center {
        padding: 3.5rem;
        margin: 4rem 0;
    }
    
    .documentation-center h4 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .documentation-center p {
        font-size: 1.375rem;
        margin-bottom: 2.5rem;
        line-height: 1.7;
    }

    .btn {
        min-width: 250px;
        padding: 1.5rem 3rem;
        font-size: 1.25rem;
        gap: 1rem;
    }

    .cta-section {
        margin-top: 5rem;
    }

    .footer {
        padding: 5rem 0 3rem;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 4rem;
        margin-bottom: 4rem;
    }
    
    .footer-brand {
        max-width: 450px;
    }
    
    .footer-brand h3 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .footer-brand p {
        font-size: 1.125rem;
        line-height: 1.8;
        margin-bottom: 2.5rem;
    }
    
    .footer-bottom {
        padding-top: 2.5rem;
        font-size: 1rem;
    }
}

/* ============================================================================
   LANDSCAPE MOBILE ORIENTATIONS
   ============================================================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .main-container {
        padding-top: calc(var(--header-height-mobile) + 1rem);
        padding-bottom: 1rem;
    }
    
    .hero-section {
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .cards-grid {
        gap: 1rem;
    }
    
    .card-header {
        padding: 1rem;
        min-height: 80px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .cta-section {
        margin-top: 1.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
}

/* ============================================================================
   HIGH DPI / RETINA DISPLAYS
   ============================================================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-mark,
    .card-icon,
    .detail-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .hero-title,
    .card-title,
    .section-title {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .header,
    .mobile-menu-toggle,
    .nav-cta,
    .cta-section,
    .bg-effects {
        display: none;
    }
    
    .main-container {
        padding-top: 0;
    }
    
    .expand-card {
        break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .card-body {
        max-height: none;
        overflow: visible;
    }
    
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    .expand-card,
    .btn,
    .nav-link,
    .detail-item,
    .token-card {
        transition: none;
        animation: none;
    }
    
    .card-body {
        transition: none;
    }
    
    .bg-grid {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .expand-card,
    .detail-item,
    .token-card {
        border-color: rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.1);
    }
    
    .btn-secondary {
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    .section-badge {
        border-color: rgba(234, 179, 8, 0.6);
        background: rgba(234, 179, 8, 0.2);
    }
}

/* Large text support */
@media (min-resolution: 120dpi) {
    body {
        font-size: 18px;
    }
    
    .btn {
        min-height: 48px;
        padding: 1.125rem 2rem;
    }
    
    .nav-link {
        min-height: 48px;
    }
}

/* ============================================================================
   PERFORMANCE OPTIMIZATIONS FOR MOBILE
   ============================================================================ */

@media (max-width: 1023px) {
    /* Optimize animations for mobile */
    .expand-card,
    .detail-item,
    .token-card {
        will-change: transform;
    }
    
    .card-body {
        will-change: max-height;
    }
    
    /* Reduce shadow complexity on mobile */
    .expand-card {
        box-shadow: var(--shadow-mobile);
    }
    
    .expand-card:hover,
    .expand-card.expanded {
        box-shadow: var(--shadow-mobile-lg);
    }
    
    .btn-primary {
        box-shadow: var(--shadow-gold-mobile);
    }
    
    /* Optimize background effects for mobile */
    .bg-grid {
        opacity: 0.4;
        background-size: 40px 40px;
    }
    
    .bg-glow {
        opacity: 0.6;
    }
}