/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktops (1400px+) */
@media (min-width: 1400px) {

    .container,
    .hero-container,
    .solution-content,
    .enterprise-content,
    .contact-content {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .section-header h2 {
        font-size: 3.5rem;
    }
}

/* Large Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}

/* Large Tablets (992px - 1199px) */
@media (max-width: 1199px) {
    :root {
        --container-max-width: 960px;
        --section-padding: 60px 0;
    }

    .hero-container,
    .solution-content,
    .enterprise-content,
    .contact-content {
        gap: 3rem;
    }

    .security-comparison {
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    :root {
        --container-max-width: 720px;
        --section-padding: 50px 0;
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
    }

    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding-top: 2rem;
    }

    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .solution-content,
    .enterprise-content,
    .contact-content,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .security-comparison {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(8, 1fr);
    }

    .industries-grid {
        grid-template-columns: 1fr;
    }

    .problem-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .features-showcase {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }

    .showcase-stats {
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .cta-features {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero-stats {
        justify-content: space-between;
        gap: 1rem;
    }
}

/* Large Mobile (576px - 767px) */
@media (max-width: 767px) {
    :root {
        --container-max-width: 540px;
        --section-padding: 40px 0;
        --font-size-5xl: 2.25rem;
        --font-size-4xl: 1.875rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.375rem;
        --font-size-xl: 1.125rem;
    }

    .mobile-menu.active {
        display: block;
    }

    .nav-container {
        height: 60px;
        padding: 0 1rem;
    }

    .hero {
        padding: 80px 0 40px;
    }

    .hero-title {
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: var(--font-size-lg);
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-features {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .hero-feature {
        padding: 1rem;
        text-align: left;
    }

    .hero-feature:hover {
        transform: none;
    }

    .hero-stats {
        display: flex;
        justify-content: space-between;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .hero-stats .stat {
        flex: 1;
        min-width: 0;
    }

    .hero-stats .stat-number {
        font-size: var(--font-size-xl);
    }

    .hero-stats .stat-label {
        font-size: var(--font-size-xs);
    }

    .problem-grid,
    .industries-grid,
    .security-stats {
        grid-template-columns: 1fr;
    }

    .industry-card {
        padding: 1.5rem;
    }

    .industry-card:hover {
        transform: translateY(-3px);
    }

    .features-showcase {
        padding: 1.5rem 1rem;
    }

    .rotating-shield {
        width: 100px;
        height: 100px;
    }

    .rotating-shield i {
        font-size: 2.5rem;
    }

    .showcase-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .unique-features {
        gap: 1.5rem;
    }

    .unique-feature {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .feature-icon {
        align-self: center;
    }

    .enterprise-features {
        gap: 1rem;
    }

    .enterprise-feature {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .compliance-badges {
        justify-content: center;
        flex-wrap: wrap;
    }

    .about-header {
        margin-bottom: 2rem;
    }

    .about-grid {
        gap: 2rem;
    }

    .mission-statement,
    .founder-card,
    .company-values {
        padding: 1.5rem;
    }

    .founder-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .contact-methods {
        gap: 1.5rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .social-links {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .modal-header {
        padding-bottom: 0;
    }
}

/* Small Mobile (480px - 575px) */
@media (max-width: 575px) {
    :root {
        --container-max-width: 100%;
        --section-padding: 30px 0;
    }

    .container {
        padding: 0 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: var(--font-size-3xl);
    }

    .hero-title {
        font-size: var(--font-size-4xl);
        line-height: 1.2;
    }

    .problem-card,
    .feature-card,
    .stat-card {
        padding: 1.5rem;
    }

    .dashboard-mockup {
        max-width: 320px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .timeline-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .auth-demo {
        max-width: 300px;
    }

    .continuous-auth-demo {
        padding: 1.5rem;
    }
}

/* Extra Small Mobile (320px - 479px) */
@media (max-width: 479px) {
    :root {
        --font-size-5xl: 2rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.375rem;
        --section-padding: 25px 0;
    }

    .nav-container {
        padding: 0 0.75rem;
    }

    .container {
        padding: 0 0.75rem;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .section-header h2 {
        font-size: var(--font-size-3xl);
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
    }

    .btn-primary.large,
    .btn-secondary.large {
        padding: 1rem 1.75rem;
    }

    .problem-card,
    .feature-card,
    .stat-card {
        padding: 1.25rem;
    }

    .contact-form,
    .continuous-auth-demo {
        padding: 1.25rem;
    }

    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }

    .modal-header,
    .modal-body {
        padding: 1.25rem;
    }

    .dashboard-mockup {
        max-width: 280px;
    }

    .auth-demo {
        max-width: 260px;
    }

    .face-outline {
        width: 100px;
        height: 100px;
    }

    .face-outline i {
        font-size: 2.5rem;
    }
}

/* Logo Responsive */
@media (max-width: 768px) {
    .brand-logo {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        height: 50px;
    }
}

/* Navigation Mobile States */
@media (max-width: 991px) {
    .mobile-menu {
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease-in-out;
    }

    .mobile-menu.active {
        display: block;
        transform: translateY(0);
        opacity: 1;
    }

    .nav-toggle {
        transition: all 0.3s ease-in-out;
    }

    .nav-toggle.active {
        transform: rotate(90deg);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    .btn-primary:hover,
    .btn-secondary:hover,
    .problem-card:hover,
    .feature-card:hover,
    .stat-card:hover {
        transform: none;
    }

    .nav-link:hover::after {
        width: 0;
    }

    .social-link:hover {
        transform: none;
    }

    /* Mobile ecosystem optimizations */
    .auth-item:hover {
        animation-play-state: running;
        /* Don't pause on touch devices */
        transform: none;
    }

    .auth-item {
        /* Optimize touch targets */
        min-height: 44px;
        min-width: 44px;
        -webkit-tap-highlight-color: transparent;
    }

    .user-type {
        /* Optimize touch targets */
        min-height: 44px;
        padding: 0.5rem;
        -webkit-tap-highlight-color: transparent;
    }

    /* Reduce animations on mobile for performance */
    .ecosystem-section {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .face-outline,
    .problem-icon,
    .feature-icon,
    .stat-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .nav-toggle,
    .mobile-menu,
    .modal,
    .cta-section,
    .footer {
        display: none !important;
    }

    .hero {
        padding-top: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        break-after: avoid;
    }

    .problem-card,
    .feature-card,
    .stat-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray);
    }

    .btn-primary,
    .btn-secondary {
        border: 2px solid var(--primary-purple);
        background: transparent !important;
        color: var(--primary-purple) !important;
    }
}

/* Accessibility Enhancements */
@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;
    }

    .scanning-line,
    .pulse-dot,
    .status-indicator.active i,
    .face-outline,
    .auth-status i,
    .bar,
    .auth-item {
        animation: none !important;
    }

    /* Keep ecosystem icons static for users who prefer reduced motion */
    .auth-item {
        position: static !important;
        display: inline-block !important;
        margin: 1rem !important;
        transform: none !important;
    }

    .ecosystem-circle {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
        --primary-purple: #4c1d95;
        --light-purple: #7c3aed;
    }

    .btn-primary,
    .btn-secondary {
        border-width: 3px;
    }

    .problem-card,
    .feature-card,
    .stat-card {
        border: 2px solid var(--primary-purple);
    }
}

/* About Page Responsive */
@media (max-width: 991px) {
    .about-hero h1 {
        font-size: var(--font-size-4xl);
    }

    .hero-highlights {
        flex-direction: column;
        gap: 1rem;
    }

    .story-grid,
    .tech-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .story-stats {
        justify-content: center;
        gap: 2rem;
    }

    .mission-statement-large {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 2rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .about-hero {
        padding: 100px 0 60px;
    }

    .about-hero h1 {
        font-size: var(--font-size-3xl);
    }

    .story-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .leader-card {
        padding: 2rem;
    }

    .leader-photo {
        width: 120px;
        height: 120px;
    }

    .leader-photo i {
        font-size: 4rem;
    }

    .expertise-tag {
        font-size: var(--font-size-xs);
    }

    .tech-circle {
        width: 250px;
        height: 250px;
    }

    .tech-element {
        width: 50px;
        height: 50px;
    }

    .center-logo {
        width: 80px;
        height: 80px;
    }

    .center-logo i {
        font-size: 2rem;
    }

    .about-cta .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 991px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 40px;
        min-height: auto;
    }

    .hero-container {
        gap: 2rem;
    }

    .section-padding {
        padding: 40px 0;
    }

    .modal-content {
        max-height: 80vh;
    }

    .about-hero {
        padding: 80px 0 50px;
        min-height: 50vh;
    }
}

/* ===== ECOSYSTEM SECTION RESPONSIVE ===== */
@media (max-width: 768px) {
    .ecosystem-circle {
        width: 400px;
        height: 400px;
        margin: 0 auto 3rem;
    }

    .brand-circle {
        width: 140px;
        height: 140px;
    }

    .brand-circle h3 {
        font-size: 1.2rem;
    }

    .brand-circle span {
        font-size: 0.8rem;
    }

    .auth-item {
        width: 120px;
        /* For 400px circle: use same approach as desktop but with 200px radius */
        transform-origin: 200px 200px;
        top: 50%;
        left: 50%;
        margin-top: -40px;
        /* Adjust for better centering */
        margin-left: -60px;
        /* Half of auth-item width */
        /* Mobile performance optimizations */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
    }

    @keyframes rotateAroundCircle {
        from {
            transform: rotate(0deg) translateX(200px) rotate(0deg);
        }

        to {
            transform: rotate(360deg) translateX(200px) rotate(-360deg);
        }
    }

    .auth-icon {
        width: 70px;
        height: 70px;
    }

    .auth-icon i {
        font-size: 1.6rem;
    }

    .auth-item span {
        font-size: 0.9rem;
    }

    .user-types {
        grid-template-columns: repeat(6, 1fr);
        gap: 1rem;
        max-width: 700px;
    }

    .user-avatar {
        width: 75px;
        height: 75px;
    }

    .user-avatar i {
        font-size: 1.6rem;
    }

    .user-type span {
        font-size: 0.95rem;
        line-height: 1.3;
    }
}

@media (max-width: 600px) and (min-width: 481px) {
    .user-types {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.5rem;
        max-width: 500px;
    }

    .user-avatar {
        width: 60px;
        height: 60px;
    }

    .user-avatar i {
        font-size: 1.3rem;
    }

    .user-type span {
        font-size: 0.85rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .ecosystem-circle {
        width: 320px;
        height: 320px;
        margin: 0 auto 2rem;
    }

    .brand-circle {
        width: 120px;
        height: 120px;
    }

    .brand-circle h3 {
        font-size: 1rem;
    }

    .brand-circle span {
        font-size: 0.7rem;
    }

    .auth-item {
        width: 100px;
        /* For 320px circle: use same approach as desktop but with 160px radius */
        transform-origin: 160px 160px;
        top: 50%;
        left: 50%;
        margin-top: -35px;
        /* Adjust for better centering */
        margin-left: -50px;
        /* Half of auth-item width */
        /* Mobile performance optimizations */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
    }

    @keyframes rotateAroundCircle {
        from {
            transform: rotate(0deg) translateX(160px) rotate(0deg);
        }

        to {
            transform: rotate(360deg) translateX(160px) rotate(-360deg);
        }
    }
}

.auth-icon {
    width: 60px;
    height: 60px;
}

.auth-icon i {
    font-size: 1.4rem;
}

.auth-item span {
    font-size: 0.85rem;
    line-height: 1.1;
}

.user-types {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 300px;
}

.user-type span {
    font-size: 0.65rem;
    line-height: 1.2;
}

.user-avatar {
    width: 65px;
    height: 65px;
}

.user-avatar i {
    font-size: 1.4rem;
}

.user-type span {
    font-size: 0.9rem;
}