/* ===================================
   Crosspoint Software Modernization
   Responsive Stylesheet
   =================================== */

/* Large Tablet/Small Desktop: 900px to 1200px */
@media (max-width: 900px) and (min-width: 769px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

/* Tablet: 768px and below */
@media (max-width: 768px) {
    :root {
        --spacing-xxl: 3rem;
        --spacing-xl: 2rem;
    }
    
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-family: "Open Sans", Sans-serif;
        font-size: 32px;
        font-weight: 700;
        line-height: 60px;
    }
    
    h2.section-title,
    .section-title {
        font-family: "Open Sans", Sans-serif !important;
        font-size: 32px !important;
        font-weight: 700 !important;
        line-height: 60px !important;
    }
    
    /* Keep section-label small */
    h2.section-label,
    .section-label {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .page-title {
        font-size: 2.25rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-nav.active {
        max-height: 500px;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: var(--spacing-md);
        gap: 0;
    }
    
    .main-nav li {
        width: 100%;
    }
    
    .main-nav a {
        display: block;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--color-border);
    }
    
    /* Grids */
    .stats-grid,
    .phases-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .client-logos {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    /* Sections */
    h2.cta-title,
    .cta-title {
        font-family: "Open Sans", Sans-serif !important;
        font-size: 32px !important;
        font-weight: 700 !important;
        line-height: 60px !important;
    }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
    :root {
        --spacing-xxl: 2rem;
        --spacing-xl: 1.5rem;
    }
    
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-family: "Open Sans", Sans-serif;
        font-size: 28px;
        font-weight: 700;
        line-height: 50px;
    }
    
    h2.section-title,
    .section-title {
        font-family: "Open Sans", Sans-serif !important;
        font-size: 28px !important;
        font-weight: 700 !important;
        line-height: 50px !important;
    }
    
    /* Keep section-label small */
    h2.section-label,
    .section-label {
        font-size: 0.7rem !important;
        line-height: 1.4 !important;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .cta-button,
    .cta-button-large {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .client-logos {
        grid-template-columns: 1fr;
    }
    
    .phase-card {
        padding: var(--spacing-md);
    }
    
    h2.cta-title,
    .cta-title {
        font-family: "Open Sans", Sans-serif !important;
        font-size: 28px !important;
        font-weight: 700 !important;
        line-height: 50px !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .mobile-menu-toggle,
    .cta-section,
    .skip-link {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
    }
}

/* High Contrast Mode (Accessibility) */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    
    .service-card,
    .phase-card,
    .contact-form {
        border: 2px solid black;
    }
}

/* 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;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-content::before,
    .hero-content::after {
        animation: none !important;
    }
}

/* Additional Mobile Refinements */
@media (max-width: 768px) {
    .hero::before,
    .page-hero::before,
    .phase-hero::before,
    .stats-section::before {
        background-size: 40px 40px;
    }
    
    .phase-header {
        flex-direction: column;
        text-align: center;
    }
    
    .phase-number-large {
        font-size: 2.5rem;
    }
    
    .why-works-grid {
        grid-template-columns: 1fr;
    }
    
    /* Enhanced elements */
    .intro-badge {
        padding: 1rem 2rem;
        gap: 0.5rem;
    }
    
    .badge-main {
        gap: 0.875rem;
    }
    
    .badge-icon {
        font-size: 1.5rem;
    }
    
    .badge-text {
        font-size: 2rem;
    }
    
    .badge-subtitle {
        font-size: 0.6875rem;
        letter-spacing: 1.5px;
    }
    
    .intro-features {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .intro-feature {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
    
    .feature-number {
        font-size: 3.5rem;
    }
    
    .benefits-list {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .framework-levels-visual {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
    
    .phase-card {
        padding: var(--spacing-lg);
    }
    
    .phase-number {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .intro-badge {
        padding: 0.875rem 1.75rem;
        gap: 0.375rem;
    }
    
    .badge-main {
        gap: 0.75rem;
    }
    
    .badge-icon {
        font-size: 1.25rem;
    }
    
    .badge-text {
        font-size: 1.75rem;
    }
    
    .badge-subtitle {
        font-size: 0.625rem;
        letter-spacing: 1.25px;
    }
    
    .intro-feature {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .feature-number {
        font-size: 3rem;
    }
    
    .feature-text {
        font-size: 0.8125rem;
    }
    
    .service-card::after,
    .phase-card::after {
        display: none;
    }
    
    .flow-step {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    .benefits-list li {
        padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) calc(var(--spacing-sm) + 36px);
        font-size: 0.875rem;
    }
    
    .benefits-list li::before {
        width: 26px;
        height: 26px;
        left: var(--spacing-xs);
        font-size: 0.8125rem;
    }
}

