:root {
  --bg: #0f172a;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #102033;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #2dd4bf;
  --danger: #ef4444;
  --border: #dbe7f5;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef6ff 0%, #f8fafc 42%, #ffffff 100%);
}

.hero {
  min-height: 620px;
  color: white;
  background:
    radial-gradient(circle at 80% 10%, rgba(45, 212, 191, 0.35), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
  padding: 24px clamp(18px, 5vw, 80px) 80px;
}

.nav {
  max-width: 1180px;
  margin: 0 auto 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.brand {
  color: white;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.hero-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: #60a5fa;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #a7f3d0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.05em;
}

h3 {
  margin-bottom: 8px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.16rem;
  line-height: 1.7;
}

.hero-actions,
.button-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
}

.button-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #4338ca);
}

.button-secondary {
  color: var(--text);
  background: white;
  border: 1px solid var(--border);
}

.hero .button-secondary {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.button-danger {
  color: white;
  background: var(--danger);
}

.hero-card {
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.hero-card svg {
  width: 100%;
  height: 100%;
}

.axis {
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 4;
  stroke-linecap: round;
}

.arc {
  fill: none;
  stroke: url(#arcGradient);
  stroke-width: 10;
  stroke-linecap: round;
}

.ball-svg {
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.22));
}

.ball-svg.one { fill: #2dd4bf; }
.ball-svg.two { fill: #60a5fa; }
.ball-svg.three { fill: #a78bfa; }

.hero-card text {
  fill: rgba(255, 255, 255, 0.86);
  font-size: 22px;
  font-weight: 800;
}

main {
  max-width: 1220px;
  margin: -58px auto 0;
  padding: 0 clamp(16px, 4vw, 32px) 70px;
}

.panel {
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-heading {
  padding: 28px 30px 8px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  padding: 22px;
}

.controls {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  background: var(--surface-soft);
}

.control-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 800;
}

.control-group p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 11px 12px;
  color: var(--text);
  background: white;
  font: inherit;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--primary);
}

output {
  display: inline-block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.input-row span {
  color: var(--muted);
  font-weight: 800;
}

.control-grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.disabled {
  opacity: 0.45;
  pointer-events: none;
}

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

.switch {
  position: relative;
  width: 58px;
  min-width: 58px;
  height: 32px;
  margin: 0;
}

.switch input {
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  transition: transform 180ms ease;
}

.switch input:checked + span {
  background: var(--primary);
}

.switch input:checked + span::after {
  transform: translateX(26px);
}

.playground-wrap {
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.stats article {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  background: white;
}

.stats span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.stats strong {
  font-size: 1.35rem;
}

.playground {
  position: relative;
  width: 760px;
  max-width: 100%;
  height: 420px;
  overflow: hidden;
  border: 4px solid #0f172a;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.85), rgba(240, 253, 250, 0.92)),
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.8), transparent 20%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 24px 50px rgba(15, 23, 42, 0.14);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

.axis-label {
  position: absolute;
  color: rgba(15, 23, 42, 0.38);
  font-weight: 900;
  font-size: 1.2rem;
}

.axis-x {
  right: 18px;
  bottom: 12px;
}

.axis-y {
  top: 14px;
  left: 18px;
}

.projectile {
  position: absolute;
  border-radius: 50%;
  box-shadow: inset -8px -10px 16px rgba(15, 23, 42, 0.18), 0 12px 22px rgba(15, 23, 42, 0.25);
  will-change: transform;
}

.concepts-panel {
  padding-bottom: 24px;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 10px 22px 22px;
}

.concept-grid article {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  background: #f8fbff;
}

.concept-grid p {
  color: var(--muted);
  line-height: 1.55;
}

footer {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 32px) 40px;
  color: var(--muted);
  text-align: center;
}

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

  .nav {
    margin-bottom: 46px;
  }

  .concept-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero {
    padding-bottom: 72px;
  }

  .nav,
  .hero-actions,
  .button-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-grid.two,
  .stats,
  .concept-grid {
    grid-template-columns: 1fr;
  }
}
