:root{
  --bg:#081225;
  --primary:#0066FF;
  --cyan:#00E5FF;
  --white:#FFFFFF;
  --muted:#A8B4C6;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:'Space Grotesk', system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial; background:var(--bg); color:var(--white); -webkit-font-smoothing:antialiased}
.container{max-width:960px;margin:0 auto;padding:1rem}

/* Header (mobile-first) */
.site-header{position:sticky;top:0;z-index:100;backdrop-filter:blur(8px);background:linear-gradient(180deg,rgba(8,18,37,0.96),rgba(8,18,37,0.96));border-bottom:1px solid rgba(255,255,255,0.03)}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:0.6rem 1rem}
.logo{display:flex;align-items:center;gap:0.6rem;text-decoration:none;color:var(--white)}
.logo img{height:36px;width:auto;border-radius:8px}
.brand-name{font-weight:700;font-size:1rem}
.brand-tag{font-size:0.72rem;color:var(--muted)}

/* Mobile toggle (hamburger) */
.mobile-toggle{display:block;background:transparent;border:0;padding:0;cursor:pointer;width:44px;height:44px;align-self:center}
.mobile-toggle .hamburger{display:block;width:22px;height:2px;background:var(--white);position:relative;transition:background .25s ease}
.mobile-toggle .hamburger::before,.mobile-toggle .hamburger::after{content:'';position:absolute;width:22px;height:2px;background:var(--white);left:0;transition:transform .25s ease,top .25s ease}
.mobile-toggle .hamburger::before{top:-7px}
.mobile-toggle .hamburger::after{top:7px}
.mobile-toggle.open .hamburger{background:transparent}
.mobile-toggle.open .hamburger::before{transform:rotate(45deg);top:0}
.mobile-toggle.open .hamburger::after{transform:rotate(-45deg);top:0}

/* Nav (collapsed by default on mobile) */
.nav-menu{display:none;gap:0.5rem}
.nav-menu a{color:var(--muted);text-decoration:none;font-weight:600;display:block;padding:0.5rem 0}
.nav-menu.open{display:grid !important;grid-template-columns:repeat(2,1fr);gap:0.6rem;position:absolute;top:100%;left:0;right:0;padding:0.75rem 1rem;background:linear-gradient(180deg,rgba(8,18,37,0.98),rgba(8,18,37,0.95));box-shadow:0 12px 40px rgba(0,0,0,0.5);backdrop-filter:blur(12px);z-index:9999;max-height:calc(100vh - 56px);overflow:auto}
.nav-menu.open a,.nav-menu.open button,.nav-menu.open .btn-cta{display:flex;align-items:center;justify-content:center;padding:0.65rem 0.9rem;border-radius:8px;width:100%;text-align:center}
.nav-menu.open a:hover,.nav-menu.open button:hover,.nav-menu.open .btn-cta:hover{background:rgba(0,102,255,0.06)}

/* Hero (single column on mobile) */
.hero{padding:1.5rem 0}
.hero-grid{display:grid;grid-template-columns:1fr;gap:1rem;align-items:start}
.hero-left h1{font-size:1.6rem;line-height:1.05;margin:0 0 0.5rem}
.hero-left .sub{color:var(--cyan);font-weight:700;margin-bottom:0.4rem}
.hero-left .desc{color:var(--muted);margin-bottom:0.6rem}
.hero-ctas{display:flex;flex-direction:column;gap:0.6rem}
.btn-primary{background:linear-gradient(90deg,var(--primary),var(--cyan));padding:0.6rem;border-radius:10px;color:#fff;font-weight:700;text-align:center}
.btn-ghost{padding:0.6rem;border-radius:10px;border:1px solid rgba(255,255,255,0.06);color:var(--muted);text-align:center}

/* Device mockup and Wenix */
.device-mockup{display:flex;justify-content:center}
.mock-screen{width:100%;height:auto;aspect-ratio:16/10;border-radius:12px;background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));border:1px solid rgba(0,225,255,0.06);box-shadow:0 14px 40px rgba(0,0,0,0.6);overflow:hidden;display:flex;align-items:center;justify-content:center;padding:0}
.wenix-main{width:100%;height:100%;object-fit:cover;display:block;border-radius:8px}
.wenix-thumbs{display:flex;gap:0.5rem;margin-top:0.6rem;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}
.wenix-thumbs .thumb{flex:0 0 auto;width:72px;height:48px;object-fit:cover;border-radius:8px;border:2px solid rgba(255,255,255,0.04);box-shadow:0 8px 24px rgba(0,0,0,0.6);cursor:pointer}
.wenix-thumbs .thumb.active{transform:translateY(-4px);box-shadow:0 18px 40px rgba(0,102,255,0.12);border-color:rgba(0,229,255,0.12)}

