/* ═══════════════════════════════════════════════════
   ND AUTOMATION — MAIN STYLESHEET
   ═══════════════════════════════════════════════════ */

/* ── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Share Tech Mono', 'Courier New', monospace !important; }

:root {
  --bg-deep:    #040e1a;
  --bg-dark:    #071525;
  --bg-card:    rgba(255,255,255,0.04);
  --border:     rgba(0,212,255,0.18);
  --cyan:       #00d4ff;
  --cyan-dim:   rgba(0,212,255,0.15);
  --cyan-glow:  rgba(0,212,255,0.4);
  --orange:     #ff6b35;
  --white:      #ffffff;
  --text-muted: rgba(255,255,255,0.55);
  --font-hud:   'Share Tech Mono', 'Courier New', monospace;
  --font-body:  'Share Tech Mono', 'Courier New', monospace;
  --radius:     12px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ── BACKGROUND ───────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 50%, rgba(0,80,100,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 85% 20%, rgba(0,50,80,0.3) 0%, transparent 70%),
    linear-gradient(160deg, #040e1a 0%, #061520 40%, #071a28 70%, #040e1a 100%);
  z-index: 0;
  pointer-events: none;
}

/* Grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ── PARTICLE CANVAS ──────────────────────────────── */
#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   FLOATING BACKGROUND SHAPES
   ══════════════════════════════════════════════════ */
.scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  pointer-events: all;
  cursor: grab;
  transition: filter 0.3s;
  user-select: none;
  will-change: transform;
}

.shape:active { cursor: grabbing; }

/* Cube */
.shape.cube {
  width: 48px; height: 48px;
  border: 1.5px solid rgba(0,212,255,0.4);
  background: rgba(0,212,255,0.05);
  transform: rotate(30deg) rotateX(45deg);
  animation: floatCube 9s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(0,212,255,0.15), inset 0 0 12px rgba(0,212,255,0.05);
}

.shape.cube::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(0,212,255,0.25);
}

.shape.cube.small { width: 28px; height: 28px; animation-duration: 11s; }
.shape.cube.tiny  { width: 16px; height: 16px; animation-duration: 7s; border-color: rgba(0,212,255,0.3); }

/* Diamond */
.shape.diamond {
  width: 42px; height: 42px;
  border: 1.5px solid rgba(0,212,255,0.45);
  background: rgba(0,212,255,0.06);
  transform: rotate(45deg);
  animation: floatDiamond 12s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(0,212,255,0.2);
}

.shape.diamond.small { width: 24px; height: 24px; animation-duration: 8s; }
.shape.diamond.tiny  { width: 14px; height: 14px; animation-duration: 14s; opacity: 0.6; }

/* Triangle */
.shape.triangle {
  width: 0; height: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-bottom: 38px solid rgba(0,212,255,0.15);
  filter: drop-shadow(0 0 8px rgba(0,212,255,0.3));
  animation: floatTriangle 10s ease-in-out infinite;
}

.shape.triangle::after {
  content: '';
  position: absolute;
  top: 12px;
  left: -14px;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 24px solid rgba(0,212,255,0.06);
}

.shape.triangle.small {
  border-left-width: 14px;
  border-right-width: 14px;
  border-bottom-width: 24px;
  animation-duration: 13s;
}

/* Prism */
.shape.prism {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(0,212,255,0.35);
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,212,255,0.02));
  border-radius: 4px;
  transform: rotate(15deg) skewX(10deg);
  animation: floatPrism 15s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(0,212,255,0.12);
}

.shape.prism.small { width: 22px; height: 22px; animation-duration: 10s; }

/* ── FLOAT KEYFRAMES ──────────────────────────────── */
@keyframes floatCube {
  0%   { transform: rotate(30deg) rotateX(45deg) translate(0,0); }
  25%  { transform: rotate(38deg) rotateX(45deg) translate(10px,-15px); }
  50%  { transform: rotate(30deg) rotateX(45deg) translate(18px,0px); }
  75%  { transform: rotate(22deg) rotateX(45deg) translate(8px,12px); }
  100% { transform: rotate(30deg) rotateX(45deg) translate(0,0); }
}

@keyframes floatDiamond {
  0%   { transform: rotate(45deg) translate(0,0); }
  33%  { transform: rotate(55deg) translate(-12px,16px); }
  66%  { transform: rotate(35deg) translate(16px,8px); }
  100% { transform: rotate(45deg) translate(0,0); }
}

