:root {
  --bg: #06101d;
  --bg-2: #0c1a2e;
  --panel: rgba(12, 26, 46, 0.72);
  --panel-strong: rgba(15, 38, 66, 0.92);
  --text: #f4f8ff;
  --muted: #9fb4c9;
  --line: rgba(156, 199, 255, 0.18);
  --blue: #178ddd;
  --deep-blue: #0c447c;
  --mint: #5df0d4;
  --violet: #8d7dff;
  --hot: #ff6da8;
  --radius: 24px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 3px;
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--blue), var(--mint), var(--hot));
  box-shadow: 0 0 24px rgba(93, 240, 212, 0.55);
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
}
.site-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 20%), rgba(23, 141, 221, 0.24), transparent 28rem),
    radial-gradient(circle at 18% 12%, rgba(93, 240, 212, 0.16), transparent 22rem),
    radial-gradient(circle at 85% 30%, rgba(255, 109, 168, 0.12), transparent 22rem),
    linear-gradient(180deg, rgba(6, 16, 29, 0.25), var(--bg) 88%);
}

.scroll-nexus {
  position: fixed;
  z-index: -1;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--nexus-opacity, 0.18);
  mix-blend-mode: screen;
  filter: blur(0.2px) saturate(1.12);
}
.scroll-nexus-svg {
  width: min(78vw, 980px);
  min-width: 460px;
  transform:
    translate3d(var(--nexus-x, 0px), var(--nexus-y, 0px), 0)
    rotate(var(--nexus-rotate, 0deg))
    scale(var(--nexus-scale, 1));
  transform-origin: 50% 50%;
  transition: opacity 0.2s linear;
  overflow: visible;
}
.nexus-piece {
  fill: rgba(23, 141, 221, 0.12);
  stroke: rgba(93, 240, 212, 0.28);
  stroke-width: 2;
  filter: drop-shadow(0 0 30px rgba(23, 141, 221, 0.28));
  transform-box: fill-box;
  transform-origin: center;
}
.nexus-left {
  transform: translate3d(calc(var(--nexus-split, 0) * -96px), calc(var(--nexus-lift, 0) * 32px), 0)
    rotate(calc(var(--nexus-split, 0) * -10deg));
}
.nexus-right {
  transform: translate3d(calc(var(--nexus-split, 0) * 96px), calc(var(--nexus-lift, 0) * -28px), 0)
    rotate(calc(var(--nexus-split, 0) * 10deg));
}
.nexus-diagonal {
  fill: rgba(93, 240, 212, 0.1);
  transform: translate3d(0, calc(var(--nexus-split, 0) * -48px), 0)
    rotate(calc(var(--nexus-split, 0) * 7deg))
    scale(calc(1 + var(--nexus-split, 0) * 0.08));
}
.nexus-trace {
  fill: none;
  stroke: rgba(93, 240, 212, 0.34);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 16 22;
  opacity: calc(0.16 + var(--nexus-split, 0) * 0.34);
  animation: nexusTrace 12s linear infinite;
}
.nexus-trace-alt {
  stroke: rgba(255, 109, 168, 0.18);
  animation-duration: 15s;
  animation-direction: reverse;
}

.nav-shell {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  width: min(calc(100% - 28px), var(--max));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 16, 29, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Syne, Inter, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
}
.brand-mark { display: grid; place-items: center; }
.brand-mark svg {
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(23, 141, 221, 0.35));
}
.logo-shell {
  transform-origin: center;
  animation: logoPulse 2.4s ease-in-out infinite;
}
.logo-diagonal {
  animation: logoDrift 1.8s ease-in-out infinite alternate;
}
.brand:hover .logo-shell {
  filter: brightness(1.2);
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: 0.25s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.nav-links .nav-cta { color: white; background: rgba(23, 141, 221, 0.24); border: 1px solid rgba(23, 141, 221, 0.35); }
.menu-toggle { display: none; }

.section {
  width: min(calc(100% - 34px), var(--max));
  margin: 0 auto;
  padding: 104px 0;
}
.hero {
  position: relative;
  min-height: 100svh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding-top: 96px;
  padding-bottom: 34px;
  text-align: center;
  overflow: hidden;
}
.hero > *, .contact > *, .why-panel > *, .project-card > * { min-width: 0; }
.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  max-width: 780px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-title, h2 {
  margin: 0;
  font-family: Syne, Inter, sans-serif;
  line-height: 0.98;
  letter-spacing: 0;
}
.hero-title {
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(2.85rem, 4.85vw, 5.2rem);
  line-height: 1;
  text-wrap: balance;
  overflow-wrap: normal;
  text-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}
.hero-title .word {
  display: inline-block;
  transform-origin: 50% 100%;
}
.hero-copy, .section-head p, .cta-panel p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}
.hero-copy {
  max-width: 610px;
  margin: 22px auto 0;
  text-wrap: balance;
}
.hero-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.hero-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(93, 240, 212, 0.24);
  border-radius: 999px;
  background: rgba(4, 18, 32, 0.62);
  color: #dffdf7;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.hero-pills span:hover {
  transform: translateY(-3px);
  border-color: rgba(93, 240, 212, 0.62);
  background: rgba(93, 240, 212, 0.14);
}
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  cursor: pointer;
  text-align: center;
  white-space: normal;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transition: transform 0.55s ease;
}
.btn:hover::after { transform: translateX(120%) skewX(-18deg); }
.btn > * { position: relative; z-index: 1; }
.btn-primary:hover {
  box-shadow: 0 20px 54px rgba(93, 240, 212, 0.3);
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--mint));
  color: #03101b;
  border: 0;
  font-weight: 800;
  box-shadow: 0 18px 44px rgba(23, 141, 221, 0.28);
}
.btn-ghost { background: rgba(255, 255, 255, 0.05); }
.hero .btn {
  backdrop-filter: blur(14px);
}

