/* ============ TOKENS ============ */
:root {
  --bg: #04070d;
  --bg-alt: #070b14;
  --surface: #0b1120;
  --surface-2: #0f1729;
  --line: rgba(148, 163, 184, 0.12);
  --text: #e6edf7;
  --muted: #8b98ad;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #818cf8;
  --grad: linear-gradient(100deg, var(--cyan), var(--blue) 55%, var(--violet));
  --radius: 18px;
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(34, 211, 238, 0.3); }

.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { width: min(1160px, 92%); margin: 0 auto; position: relative; z-index: 2; }

h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
p { color: var(--muted); }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--grad); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: none;
  position: relative; transition: transform 0.25s cubic-bezier(0.3, 0.8, 0.3, 1), box-shadow 0.3s;
  will-change: transform;
}
.btn span { position: relative; z-index: 1; }
.btn-primary {
  background: var(--grad); color: #04121a;
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover { box-shadow: 0 12px 44px rgba(59, 130, 246, 0.45); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04); color: var(--text);
  border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: rgba(34, 211, 238, 0.5); }
.btn-block { width: 100%; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
/* blur lives on a pseudo-element: backdrop-filter on .nav itself would make it
   the containing block for the fixed mobile menu panel */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transition: opacity 0.35s;
}
.nav.scrolled {
  background: rgba(4, 7, 13, 0.75);
  border-bottom-color: var(--line);
}
.nav.scrolled::before { opacity: 1; }
.nav-inner {
  width: min(1160px, 92%); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; display: block; }
.logo-mark svg { width: 100%; height: 100%; }
.logo-text {
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--text);
}
.logo-text em { font-style: normal; font-weight: 400; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta {
  color: #04121a; background: var(--grad); padding: 10px 22px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600;
}
.nav-toggle { display: none; }

/* ============ HERO ============ */
.hero {
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 140px 0 80px; text-align: center; overflow: hidden;
}
#net-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 60%);
  top: -300px; left: 50%; transform: translateX(-50%); pointer-events: none;
}
.hero-inner { position: relative; z-index: 3; width: min(880px, 92%); }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  font-size: 0.82rem; color: var(--muted); margin-bottom: 30px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 700; margin-bottom: 26px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; }

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 620px; margin: 0 auto 40px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }

.hero-stats {
  display: flex; justify-content: center; gap: clamp(28px, 6vw, 72px); flex-wrap: wrap;
}
.hstat { display: flex; flex-direction: column; align-items: center; }
.hstat strong {
  font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hstat span { font-size: 0.82rem; color: var(--muted); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 24px; height: 40px; border: 1.5px solid var(--line); border-radius: 14px;
}
.scroll-hint span {
  position: absolute; top: 7px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 3px; background: var(--cyan); animation: scrollhint 1.8s infinite;
}
@keyframes scrollhint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ MARQUEE ============ */
.marquee-wrap {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-alt); position: relative; z-index: 2;
}
.marquee { overflow: hidden; padding: 20px 0; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track {
  display: flex; align-items: center; gap: 40px; width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  font-family: var(--font-head); font-size: 0.95rem; font-weight: 500;
  color: var(--muted); white-space: nowrap;
}
.marquee-track i { color: var(--cyan); font-style: normal; font-size: 0.6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
.section { padding: clamp(80px, 10vw, 130px) 0; position: relative; z-index: 2; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: clamp(44px, 6vw, 70px); }
.section-head p { margin-top: 18px; font-size: 1.05rem; }

/* ============ SERVICES ============ */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.svc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 28px; position: relative; overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.3, 0.8, 0.3, 1), border-color 0.35s, box-shadow 0.35s;
}
.svc-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, 0.08), transparent 55%);
  transition: opacity 0.35s; pointer-events: none;
}
.svc-card:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, 0.35); box-shadow: 0 24px 60px rgba(2, 8, 20, 0.6); }
.svc-card:hover::before { opacity: 1; }