@keyframes floatTriangle {
  0%   { transform: translate(0,0) rotate(0deg); }
  30%  { transform: translate(-14px,20px) rotate(8deg); }
  70%  { transform: translate(18px,-10px) rotate(-5deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

@keyframes floatPrism {
  0%   { transform: rotate(15deg) skewX(10deg) translate(0,0); }
  40%  { transform: rotate(25deg) skewX(15deg) translate(-16px,20px); }
  80%  { transform: rotate(5deg)  skewX(5deg)  translate(12px,-10px); }
  100% { transform: rotate(15deg) skewX(10deg) translate(0,0); }
}

/* ══════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(4,14,26,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(4,14,26,0.95);
  box-shadow: 0 4px 40px rgba(0,0,0,0.6);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* ── Logo ─────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: #00d4ff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(0,212,255,0.7), 0 0 28px rgba(0,212,255,0.35);
  background: none;
  border: none;
  box-shadow: none;
  white-space: nowrap;
}

.logo__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes logoGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0,212,255,0.25), 0 0 20px rgba(0,212,255,0.08);
    border-color: rgba(0,212,255,0.35);
  }
  50% {
    box-shadow: 0 0 20px rgba(0,212,255,0.55), 0 0 40px rgba(0,212,255,0.2);
    border-color: rgba(0,212,255,0.65);
  }
}

.logo__text { display: flex; flex-direction: column; }

.logo__name {
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--cyan);
  line-height: 1.1;
}

.logo__sub {
  font-family: var(--font-hud);
  font-size: 7px;
  letter-spacing: 1.5px;
  color: var(--cyan);
  opacity: 0.8;
}

/* ── Navigation ───────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav__link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  position: relative;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 14px; right: 14px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav__link:hover,
.nav__link.active {
  color: var(--white);
}

.nav__link:hover::after,
.nav__link.active::after {
  transform: scaleX(1);
}

.nav__link.active {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--cyan);
}

/* ── BUTTONS ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  border-radius: 6px;
  padding: 10px 22px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  border: none;
  outline: none;
}

/* Primary button */
.btn--primary {
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(0,212,255,0.05));
  border: 1.5px solid var(--cyan);
  color: var(--white);
  box-shadow: 0 0 20px rgba(0,212,255,0.2), inset 0 0 20px rgba(0,212,255,0.05);
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.3), rgba(0,212,255,0.1));
  opacity: 0;
  transition: opacity 0.3s;
}

.btn--primary:hover::before { opacity: 1; }
.btn--primary:hover {
  box-shadow: 0 0 40px rgba(0,212,255,0.5), inset 0 0 20px rgba(0,212,255,0.15);
  transform: translateY(-2px);
}

/* Outline button */
.btn--outline {
  background: transparent;
  border: 1px solid rgba(0,212,255,0.5);
  color: var(--cyan);
}

.btn--outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,212,255,0.1);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn--outline:hover::before { opacity: 1; }
.btn--outline:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0,212,255,0.25);
  transform: translateY(-1px);
}

/* Glitch button effect */
.glitch-btn {
  position: relative;
}

.glitch-btn:hover::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  clip-path: polygon(0 30%, 100% 30%, 100% 70%, 0 70%);
  animation: glitch 0.3s steps(2) infinite;
  background: rgba(4,14,26,0.9);
}

@keyframes glitch {
  0%   { transform: translate(2px, 0) skewX(1deg); }
  25%  { transform: translate(-2px, 0) skewX(-1deg); }
  50%  { transform: translate(1px, 0) skewX(0.5deg); }
  75%  { transform: translate(-1px, 0) skewX(-0.5deg); }
  100% { transform: translate(0, 0) skewX(0deg); }
}

.nav__cta { margin-left: 16px; }

/* ── Cabinet button ──────────────────────────────── */
.btn--cabinet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 7px 14px;
  background: rgba(0,212,255,0.07);
  border: 1px solid rgba(0,212,255,0.35);
  border-radius: 4px;
  color: var(--cyan);
  font-family: var(--font-hud, 'Orbitron', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.btn--cabinet svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.btn--cabinet:hover {
  background: rgba(0,212,255,0.16);
  box-shadow: 0 0 14px rgba(0,212,255,0.28);
  border-color: var(--cyan);
}

/* ── Nav close button (mobile only) ──────────────── */
.nav__close {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.25);
  color: var(--cyan);
  font-size: 20px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.nav__close:active {
  background: rgba(0,212,255,0.2);
  transform: scale(0.92);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cyan);
  transition: var(--transition);
  border-radius: 2px;
}

