/* ═══════════════════════════════════════════════════════
   ELITE TECH-INNOVATIONS — base.css
   Shared across all pages: reset, vars, cursor, nav,
   footer, loader, 3D canvas, scroll animations
═══════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── CSS Variables ── */
:root {
  --bg: #F5F4F0;
  --bg2: #EEECEA;
  --bg3: #E5E3DE;
  --white: #FFFFFF;
  --ink: #0F0F0D;
  --ink2: #2A2A27;
  --muted: #7A7971;
  --muted2: #A8A69F;
  --blue: #1A3BCC;
  --blue-light: #2E52E8;
  --blue-pale: #E8ECFC;
  --border: rgba(15,15,13,0.1);
  --border2: rgba(15,15,13,0.06);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

/* ── 3D Background Canvas ── */
#bg3d {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 1s ease;
}
#bg3d.visible { opacity: 1; }

/* Sections above 3D bg */
.ticker, .about, .why, .products, .clients, .team, .cta-section,
.services-main, .process-section, .capabilities, .cta-strip,
.contact-wrap, footer {
  position: relative; z-index: 2;
}
.about, .products, .clients, .team,
.capabilities, .contact-wrap {
  background: rgba(245,244,240,0.92) !important;
  backdrop-filter: blur(1px);
}
footer {
  background: rgba(15,15,13,0.97) !important;
}
.why, .process-section {
  background: rgba(15,15,13,0.93) !important;
  backdrop-filter: blur(1px);
}
.cta-section, .cta-strip { background: rgba(245,244,240,0.90) !important; }
.ticker                { background: rgba(255,255,255,0.94) !important; }
.services-main         { background: rgba(245,244,240,0.92) !important; }

/* ── Custom Cursor ── */
.cursor {
  position: fixed; width: 10px; height: 10px;
  background: var(--blue); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width 0.3s, height 0.3s, background 0.3s;
  mix-blend-mode: multiply;
}
.cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1.5px solid var(--blue); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
  opacity: 0.4;
}
body:has(a:hover) .cursor,
body:has(button:hover) .cursor { width: 20px; height: 20px; }
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring { width: 52px; height: 52px; opacity: 0.2; }

