:root {
  color-scheme: dark;
  --white: #f6f6f4;
  --muted: #77777a;
  --line: rgba(255, 255, 255, .085);
  --panel: #1a1a1d;
  --pink: #ff2f66;
  --cyan: #24d8dd;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  background: #101012;
  color: var(--white);
  font-family: "Criptzoom Chart Text", Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }

.login-scene {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background: #101012;
}

.login-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

.brand-stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  perspective: 1800px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 5;
  display: flex;
  gap: .28em;
  margin: 0;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(76px, 11vw, 172px);
  font-weight: 900;
  line-height: .84;
  letter-spacing: -.075em;
  white-space: nowrap;
  text-rendering: geometricPrecision;
  transform-style: preserve-3d;
  transform: translateY(0);
  transition: transform 1.05s cubic-bezier(.16, 1, .3, 1);
}

.login-brand span {
  display: block;
  animation: brand-rise-in 2.4s cubic-bezier(.16, 1, .3, 1) both;
  will-change: transform, opacity;
}

.orbit-plane {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  pointer-events: none;
  will-change: transform;
}

.orbit-plane-one,
.orbit-plane-two,
.orbit-plane-three,
.orbit-plane-four,
.orbit-plane-five { transform: none; }

.orbit-card {
  --start: 0%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: clamp(120px, 12vw, 187px);
  aspect-ratio: .72;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: #181818;
  box-shadow: 0 22px 80px rgba(0, 0, 0, .7);
  transform: translate(-50%, -50%);
  transform-origin: center;
  will-change: transform, opacity, filter;
}

.card-one { --start: 2%; }
.card-two { --start: 24%; }
.card-three { --start: 47%; }
.card-four { --start: 62%; }
.card-five { --start: 86%; }

.orbit-card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .92));
}

.orbit-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.orbit-card > div {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 8px;
  bottom: 10px;
  display: grid;
  gap: 2px;
}

