:root {
  --bg: #05070d;
  --cyan: #00e5ff;
  --magenta: #b829ff;
  --ink: #eef2f8;
  --ink-dim: #97a2b8;
  --card-bg: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.09);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.35) transparent;
}

::selection { background: var(--cyan); color: #05070d; }

#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 30;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.7);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1.2rem, 4vw, 3.2rem);
  pointer-events: none;
}
.site-header .logo,
.site-header nav {
  pointer-events: auto;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.logo-cube { color: var(--cyan); }
.logo .accent { color: var(--ink-dim); font-weight: 500; }

.nav-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.nav-link:hover {
  border-color: rgba(0, 229, 255, 0.6);
  background: rgba(0, 229, 255, 0.08);
  transform: translateY(-1px);
}

main.content {
  position: relative;
  z-index: 5;
}

.panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 8vw;
  position: relative;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.panel.interactive { pointer-events: auto; }

.hero { min-height: 130vh; }
.spacer-panel { min-height: 90vh; }
.open-line { min-height: 90vh; align-items: center; text-align: center; }
.services { min-height: 260vh; align-items: center; }
.contact { min-height: 110vh; align-items: center; text-align: center; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.05;
  margin: 0 0 1.2rem;
  font-weight: 700;
  max-width: 16ch;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 700;
}
.accent {
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p, .open-line p, .contact p {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--ink-dim);
  max-width: 46ch;
  margin: 0 0 1.5rem;
}

.scroll-cue {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.04em;
}
.scroll-cue .arrow {
  display: inline-block;
  animation: bounce 1.8s ease-in-out infinite;
  color: var(--cyan);
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

.services h2 { text-align: center; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.4rem;
  width: 100%;
  max-width: 1180px;
  margin-top: 2.5rem;
}
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.8rem 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(255, 255, 255, 0.055);
}
.card-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
}
.card-icon.icon-ai, .card-icon.icon-robot {
  background: rgba(184, 41, 255, 0.12);
  color: var(--magenta);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}
.service-card p {
  font-size: 0.95rem;
  color: var(--ink-dim);
  margin: 0;
  line-height: 1.5;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 0.9rem 2rem;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  margin-bottom: 2.5rem;
}
.contact-email:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.25);
}
.contact footer {
  color: var(--ink-dim);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .panel { padding: 0 6vw; }
  .service-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .service-grid { grid-template-columns: 1fr; }
}
