/* Responsive Base Styles */
:root {
    --spacing-unit: 1rem;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --container-padding: 1rem;
    --header-height: 70px;
    --min-font: 14px;
    --max-font: 16px;
    --min-width: 320px;
    --max-width: 1200px;
}

/* Fluid typography */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    height: 100%;
    overflow-x: hidden;
    width: 100%;
    font-size: clamp(
        var(--min-font), 
        calc(var(--min-font) + (var(--max-font) - var(--min-font)) * ((100vw - var(--min-width)) / (var(--max-width) - var(--min-width)))), 
        var(--max-font)
    );
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    position: relative;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    padding-top: var(--header-height);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Reset for when menu is closed */
body.menu-closed {
    position: static;
    overflow: visible;
    height: auto;
}

/* ===== Breakpoints ===== */
/* Mobile (default) - up to 480px */
:root {
    --container-padding: 1rem;
}

/* Small devices (landscape phones, 481px and up) */
@media (min-width: 481px) {
    :root {
        --container-padding: 1.5rem;
    }
}

/* Tablets (768px and up) */
@media (min-width: 769px) {
    :root {
        --container-padding: 2rem;
    }
    
    .container {
        max-width: 1200px;
    }
}

/* Large desktops (1200px and up) */
@media (min-width: 1200px) {
    :root {
        --container-padding: 3rem;
    }
}

/* Mobile menu open state */
@media (max-width: 768px) {
    body.menu-open {
        position: fixed;
        overflow: hidden;
        width: 100%;
        height: 100%;
    }
    
    /* Typography adjustments for mobile */
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.75rem !important; }
    h3 { font-size: 1.5rem !important; }
    p, li, a { 
        font-size: 1rem !important;
        line-height: 1.6;
    }
    
    .section-title {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
    }
    
    /* Contact section specific */
    #contact .section-title {
        font-size: 1.5rem !important;
    }
    
    #contact .section-subtitle {
        font-size: 0.9rem !important;
    }
    
    /* Ensure all containers are full width on mobile */
    .container, 
    .hero-container,
    .features-container,
    .stats-container,
    .pricing-container,
    .contact-container,
    .footer-content {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: var(--container-padding) !important;
        padding-right: var(--container-padding) !important;
    }
    
    /* Fix for fixed/absolute positioned elements */
    .orb1, .orb2, .orb3 {
        display: none; /* Hide orbs on mobile for better performance */
    }
}

/* Base Typography */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    padding-top: var(--header-height);
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Navigation */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    position: relative;
}

/* Feature Cards - Responsive */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .feature-card {
        padding: 1.5rem !important;
        margin: 0.5rem 0 !important;
    }
    
    .feature-card h3 {
        font-size: 1.2rem !important;
        margin: 0.5rem 0 !important;
    }
    
    .feature-card p {
        margin: 0.5rem 0 !important;
        font-size: 0.9rem !important;
    }
    
    .feature-icon {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .highlight {
        padding: 0.1rem 0.3rem !important;
        margin: 0.2rem 0 !important;
        display: inline-block !important;
    }
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--primary-cyan);
    border-radius: 8px;
    cursor: pointer;
    padding: 12px 8px;
    z-index: 1001;
    position: relative;
    margin-left: 15px;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.mobile-menu-button:hover,
.mobile-menu-button:focus {
    background: rgba(0, 240, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(0, 240, 255, 0.3);
}

.mobile-menu-button:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* Show menu button on mobile */
@media (max-width: 991px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .mobile-menu-button {
        display: flex;
        margin-left: auto;
        position: relative;
        z-index: 1001;
    }
    
    .nav-links {
        display: none;
    }
    
    /* Ensure proper spacing for mobile header */
    .nav-container {
        padding: 0 15px;
    }
    
    /* Adjust logo size for mobile */
    .logo {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60%;
    }
}

.mobile-menu-button .hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-cyan);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    position: relative;
    pointer-events: none;
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.5);
}

/* Hamburger icon animation */
.mobile-menu-button .hamburger:nth-child(1) {
    transform: translateY(0) rotate(0);
}

.mobile-menu-button .hamburger:nth-child(2) {
    margin: 6px 0;
    opacity: 1;
}

.mobile-menu-button .hamburger:nth-child(3) {
    transform: translateY(0) rotate(0);
}

/* Animate to X when active */
.mobile-menu-button.active .hamburger:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: #fff;
}

.mobile-menu-button.active .hamburger:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-button.active .hamburger:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: #fff;
}

/* Active state styles */
.mobile-menu-button.active {
    background: rgba(0, 0, 0, 0.4);
    border-color: #fff;
}