.hero-visual {
  position: relative;
  z-index: 3;
  width: min(640px, 100%);
  perspective: 1000px;
  pointer-events: auto;
}
.orbit-panel {
  position: relative;
  width: 100%;
  height: 174px;
  min-height: 0;
  border: 1px solid rgba(93, 240, 212, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 48%, rgba(23, 141, 221, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(23, 141, 221, 0.14), rgba(93, 240, 212, 0.045)),
    rgba(4, 15, 29, 0.72);
  overflow: hidden;
  opacity: 1;
  transform: translate(var(--hero-x, 0px), var(--hero-y, 0px)) scale(var(--hero-scale, 1));
  transition: opacity 0.25s ease, transform 0.18s ease-out;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 24px 80px rgba(0, 0, 0, 0.28);
}
.hero:hover .orbit-panel { opacity: 1; }
.dock-scan {
  position: absolute;
  inset: 0;
  transform: translateX(-130%);
  background: linear-gradient(90deg, transparent, rgba(93, 240, 212, 0.13), transparent);
  animation: scanDock 4.8s ease-in-out infinite;
}
.dock-node {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(93, 240, 212, 0.9), 0 0 42px rgba(23, 141, 221, 0.45);
}
.node-a { left: 17%; top: 31%; animation: nodePulse 2.8s ease-in-out infinite; }
.node-b { left: 52%; top: 48%; animation: nodePulse 3.2s ease-in-out 0.4s infinite; }
.node-c { right: 18%; top: 34%; animation: nodePulse 2.6s ease-in-out 0.8s infinite; }
.orbit-panel::before {
  content: "";
  position: absolute;
  inset: -110% 18% 18%;
  border: 1px solid rgba(93, 240, 212, 0.18);
  border-radius: 50%;
  animation: spin 16s linear infinite;
}
.orbit-panel::after {
  content: "";
  position: absolute;
  inset: 18% 28% -96%;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  animation: spin 22s linear infinite reverse;
}
.signal-logo {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  filter: drop-shadow(0 0 34px rgba(23, 141, 221, 0.72));
  transform: translateY(3px) scale(0.68);
  opacity: 0.74;
}
.console-line {
  position: absolute;
  left: 50%;
  top: 16px;
  opacity: 1;
  transform: translateX(-50%);
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: min(330px, 72%);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3, 10, 20, 0.5);
}
.hero:hover .console-line {
  opacity: 1;
}
.console-line span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 18px var(--mint);
}
.console-line b { margin-right: auto; }
.console-line em { color: var(--mint); font-style: normal; }
.metric-grid {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 16px;
  width: min(430px, 82%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateX(-50%);
}
.hero:hover .metric-grid {
  opacity: 1;
  transform: translateX(-50%);
}
.metric-grid div, .service-card, .project-card, .step, .contact-form, .cta-panel, .why-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
}
.metric-grid div {
  position: relative;
  padding: 14px 16px;
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}
.metric-grid div::before,
.service-card::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-105%);
  background: linear-gradient(90deg, transparent, rgba(93, 240, 212, 0.12), transparent);
  transition: transform 0.55s ease;
}
.metric-grid div:hover::before,
.service-card:hover::before,
.project-card:hover::before {
  transform: translateX(105%);
}
.metric-grid div:hover {
  transform: translateY(-4px);
  border-color: rgba(93, 240, 212, 0.42);
  background: rgba(23, 141, 221, 0.18);
}
.metric-grid strong { display: block; font-family: Syne; font-size: 1.6rem; }
.metric-grid span { color: var(--muted); font-size: 0.82rem; }

.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head h2, .cta-panel h2, .why-panel h2 { margin-top: 14px; font-size: clamp(2.2rem, 6vw, 4.6rem); }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service-card {
  position: relative;
  min-height: 270px;
  padding: 24px;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  overflow: hidden;
}
.service-card:hover { border-color: rgba(93, 240, 212, 0.48); background: var(--panel-strong); }
.card-code { color: var(--mint); font-family: Syne; }
.service-card h3, .project-card h3 { font-size: 1.55rem; margin: 54px 0 12px; }
.service-card p, .project-card p, .step p, .why-grid p { color: var(--muted); line-height: 1.65; }

