/* The Brr download page. Same look as the app's login page: graphite, one loud accent, slow light. */
@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Anton';
  src: url('/assets/fonts/anton.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0b0c0e;
  --panel: #111317;
  --raised: #16181d;
  --hover: #1c1f26;
  --line: #23262e;
  --line-strong: #323743;
  --ink: #f1f2f4;
  --ink-2: #a4a9b3;
  --ink-3: #6b7180;
  --volt: #e9ff3d;
  --volt-ink: #141600;
  --ice: #7fd6ff;
  --ok: #4ade80;
  --bad: #ff5d5d;
  --swift: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 'Geist', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: color-mix(in srgb, var(--volt) 35%, transparent);
}
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--volt) 70%, transparent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ───────── backdrop ───────── */
.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.blob-a {
  width: 640px;
  height: 640px;
  left: 50%;
  top: 34%;
  translate: -50% -50%;
  background: rgb(233 255 61 / 0.11);
  animation: drift 16s ease-in-out infinite alternate;
}
.blob-b {
  width: 460px;
  height: 460px;
  right: -110px;
  bottom: -150px;
  background: rgb(127 214 255 / 0.08);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}
.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgb(255 255 255 / 0.03) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 62% 58% at 50% 40%, #000 15%, transparent 78%);
}
.streak {
  position: absolute;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--volt), transparent);
  animation: streak linear infinite;
}
.streak:nth-of-type(1) {
  top: 12%;
  width: 220px;
  opacity: 0.4;
  animation-duration: 5.2s;
  animation-delay: -1.2s;
}
.streak:nth-of-type(2) {
  top: 23%;
  width: 120px;
  opacity: 0.22;
  animation-duration: 7.5s;
  animation-delay: -4s;
}
.streak:nth-of-type(3) {
  top: 38%;
  width: 300px;
  opacity: 0.3;
  animation-duration: 4.4s;
  animation-delay: -2.6s;
}
.streak:nth-of-type(4) {
  top: 57%;
  width: 160px;
  opacity: 0.26;
  animation-duration: 6.3s;
  animation-delay: -0.4s;
}
.streak:nth-of-type(5) {
  top: 71%;
  width: 260px;
  opacity: 0.34;
  animation-duration: 5.8s;
  animation-delay: -3.3s;
}
.streak:nth-of-type(6) {
  top: 84%;
  width: 140px;
  opacity: 0.2;
  animation-duration: 8.1s;
  animation-delay: -5.5s;
}

/* ───────── layout ───────── */
main {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px 64px;
}
.stage {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#downloads {
  max-width: 620px;
  align-items: stretch;
  text-align: left;
}
.rise > *,
.stage.in > * {
  animation: rise 560ms var(--swift) backwards;
}
.stage > :nth-child(2) {
  animation-delay: 45ms;
}
.stage > :nth-child(3) {
  animation-delay: 90ms;
}
.stage > :nth-child(4) {
  animation-delay: 135ms;
}
.stage > :nth-child(5) {
  animation-delay: 180ms;
}
.stage > :nth-child(n + 6) {
  animation-delay: 225ms;
}

