:root {
  --bg: #030712;
  --ink: #f4fbff;
  --muted: #9bb0c7;
  --cyan: #22d3ee;
  --cyan-2: #7ddfff;
  --teal: #2dd4bf;
  --violet: #7c5cff;
  --line: rgba(125, 223, 255, 0.18);
  --card: rgba(10, 22, 42, 0.55);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Syne", "DM Sans", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #030712;
  line-height: 1.62;
  min-height: 100vh;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--cyan-2); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.03em; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cyan);
  color: #042028;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --- 3D scene backdrop --- */
.scene-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
#space-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.vol-light {
  position: absolute;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  left: 52%;
  top: -12%;
  background:
    radial-gradient(circle at 40% 40%, rgba(34, 211, 238, 0.28), transparent 42%),
    radial-gradient(circle at 70% 50%, rgba(124, 92, 255, 0.22), transparent 50%);
  filter: blur(8px);
  animation: drift 14s ease-in-out infinite;
}
.grid-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -35%;
  height: 70%;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.12) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(700px) rotateX(68deg);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.55), transparent 75%);
  animation: grid-shift 28s linear infinite;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.orb-a {
  width: 220px;
  height: 220px;
  right: 8%;
  top: 18%;
  background: radial-gradient(circle at 30% 30%, #9af4ff, #0891b2 45%, transparent 70%);
  opacity: 0.55;
  animation: float-y 8s ease-in-out infinite;
}
.orb-b {
  width: 140px;
  height: 140px;
  left: 6%;
  top: 42%;
  background: radial-gradient(circle at 35% 30%, #c4b5fd, #6d28d9 50%, transparent 70%);
  opacity: 0.45;
  animation: float-y 10s ease-in-out infinite reverse;
}
.orb-c {
  width: 90px;
  height: 90px;
  right: 28%;
  bottom: 18%;
  background: radial-gradient(circle at 30% 30%, #5eead4, #0f766e 50%, transparent 70%);
  opacity: 0.4;
  animation: float-y 7s ease-in-out infinite 1s;
}

@keyframes drift {
  0%, 100% { transform: translate(-8%, 0) scale(1); }
  50% { transform: translate(4%, 6%) scale(1.08); }
}
@keyframes grid-shift {
  from { background-position: 0 0; }
  to { background-position: 0 56px; }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}
@keyframes spin-slow {
  to { transform: rotateX(72deg) rotateZ(360deg); }
}
@keyframes spin-rev {
  to { transform: rotateX(72deg) rotateZ(-360deg); }
}
@keyframes bob {
  0%, 100% { transform: translateZ(40px) translateY(0); }
  50% { transform: translateZ(40px) translateY(-10px); }
}

main#main {
  position: relative;
  z-index: 1;
  padding-bottom: 1rem;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0.7rem;
  z-index: 40;
  margin: 0.7rem auto 0;
  width: min(1180px, calc(100% - 2rem));
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: 0 0.85rem 0 0.65rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(6, 12, 24, 0.55);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 16px rgba(34, 211, 238, 0.35));
  transform: perspective(200px) rotateY(-12deg) rotateX(8deg);
}
.brand-mark svg { width: 40px; height: 40px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.08em; }
.brand-text span { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.site-nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.94rem;
}
.site-nav a:hover,
.site-nav a.is-active { color: #fff; }
.nav-cta { margin-left: 0.25rem; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 34, 0.8);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 8px;
  background: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 12px;
  padding: 0.9rem 1.45rem;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transform: translateZ(0);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.btn-sm { padding: 0.6rem 1.05rem; font-size: 0.9rem; }

a.btn-primary,
button.btn-primary,
.btn-primary {
  background: #0ea5e9;
  color: #ffffff !important;
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
}
a.btn-primary:hover,
button.btn-primary:hover,
.btn-primary:hover {
  background: #38bdf8;
  color: #ffffff !important;
  border-color: #0ea5e9;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.5);
}
a.btn-primary:active,
button.btn-primary:active,
.btn-primary:active {
  background: #0284c7;
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

a.btn-ghost,
button.btn-ghost,
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
a.btn-ghost:hover,
button.btn-ghost:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
  border-color: #7ddfff;
  transform: translateY(-2px);
}

.hero {
  padding: 3.2rem 0 2.4rem;
  position: relative;
  z-index: 1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.15rem, 4.6vw, 3.7rem);
  margin: 0 0 1rem;
  text-shadow: 0 10px 40px rgba(34, 211, 238, 0.25);
}
.kicker {
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  margin-bottom: 0.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.stage-wrap {
  position: relative;
  min-height: 430px;
  perspective: 1200px;
}
.stage-3d {
  position: absolute;
  inset: 0 0 90px;
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateY(-22deg);
  transition: transform 0.15s ease-out;
}
.ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  border-radius: 50%;
  border: 2px solid rgba(125, 223, 255, 0.28);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.15), inset 0 0 30px rgba(124, 92, 255, 0.12);
  transform-style: preserve-3d;
}
.ring-1 {
  transform: rotateX(72deg);
  animation: spin-slow 18s linear infinite;
}
.ring-2 {
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  border-color: rgba(124, 92, 255, 0.45);
  transform: rotateX(72deg);
  animation: spin-rev 12s linear infinite;
}
.cloud-core {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  transform-style: preserve-3d;
  animation: bob 4.5s ease-in-out infinite;
}
.core-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.7), transparent 68%);
  filter: blur(8px);
}
.core-body {
  position: absolute;
  inset: 10px;
  border-radius: 42% 58% 48% 52%;
  background:
    radial-gradient(circle at 32% 28%, #fff 0, #67e8f9 18%, #0891b2 55%, #0e7490 100%);
  box-shadow:
    18px 22px 30px rgba(0, 0, 0, 0.45),
    inset -12px -16px 20px rgba(8, 47, 73, 0.45),
    inset 10px 10px 16px rgba(255, 255, 255, 0.55);
}

.glass-card {
  position: absolute;
  width: 158px;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(8, 20, 40, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d;
}
.glass-card span { display: block; font-size: 0.72rem; color: var(--teal); letter-spacing: 0.08em; text-transform: uppercase; }
.glass-card strong { display: block; font-family: var(--display); margin: 0.15rem 0; }
.glass-card small { color: var(--muted); }
.gc-1 { left: 6%; top: 8%; transform: translateZ(70px) rotateY(8deg); }
.gc-2 { right: 0; top: 22%; transform: translateZ(110px) rotateY(-12deg); }
.gc-3 { left: 18%; bottom: 6%; transform: translateZ(90px) rotateX(6deg); }

.hero-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  background: rgba(8, 16, 32, 0.62);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.hero-panel ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; }
.hero-panel li { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.88rem; }
.hero-panel li span { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hero-panel strong { color: var(--cyan-2); font-size: 0.86rem; font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0 0 3rem;
  perspective: 900px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem;
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--cyan-2);
}

.section { padding: 1.5rem 0 3.5rem; position: relative; z-index: 1; }
.section-head { max-width: 640px; margin-bottom: 1.8rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 0.6rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.05rem;
  perspective: 1000px;
}
.card,
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(8, 16, 32, 0.55));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.3rem;
  min-height: 100%;
  backdrop-filter: blur(14px);
  box-shadow:
    0 22px 40px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}