.project-list { display: grid; gap: 16px; }
.project-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
  padding: 26px;
  border-radius: var(--radius);
  overflow: hidden;
}
.project-card span { color: var(--mint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; }
.project-card h3 { margin: 10px 0 0; }
.project-card p { margin: 0; }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { position: relative; padding: 24px; border-radius: var(--radius); }
.step::before { content: ""; display: block; width: 40px; height: 3px; margin-bottom: 28px; background: linear-gradient(90deg, var(--blue), var(--mint)); }
.step b { font-family: Syne; font-size: 1.35rem; }

.why-panel, .cta-panel, .contact-form {
  border-radius: 32px;
  padding: clamp(24px, 5vw, 54px);
}
.why-panel { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 34px; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.why-grid p { margin: 0; padding: 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.045); }
.why-grid strong { color: white; }
.cta-panel { text-align: center; background: linear-gradient(135deg, rgba(23, 141, 221, 0.18), rgba(93, 240, 212, 0.08)), var(--panel); }
.cta-panel p { max-width: 680px; margin: 18px auto 28px; }

.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.contact .section-head { margin: 0; }
.contact-form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; }
input, textarea, select {
  width: 100%;
  color: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 8, 16, 0.54);
  padding: 14px 16px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--mint); box-shadow: 0 0 0 4px rgba(93, 240, 212, 0.12); }
textarea { resize: vertical; }
.form-status { min-height: 24px; margin: 0; color: var(--mint); }

.footer {
  width: min(calc(100% - 34px), var(--max));
  margin: 0 auto;
  padding: 32px 0 50px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer .brand { color: white; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scanDock {
  0%, 28% { transform: translateX(-130%); opacity: 0; }
  38% { opacity: 1; }
  70%, 100% { transform: translateX(130%); opacity: 0; }
}
@keyframes nodePulse {
  0%, 100% { transform: scale(0.8); opacity: 0.42; }
  45% { transform: scale(1.35); opacity: 1; }
}
@keyframes nexusTrace {
  to { stroke-dashoffset: -220; }
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.22); }
}
@keyframes logoDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(1.4px, -1px); }
}

@media (max-width: 920px) {
  .menu-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: white;
  }
  .menu-toggle span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: white;
    box-shadow: 0 0 12px rgba(93, 240, 212, 0.38);
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, background 0.25s ease;
  }
  .menu-toggle span:first-child { transform: translate(-50%, calc(-50% - 4px)); }
  .menu-toggle span:last-child { transform: translate(-50%, calc(-50% + 4px)); }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(6, 16, 29, 0.94);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: 0.25s ease;
  }
  .nav-shell.is-open .nav-links { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-shell.is-open .menu-toggle {
    border-color: rgba(93, 240, 212, 0.58);
    background: rgba(23, 141, 221, 0.18);
  }
  .nav-shell.is-open .menu-toggle span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
  .nav-shell.is-open .menu-toggle span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
  .contact, .why-panel { grid-template-columns: 1fr; }
  .hero {
    height: auto;
    min-height: 100svh;
    gap: 28px;
  }
  .hero-title { font-size: clamp(3rem, 10vw, 5.4rem); }
  .hero-visual { width: 100%; }
  .orbit-panel { width: min(560px, 88vw); height: 168px; min-height: 0; }
  .card-grid, .timeline { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .section { width: min(calc(100% - 24px), var(--max)); padding: 72px 0; }
  .hero {
    position: relative;
    height: auto;
    min-height: 100svh;
    width: min(calc(100% - 24px), var(--max));
    padding-top: 104px;
    padding-bottom: 32px;
    overflow: visible;
  }
  .hero-content {
    position: relative;
    z-index: 2;
    align-self: center;
  }
  .hero-title { font-size: clamp(2.35rem, 11vw, 3.85rem); }
  .hero-copy { font-size: 1rem; line-height: 1.58; }
  .hero-actions, .btn { width: 100%; }
  .hero-pills { gap: 8px; }
  .hero-pills span { min-height: 34px; font-size: 0.8rem; }
  .hero-visual {
    position: relative;
    z-index: 3;
    inset: auto;
    width: 100%;
    height: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .card-grid, .timeline, .project-card, .why-grid { grid-template-columns: 1fr; }
  .orbit-panel {
    left: auto;
    top: auto;
    width: 100%;
    height: 152px;
    min-height: 0;
    border-radius: 24px;
    opacity: 1;
  }
  .metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: calc(100% - 28px); }
  .metric-grid div { padding: 10px; }
  .metric-grid strong { font-size: 1.2rem; }
  .console-line { font-size: 0.85rem; }
  .footer { align-items: flex-start; flex-direction: column; }
  .scroll-nexus-svg { min-width: 360px; width: 112vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .scroll-nexus { opacity: 0.08; }
}