/* ══════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

/* Left art (circuit / logo graphic) */
.hero__left-art {
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  opacity: 0.45;
  z-index: 1;
  pointer-events: none;
  animation: pulseArt 4s ease-in-out infinite;
}

@keyframes pulseArt {
  0%, 100% { opacity: 0.35; transform: translateY(-50%) scale(1); }
  50%       { opacity: 0.55; transform: translateY(-50%) scale(1.03); }
}

.circuit-art svg { width: 100%; height: auto; }

.hero__content {
  text-align: center;
  position: relative;
  z-index: 3;
}

.hero__eyebrow {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--cyan);
  margin-bottom: 10px;
  opacity: 0.9;
}

.hero__sub {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-hud);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 2px;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.hero__title-line {
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, #a0ecff 50%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(0,212,255,0.3));
}

.hero__desc {
  font-family: var(--font-hud);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero__cta {
  padding: 16px 48px;
  font-size: 12px;
}

/* ══════════════════════════════════════════════════
   REVEAL ANIMATIONS
   ══════════════════════════════════════════════════ */
.reveal-text {
  opacity: 0;
  animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ══════════════════════════════════════════════════
   SERVICES SECTION
   ══════════════════════════════════════════════════ */
.services {
  position: relative;
  z-index: 2;
  padding: 0 0 80px;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── SERVICE CARD ─────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 22px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: revealCard 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealCard {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Scan line effect */
.card__scan {
  position: absolute;
  top: -100%;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  pointer-events: none;
  transition: none;
}

.card:hover .card__scan {
  animation: scanLine 1.2s linear forwards;
}

@keyframes scanLine {
  from { top: -2%; }
  to   { top: 102%; }
}

/* Hover glow border */
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--cyan), transparent 50%, rgba(0,212,255,0.3));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}

/* Corner decorations */
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-top: 1.5px solid var(--cyan);
  border-left: 1.5px solid var(--cyan);
  border-radius: 12px 0 0 0;
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover::before,
.card:hover::after { opacity: 1; }

.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 40px rgba(0,212,255,0.15),
    inset 0 0 30px rgba(0,212,255,0.04);
  border-color: rgba(0,212,255,0.4);
}

/* Icon wrap */
.card__icon-wrap {
  position: relative;
  width: 90px; height: 90px;
}

.card__icon-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.15);
  animation: spinRing 8s linear infinite;
}

@keyframes spinRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.card__icon {
  width: 90px; height: 90px;
  transition: var(--transition);
  filter: drop-shadow(0 0 8px rgba(0,212,255,0.3));
}

.card:hover .card__icon {
  filter: drop-shadow(0 0 20px rgba(0,212,255,0.7));
  transform: scale(1.08) rotateY(10deg);
}

.card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  text-align: center;
}

/* Card text */
.card__title {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--white);
  transition: var(--transition);
}

.card:hover .card__title {
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0,212,255,0.5);
}

.card__text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.card__btn {
  font-size: 9px;
  padding: 8px 18px;
  letter-spacing: 1.5px;
  width: 100%;
  margin-top: auto;
}

/* Futuristic hover on card btn */
.card__btn::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  letter-spacing: 3px;
  font-size: 9px;
  background: rgba(0,212,255,0.12);
  color: var(--white);
  transition: opacity 0.3s;
}

.card__btn:hover::after { opacity: 1; }

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 2;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  background: rgba(4,14,26,0.8);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer__nav {
  display: flex;
  gap: 20px;
}

.footer__link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__link:hover { color: var(--cyan); }

/* ══════════════════════════════════════════════════
   FUTURISTIC TEXT HOVER EFFECTS
   ══════════════════════════════════════════════════ */
.hero__title-line {
  display: block;
  transition: var(--transition);
  position: relative;
}

.hero__title-line:hover {
  filter: drop-shadow(0 0 30px rgba(0,212,255,0.8)) drop-shadow(0 0 60px rgba(0,212,255,0.4));
  animation: titleGlitch 0.4s steps(3) 1;
}

