:root {
  color-scheme: dark;
  --ink: #ecf3ff;
  --ink-soft: #a7bad6;
  --paper: #0a1221;
  --card: rgba(13, 23, 39, 0.8);
  --line: #304763;
  --line-soft: #466081;
  --accent: #ff9564;
  --accent-soft: rgba(255, 149, 100, 0.16);
  --mint: rgba(72, 162, 141, 0.72);
  --sky: rgba(78, 117, 219, 0.72);
  --deep: #71a9ff;
  --deep-ink: #06101f;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(47, 86, 158, 0.36) 0%, rgba(47, 86, 158, 0) 38%),
    radial-gradient(circle at 88% 0%, rgba(18, 140, 145, 0.26) 0%, rgba(18, 140, 145, 0) 45%),
    linear-gradient(162deg, #070d17 0%, #0b1524 52%, #0c1520 100%);
}

.site-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 24px 18px 34px;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(48px);
  opacity: 0.55;
}

.ambient-left {
  width: 340px;
  height: 340px;
  left: -120px;
  top: 180px;
  background: var(--mint);
}

.ambient-right {
  width: 330px;
  height: 330px;
  right: -140px;
  top: 40px;
  background: var(--sky);
}

#app {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
}

.landing {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
  animation-delay: 80ms;
}

.delay-2 {
  animation-delay: 150ms;
}

.delay-3 {
  animation-delay: 220ms;
}

.delay-4 {
  animation-delay: 300ms;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(11, 20, 33, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
  background: linear-gradient(150deg, #ffb26a 0%, #ff6d6d 100%);
  box-shadow: 0 10px 18px rgba(255, 120, 96, 0.35);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 10px;
}

.top-nav a:hover {
  background: rgba(90, 121, 167, 0.2);
}

.content-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero,
.section {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero {
  padding: 34px clamp(20px, 4vw, 40px);
}

.hero-kicker {
  margin: 0;
  color: #b3c8e8;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.hero-title {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.02;
  max-width: 16ch;
}

.hero-copy {
  margin: 0;
  color: var(--ink-soft);
  max-width: 66ch;
  font-size: 1.05rem;
}

.hero-cta {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

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

.button:active {
  transform: translateY(0);
}

.button {
  background: linear-gradient(145deg, #83b5ff 0%, #5e87e3 100%);
  color: var(--deep-ink);
  box-shadow: 0 10px 16px rgba(48, 95, 175, 0.28);
}

.button-secondary {
  background: #203654;
  color: var(--ink);
  box-shadow: none;
}

.button-ghost {
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--ink);
  box-shadow: none;
}

.install-pill {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 8px 7px 11px;
  border-radius: 10px;
  border: 1px solid #3b567b;
  background: rgba(8, 17, 29, 0.72);
}

.install-command {
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: auto;
}

.copy-icon-btn {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3f5f86;
  border-radius: 8px;
  background: #12253d;
  color: #d2e6ff;
  cursor: pointer;
  flex: 0 0 auto;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}

.copy-icon-btn:hover {
  transform: translateY(-1px);
  border-color: #5d83b3;
  color: #eff6ff;
}

.copy-icon-btn.copied {
  border-color: #7fd89c;
  color: #7fd89c;
}

.copy-icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.section {
  padding: 28px clamp(18px, 3.4vw, 34px);
}

.section-title {
  margin: 0;
  font-size: clamp(1.35rem, 3.6vw, 2rem);
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--ink-soft);
  max-width: 72ch;
}

.value-grid {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.value-card {
  border: 1px solid #3e5d80;
  background: rgba(6, 14, 25, 0.85);
  border-radius: 14px;
  padding: 14px;
}

.value-card h3 {
  margin: 0 0 7px;
  font-size: 1.02rem;
}

.value-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.playground-grid {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.play-card {
  background: rgba(7, 16, 27, 0.88);
  border: 1px solid #3e5b7e;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.play-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.play-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.metric-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
}

.metric-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.race-shell {
  display: flex;
  flex-direction: column;
}

.race-cycle-note {
  margin-top: 8px;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.html-preview {
  border-radius: 12px;
  border: 1px dashed var(--line-soft);
  padding: 11px;
  font-size: 0.94rem;
  background: rgba(17, 38, 63, 0.75);
}

.html-preview[data-mode="html"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.snippet-tabs {
  margin-top: 18px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid #405f83;
  border-radius: 999px;
  background: #0a1526;
  color: var(--ink);
  padding: 8px 11px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.chip-active {
  background: var(--deep);
  color: var(--deep-ink);
  border-color: var(--deep);
}

.code-block {
  margin: 0;
  border: 1px solid #365475;
  border-radius: 14px;
  padding: 14px;
  overflow: auto;
  background: #081321;
}

.mono {
  margin: 0;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.58;
}

.code-block .mono {
  color: #d5e6ff;
  white-space: pre;
}

.steps {
  margin: 16px 0 0;
  color: var(--ink-soft);
  padding-left: 18px;
}

.steps li {
  margin-top: 7px;
}

.footer {
  margin-top: 4px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.footer a {
  color: inherit;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .site-header {
    position: static;
  }
}

@media (max-width: 700px) {
  .top-nav {
    display: none;
  }

  .hero-cta .button {
    flex: 1 1 180px;
  }

  .metric-value {
    font-size: 1.6rem;
  }
}

@media (max-width: 560px) {
  .site-shell {
    padding: 12px 10px 24px;
  }

  .hero,
  .section {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
