:root {
  --bg: #06111b;
  --bg-alt: #0b1a2e;
  --panel: rgba(10, 20, 36, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef6ff;
  --muted: rgba(222, 234, 255, 0.62);
  --accent: #79e6f6;
  --accent-2: #8aa3ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(121, 230, 246, 0.12), transparent 30%),
    radial-gradient(circle at 82% 22%, rgba(138, 163, 255, 0.12), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg-alt) 42%, #050b13);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero,
.panel {
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
  gap: 24px;
  padding: 28px;
  border-radius: 36px;
}

.hero-copy h1,
.section-head h2 {
  margin: 4px 0 0;
  line-height: 1.05;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  max-width: 11ch;
}

.hero-text,
.small-note {
  color: var(--muted);
  line-height: 1.6;
}

.hero-text {
  max-width: 52ch;
  margin-top: 16px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.action.primary {
  background: rgba(121, 230, 246, 0.14);
  border-color: rgba(121, 230, 246, 0.28);
}

.action.secondary,
.action.tertiary {
  background: rgba(255, 255, 255, 0.04);
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-stat {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
}

.hero-label,
.eyebrow,
.metric-label,
.orb-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-label,
.metric-label,
.orb-label {
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  color: rgba(121, 230, 246, 0.84);
}

.feature-grid,
.artifact-grid {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.feature-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.artifact-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.panel {
  border-radius: 32px;
  padding: 22px;
}

.large-panel {
  padding-bottom: 26px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head.compact {
  margin-bottom: 8px;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.metric-card,
.drag-meter,
.control,
.download-list a {
  border: 1px solid var(--border);
  background: var(--panel-soft);
}

.metric-card {
  border-radius: 24px;
  padding: 14px;
}

.metric-value,
.drag-value {
  display: block;
  margin-top: 6px;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1;
}

.orb-wrap {
  margin-top: 16px;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.orb-stage {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-align: center;
  transition:
    width 120ms linear,
    height 120ms linear,
    filter 120ms linear,
    transform 120ms linear,
    box-shadow 120ms linear,
    border 120ms linear,
    background 120ms linear;
  animation: pulse 1s ease-in-out infinite;
}

.orb::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.orb-content {
  position: relative;
  z-index: 1;
}

.orb-status {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.drag-meter {
  margin-top: 10px;
  padding: 14px;
  border-radius: 22px;
}

.bar {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(121, 230, 246, 0.92), rgba(138, 163, 255, 0.92));
  transition: width 120ms linear;
}

.presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.preset {
  min-height: 46px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.84);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.preset.active {
  background: rgba(121, 230, 246, 0.14);
  border-color: rgba(121, 230, 246, 0.28);
  color: #d9fbff;
}

.controls-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.control {
  padding: 14px;
  border-radius: 22px;
}

.control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.control-value {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.plot-image {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.download-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.download-list a {
  display: block;
  padding: 14px;
  border-radius: 20px;
  text-decoration: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.985); }
  50% { transform: scale(1.015); }
}

@media (max-width: 980px) {
  .hero,
  .feature-grid,
  .artifact-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 16px;
  }

  .hero,
  .panel {
    border-radius: 24px;
    padding: 18px;
  }

  .metrics,
  .presets {
    grid-template-columns: 1fr;
  }

  .orb-stage {
    min-height: 260px;
  }
}
