/* PAX ARK Overview lock screen. Same tokens as the page itself. */

@font-face {
  font-family: "Archivo";
  src: url("archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #030507;
  --plate: #0b0f13;
  --plate-2: #11161b;
  --hair: rgba(255, 255, 255, .09);
  --hair-strong: rgba(255, 255, 255, .18);
  --ink: #eef3f4;
  --ink-2: #a9b4b9;
  --ink-3: #7a868c;
  --ember: #f08a3c;
  --ember-ink: #1a0d03;
  --radius-panel: 14px;
  --radius-control: 8px;
  --t-fast: 160ms;
  --t-panel: 400ms;
  color-scheme: dark;
}

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

html {
  background: var(--void);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(40px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
  background: var(--void);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  font-stretch: 100%;
  font-synthesis: none;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* The quiet orbit behind the card: the model's base plate, seen from above at an angle. */

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(60% 45% at 50% 44%, rgba(238, 243, 244, .035), transparent 70%);
}

.orbit {
  position: absolute;
  left: 50%;
  top: 46%;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 { width: 620px; height: 400px; border-color: rgba(255, 255, 255, .06); }
.orbit-2 { width: 1000px; height: 643px; }
.orbit-3 { width: 1460px; height: 938px; border-color: rgba(255, 255, 255, .035); }

.orbit-run {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  animation: orbit 140s linear infinite;
}

.spark {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--ink-2);
  opacity: .55;
}

@keyframes orbit {
  to { transform: rotate(1turn); }
}

/* The card. */

.door {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 44px 40px 36px;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  border: 1px solid var(--hair);
  border-radius: var(--radius-panel);
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.door-head {
  margin: 0 0 32px;
}

.mark {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 0 28px -2px;
  color: var(--ink-2);
}

.wordmark {
  margin: 0;
  font-size: 34px;
  line-height: 38px;
  font-weight: 640;
  font-stretch: 118%;
  letter-spacing: -.02em;
}

.wm-a,
.wm-b {
  display: block;
}

.wm-b {
  font-weight: 340;
  color: var(--ink-2);
}

.lede {
  margin: 16px 0 0;
  max-width: 34ch;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

/* The form. */

.door-form {
  margin: 0;
}

.field {
  margin: 0 0 20px;
}

.hint {
  margin: 8px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
}

.label {
  display: block;
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 18px;
  font-weight: 560;
  font-stretch: 90%;
  letter-spacing: .01em;
}

.text,
.digit {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius-control);
  background: rgba(3, 5, 7, .72);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  caret-color: var(--ink);
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
  -webkit-appearance: none;
  appearance: none;
}

.text {
  height: 50px;
  padding: 0 14px;
  font-size: 18px;
  letter-spacing: .04em;
}

.code {
  text-transform: uppercase;
  letter-spacing: .12em;
}

.text:hover,
.digit:hover {
  border-color: rgba(255, 255, 255, .3);
}

.text:focus,
.digit:focus {
  outline: none;
}

.text:focus-visible,
.digit:focus-visible {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(17, 22, 27, .9);
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

/* Without the script: one PIN field. With it: one box per digit, in the same space. */

.digits {
  display: none;
}

.js .pin-single {
  display: none;
}

.js .digits {
  display: flex;
  gap: 8px;
}

.digit {
  flex: 1 1 0;
  min-width: 0;
  max-width: 52px;
  height: 60px;
  padding: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 560;
  font-stretch: 100%;
}

.digit:not(:placeholder-shown) {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(17, 22, 27, .9);
}

.digits[data-length="8"] .digit,
.digits[data-length="9"] .digit,
.digits[data-length="10"] .digit {
  font-size: 18px;
}

[aria-invalid="true"] {
  border-color: rgba(255, 255, 255, .4);
}

/* One line reserved for the message, so nothing moves when it appears. */

.error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 20px;
  margin: -4px 0 20px;
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
}

.error:not(:empty)::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border: 1.5px solid var(--ink-2);
  border-radius: 50%;
}

/* The single primary action. */

.primary {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--ember);
  color: var(--ember-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 640;
  font-stretch: 110%;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color var(--t-fast) ease, transform var(--t-fast) ease, opacity var(--t-fast) ease;
  -webkit-appearance: none;
  appearance: none;
}

.primary:hover {
  background: #f39a55;
}

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

.primary:focus {
  outline: none;
}

.primary:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.primary[aria-busy="true"] {
  cursor: progress;
  opacity: .78;
}

.foot {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  max-width: 440px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 18px;
  font-stretch: 90%;
  font-weight: 460;
  text-align: center;
}

/* Phones. */

@media (max-width: 480px) {
  body {
    justify-content: flex-start;
    padding-top: max(28px, env(safe-area-inset-top));
  }

  .door {
    padding: 32px 20px 24px;
  }

  .door-head {
    margin-bottom: 28px;
  }

  .mark {
    margin-bottom: 22px;
  }

  .error {
    gap: 8px;
    font-size: 13px;
  }

  .js .digits {
    gap: 6px;
  }

  .digit {
    height: 56px;
    font-size: 22px;
  }
}

/* Narrow phones: the message takes two lines, so two are reserved. */
@media (max-width: 379px) {
  .error {
    min-height: 40px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  body {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-run {
    animation: none;
  }

  .text,
  .digit,
  .primary {
    transition: none;
  }
}

@media (forced-colors: active) {
  .primary {
    border: 1px solid ButtonText;
  }

  .error:not(:empty)::before {
    border-color: CanvasText;
  }
}