.mobile-menu-button .hamburger:nth-child(1) {
    transform: translateY(0) rotate(0);
}

.mobile-menu-button .hamburger:nth-child(2) {
    opacity: 1;
    transform: scaleX(1);
}

.mobile-menu-button .hamburger:nth-child(3) {
    transform: translateY(0) rotate(0);
}

/* Animated hamburger to X */
.mobile-menu-button.active .hamburger:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.mobile-menu-button.active .hamburger:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-button.active .hamburger:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Navigation Links */
.nav-links {
    display: none;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) {
    .nav-links {
        display: flex;
    }
    
    .mobile-menu-button {
        display: none !important;
    }
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color var(--transition-speed) ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-cyan);
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--primary-cyan);
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    pointer-events: none;
}

.mobile-menu-overlay.active {
opacity: 1;
visibility: visible;
pointer-events: auto;
}

/* Mobile menu styles */
.mobile-menu {
position: fixed;
top: 0;
right: -100%;
width: 85%;
max-width: 320px;
height: 100vh;
background: rgba(15, 15, 20, 0.98);
backdrop-filter: blur(10px);
z-index: 1000;
transition: right 0.3s ease-in-out;
padding: 20px;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
box-sizing: border-box;
    border-left: 1px solid rgba(0, 240, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    will-change: transform;
}

.mobile-menu.active {
    right: 0;
}

/* Mobile menu header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* Mobile menu navigation */
.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-menu-nav li {
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
    width: 100%;
}

.mobile-menu.active .mobile-menu-nav li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 15px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    margin: 8px 0;
    border-left: 3px solid transparent;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    width: 100%;
    box-sizing: border-box;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a:focus {
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.1);
    transform: translateX(10px);
    border-left-color: #00f0ff;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

/* Add staggered animation for menu items */
.mobile-menu-nav li:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-nav li:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-nav li:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-nav li:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-nav li:nth-child(5) { transition-delay: 0.25s; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-logo {
    color: var(--primary-cyan);
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    margin-left: auto;
    display: block;
}

.mobile-menu-close:focus {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 2px;
}

.mobile-menu-nav {
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

.mobile-menu-nav li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-nav li:last-child {
    border-bottom: none;
}

.mobile-menu-nav a {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 16px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-nav a:active,
.mobile-menu-nav a:focus {
    background: rgba(0, 240, 255, 0.1);
    outline: none;
}

.mobile-menu-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-cyan);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.mobile-menu-nav a:hover::before,
.mobile-menu-nav a:focus::before {
    transform: scaleY(1);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile menu styles */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: rgba(15, 15, 20, 0.98);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    border-left: 1px solid rgba(0, 240, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Better touch targets for mobile */
@media (max-width: 480px) {
    .mobile-menu {
        width: 90%;
        max-width: 300px;
        padding: 15px;
    }
    
    .mobile-menu-nav a {
        padding: 18px 20px;
        font-size: 1.2rem;
    }
    
    .mobile-menu-nav a {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .mobile-menu-header {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .mobile-menu-close {
        font-size: 20px;
    }
    
    .mobile-menu-header {
        padding: 10px 0;
        margin-bottom: 15px;
    }
    
    .mobile-menu-nav a {
        padding: 10px 12px;
        font-size: 1rem;
    }
    
    .mobile-menu-cta {
        margin-top: 20px;
    }
}

/* Fix for iOS scrolling */
@supports (-webkit-touch-callout: none) {
    .mobile-menu {
        height: -webkit-fill-available;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Responsive Sections */
section {
    padding: 4rem 0;
    position: relative;
}

/* About Section */
.about-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-text {
    flex: 1;
}

/* Team Section */
.team-member {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.team-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-text {
    flex: 1;
}

/* Responsive Breakpoints */
/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    :root {
        --container-padding: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .about-container {
        flex-direction: row;
        align-items: center;
    }
    
    .team-member {
        flex-direction: row;
        align-items: center;
    }
    
    .mobile-menu-button {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    :root {
        --container-padding: 3rem;
    }
    
    .mobile-menu-button {
        display: none;
    }
    
    .nav-links {
        display: flex;
    }
}

/* X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    :root {
        --container-padding: 4rem;
    }
}

/* XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    :root {
        --container-padding: 5rem;
    }
}

/* Mobile Menu Toggle */
@media (max-width: 991px) {
    .mobile-menu-button {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .mobile-menu {
        width: 90%;
    }
}

/* High DPI Displays */
@media 
(-webkit-min-device-pixel-ratio: 2), 
(min-resolution: 192dpi) { 
    /* High DPI specific styles */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    nav, .mobile-menu-button, .mobile-menu-overlay {
        display: none !important;
    }
    
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
    }
}