/* ── Navigation ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  background: rgba(245,244,240,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  transition: all 0.4s;
}
nav.solid {
  background: rgba(245,244,240,0.98);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}
.nav-logo {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 900; font-size: 17px;
  letter-spacing: -0.5px; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.nav-logo-img { height: 30px; width: auto; display: block; }
.logo-dot {
  width: 7px; height: 7px;
  background: var(--blue); border-radius: 50%;
  animation: breathe 3s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{transform:scale(1)} 50%{transform:scale(1.4)} }
.nav-center { display: flex; gap: 4px; }
.nav-center a {
  color: var(--muted); text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  padding: 6px 14px; border-radius: 100px;
  transition: all 0.2s; letter-spacing: -0.1px;
}
.nav-center a:hover { color: var(--ink); background: var(--border2); }
.nav-center a.active { color: var(--blue); background: var(--border2); }
.nav-cta {
  background: var(--ink); color: var(--white);
  padding: 9px 22px; border: none;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  border-radius: 100px; cursor: pointer;
  transition: all 0.2s;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.nav-cta:hover { background: var(--blue); transform: translateY(-1px); }
.nav-cta-mobile { display: none; }

/* ── Mobile Hamburger ── */
.nav-burger {
  display: none; position: relative; width: 40px; height: 40px;
  background: transparent; border: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  z-index: 101;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform 0.35s ease, opacity 0.25s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-overlay {
  position: fixed; inset: 0; background: rgba(15,15,13,0.4);
  backdrop-filter: blur(2px); z-index: 98; opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.nav-overlay.visible { opacity: 1; pointer-events: auto; }

/* ── Shared Section Utilities ── */
.section { padding: 120px 48px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  color: var(--blue); letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 20px;
}
.section-tag::before { content:''; width:20px; height:1.5px; background:var(--blue); }
.section-h {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(36px,3.5vw,56px);
  font-weight: 800; line-height: 1.0;
  letter-spacing: -2px; color: var(--ink);
}

/* Shared buttons */
.btn-dark {
  background: var(--ink); color: var(--white);
  padding: 14px 28px; border: none;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600; font-size: 14px;
  border-radius: 100px; cursor: pointer; transition: all 0.25s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-dark:hover { background: var(--blue); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(26,59,204,0.25); }
.btn-outline {
  background: transparent; color: var(--ink);
  padding: 13px 28px; border: 1.5px solid var(--border);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500; font-size: 14px;
  border-radius: 100px; cursor: pointer; transition: all 0.25s;
  text-decoration: none; display: inline-flex; align-items: center;
}
.btn-outline:hover { border-color: var(--ink); background: var(--white); }

/* ── Shared Hero Background Elements ── */
.page-hero {
  min-height: min(100vh, 860px); padding: 0 48px 80px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; z-index: 2; background: var(--bg); overflow: hidden;
}
.page-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border2) 1px, transparent 1px),
    linear-gradient(90deg, var(--border2) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hero-nodes { position: absolute; inset: 0; pointer-events: none; }
.page-hero-orb {
  position: absolute; right: -120px; top: 50%; transform: translateY(-50%);
  width: 700px; height: 700px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.page-hero-orb::before {
  content: ''; width: 500px; height: 500px;
  border-radius: 50%; border: 1px solid var(--border); position: absolute;
}
.page-hero-orb::after {
  content: ''; width: 300px; height: 300px;
  border-radius: 50%; border: 1px solid var(--border); position: absolute;
}
.orb-core {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--blue); opacity: 0.07;
  animation: pulse-orb 4s ease-in-out infinite;
}
@keyframes pulse-orb { 0%,100%{transform:scale(1);opacity:0.07} 50%{transform:scale(1.2);opacity:0.14} }
.hero-node {
  position: absolute; width: 5px; height: 5px;
  background: var(--blue); border-radius: 50%;
  opacity: 0; animation: nodeAppear 4s ease-in-out infinite;
}
@keyframes nodeAppear { 0%,100%{opacity:0;transform:scale(0)} 50%{opacity:0.55;transform:scale(1)} }
.hero-conn {
  position: absolute; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0; transform-origin: left;
  animation: lineFlow 3s ease-in-out infinite;
}
@keyframes lineFlow { 0%,100%{opacity:0;transform:scaleX(0)} 40%,60%{opacity:0.22;transform:scaleX(1)} }
.breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 100px;
  font-size: 12px; color: var(--muted2); font-weight: 500;
  text-decoration: none;
  position: absolute;
  top: 80px;
  left: 48px;
  z-index: 10;
}
.breadcrumb a { color: var(--muted2); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--muted2); opacity: 0.4; }
.breadcrumb span { color: var(--ink2); font-weight: 600; }
.page-hero-inner { position: relative; z-index: 1; max-width: 820px; }
.page-hero h1 {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(56px,7vw,108px);
  font-weight: 900; line-height: 0.92; letter-spacing: -4px; color: var(--ink);
}
.page-hero h1 .line2 { color: var(--blue); }
.page-hero h1 .line3 { -webkit-text-stroke: 1.5px var(--ink); color: transparent; }
.page-hero-bottom {
  position: relative; z-index: 1; margin-top: 40px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.page-hero p { font-size: 15px; color: var(--muted); line-height: 1.7; max-width: 480px; }
.scroll-hint {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--muted2); letter-spacing: 2px; text-transform: uppercase;
}
.scroll-hint::before { content:''; width:32px; height:1px; background:var(--blue); opacity:0.5; }