@keyframes titleGlitch {
  0%   { transform: skewX(0deg) translateX(0); }
  20%  { transform: skewX(3deg) translateX(-3px); clip-path: polygon(0 0,100% 0,100% 45%,0 45%); }
  40%  { transform: skewX(-3deg) translateX(3px); clip-path: polygon(0 55%,100% 55%,100% 100%,0 100%); }
  60%  { transform: skewX(1deg) translateX(-1px); }
  80%  { transform: skewX(-1deg) translateX(1px); }
  100% { transform: skewX(0deg) translateX(0); clip-path: none; }
}

/* Nav link scanner effect */
.nav__link:hover {
  text-shadow: 0 0 12px rgba(0,212,255,0.6);
  letter-spacing: 1px;
}

/* Card title type effect */
.card:hover .card__title {
  animation: typeGlow 0.5s ease forwards;
}

@keyframes typeGlow {
  0%   { letter-spacing: 2px; text-shadow: none; }
  50%  { letter-spacing: 4px; text-shadow: 0 0 20px rgba(0,212,255,0.8); }
  100% { letter-spacing: 2px; text-shadow: 0 0 10px rgba(0,212,255,0.4); }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — FULL MOBILE OPTIMIZATION
   ══════════════════════════════════════════════════ */

/* ── Global mobile base ───────────────────────── */
html {
  -webkit-text-size-adjust: 100%;   /* prevent iOS font inflation */
  text-size-adjust: 100%;
}

/* Smooth GPU-composited scrolling on iOS */
body {
  -webkit-overflow-scrolling: touch;
}

/* ── TOUCH TARGETS — min 44×44px ─────────────────── */
.btn        { min-height: 44px; -webkit-tap-highlight-color: transparent; }
.nav__link  { min-height: 44px; -webkit-tap-highlight-color: transparent; }
.card__btn  { min-height: 44px; -webkit-tap-highlight-color: transparent; }
.footer__link { -webkit-tap-highlight-color: transparent; }
.burger     { -webkit-tap-highlight-color: transparent; }

/* ── TOUCH DEVICES — active states & hover cleanup ── */
@media (hover: none) and (pointer: coarse) {
  /* Crisp tap feedback on buttons */
  .btn:active       { opacity: 0.82; transform: scale(0.96); transition: transform 0.08s, opacity 0.08s; }
  .card__btn:active { background: rgba(0,212,255,0.12); transform: scale(0.95); transition: transform 0.08s; }

  /* Card press glow */
  .card:active {
    border-color: rgba(0,212,255,0.5);
    background: rgba(0,212,255,0.07);
    transform: scale(0.99);
    transition: transform 0.08s, border-color 0.08s, background 0.08s;
  }

  /* Disable desktop-only hover effects */
  .card:hover       { transform: none; box-shadow: none; }
  .glitch-btn:hover::after { display: none; }
  .hero__title-line:hover  { filter: none; animation: none; }
  #particleCanvas   { pointer-events: none; }

  /* Trigger scan on card focus (accessibility) */
  .card:focus-within .card__scan { animation: scanLine 1.2s linear forwards; }
}

/* ── 1100px — Small laptop / large tablet ─────── */
@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__title    { font-size: clamp(28px, 4.5vw, 52px); }
  .hero__left-art { width: 200px; left: -20px; opacity: 0.3; }
}

/* ── 1024px ───────────────────────────────────── */
@media (max-width: 1024px) {
  .header__inner { gap: 20px; }
  .nav__link     { font-size: 13px; padding: 6px 10px; }
}

