:root {
  --bg: #07111a;
  --bg-soft: #0d1c28;
  --text: #f7fbff;
  --muted: #b3c3cf;
  --brand: #ff7a18;
  --brand-2: #00b3a4;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 15% -15%, #153447 0%, rgba(21, 52, 71, 0) 60%),
    radial-gradient(800px 500px at 100% 0%, #2b2320 0%, rgba(43, 35, 32, 0) 65%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-soft) 100%);
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

.bg-glow-left {
  background: var(--brand-2);
  left: -100px;
  top: 200px;
}

.bg-glow-right {
  background: var(--brand);
  right: -100px;
  top: 120px;
}

.site-header,
main,
.site-footer {
  width: min(1080px, calc(100% - 2.8rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.logo {
  width: 34px;
  height: 34px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.66rem 1.1rem;
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

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

.btn-primary {
  background: linear-gradient(90deg, var(--brand) 0%, #ff9850 100%);
  color: #1f1208;
}

.btn-ghost {
  border: 1px solid var(--card-border);
  color: var(--text);
  opacity: 0.92;
}

.lang-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
}

.lang-link {
  text-decoration: none;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
}

.lang-link:hover {
  color: var(--text);
}

.lang-link.active {
  color: var(--text);
  font-weight: 700;
}

.lang-divider {
  color: #7f95a4;
  font-size: 0.76rem;
}

.site-header .header-github {
  margin-left: 0.2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.95fr);
  grid-template-areas: "main banner";
  gap: 1.15rem 1.2rem;
  align-items: center;
  padding: 2.4rem 0 1.4rem;
}

.hero-main {
  grid-area: main;
}

.eyebrow {
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--brand-2);
  font-size: 0.82rem;
  margin: 0;
}

h1 {
  margin: 0.7rem 0;
  line-height: 1.02;
  font-size: clamp(2rem, 6.3vw, 4.3rem);
}

.lead {
  color: var(--muted);
  max-width: 720px;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.hero-banner {
  grid-area: banner;
  width: 100%;
  max-width: 520px;
  justify-self: end;
  margin-top: 0;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
}

section {
  padding: 2.2rem 0;
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 760px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.quickstart .card a {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--text);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem 1.2rem 1.3rem;
  backdrop-filter: blur(7px);
}

.card h3 {
  margin: 0 0 0.72rem;
  font-size: 1.03rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.card ol {
  margin: 0.7rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.6;
}

.setup .card p,
.setup .card ol {
  color: #c7d5e0;
  font-size: 0.99rem;
}

.setup .card li + li {
  margin-top: 0.36rem;
}

.setup .card ol {
  margin-top: 0.95rem;
  padding-left: 1.35rem;
  line-height: 1.72;
}

.setup .section-copy {
  margin-bottom: 0.9rem;
}

.card a {
  color: var(--text);
}

.command {
  margin: 0.8rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  overflow-x: auto;
}

.flow ol {
  margin: 0;
  padding-left: 1.2rem;
  color: #c7d5e0;
  font-size: 1rem;
  line-height: 1.8;
}

.demo-strip {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.demo-step {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card);
  padding: 0.9rem 0.8rem;
  text-align: center;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #d6e2ec;
  animation: demoPulse 6s ease-in-out infinite;
}

.demo-step-label {
  font-weight: 600;
}

.demo-step-sub {
  font-size: 0.78rem;
  color: #b8c8d4;
}

.hotkey-visual {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0;
}

.keycap {
  min-width: 2rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.92rem;
}

.key-plus {
  color: #a9bcc8;
  font-size: 0.9rem;
}

.demo-step-hold .keycap {
  animation: holdKeysPress 6s ease-in-out infinite;
}

.demo-step-release .keycap {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  animation: releaseKeysUp 6s ease-in-out infinite;
  animation-delay: 3s;
}

.demo-step-release .hotkey-visual::after {
  content: "";
  position: absolute;
  inset: -0.3rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 122, 24, 0.55);
  opacity: 0;
  animation: releaseRing 6s ease-out infinite;
  animation-delay: 3s;
}

.demo-step:nth-child(1) {
  animation-delay: 0s;
}

.demo-step:nth-child(2) {
  animation-delay: 1.5s;
}

.demo-step:nth-child(3) {
  animation-delay: 3s;
}

.demo-step:nth-child(4) {
  animation-delay: 4.5s;
}

@keyframes demoPulse {
  0%,
  75%,
  100% {
    transform: translateY(0);
    border-color: var(--card-border);
    box-shadow: none;
  }
  18% {
    transform: translateY(-2px);
    border-color: rgba(255, 122, 24, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 122, 24, 0.17);
  }
}

@keyframes holdKeysPress {
  0%,
  75%,
  100% {
    transform: translateY(0);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
    background: rgba(255, 255, 255, 0.08);
  }
  18%,
  30% {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    background: rgba(0, 179, 164, 0.15);
  }
}

@keyframes releaseKeysUp {
  0%,
  12%,
  100% {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.08);
  }
  20% {
    transform: translateY(-4px);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3);
    background: rgba(255, 122, 24, 0.18);
  }
  28% {
    transform: translateY(0);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.24);
  }
}

@keyframes releaseRing {
  0%,
  14%,
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
  22% {
    opacity: 0.7;
  }
  36% {
    opacity: 0;
    transform: scale(1.18);
  }
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
}

.btn-inline {
  margin-left: 0;
}

.faq {
  display: grid;
  gap: 0.75rem;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  color: var(--muted);
  margin: 0.6rem 0 0;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.support-grid .card a {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--text);
}

.cta-block {
  padding-bottom: 2.4rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  padding: 1.1rem 0 2rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 400ms ease, transform 400ms ease;
}

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

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "banner";
    gap: 0.95rem;
  }

  .hero-main {
    text-align: center;
  }

  .lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-banner {
    justify-self: center;
    max-width: 680px;
    margin-top: 0.35rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    row-gap: 0.55rem;
  }

  .site-header .header-github {
    margin-left: 0;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .quickstart-grid {
    grid-template-columns: 1fr;
  }

  .demo-strip {
    grid-template-columns: 1fr 1fr;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .hero-actions {
    gap: 0.62rem;
  }

  h2 {
    font-size: 1.62rem;
  }

  .setup .card p,
  .setup .card ol,
  .flow ol {
    font-size: 0.98rem;
  }

  .card {
    padding: 1.1rem 1rem 1.15rem;
  }
}
