:root {
  color-scheme: light;
  --ink: #fff;
  --button-radius: 16px;
  --bg-top: #8055ff;
  --bg-bottom: #c7afff;
  --page-gradient: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  --panel: rgb(78 50 153 / 38%);
  --panel-soft: rgb(255 255 255 / 20%);
  --font-sans: "Funnel Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-top);
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-gradient);
  color: var(--ink);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.page {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 48px));
  min-height: 100svh;
  margin-inline: auto;
  padding-block: 30px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.brand img {
  width: 50px;
  height: 50px;
  border-radius: 14px;
}

.hero {
  position: relative;
  display: block;
  min-height: calc(100svh - 80px);
}

.hero-copy {
  position: absolute;
  top: 150px;
  left: 0;
  width: 480px;
}

h1 {
  width: max-content;
  margin: 0;
  color: var(--ink);
  font-size: 68px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  white-space: nowrap;
}

.lede {
  margin: 30px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 100;
  line-height: 1.5;
  white-space: nowrap;
}

.install-command {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 480px;
  height: 50px;
  margin-top: 60px;
  padding: 0 7px 0 20px;
  border-radius: var(--button-radius);
  background: var(--panel);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
}

.install-command code {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-command code span {
  margin-right: 8px;
}

.copy-install {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: rgb(255 255 255 / 12%);
  color: var(--ink);
  font-family: var(--font-sans);
  cursor: pointer;
}

.copy-icon {
  width: 20px;
  height: 20px;
}

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

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

.actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.download-link,
.docs-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 230px;
  height: 50px;
  border-radius: var(--button-radius);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.download-link {
  background: #000;
}

.apple-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.docs-link {
  background: var(--panel-soft);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
}

.copy-install:focus-visible,
.download-link:focus-visible,
.docs-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
}

.phone-wrap {
  position: absolute;
  top: 60px;
  left: 560px;
  width: 400px;
  height: calc(100svh - 140px);
  overflow: hidden;
}

.phone {
  position: relative;
  z-index: 0;
  display: block;
  width: 400px;
  height: auto;
}

.phone-next {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.phone-next.is-visible {
  opacity: 1;
}

@media (max-width: 980px) {
  .page {
    width: min(680px, calc(100% - 36px));
    padding-block: 24px 0;
  }

  .hero {
    display: grid;
    position: static;
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding-top: 84px;
  }

  .hero-copy,
  .install-command {
    position: static;
    min-width: 0;
    width: 100%;
  }

  h1 {
    width: auto;
    font-size: 54px;
    white-space: normal;
  }

  .actions {
    flex-wrap: wrap;
  }

  .download-link,
  .docs-link {
    flex: 1 1 220px;
  }

  .phone-wrap {
    position: relative;
    top: auto;
    left: auto;
    justify-self: center;
    min-width: 0;
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .phone {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 28px, 420px);
  }

  .brand {
    font-size: 20px;
  }

  .brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .hero {
    padding-top: 64px;
  }

  h1 {
    font-size: 54px;
  }

  .lede {
    margin-top: 20px;
    font-size: 16px;
    white-space: normal;
  }

  .install-command {
    margin-top: 42px;
  }

  .install-command code {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 46px;
  }
}

@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;
  }
}