/* Grids */
.services-grid{display:grid;grid-template-columns:1fr;gap:0.75rem;margin-top:1rem}
.projects-grid{display:grid;grid-template-columns:1fr;gap:0.75rem;margin-top:1rem}
.features-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:0.6rem;margin-top:1rem}
.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:0.6rem;margin-top:1rem}
.footer-grid{display:grid;grid-template-columns:1fr;gap:1rem}

/* Contact form */
.contact-form .row{display:flex;flex-direction:column;gap:0.6rem}
.contact-form input,.contact-form textarea{width:100%;padding:0.8rem;border-radius:8px;border:1px solid rgba(255,255,255,0.04);background:rgba(0,0,0,0.35);color:var(--white)}

/* CTA */
.cta-actions{display:flex;flex-direction:column;gap:0.6rem}
.cta-actions a{width:100%}

/* Performance */
.particles-canvas{display:block}
.hero-bg-anim{opacity:0.6}

/* When the user is actively scrolling, reduce/stop CSS animations to prevent jank */
.scrolling-paused .hero-bg-anim,
.scrolling-paused .floater,
.scrolling-paused .particles-canvas,
.scrolling-paused .c4a-robot-floating,
.scrolling-paused .wenix-main,
.scrolling-paused .mock-screen{animation:none !important;transition:none !important}

/* Lightbox tweaks for mobile */
.lightbox-nav{font-size:1.8rem;padding:0.35rem 0.6rem}
.lightbox-close{font-size:1.6rem;top:12px;right:12px}

/* Our Process: horizontal scroller on mobile */
.process .timeline{list-style:none;padding:0.6rem 0;margin:0;display:flex;gap:0.8rem;overflow-x:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;touch-action:auto;overscroll-behavior-x:contain}
.process .timeline::-webkit-scrollbar{display:none;height:0}
.process .timeline li{flex:0 0 80%;min-width:240px;background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));padding:1rem;border-radius:10px;box-shadow:0 14px 36px rgba(0,0,0,0.5);scroll-snap-align:start;display:flex;flex-direction:column;gap:0.4rem}
.process .timeline li strong{font-size:1rem;margin-bottom:0.25rem}
.process .timeline li span{color:var(--muted);font-size:0.95rem}


/* On wider screens let globals.css control layout again */

/* Toggle button (label + switch) - match desktop */
.anim-toggle{display:inline-flex;align-items:center;gap:0.6rem;background:transparent;padding:0.1rem 0.2rem;border-radius:8px;color:var(--muted);font-weight:600;cursor:pointer;border:none}
.anim-toggle .anim-label{color:var(--muted);font-weight:600;font-size:0.95rem;line-height:1;white-space:nowrap}
.anim-toggle .anim-switch{width:44px;height:24px;background:rgba(255,255,255,0.12);border-radius:999px;padding:3px;display:inline-flex;align-items:center;transition:background .18s ease,transform .12s ease;justify-content:flex-start}
.anim-toggle .anim-thumb{width:18px;height:18px;background:#fff;border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,0.25);transform:translateX(0);transition:transform .18s cubic-bezier(.2,.9,.2,1),background .18s ease}
.anim-toggle.active .anim-switch{background:linear-gradient(90deg,var(--primary),var(--cyan));justify-content:flex-end}
.anim-toggle:active{transform:translateY(1px)}

/* Ensure toggle fits nav grid */
.nav-menu.open .anim-toggle{width:100%;justify-content:center;padding:0.15rem 0}

/* Helpers */
img{max-width:100%;height:auto;display:block}
button{font:inherit}

/* Hand-off to desktop: keep this file mobile-first; globals.css will take over at >=769px */
@media (min-width:769px){
  .mobile-toggle{display:none}
  .nav-menu{display:flex}
  .nav-menu.open{position:static;display:flex;flex-direction:row;gap:1rem;padding:0;background:transparent;border-bottom:0;box-shadow:none;max-height:none;overflow:visible}
  .hero-grid{grid-template-columns:1fr 520px}
  .mock-screen{width:520px;height:320px;aspect-ratio:auto}
  .wenix-thumbs{position:absolute;bottom:12px;left:12px;flex-wrap:wrap;overflow:visible}
  .container{max-width:1200px}
}
