@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/rubik-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/rubik-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/rubik-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-top: #231f34;
  --bg-bottom: #403b51;
  --text: #ffffff;
  --text-muted: #bab3d6;
  --text-subtle: #ada4ce;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-border: rgba(255, 255, 255, 0.11);
  --icon-bg: #6c648a;
  --icon-ink: #ede9f5;
  --accent: #988dc2;
  --accent-ink: #231f34;
  --focus: #ffc469;
  --radius-card: 20px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-top) linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 62%, var(--bg-bottom) 100%);
  color: var(--text);
  font-family: "Rubik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sky__art {
  width: 100%;
  height: 52vh;
  min-height: 300px;
  display: block;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 30%, transparent 72%);
  mask-image: linear-gradient(180deg, #000 0%, #000 30%, transparent 72%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 12px 0 34px;
}

.sparkle {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: #ede9f5;
  opacity: 0.75;
}

.sparkle--sm {
  width: 13px;
  height: 13px;
  opacity: 0.6;
}

.logo {
  width: 190px;
  height: auto;
}

.states {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.state {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.state[hidden] {
  display: none;
}

.state--centred {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-bottom: 12%;
}

.title {
  margin: 0;
  font-size: clamp(22px, 5.9vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}

.title--sm {
  font-size: clamp(21px, 5.6vw, 25px);
  max-width: 19ch;
}

.subtitle {
  margin: 14px 0 0;
  font-size: 17px;
  color: var(--text-subtle);
  text-align: center;
  text-wrap: pretty;
}

.state--centred .subtitle {
  margin-top: 0;
  max-width: 34ch;
}

.state__lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
}

.card {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}

.benefit + .benefit {
  border-top: 1px solid var(--surface-border);
}

.benefit__icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--icon-bg);
  color: var(--icon-ink);
  display: grid;
  place-items: center;
}

.benefit__icon svg {
  width: 25px;
  height: 25px;
}

.benefit__text {
  font-size: 16px;
  line-height: 1.35;
}

.note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.35;
}

.note__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.note__icon svg {
  width: 26px;
  height: 26px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
  width: 100%;
}

.state--centred .actions {
  max-width: 320px;
  margin-top: 18px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--secondary {
  background: transparent;
  border-color: rgba(186, 179, 214, 0.45);
  color: var(--text-muted);
}

.btn:hover {
  filter: brightness(1.06);
}

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

.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.footnote {
  margin: 26px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

@media (min-width: 520px) {
  .page {
    padding-top: 48px;
  }
}