.mark.busy path {
  animation: rev 460ms ease-in-out infinite;
}
.mark.busy path:nth-of-type(2) {
  animation-delay: 70ms;
}
.mark.busy path:nth-of-type(3) {
  animation-delay: 140ms;
}
.wordmark {
  margin-top: 16px;
  font: 42px/1 'Anton', 'Geist', sans-serif;
  letter-spacing: 0.02em;
}
h1 {
  margin: 30px 0 0;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.welcome h1 {
  margin: 0;
}
h2 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lede {
  margin: 8px 0 0;
  max-width: 390px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
}
.welcome .lede {
  margin-top: 2px;
}
.fine {
  margin: 24px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}
form {
  width: 100%;
  margin-top: 26px;
}

/* ───────── the key field ───────── */
.keyfield {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 8px 0 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgb(11 12 14 / 0.7);
  backdrop-filter: blur(12px);
  transition:
    border-color 200ms,
    box-shadow 200ms;
}
.keyfield:focus-within {
  border-color: rgb(233 255 61 / 0.7);
  box-shadow: 0 0 0 4px rgb(233 255 61 / 0.1);
}
.keyfield.bad {
  border-color: rgb(255 93 93 / 0.6);
  box-shadow: 0 0 0 4px rgb(255 93 93 / 0.1);
}
.keyfield.good {
  border-color: rgb(74 222 128 / 0.6);
  box-shadow: 0 0 0 4px rgb(74 222 128 / 0.12);
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.key-icon {
  color: var(--ink-3);
  transition: color 200ms;
}
.keyfield.has .key-icon {
  color: var(--volt);
}
#key {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 14.5px 'Geist Mono', ui-monospace, Consolas, monospace;
  letter-spacing: 0.08em;
}
#key::placeholder {
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  color: var(--ink-3);
}
/* The key is a password: shown as dots unless the person asks to see it. */
#key.masked:not(:placeholder-shown) {
  -webkit-text-security: disc;
}
.ghost,
.chip {
  flex: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  transition:
    background-color 150ms,
    color 150ms;
}
.ghost {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
}
.ghost:hover {
  background: var(--hover);
  color: var(--ink);
}
.ghost .icon {
  width: 17px;
  height: 17px;
}
.chip {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--raised);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}
.chip:hover {
  background: var(--hover);
  color: var(--ink);
}
.chip.wide {
  margin-top: 14px;
  border: 1px solid var(--line);
}
.scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgb(233 255 61 / 0.16) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
  pointer-events: none;
}
.shake {
  animation: shake 440ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.hint {
  min-height: 21px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}
.hint.bad {
  color: var(--bad);
}
.hint b {
  font-weight: 500;
  color: var(--ink);
}
.hint .tick {
  color: var(--ok);
  font-weight: 700;
}

/* ───────── buttons ───────── */
.primary {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: 11px;
  background: var(--volt);
  color: var(--volt-ink);
  font: 600 15.5px 'Geist', sans-serif;
  cursor: pointer;
  transition:
    background-color 150ms,
    box-shadow 200ms,
    transform 120ms,
    opacity 200ms;
}
.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.5) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}
.primary:not(:disabled):hover {
  background: #f2ff70;
  box-shadow: 0 12px 34px -12px rgb(233 255 61 / 0.7);
}
.primary:not(:disabled):hover::after {
  transform: translateX(130%);
  transition: transform 700ms var(--swift);
}
.primary:not(:disabled):active {
  transform: scale(0.98);
}
.primary:disabled {
  opacity: 0.45;
  cursor: default;
}
.link {
  align-self: center;
  margin-top: 22px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.link:hover {
  color: var(--ink-2);
  text-decoration: underline;
}

/* ───────── downloads ───────── */
.welcome {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(17 19 23 / 0.78);
  backdrop-filter: blur(12px);
  transition:
    transform 260ms var(--swift),
    border-color 150ms,
    box-shadow 260ms var(--swift);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 36px -22px rgb(0 0 0 / 0.95);
}
.card.yours {
  border-color: rgb(233 255 61 / 0.45);
}
.card .os {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}
.card .os svg {
  width: 20px;
  height: 20px;
  color: var(--ink-2);
}
.card .meta {
  font-size: 12.5px;
  color: var(--ink-3);
}
.card .badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgb(233 255 61 / 0.14);
  color: var(--volt);
  font-size: 11.5px;
  font-weight: 500;
}
.card .primary,
.card .secondary {
  height: 42px;
  margin-top: 14px;
  font-size: 14px;
}
.secondary {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--raised);
  color: var(--ink);
  font: 600 14px 'Geist', sans-serif;
  cursor: pointer;
  transition:
    background-color 150ms,
    transform 120ms;
}
.secondary:hover {
  background: var(--hover);
}
.secondary:active {
  transform: scale(0.98);
}
.empty {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-3);
}
.panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(17 19 23 / 0.6);
}
.notes {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}
.notes ul {
  margin: 0;
  padding-left: 18px;
}
.notes li::marker {
  color: var(--volt);
}
.notes p {
  margin: 0 0 6px;
}
.steps {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}
.steps li + li {
  margin-top: 6px;
}
.steps b {
  color: var(--ink);
  font-weight: 600;
}

/* ───────── motion ───────── */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes drift {
  from {
    transform: translate(-34px, -22px) scale(1);
  }
  to {
    transform: translate(44px, 30px) scale(1.14);
  }
}
@keyframes streak {
  from {
    transform: translateX(110vw);
  }
  to {
    transform: translateX(-45vw);
  }
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes rev {
  50% {
    transform: translateX(1.5px);
  }
}
@keyframes shake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-6px);
  }
  40%,
  60% {
    transform: translateX(6px);
  }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .wordmark {
    font-size: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .streak {
    display: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
