/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Hero spacing adjustments */
    .hero {
        padding-bottom: 100px !important;
    }
    
    .scroll-indicator {
        bottom: 4rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .command-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .flow-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .flow-step {
        padding: var(--spacing-md);
    }

    .flow-points li {
        justify-content: flex-start;
        text-align: left;
    }

    .flow-visual {
        width: 72px;
        height: 72px;
    }

    .signal-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .opportunity-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .membership-hud-board {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .membership-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    section {
        padding: var(--spacing-2xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    .section-subtitle {
        font-size: 1rem;
        line-height: 1.6;
        max-width: 34ch;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: linear-gradient(180deg, #0A1F78 0%, #1234B8 52%, #1F4EDB 100%);
        border-left: 1px solid rgba(157, 205, 255, 0.55);
        box-shadow: 0 14px 36px rgba(6, 18, 56, 0.45);
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem var(--spacing-xl) var(--spacing-xl);
        gap: var(--spacing-lg);
        transition: right var(--transition-base);
        overflow-y: auto;
        z-index: 1001;
    }
    
    .nav-menu.active {
        right: 0;
        box-shadow:
            0 0 0 100vmax rgba(2, 8, 24, 0.58),
            0 18px 44px rgba(7, 18, 60, 0.52);
    }

    .nav-wrapper {
        padding: 0.95rem 0;
        gap: var(--spacing-sm);
    }

    .navbar .logo-image {
        width: 138px;
        height: auto;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .nav-system-status {
        display: none;
    }
    
    .nav-link {
        width: 100%;
        padding: var(--spacing-md) 0;
        color: rgba(247, 250, 255, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.24);
        border-radius: 10px;
        transition: color 180ms ease, background-color 180ms ease, padding-left 180ms ease, border-color 180ms ease;
    }

    .nav-link:active,
    .nav-link.active,
    .nav-link:focus-visible {
        color: #FFFFFF;
        background: rgba(255, 255, 255, 0.16);
        border-bottom-color: rgba(255, 255, 255, 0.46);
        padding-left: 0.75rem;
    }
    
    .nav-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-cta .btn-whatsapp,
    .nav-cta .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .hamburger {
        display: flex;
        z-index: 1002;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Hero */
    .hero {
        min-height: 70vh;
        padding-top: 80px;
        padding-bottom: 40px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .hero-content,
    .fixed-hero-two-line {
        max-width: 100%;
    }

    .hero-content {
        padding-inline: 0.25rem;
    }

    .fixed-hero-two-line {
        font-size: clamp(1.55rem, 7.6vw, 2.35rem);
        line-height: 1.06;
    }

    .fixed-hero-two-line .title-line {
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
        text-wrap: balance;
        letter-spacing: -0.01em;
    }

    .section-title {
        font-size: clamp(1.5rem, 5.8vw, 2rem);
        max-width: 21ch;
        line-height: 1.2;
    }

    .fixed-two-line {
        font-size: clamp(1.05rem, 4.4vw, 1.55rem);
        line-height: 1.16;
    }

    .about .section-title,
    .operational-flow .section-title,
    .signal-wall .section-title,
    .services .section-title,
    .opportunity-window .section-title,
    .contact .section-title {
        font-size: clamp(1.2rem, 4.6vw, 1.65rem);
        max-width: 28ch;
        line-height: 1.16;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        max-width: 34ch;
        line-height: 1.5;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin: var(--spacing-md) 0;
    }

    .hero .stat-item {
        padding: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 80px !important;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* About */
    .about-grid {
        grid-template-columns: 1fr;
    }

    .command-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .flow-grid {
        grid-template-columns: 1fr;
    }

    .flow-step {
        align-items: center;
        text-align: center;
    }

    .flow-stage {
        font-size: 0.82rem;
    }

    .flow-points li {
        justify-content: flex-start;
        text-align: left;
    }

    .flow-link {
        width: 100%;
        justify-content: center;
    }

    .flow-visual {
        width: 68px;
        height: 68px;
        margin-bottom: var(--spacing-sm);
    }

    .signal-grid {
        grid-template-columns: 1fr;
    }

    .opportunity-grid {
        grid-template-columns: 1fr;
    }

    .opportunity-visual {
        width: 68px;
        height: 68px;
    }

    .signal-visual {
        width: 68px;
        height: 68px;
    }

    .membership-hud-board {
        grid-template-columns: 1fr;
    }

    .membership-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .command-membership-grid {
        padding: var(--spacing-md);
    }

    .membership-card.featured {
        transform: none;
    }

    .membership-card.featured:hover {
        transform: translateY(-8px);
    }

    .command-strip {
        justify-content: flex-start;
    }

    .command-chip {
        font-size: 0.72rem;
    }

    #particle-canvas {
        opacity: 0.48;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Why Now */
    .urgency-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: clamp(1.25rem, 5.5vw, 1.6rem);
        max-width: 20ch;
        line-height: 1.2;
    }

    .fixed-two-line {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
        line-height: 1.16;
    }

    .about .section-title,
    .operational-flow .section-title,
    .signal-wall .section-title,
    .services .section-title,
    .opportunity-window .section-title,
    .contact .section-title {
        font-size: clamp(1.05rem, 4.4vw, 1.35rem);
        max-width: 26ch;
        line-height: 1.16;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    section {
        padding: clamp(2.35rem, 8.2vw, 2.8rem) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-lg);
    }

    .section-subtitle {
        font-size: 0.96rem;
        line-height: 1.55;
    }
    
    /* Hero specific */
    .hero {
        padding-bottom: 60px !important;
    }
    
    .hero-cta {
        margin-bottom: 60px !important;
        gap: 0.75rem;
    }

    .fixed-hero-two-line {
        font-size: clamp(1.3rem, 8vw, 1.95rem);
        line-height: 1.05;
    }

    .fixed-hero-two-line .title-line {
        letter-spacing: -0.012em;
    }

    .flow-visual {
        width: 62px;
        height: 62px;
    }

    .flow-stage {
        font-size: 0.76rem;
    }

    .flow-points li {
        font-size: 0.84rem;
        line-height: 1.32;
    }

    .signal-visual {
        width: 62px;
        height: 62px;
    }

    .opportunity-visual {
        width: 62px;
        height: 62px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }

    .nav-wrapper {
        padding: 0.85rem 0;
    }

    .navbar .logo-image {
        width: 112px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    section {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-badge,
    .section-badge,
    .why-now-badge {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .about-card,
    .service-card,
    .urgency-card {
        padding: var(--spacing-md);
    }

    .about-card h3,
    .service-header h3,
    .flow-step h3 {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .flow-step {
        padding: var(--spacing-md);
    }

    .signal-card {
        padding: var(--spacing-md);
    }

    .membership-name {
        font-size: 1.6rem;
    }

    .membership-price {
        font-size: 2.3rem;
    }

    .limited-slots {
        font-size: 0.78rem;
        padding: 0.45rem 0.75rem;
    }

    #particle-canvas {
        opacity: 0.36;
    }
    
    .about-icon,
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .command-icon {
        width: 80px;
        height: 80px;
    }

    .icon-core {
        inset: 14px;
        font-size: 1.3rem;
    }
    
    .mission-statement {
        padding: var(--spacing-md);
    }
    
    .mission-icon {
        font-size: 2rem;
    }
    
    .mission-statement blockquote {
        font-size: 1rem;
    }
    
    .contact-form-wrapper {
        padding: var(--spacing-md);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 1rem;
        right: 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-hero-primary,
    .btn-hero-secondary,
    .btn-whatsapp,
    .btn-service,
    .btn-submit,
    .btn-urgent {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        min-height: 46px;
    }
}

/* Small Phones (640px and below) */
@media (max-width: 640px) {
    .command-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .command-grid .command-card {
        width: 100%;
        min-height: 0;
    }

    .command-grid .command-card p {
        max-width: 100%;
    }
}

/* Narrow mobile tuning (around 406px) */
@media (min-width: 390px) and (max-width: 430px) {
    .fixed-hero-two-line {
        font-size: 1.48rem;
        line-height: 1.08;
        color: #83EEFF !important;
        text-shadow:
            0 0 10px rgba(102, 228, 255, 0.5),
            0 0 22px rgba(102, 228, 255, 0.28);
    }

    .fixed-hero-two-line .title-line {
        letter-spacing: -0.01em;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .fixed-hero-two-line {
        font-size: 1.16rem;
    }

    .section-header {
        margin-bottom: var(--spacing-md);
    }

    .hero-cta {
        gap: 0.65rem;
        margin-top: var(--spacing-md);
    }

    .about-grid,
    .command-grid,
    .flow-grid,
    .signal-grid,
    .opportunity-grid,
    .services-grid,
    .urgency-grid,
    .membership-grid {
        gap: 0.9rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .urgency-stat {
        font-size: 2rem;
    }
}

/* Ultra Small Mobile (320px and below) */
@media (max-width: 320px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 0.6rem;
    }

    .hero-title {
        font-size: 1.6rem;
        line-height: 1.15;
    }

    .fixed-hero-two-line {
        font-size: 1.03rem;
        line-height: 1.08;
    }

    .hero-subtitle,
    .section-subtitle,
    .flow-step p,
    .about-card p {
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .command-grid .command-card,
    .flow-step,
    .signal-card,
    .membership-card,
    .urgency-card,
    .contact-info,
    .contact-form-wrapper {
        padding: 0.85rem;
    }

    .command-icon {
        width: 72px;
        height: 72px;
    }

    .icon-core {
        inset: 13px;
        font-size: 1.15rem;
    }

    .flow-visual {
        width: 56px;
        height: 56px;
    }

    .signal-visual {
        width: 56px;
        height: 56px;
    }

    .opportunity-visual {
        width: 56px;
        height: 56px;
    }

    .flow-stage {
        font-size: 0.74rem;
    }

    .flow-points li {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .flow-link,
    .btn-primary,
    .btn-secondary,
    .btn-hero-primary,
    .btn-hero-secondary,
    .btn-whatsapp,
    .btn-service,
    .btn-submit,
    .btn-urgent {
        padding: 0.75rem 1rem;
        font-size: 0.84rem;
    }
}

/* High Resolution Displays */
@media (min-width: 1440px) {
    .container {
        max-width: 1600px;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
    }
    
    .hero-title {
        font-size: 5.5rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .whatsapp-float,
    .scroll-indicator,
    .hero-cta,
    .service-footer,
    .why-now-cta,
    .contact-form-wrapper {
        display: none !important;
    }
    
    body {
        color: #000;
    }
    
    .hero,
    section {
        page-break-inside: avoid;
    }
}

/* Accessibility - Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator,
    .whatsapp-float {
        animation: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles here if needed */
}