:root {
  --bg-obsidian: #020203;
  --glass-bg: rgba(12, 12, 16, 0.55);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-highlight: rgba(255, 255, 255, 0.18);

  --cyan: #00e5ff;
  --purple: #9d00ff;
  --pink: #ff007f;

  --neon-gradient: linear-gradient(135deg, var(--cyan), var(--purple), var(--pink));
  --neon-gradient-animated: linear-gradient(270deg, var(--cyan), var(--purple), var(--pink), var(--cyan));

  --text-main: #ffffff;
  --text-muted: #8d8da1;

  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 32px;

  --shadow-cinematic:
    0 40px 80px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-obsidian);
  color: var(--text-main);
  font-family: "Inter", system-ui, sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.cinematic-backdrop {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background: var(--bg-obsidian);
}

.mesh-gradient {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 50% 20%, rgba(157, 0, 255, 0.17) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(0, 229, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 0, 127, 0.12) 0%, transparent 40%);
  animation: meshSpin 30s linear infinite;
  filter: blur(60px);
}

@keyframes meshSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tech-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(1000px) rotateX(60deg) translateY(100px) scale(2.5);
  transform-origin: bottom center;
  opacity: 0.25;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  from { background-position: 0 0; }
  to { background-position: 0 50px; }
}

.noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.page {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 10px;
}

.brand {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: var(--text-muted);
}

.drop-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.glass-panel {
  position: relative;
  overflow: hidden;
  padding: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  box-shadow: var(--shadow-cinematic);
}

.hero {
  text-align: center;
  border-radius: var(--radius-lg);
}

.hero-glow {
  position: absolute;
  top: -55%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(157,0,255,0.12), transparent 60%);
  pointer-events: none;
}

.eyebrow {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.32em;
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(48px, 12vw, 88px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.animated-gradient-text {
  background: var(--neon-gradient-animated);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientText 6s ease infinite;
}

@keyframes gradientText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-gem-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 28px auto 18px;
  display: grid;
  place-items: center;
}

.hero-gem-pulse-1,
.hero-gem-pulse-2 {
  position: absolute;
  inset: 20px;
  border: 1px solid var(--purple);
  border-radius: 50%;
  opacity: 0;
  animation: ripple 3s linear infinite;
}

.hero-gem-pulse-2 {
  border-color: var(--pink);
  animation-delay: 1.5s;
}

@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.hero-gem {
  position: relative;
  z-index: 2;
  width: 110px;
  animation: float3D 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

@keyframes float3D {
  0%, 100% { transform: translateY(0) rotateX(5deg) rotateY(-5deg); }
  50% { transform: translateY(-15px) rotateX(-5deg) rotateY(5deg); }
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 610px;
  margin: 20px auto 0;
  color: rgba(255,255,255,0.76);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.8;
}

.hero-buttons {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 17px 30px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.6;
}

.btn-primary {
  background: #ffffff;
  color: #050508;
  box-shadow: 0 12px 30px rgba(255,255,255,0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  color: #ffffff;
  background: var(--neon-gradient);
  box-shadow: 0 18px 40px rgba(157,0,255,0.32);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.26);
}

.full-width {
  width: 100%;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 900;
}

.section-copy {
  margin: 0;
  color: rgba(255,255,255,0.68);
  font-size: 15px;
  line-height: 1.7;
}

.gem-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.gem-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.gem-mini-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(0,229,255,0.06);
  border: 1px solid rgba(0,229,255,0.14);
  text-shadow: 0 0 14px rgba(0,229,255,0.8);
}

.gem-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.gem-location {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.gem-link {
  padding: 11px 14px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  transition: all 0.2s ease;
}

.gem-link:hover {
  border-color: var(--pink);
  background: rgba(255,0,127,0.08);
}

.gem-link-disabled {
  color: #676778;
  pointer-events: none;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2,2,3,0.92);
  backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
}

.modal {
  width: min(100%, 620px);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.modal-kicker {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.modal-head h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
}

.close-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255,255,255,0.06);
  font-size: 23px;
}

.form-grid {
  display: grid;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 16px;
}

.field label {
  display: block;
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.field input {
  width: 100%;
  padding: 16px;
  color: #ffffff;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  outline: none;
}

.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.08);
}

.field-help {
  margin-top: 8px;
  color: #666678;
  font-size: 11px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 2000;
  max-width: calc(100vw - 30px);
  padding: 15px 24px;
  transform: translate(-50%, 120px);
  color: #050508;
  background: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
  opacity: 0;
  transition: all 0.35s ease;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

.footer {
  padding: 36px 0 10px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .page {
    padding: 24px 14px 60px;
    gap: 18px;
  }

  .glass-panel {
    padding: 24px;
  }

  .topbar {
    padding: 0 2px;
  }

  .brand {
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .drop-chip {
    padding: 7px 10px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .gem-card {
    grid-template-columns: auto 1fr;
  }

  .gem-link {
    grid-column: 1 / -1;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 24px;
  }
}