/* ── 768px — Tablet ───────────────────────────── */
@media (max-width: 768px) {
  body::after { background-size: 40px 40px; }

  /* Container */
  .container { padding: 0 16px; }

  /* Header */
  .header       { padding: 12px 0; }
  .header__inner{ gap: 12px; }
  .logo__icon   { width: 44px; height: 44px; }
  .logo__name   { font-size: 12px; letter-spacing: 1.5px; }
  .logo__sub    { font-size: 6px; }

  /* Burger */
  .burger     { display: flex; }
  .nav__cta   { display: none !important; }

  /* Burger → X animation */
  .burger.active span:nth-child(1) { transform: rotate(45deg)  translate(5px,  5px); }
  .burger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* ── Nav full-screen overlay — slides in from top ── */
  .nav { display: none; }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(4, 14, 26, 0.97);
    z-index: 200;
    align-items: center;
    justify-content: center;
    gap: 28px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    animation: navSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    /* GPU layer */
    will-change: opacity, transform;
  }

  @keyframes navSlideIn {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .nav__close { display: flex; }

  .nav.open .nav__link {
    font-size: 20px;
    font-family: var(--font-hud);
    letter-spacing: 2.5px;
    padding: 14px 28px;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid transparent;
    border-radius: 10px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
    -webkit-tap-highlight-color: transparent;
    width: 80vw;
    max-width: 320px;
  }

  .nav.open .nav__link:active,
  .nav.open .nav__link.active {
    color: var(--cyan);
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.06);
    text-shadow: 0 0 18px rgba(0, 212, 255, 0.55);
  }

  /* Hero */
  .hero {
    min-height: 100svh;
    padding: 90px 0 44px;
    align-items: flex-start;
  }
  .hero__left-art { display: none; }
  .hero__eyebrow  { font-size: 9px; letter-spacing: 2px; }
  .hero__sub      { font-size: 13px; letter-spacing: 0.5px; }
  .hero__title    { font-size: clamp(26px, 7.5vw, 48px); letter-spacing: 1px; margin-bottom: 18px; }
  .hero__desc     { font-size: 10px; letter-spacing: 2.5px; margin-bottom: 32px; }
  .hero__cta      { padding: 14px 36px; font-size: 11px; width: 100%; max-width: 320px; }

  /* Services */
  .services        { padding: 0 0 60px; }
  .services__grid  { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Cards */
  .card {
    padding: 24px 16px 20px;
    gap: 12px;
    /* Smooth enter animation on mobile */
    animation-duration: 0.5s;
  }
  .card__icon-wrap { width: 72px; height: 72px; }
  .card__icon      { width: 72px; height: 72px; }
  .card__title     { font-size: 11px; letter-spacing: 1.5px; }
  .card__text      { font-size: 11px; }
  .card__btn       { font-size: 8px; padding: 8px 14px; }

  /* Shapes */
  .shape.cube    { width: 36px; height: 36px; }
  .shape.diamond { width: 30px; height: 30px; }

  /* Footer */
  .footer__inner { flex-direction: column; gap: 14px; text-align: center; }
  .footer__nav   { flex-wrap: wrap; justify-content: center; gap: 12px; }
}

/* ── 480px — Phone ────────────────────────────── */
@media (max-width: 480px) {
  /* Prevent overscroll bounce from revealing black bars */
  html { overscroll-behavior-y: contain; }
  body { overscroll-behavior-y: contain; }

  .container  { padding: 0 14px; }

  /* Header */
  .header     { padding: 10px 0; }
  .logo__sub  { display: none; }
  .logo__name { font-size: 11px; }
  .logo__icon { width: 40px; height: 40px; }

  /* Hero */
  .hero {
    padding: 80px 0 32px;
    min-height: 100svh;
    /* Avoid layout shift when address bar collapses */
    min-height: -webkit-fill-available;
  }
  .hero__eyebrow { font-size: 8px; letter-spacing: 1.5px; margin-bottom: 6px; }
  .hero__sub     { font-size: 12px; margin-bottom: 16px; }
  .hero__title   {
    font-size: clamp(24px, 8.5vw, 38px);
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    line-height: 1.15;
  }
  .hero__desc    { font-size: 9px; letter-spacing: 2px; margin-bottom: 28px; }
  .hero__cta     { padding: 14px 28px; font-size: 10px; width: 100%; max-width: 100%; }

  /* Services — single column */
  .services__grid { grid-template-columns: 1fr; gap: 12px; }

  /* Cards — horizontal layout */
  .card {
    flex-direction: row;
    text-align: left;
    padding: 16px 14px;
    gap: 14px;
    align-items: flex-start;
    /* Fast, smooth press response */
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    /* GPU-composite for butter-smooth 60fps */
    will-change: transform;
  }

  .card__icon-wrap        { width: 56px; height: 56px; flex-shrink: 0; }
  .card__icon-wrap::before{ display: none; }
  .card__icon             { width: 56px; height: 56px; }

  .card__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .card__title { font-size: 11px; letter-spacing: 1px; }
  .card__text  { font-size: 11px; line-height: 1.55; }

  .card__btn {
    width: auto;
    align-self: flex-start;
    font-size: 8px;
    padding: 7px 14px;
  }

  /* No hover lift on touch */
  .card:hover { transform: none; }

  /* Fewer floating shapes to save GPU */
  .shape:nth-child(n+7) { display: none; }

  /* Footer */
  .footer      { padding: 16px 0; }
  .footer__nav { gap: 10px; }
  .footer__link{ font-size: 11px; }
  .footer__copy{ font-size: 11px; }
}