.orbit-card strong { font-size: 14px; letter-spacing: -.025em; }
.orbit-card small { overflow: hidden; color: rgba(255,255,255,.72); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.card-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: -5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 700;
  box-shadow: 0 7px 20px rgba(0,0,0,.25);
}
.card-badge.pink { background: #ff54c0; }
.card-badge.cyan { background: #49cbd0; }
.card-badge.violet { background: #6657ff; }

@keyframes brand-rise-in {
  from { opacity: 0; transform: translateY(55vh); }
  to { opacity: 1; transform: translateY(0); }
}

.login-panel {
  position: relative;
  z-index: 8;
  width: min(100% - 40px, 360px);
  margin: 0 auto;
  padding: clamp(350px, 43vh, 450px) 0 42px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(56px);
  transition: opacity .7s ease .34s, transform .9s cubic-bezier(.16, 1, .3, 1) .24s, visibility 0s linear .95s;
}

.is-ready .brand-stage {
  opacity: 1;
}

.is-ready .login-brand {
  transform: translateY(-17vh);
}

.is-ready .orbit-plane { opacity: 1; filter: none; }
.is-ready .orbit-plane-two { z-index: 1 !important; margin-top: 12px; }
.is-ready .orbit-plane-two .orbit-card { filter: blur(1.35px) !important; }
.is-ready .login-panel { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: .24s, .14s, 0s; }

.recovery-card > p {
  margin: 0 0 12px;
  color: #858581;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .19em;
}
.recovery-card h2 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -.055em; }
.recovery-card > span:not(.recovery-icon) { display: block; margin-top: 10px; color: #8e8e8b; font-size: 14px; line-height: 1.55; }

.login-form { display: grid; gap: 20px; }
.login-form > label,
.recovery-card label { display: grid; gap: 8px; }
.login-form label > span:first-child,
.recovery-card label > span { color: #77777a; font-size: 10px; font-weight: 500; letter-spacing: .01em; }

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"],
.recovery-card input {
  width: 100%;
  height: 42px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #fff;
  padding: 0 38px 0 0;
  font-size: 13px;
  transition: border-color .2s ease, color .2s ease;
}
.login-form input:focus,
.recovery-card input:focus { border-color: rgba(255,255,255,.52); background: transparent; box-shadow: none; }
.login-form input::placeholder,
.recovery-card input::placeholder { color: #5d5d60; }

.password-field { position: relative; display: block; }
.password-field input { padding-right: 96px !important; }
.password-field #togglePassword {
  position: absolute;
  top: 50%;
  right: 46px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #777;
  cursor: pointer;
  translate: 0 -50%;
}
.password-field #togglePassword:hover { color: #fff; background: rgba(255,255,255,.06); }
.password-field svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.login-submit-orb {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background: #f6f6f4;
  color: #101012;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  cursor: pointer;
  translate: 0 -50%;
  transition: transform .22s cubic-bezier(.16, 1, .3, 1), background .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.login-submit-orb svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-submit-orb:hover { transform: translateX(2px) scale(1.04); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.login-submit-orb:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.login-submit-orb:disabled { cursor: wait; opacity: .55; transform: none; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.login-options { display: flex; align-items: center; justify-content: flex-end; margin-top: -10px; }
.forgot-button { padding: 0; border: 0; background: none; color: #77777a; font-size: 10px; cursor: pointer; }
.forgot-button:hover { color: #fff; text-decoration: underline; }

.form-message { min-height: 16px; margin: -4px 0 -8px; color: #ff789a; font-size: 10px; line-height: 1.4; text-align: center; }
.form-message.success { color: #5ce3a6; }

.login-submit,
.biometric-button {
  height: 46px;
  border-radius: 3px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}
.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.025);
  background: #1b1b1e;
  color: #a8a8aa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.login-submit svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-submit:hover { transform: translateY(-1px); background: #222226; color: #fff; }
.login-submit:disabled { cursor: wait; opacity: .6; transform: none; }

.biometric-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.012);
  color: #8c8c8f;
  font-size: 11px;
  letter-spacing: .025em;
}
.biometric-button::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12) 12%, rgba(255,255,255,.12) 88%, transparent);
}
.biometric-button:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.055); transform: translateY(-2px); }
.face-id-icon { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }


.recovery-dialog {
  width: min(100% - 32px, 460px);
  border: 0;
  padding: 0;
  border-radius: 22px;
  background: transparent;
  color: #fff;
}
.recovery-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(12px); }
.recovery-card { position: relative; margin: 0; padding: 36px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: #111; box-shadow: 0 35px 100px rgba(0,0,0,.8); text-align: center; }
.recovery-icon { display: grid; width: 50px; height: 50px; place-items: center; margin: 0 auto 20px; border-radius: 50%; background: #fff; color: #000; }
.recovery-icon svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.recovery-card label { margin-top: 24px; text-align: left; }
.recovery-card .login-submit { width: 100%; margin-top: 12px; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #777; font-size: 24px; cursor: pointer; }
.dialog-close:hover { background: rgba(255,255,255,.06); color: #fff; }

.noscript-message { position: fixed; z-index: 30; inset: auto 20px 20px; margin: 0; padding: 14px; border-radius: 10px; background: #fff; color: #000; text-align: center; }

@media (max-width: 700px) {
  .login-brand { gap: .32em; font-size: clamp(44px, 13.5vw, 56px); }
  .orbit-plane-one { margin-left: 56px; }
  .orbit-card { width: clamp(88px, 25.35vw, 107px); border-radius: 8px; }
  .orbit-card > div { left: 7px; bottom: 7px; }
  .orbit-card strong { font-size: 11px; }
  .orbit-card small { font-size: 6px; }
  .card-badge { top: 7px; padding: 3px 6px; font-size: 6px; }
  .is-ready .login-brand { transform: translateY(-22vh); }
  .login-panel { width: min(calc(100% - 48px), 320px); padding-top: 39vh; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .login-form { gap: 18px; }
  .recovery-card { padding: 32px 22px 24px; }
}

@media (max-height: 720px) and (min-width: 701px) {
  .login-panel { padding-top: 46vh; }
  .login-form { gap: 12px; }
  .login-submit, .biometric-button { height: 42px; }
  .is-ready .login-brand { transform: translateY(-18vh); }
}

@media (prefers-reduced-motion: reduce) {
  .login-brand span { animation-duration: .01ms; }
  .brand-stage, .login-brand, .orbit-plane, .login-panel { transition-duration: .01ms !important; transition-delay: 0s !important; }
}