/* ── Footer ── */
footer {
  background: rgba(15,15,13,0.95) !important;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 64px 48px 36px;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, var(--blue), var(--blue-light), var(--blue)),
    radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 2px, 22px 22px;
  background-position: top left, 0 0;
  background-repeat: no-repeat, repeat;
}
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px; margin-bottom: 52px; position: relative; z-index: 1; }
.footer-logo {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 900; font-size: 17px; color: #fff;
  letter-spacing: -0.5px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px; text-decoration: none;
}
.footer-about { font-size: 13.5px; color: rgba(255,255,255,0.4); line-height: 1.7; margin-bottom: 22px; }
.footer-contact-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.footer-contact-item { font-size: 13px; color: rgba(255,255,255,0.4); display: flex; align-items: flex-start; gap: 10px; }
.footer-contact-item .contact-icon { flex: 0 0 16px; width: 16px; text-align: center; line-height: 1.7; }
.footer-contact-item span { color: rgba(255,255,255,0.7); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}
.footer-social a:hover { color: #fff; border-color: var(--blue-light); background: var(--blue); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,59,204,0.35); }
.footer-col-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.3); margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 13.5px; color: rgba(255,255,255,0.45); text-decoration: none;
  transition: color 0.2s, padding-left 0.2s; font-weight: 500;
  position: relative; display: inline-block;
}
.footer-links a::before {
  content: '→'; position: absolute; left: -16px; opacity: 0;
  transition: opacity 0.2s, left 0.2s; color: var(--blue);
}
.footer-links a:hover { color: #fff; padding-left: 16px; }
.footer-links a:hover::before { opacity: 1; left: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.2); }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile
═══════════════════════════════════════════════════════ */

/* Tablet: 1024px and below */
@media (max-width: 1024px) {
  .section { padding: 90px 32px; }
  .page-hero { padding: 0 32px 64px; }
  .breadcrumb { left: 32px; }
  .page-hero-orb { width: 480px; height: 480px; right: -160px; }
  .page-hero-orb::before { width: 340px; height: 340px; }
  .page-hero-orb::after { width: 200px; height: 200px; }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
  footer { padding: 56px 32px 28px; }
}

/* Mobile nav breakpoint: 860px and below */
@media (max-width: 860px) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }

  nav { padding: 0 20px; height: 60px; }
  .breadcrumb { left: 20px; }
  .page-hero { min-height: auto; padding: 130px 20px 48px; justify-content: flex-start; }
  .nav-burger { display: flex; }
  .nav-cta-desktop { display: none; }
  .nav-cta-mobile {
    display: inline-flex; margin-top: 28px; width: 100%;
    justify-content: center; padding: 14px 22px;
  }
  .nav-center {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 82vw);
    background: var(--white); z-index: 100;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 88px 28px 32px;
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
    overflow-y: auto;
  }
  .nav-center.open { transform: translateX(0); }
  .nav-center a {
    padding: 14px 16px; border-radius: 12px; font-size: 15.5px;
    border-bottom: 1px solid var(--border2);
  }
  .nav-center a.active { background: var(--blue-pale); }

  .page-hero h1 { font-size: clamp(40px,12vw,64px); letter-spacing: -2px; }
  .page-hero-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .page-hero-orb { display: none; }
  .hero-nodes { display: none; }

  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* Small phones: 480px and below */
@media (max-width: 480px) {
  .section { padding: 64px 18px; }
  .page-hero { padding: 118px 18px 48px; }
  .breadcrumb { left: 16px; top: 76px; font-size: 11px; padding: 5px 12px; }
  nav { padding: 0 16px; }
  .nav-logo-img { height: 24px; }
  footer { padding: 48px 18px 24px; }
  .section-h { letter-spacing: -1px; }
}

/* Snappier, shorter-throw reveal on touch devices — long desktop-style travel
   distances read as sluggish on a phone screen */
@media (max-width: 860px) {
  .reveal { transform: translateY(16px); transition: opacity 0.4s ease, transform 0.4s ease; }
  .reveal-d1 { transition-delay: 0.06s; }
  .reveal-d2 { transition-delay: 0.12s; }
  .reveal-d3 { transition-delay: 0.18s; }
}

/* Respect reduced-motion preference: skip travel distance, just fade */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { transform: none !important; transition: opacity 0.3s ease !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ── Scroll-to-top button ── */
#scrollTopBtn {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--white);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  opacity: 0; transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
#scrollTopBtn.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
#scrollTopBtn:hover { background: var(--blue); transform: translateY(-3px) scale(1.05); }
@media (max-width: 860px) {
  #scrollTopBtn { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}
