:root {
  --bg: #05060f;
  --glass: rgba(16, 18, 40, 0.55);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f7ff;
  --muted: #a9b0d0;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --pink: #f472b6;
  --amber: #fbbf24;
  --green: #34d399;
  --grad: linear-gradient(90deg, #22d3ee, #a78bfa 35%, #f472b6 70%, #fbbf24);
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.55;
}

a { color: inherit; }
h1, h2, h3, .brand, .price, .stats strong { font-family: "Space Grotesk", Inter, sans-serif; }

/* Background layers: CSS aurora behind a transparent WebGL canvas */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.aurora span {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: #7c3aed; top: -20vmax; left: -10vmax; }
.aurora span:nth-child(2) { background: #0891b2; bottom: -25vmax; right: -15vmax; animation-delay: -7s; }
.aurora span:nth-child(3) { background: #db2777; top: 30%; left: 40%; width: 40vmax; height: 40vmax; opacity: 0.22; animation-delay: -14s; }
@keyframes drift {
  to { transform: translate(12vmax, 8vmax) scale(1.15); }
}

#scene { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; touch-action: pan-y; }
#labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.label {
  position: absolute;
  transform: translate(-50%, -160%);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(5, 6, 15, 0.8);
  border: 1px solid var(--c, var(--cyan));
  box-shadow: 0 0 18px -4px var(--c, var(--cyan));
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.label.show { opacity: 1; }

/* Cursor glow (mouse only) */
#glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18), transparent 65%);
  pointer-events: none;
  display: none;
}
@media (pointer: fine) { #glow { display: block; } }

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: linear-gradient(rgba(5, 6, 15, 0.9), rgba(5, 6, 15, 0));
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 2px; text-decoration: none; }

/* Logo: a small rotating 3D murex shell (drawn by logo.js) */
.logo-shell { width: 46px; height: 46px; margin: -6px 0; filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.55)); }

/* Wordmark: extruded letters that wave, with the whole word tilting in 3D */
.wordmark {
  display: inline-flex;
  gap: 0.45em;
  font-size: 1.1rem;
  perspective: 500px;
}
.word { display: inline-flex; transform-style: preserve-3d; animation: tilt 7s ease-in-out infinite; }
.word.colorful { animation-delay: -3.5s; }
.ch {
  display: inline-block;
  color: var(--c, var(--text));
  /* Stacked shadows give the letters depth */
  text-shadow:
    1px 1px 0 var(--d, #6d28d9),
    2px 2px 0 var(--d, #6d28d9),
    3px 3px 0 color-mix(in srgb, var(--d, #6d28d9) 70%, #000),
    4px 4px 8px rgba(0, 0, 0, 0.6);
  animation: wave 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.09s);
}
@keyframes tilt {
  0%, 100% { transform: rotateY(-16deg) rotateX(10deg); }
  50% { transform: rotateY(16deg) rotateX(-8deg); }
}
@keyframes wave {
  0%, 100% { transform: translateY(0) rotateX(0); }
  50% { transform: translateY(-3px) rotateX(25deg); }
}
.brand:hover .ch { animation-duration: 1s; }
.nav nav { display: flex; align-items: center; }
.nav nav a { margin-left: 22px; text-decoration: none; color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav nav a:hover { color: var(--text); }
.nav .nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--text);
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box;
  border: 1px solid transparent;
}
.nav .nav-cta:hover { box-shadow: 0 0 24px rgba(244, 114, 182, 0.45); }

/* Hero */
.hero { position: relative; height: 100vh; min-height: 600px; touch-action: pan-y; }
.hero-text {
  position: absolute;
  left: 6vw;
  top: 50%;
  transform: translateY(-50%);
  max-width: 580px;
  pointer-events: auto;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.04; margin-bottom: 20px; letter-spacing: -1px; }
.grad {
  font-style: normal;
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.lead { color: var(--muted); font-size: 1.12rem; margin-bottom: 28px; max-width: 500px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hint {
  position: absolute;
  bottom: 22px;
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  opacity: 0.8;
}

.panel {
  position: absolute;
  right: 5vw;
  bottom: 12vh;
  width: min(340px, calc(100% - 32px));
  padding: 24px;
  border-radius: 18px;
  background: rgba(10, 12, 30, 0.85);
  border: 1px solid var(--line);
  box-shadow: 0 0 40px -10px var(--c, var(--violet));
  backdrop-filter: blur(12px);
  pointer-events: auto;
}
.panel-dot { display: block; width: 36px; height: 4px; border-radius: 4px; margin-bottom: 14px; background: var(--c, var(--cyan)); box-shadow: 0 0 14px var(--c, var(--cyan)); }
.panel h3 { margin-bottom: 8px; }
.panel p { color: var(--muted); }
.panel-link { display: inline-block; margin-top: 12px; color: var(--c, var(--cyan)); text-decoration: none; font-weight: 600; }
.close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  position: relative;
  display: inline-block;
  padding: 14px 28px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(120deg, #7c3aed, #db2777);
  color: #fff;
  font: 600 1rem Inter, sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px -8px rgba(219, 39, 119, 0.6);
  transition: transform 0.2s ease-out, box-shadow 0.2s;
}
.btn:hover { box-shadow: 0 14px 40px -6px rgba(167, 139, 250, 0.8); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--cyan); box-shadow: 0 0 24px -6px var(--cyan); }

/* Marquee */
.marquee {
  overflow: hidden;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  background: rgba(5, 6, 15, 0.6);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track { display: flex; gap: 48px; width: max-content; animation: scroll 40s linear infinite; }
.track span { color: var(--muted); font-weight: 600; letter-spacing: 1px; white-space: nowrap; }
.track span:nth-child(4n + 1) { color: var(--cyan); }
.track span:nth-child(4n + 3) { color: var(--pink); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Sections */
section:not(.hero) { position: relative; padding: 100px 6vw; text-align: center; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.12; margin-bottom: 12px; letter-spacing: -0.5px; }
section p { color: var(--muted); }
.sub { max-width: 580px; margin: 0 auto; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 20px;
  max-width: 1050px;
  margin: 0 auto;
  padding: 60px 6vw !important;
}
.stats strong {
  display: block;
  font-size: 2.8rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats span { color: var(--muted); font-size: 0.92rem; }

/* Glass cards with a cursor spotlight */
.card, .plan, .region, .pipeline li, .contact-box {
  --mx: 50%;
  --my: 50%;
  position: relative;
  background:
    radial-gradient(400px circle at var(--mx) var(--my), color-mix(in srgb, var(--c, #a78bfa) 18%, transparent), transparent 60%),
    var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1180px;
  margin: 48px auto 0;
  perspective: 900px;
}
.card {
  padding: 28px;
  border-radius: 18px;
  text-align: left;
  transition: transform 0.15s ease-out, border-color 0.2s, box-shadow 0.2s;
}
.card:hover, .plan:hover, .region:hover {
  border-color: color-mix(in srgb, var(--c, #a78bfa) 60%, transparent);
  box-shadow: 0 20px 50px -20px var(--c, #a78bfa);
}
.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card p { font-size: 0.95rem; }
.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  color: var(--c);
  font-size: 1.3rem;
  box-shadow: 0 0 24px -6px var(--c);
}

/* Workflow pipeline */
.pipeline {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1180px;
  margin: 56px auto 0;
  text-align: left;
  position: relative;
}
.pipeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #22d3ee, #a78bfa, #f472b6, #fbbf24, #34d399, #22d3ee);
  background-size: 200% 100%;
  animation: flow 4s linear infinite;
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.6);
}
@keyframes flow { to { background-position: -200% 0; } }
.pipeline li { padding: 24px 20px; border-radius: 16px; }
.pipeline span { color: var(--c); font-weight: 800; letter-spacing: 2px; text-shadow: 0 0 12px var(--c); }
.pipeline h3 { margin: 6px 0; }
.pipeline p { font-size: 0.92rem; }

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1080px;
  margin: 48px auto 0;
  perspective: 900px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 34px 28px;
  border-radius: 22px;
  text-align: left;
  transition: transform 0.15s ease-out, border-color 0.2s, box-shadow 0.2s;
}
.plan.featured {
  border: 1px solid transparent;
  background:
    radial-gradient(400px circle at var(--mx) var(--my), rgba(244, 114, 182, 0.18), transparent 60%) padding-box,
    linear-gradient(rgba(16, 18, 40, 0.85), rgba(16, 18, 40, 0.85)) padding-box,
    var(--grad) border-box;
  box-shadow: 0 0 60px -20px var(--pink);
}
.badge {
  position: absolute;
  top: -13px;
  right: 24px;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #db2777);
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 600;
}
.plan h3 { color: var(--c); letter-spacing: 1px; }
.price { margin: 14px 0 6px; font-size: 3.4rem; font-weight: 700; color: var(--text) !important; line-height: 1; }
.price span { font-size: 1.5rem; vertical-align: top; margin-right: 2px; color: var(--c); }
.for { font-size: 0.92rem; margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; }
.plan li { padding: 8px 0 8px 28px; position: relative; color: var(--muted); }
.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--c);
  font-weight: 700;
  text-shadow: 0 0 10px var(--c);
}
.note { margin-top: 32px; font-size: 0.95rem; }
.note a { color: var(--cyan); text-decoration: none; font-weight: 600; }

/* Regions */
.region-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  max-width: 1080px;
  margin: 44px auto 28px;
  perspective: 900px;
}
.region {
  padding: 26px 22px;
  border-radius: 18px;
  text-align: left;
  border-top: 3px solid var(--c);
  transition: transform 0.15s ease-out, border-color 0.2s, box-shadow 0.2s;
}
.region h3 { margin-bottom: 4px; }
.region p { font-size: 0.92rem; }

/* Contact */
.contact-box {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 36px;
  border-radius: 26px;
  --c: #a78bfa;
}
.form { display: grid; gap: 12px; max-width: 560px; margin: 28px auto 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form input, .form textarea {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 6, 15, 0.7);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25); }
.direct { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.direct a { color: var(--cyan); text-decoration: none; }
.sep { color: var(--muted); }
.pin { color: var(--pink); text-shadow: 0 0 10px var(--pink); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.5em; font-size: 0.95rem; }
.form-status.ok { color: var(--green); }
.form-status.error { color: #fb7185; }
.btn:disabled { opacity: 0.6; cursor: wait; }

footer { padding: 28px; text-align: center; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); background: rgba(5, 6, 15, 0.7); }

/* Scroll reveal */
.reveal { opacity: 0; translate: 0 36px; transition: opacity 0.8s ease, translate 0.8s ease; }
.reveal.visible { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
  .aurora span, .track, .grad, .word, .ch, .pipeline::before { animation: none; }
}

@media (max-width: 960px) {
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline::before { display: none; }
  .pipeline li { border-left: 3px solid var(--c); }
}

@media (max-width: 720px) {
  .nav { padding: 12px 16px; }
  .brand { letter-spacing: 1px; gap: 6px; }
  .wordmark { font-size: 0.92rem; gap: 0.35em; }
  .logo-shell { width: 38px; height: 38px; }
  .nav nav a:not(.nav-cta) { display: none; }
  .nav .nav-cta { padding: 7px 14px; font-size: 0.85rem; }
  .hero-text { top: auto; bottom: 64px; transform: none; left: 16px; right: 16px; }
  .lead { font-size: 1rem; }
  .hint { display: none; }
  .panel { top: 76px; bottom: auto; right: 16px; }
  section:not(.hero) { padding: 72px 16px; }
  .pipeline { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .contact-box { padding: 36px 20px; }
}