.card h3 { margin: 0.7rem 0 0.45rem; font-size: 1.12rem; }
.card-3d:hover {
  box-shadow: 0 30px 50px rgba(8, 145, 178, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.icon {
  width: 48px;
  height: 48px;
  color: #042028;
  background: linear-gradient(160deg, #e0fbff, #22d3ee 55%, #7c5cff);
  border-radius: 14px;
  display: grid;
  place-items: center;
  box-shadow: 8px 10px 0 rgba(8, 47, 73, 0.45), 0 12px 20px rgba(34, 211, 238, 0.25);
  transform: rotateX(12deg) rotateY(-12deg);
}
.icon svg { width: 24px; height: 24px; }

.page-hero {
  padding: 3.2rem 0 1.6rem;
  position: relative;
  z-index: 1;
}
.page-hero::after {
  content: "";
  display: block;
  width: min(1180px, calc(100% - 2rem));
  height: 1px;
  margin: 1.6rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.45), transparent);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 0 0 0.6rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  perspective: 1000px;
}

.form-grid { display: grid; gap: 0.9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.92rem; }
input, select, textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 22, 0.75);
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.alert-ok { background: rgba(45, 212, 191, 0.15); border: 1px solid rgba(45, 212, 191, 0.4); }
.alert-err { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.4); }
.error-list { margin: 0; padding-left: 1.1rem; color: #fecaca; }

.script-price {
  font-family: var(--display);
  color: var(--teal);
  margin: 0.4rem 0;
  font-size: 1.2rem;
}

.legal { max-width: 760px; padding-bottom: 4rem; position: relative; z-index: 1; }
.legal h2 { margin-top: 2rem; font-size: 1.25rem; }
.legal h3 { margin-top: 1.4rem; font-size: 1.05rem; }
.legal ul, .legal ol { color: var(--muted); }
.legal p, .legal li { color: #c5d4e0; }

.cta-band {
  margin: 1rem 0 3rem;
  padding: 2rem;
  border-radius: 24px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.35), rgba(15, 23, 42, 0.8) 45%, rgba(109, 40, 217, 0.28));
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.35);
  transform: perspective(900px) rotateX(4deg);
}
.cta-band h2 { margin: 0 0 0.4rem; }

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(16px);
  padding: 2.5rem 0 1.2rem;
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr;
  gap: 1.5rem;
}
.footer-brand {
  font-family: var(--display);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.site-footer h2 { font-size: 0.95rem; margin: 0 0 0.7rem; color: var(--cyan-2); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0.35rem 0; }
.footer-links a, .site-footer a { color: var(--muted); }
.footer-links a:hover, .site-footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Large desktop */
@media (min-width: 1200px) {
  .hero {
    padding: 4rem 0 3rem;
    min-height: calc(100vh - 110px);
    display: flex;
    align-items: center;
  }
  .hero-grid { gap: 3rem; }
}

/* Tablet / small laptop */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .stage-wrap {
    min-height: 360px;
    max-width: 520px;
    margin-inline: auto;
    width: 100%;
  }
  .split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .cta-band { transform: none; }
  .stage-3d { transform: rotateX(14deg) rotateY(-12deg) scale(0.95); }
}