.svc-icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 22px;
  display: grid; place-items: center; color: var(--cyan);
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.12), rgba(129, 140, 248, 0.1));
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.svc-icon svg { width: 26px; height: 26px; }
.svc-card h3 { font-size: 1.18rem; margin-bottom: 12px; }
.svc-card p { font-size: 0.93rem; margin-bottom: 20px; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-tags span {
  font-size: 0.72rem; font-weight: 500; color: var(--muted);
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

/* ============ WHY ============ */
.why-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.why-copy { position: sticky; top: 120px; }
.why-copy p { margin: 18px 0 30px; font-size: 1.05rem; }
.why-list { display: flex; flex-direction: column; gap: 18px; }
.why-item {
  display: flex; gap: 22px; padding: 26px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.35s cubic-bezier(0.3, 0.8, 0.3, 1), border-color 0.35s;
}
.why-item:hover { transform: translateX(8px); border-color: rgba(34, 211, 238, 0.35); }
.why-num {
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  flex-shrink: 0; padding-top: 2px;
}
.why-item h4 { font-size: 1.05rem; margin-bottom: 6px; }
.why-item p { font-size: 0.9rem; }

/* ============ STATS BAND ============ */
.stats-band {
  padding: clamp(56px, 7vw, 90px) 0; position: relative; z-index: 2;
  background:
    radial-gradient(600px 300px at 20% 50%, rgba(34, 211, 238, 0.07), transparent),
    radial-gradient(600px 300px at 80% 50%, rgba(129, 140, 248, 0.07), transparent);
}
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat strong {
  display: block; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: 0.88rem; color: var(--muted); }

/* ============ PRODUCTS ============ */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.prod-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform 0.35s cubic-bezier(0.3, 0.8, 0.3, 1), border-color 0.35s;
  position: relative; overflow: hidden;
}
.prod-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.prod-card:hover { transform: translateY(-6px); border-color: rgba(129, 140, 248, 0.4); }
.prod-card:hover::after { transform: scaleX(1); }
.prod-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--violet); margin-bottom: 14px;
}
.prod-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.prod-card p { font-size: 0.9rem; }

/* ============ PROCESS ============ */
.process-row { display: flex; align-items: stretch; gap: 14px; }
.proc-step {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 24px; text-align: center;
  transition: transform 0.35s cubic-bezier(0.3, 0.8, 0.3, 1), border-color 0.35s;
}
.proc-step:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, 0.35); }
.proc-dot {
  width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; color: #04121a;
  background: var(--grad); box-shadow: 0 6px 22px rgba(34, 211, 238, 0.35);
}
.proc-step h4 { margin-bottom: 10px; }
.proc-step p { font-size: 0.88rem; }
.proc-line {
  align-self: center; width: 40px; height: 1.5px; flex-shrink: 0;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.5), rgba(129, 140, 248, 0.5));
}

/* ============ CONTACT ============ */
.contact {
  background:
    radial-gradient(700px 400px at 85% 20%, rgba(59, 130, 246, 0.1), transparent),
    var(--bg-alt);
  border-top: 1px solid var(--line);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact-copy p { margin: 18px 0 26px; font-size: 1.05rem; }
.contact-points { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.contact-points li { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 0.95rem; }
.contact-points li::before {
  content: "✓"; display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; font-size: 0.7rem; font-weight: 700; color: #04121a;
  background: var(--grad); flex-shrink: 0;
}

.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(26px, 4vw, 40px); display: flex; flex-direction: column; gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
}
.contact-form input, .contact-form select, .contact-form textarea {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
  outline: none; transition: border-color 0.25s, box-shadow 0.25s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.contact-form textarea { resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--cyan); text-align: center; min-height: 1.2em; }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--line); padding: 60px 0 30px; position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.footer-logo { margin-bottom: 12px; display: inline-flex; }
.footer p { font-size: 0.88rem; max-width: 260px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h5 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin-bottom: 6px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.25s; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  font-size: 0.82rem; color: var(--muted); display: flex; justify-content: space-between;
}

/* ============ REVEAL DEFAULTS (JS overrides) ============ */
[data-reveal], [data-card] { opacity: 0; }
.no-js [data-reveal], .no-js [data-card] { opacity: 1; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .why-copy { position: static; }
  .process-row { flex-direction: column; }
  .proc-line { width: 1.5px; height: 32px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 0; top: 64px; z-index: 99;
    background: rgba(4, 7, 13, 0.97); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; gap: 30px;
    transform: translateY(-110%); transition: transform 0.4s cubic-bezier(0.3, 0.8, 0.3, 1);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 1.2rem; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 6px;
  }
  .nav-toggle span { width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
  .nav-toggle.open span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle.open span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .services-grid, .products-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal], [data-card] { opacity: 1 !important; }
}