/* ── 360px — Very small phone ─────────────────── */
@media (max-width: 360px) {
  .logo__name    { font-size: 10px; letter-spacing: 1px; }
  .hero__title   { font-size: 22px; letter-spacing: 0; }
  .card          { padding: 14px 12px; gap: 10px; }
  .card__icon-wrap{ width: 48px; height: 48px; }
  .card__icon    { width: 48px; height: 48px; }
}

/* ── Landscape phone ──────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 76px 0 36px;
  }
  .hero__title { font-size: clamp(20px, 5vw, 36px); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .card { flex-direction: column; text-align: center; }
}

/* ── Safe area — notch / Dynamic Island / home bar ── */
@supports (padding: env(safe-area-inset-top)) {
  .header {
    padding-left:  max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  .footer {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .hero {
    padding-top: max(80px, calc(60px + env(safe-area-inset-top)));
  }
  /* Nav overlay respects the notch */
  .nav.open {
    padding-top: env(safe-area-inset-top);
  }
}

/* ── Reduced motion ───────────────────────────── */
@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;
  }
  .logo__icon, .shape, .card__icon-wrap::before { animation: none; }
  .reveal-text, .reveal-card, .card { opacity: 1; animation: none; }
}

/* Ensure nav__cta stays hidden on mobile */
@media (max-width: 768px) {
  .nav__cta { display: none !important; }
}

/* Footer links don't need 44px height on desktop */
@media (min-width: 769px) {
  .footer__link { min-height: auto; }
}

/* ── SCROLLBAR ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: rgba(0,212,255,0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.6); }

/* ── SELECTION ────────────────────────────────────── */
::selection {
  background: rgba(0,212,255,0.3);
  color: white;
}

/* ══════════════════════════════════════════════════
   MOBILE PERFORMANCE — strip heavy GPU effects
   Applied on any touch/mobile viewport (≤768px)
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Kill backdrop-filter everywhere — most expensive GPU op ── */
  .card,
  .header,
  .nav.open,
  #about > div > div,
  [style*="backdrop-filter"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* ── Hero: remove blur from reveal animation ── */
  @keyframes revealUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── Cards: no blur on enter animation ── */
  @keyframes revealCard {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── Shapes: hide all — CSS float animations still eat CPU ── */
  .scene { display: none !important; }

  /* ── Hero title: no drop-shadow filter ── */
  .hero__title-line {
    filter: none !important;
  }

  /* ── Card icon ring: disable spinning ring animation ── */
  .card__icon-wrap::before { animation: none !important; display: none !important; }

  /* ── Card hover effects: disabled on touch ── */
  .card { will-change: auto; }

  /* ── Grid overlay: larger cells = fewer lines rendered ── */
  body::after { background-size: 80px 80px !important; }
}

/* ── Extra strip for very small phones ── */
@media (max-width: 480px) {

  /* ── Particle canvas: hide completely — canvas 2D is heavy on low-end phones ── */
  #particleCanvas { display: none !important; }

  /* ── Background gradient: simplify (remove expensive radial gradients) ── */
  body::before {
    background: #040e1a !important;
  }

  /* ── Remove grid overlay entirely ── */
  body::after { display: none !important; }

  /* ── Disable all CSS animations except essential ones ── */
  .shape,
  .card__icon-wrap::before,
  .card__scan,
  #aw-btn::before {
    animation: none !important;
  }

  /* ── Simplify header blur ── */
  .header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(4,14,26,0.97) !important;
  }

  /* ── Nav overlay: no blur ── */
  .nav.open {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(4,14,26,0.99) !important;
  }

  /* ── Instant transitions on mobile ── */
  .btn, .card, .nav__link {
    transition-duration: 0.12s !important;
  }
}
