:root {
  color-scheme: light;
  --ink: rgb(255 255 255 / 90%);
  --soft: rgb(255 255 255 / 72%);
  --night: oklch(58% 0.23 286);
  --line: rgb(255 255 255 / 18%);
  --control-height: 3.25rem;
  --chrome-background: #7858F5;
}

* {
  box-sizing: border-box;
}

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

html {
  background-color: var(--chrome-background);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--chrome-background);
  color: var(--ink);
  font-family: "Fira Code", ui-monospace, Menlo, Consolas, monospace;
  isolation: isolate;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 84% 62% at 18% 24%, oklch(63% 0.23 286 / 82%), oklch(63% 0.23 286 / 0%) 58%),
    radial-gradient(ellipse 76% 60% at 82% 20%, oklch(68% 0.19 286 / 72%), oklch(68% 0.19 286 / 0%) 58%),
    radial-gradient(ellipse 92% 68% at 24% 68%, oklch(72% 0.15 286 / 72%), oklch(72% 0.15 286 / 0%) 62%),
    radial-gradient(ellipse 96% 70% at 78% 76%, oklch(76% 0.11 286 / 76%), oklch(76% 0.11 286 / 0%) 62%),
    linear-gradient(180deg, #7858F5 0%, oklch(66% 0.2 286) 48%, oklch(72% 0.14 286) 100%);
}

a {
  color: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 0.42rem;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 2.05rem;
  height: 2.05rem;
}

.hero-brand {
  flex-direction: column;
  gap: 0.8rem;
  justify-content: center;
  width: max-content;
  margin: 0 auto 3rem;
}

.hero-brand img {
  width: 5.2rem;
  height: 5.2rem;
}

.brand-name {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

main {
  position: relative;
  z-index: 2;
}

.confetti-field {
  position: fixed;
  inset:
    calc(env(safe-area-inset-top) * -1)
    calc(env(safe-area-inset-right) * -1)
    calc(env(safe-area-inset-bottom) * -1)
    calc(env(safe-area-inset-left) * -1);
  z-index: 1;
  width: calc(100% + env(safe-area-inset-left) + env(safe-area-inset-right));
  height: calc(100% + env(safe-area-inset-top) + env(safe-area-inset-bottom));
  pointer-events: none;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(960px, calc(100% - clamp(2rem, 8vw, 7rem)));
  min-height: 100svh;
  margin-inline: auto;
  padding-block: clamp(2.6rem, 6vh, 6rem);
  text-align: center;
}

.hero-copy {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  margin-inline: auto;
  transform: none;
}

p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 5.2vw, 3.15rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: 0 12px 34px oklch(34% 0.18 286 / 20%);
}

.lede {
  max-width: 44rem;
  margin: 0.55rem auto 0;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 2;
  text-shadow: 0 8px 28px oklch(34% 0.18 286 / 16%);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: min(100%, 480px);
  margin-top: 1rem;
}

.app-store,
.docs-link {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  height: var(--control-height);
  padding: 0 1.12rem;
  border: 0;
  border-radius: calc(var(--control-height) / 3);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 22%), rgb(255 255 255 / 12%));
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(8px) saturate(1.08);
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
  transition: transform 180ms ease, background 180ms ease;
}

.app-store {
  background: rgb(0 0 0);
}

.apple-icon {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  margin-right: 0.62rem;
}

.app-store-product {
  margin-left: 0.4em;
}

.app-store:hover {
  background: rgb(0 0 0);
  transform: translateY(-2px);
}

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

.agent-install {
  width: min(100%, 640px);
  margin: 3.25rem auto 0;
  color: rgb(255 255 255 / 70%);
  font-size: 12px;
  font-weight: 430;
  line-height: 1.8;
  text-align: left;
}

.agent-install p {
  margin: 0 0 0.45rem 0.92rem;
}

.install-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  height: var(--control-height);
  padding: 0 0.52rem 0 0.92rem;
  border: 0;
  border-radius: calc(var(--control-height) / 3);
  background: rgb(0 0 0 / 34%);
  backdrop-filter: blur(8px) saturate(1.08);
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
}

.copy-toast {
  position: absolute;
  right: 0.58rem;
  bottom: calc(100% + 0.42rem);
  padding: 0.24rem 0.48rem;
  border-radius: 0.42rem;
  background: rgb(0 0 0 / 58%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.25rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.install-command code {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 430;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-install {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: calc(2.25rem / 3);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.copy-icon {
  width: 1.12rem;
  height: 1.12rem;
}

.brand:focus-visible,
.app-store:focus-visible,
.docs-link:focus-visible,
.copy-install:focus-visible {
  outline: 3px solid rgb(255 255 255 / 90%);
  outline-offset: 5px;
}

@media (max-width: 920px) {
  .hero-copy {
    max-width: 42rem;
  }

}

@media (max-width: 620px) {
  .hero {
    width: min(28rem, calc(100% - 1.4rem));
  }

  .hero-brand {
    margin-bottom: 2.35rem;
  }

  .hero-brand img {
    width: 4.35rem;
    height: 4.35rem;
  }

  .brand-name {
    font-size: 18px;
  }

  h1 {
    font-size: clamp(1.75rem, 8.4vw, 2.15rem);
  }

  .lede {
    max-width: 24ch;
    font-size: 0.94rem;
    line-height: 1.55;
    text-wrap: balance;
  }

  .agent-install {
    margin-top: 2.35rem;
  }

  .actions {
    gap: 1rem;
  }

  .app-store,
  .docs-link {
    height: var(--control-height);
    border-radius: calc(var(--control-height) / 3);
  }

  .install-command {
    align-items: center;
    height: var(--control-height);
    border-radius: calc(var(--control-height) / 3);
    padding: 0 0.58rem 0 0.92rem;
  }

  .install-command code {
    line-height: 1;
  }

  .copy-install {
    width: 2.25rem;
  }

}

@media (max-width: 430px) {
  .app-store-product {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