/* Mobile nav + compact layouts */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 60;
    flex-shrink: 0;
  }
  .site-header { width: calc(100% - 1.25rem); top: 0.5rem; }
  .header-inner { min-height: 60px; padding: 0 0.55rem 0 0.45rem; }
  .site-nav {
    display: none;
    position: absolute;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    background: rgba(6, 12, 24, 0.98);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.75rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 0.85rem 0.9rem;
    border-radius: 10px;
    font-size: 1rem;
  }
  .site-nav a:hover,
  .site-nav a.is-active { background: rgba(14, 165, 233, 0.12); }
  .nav-cta {
    margin: 0.35rem 0 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 1.25rem); }
  .site-header { width: calc(100% - 1.25rem); }

  .brand-text span { display: none; }
  .brand-text strong { font-size: 0.95rem; letter-spacing: 0.06em; }
  .brand-mark { transform: none; }
  .brand-mark svg { width: 36px; height: 36px; }

  .hero { padding: 1.4rem 0 1.5rem; }
  .hero h1 { font-size: clamp(1.75rem, 7vw, 2.2rem); }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .hero-actions .btn { width: 100%; }

  .hero-grid,
  .split,
  .footer-grid,
  .cards,
  .stats,
  .form-row,
  .hero-panel ul { grid-template-columns: 1fr; }

  .stage-wrap { min-height: 300px; max-width: 100%; }
  .ring { width: 210px; height: 210px; margin: -105px 0 0 -105px; }
  .ring-2 { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
  .gc-2,
  .gc-3 { display: none; }
  .gc-1 { left: 50%; top: 6%; transform: translateX(-50%) translateZ(50px); width: 140px; }
  .hero-panel { padding: 0.9rem 1rem; }
  .hero-panel strong { word-break: break-word; }

  .orb-a { width: 120px; height: 120px; opacity: 0.35; }
  .orb-b { width: 80px; height: 80px; opacity: 0.3; }
  .orb-c { display: none; }
  .grid-floor { opacity: 0.5; }

  .section { padding: 1rem 0 2.4rem; }
  .page-hero { padding: 2rem 0 1rem; }
  .page-hero h1 { font-size: clamp(1.65rem, 6.5vw, 2.1rem); }

  .card,
  .panel,
  .stat { padding: 1.1rem; border-radius: 16px; }
  .card-3d:hover { transform: none; }

  .cta-band {
    padding: 1.35rem;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    transform: none;
  }
  .cta-band .btn { width: 100%; }

  .btn {
    padding: 0.95rem 1.2rem;
    white-space: normal;
  }

  form.panel .btn,
  .form-grid .btn { width: 100%; }

  .site-footer { padding: 2rem 0 1.2rem; }
  .footer-grid { gap: 1.4rem; }
  .legal { padding-bottom: 2.5rem; }
}

@media (max-width: 380px) {
  .brand-text strong { font-size: 0.85rem; }
  .stats { gap: 0.65rem; }
  .stat b { font-size: 1.25rem; }
}

/* Touch devices: keep layout calm, no hover tilt */
@media (hover: none), (pointer: coarse) {
  .card-3d,
  .card-3d:hover {
    transform: none !important;
  }
  .stage-3d {
    transition: none;
  }
  .btn:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .grid-floor { transform: none; }
}
