:root {
  color-scheme: dark;
  --ink: #f5f2eb;
  --muted: #858a95;
  --blue: #1717ef;
  --blue-rgb: 23, 23, 239;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: #07090d;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -4%, rgba(57, 65, 84, 0.25), transparent 39%),
    linear-gradient(180deg, #0d1016 0%, #080a0e 55%, #06070a 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
  content: "";
  pointer-events: none;
}

.access-shell {
  position: relative;
  display: grid;
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top) + 18px)
    18px
    calc(env(safe-area-inset-bottom) + 22px);
  place-items: center;
}

.access-card {
  width: 100%;
  padding: 20px 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 25%, rgba(var(--blue-rgb), 0.10), transparent 36%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.44),
    inset 0 1px rgba(255, 255, 255, 0.065);
}

.access-brand {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.access-brand img {
  display: block;
  width: 98px;
  height: auto;
}

.access-brand span {
  padding-left: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 540;
  letter-spacing: 0.045em;
}

.access-mark {
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  margin: 32px auto 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 50%;
  box-shadow:
    0 0 0 14px rgba(255, 255, 255, 0.018),
    0 0 0 28px rgba(255, 255, 255, 0.012);
}

.access-mark::before,
.access-mark::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 14px rgba(var(--blue-rgb), 0.9);
  content: "";
}

.access-mark::before {
  top: 5px;
  left: 35px;
}

.access-mark::after {
  right: 7px;
  bottom: 37px;
  opacity: 0.38;
}

.access-mark img {
  position: relative;
  z-index: 2;
  display: block;
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.mark-glow {
  position: absolute;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--blue-rgb), 0.22), transparent 68%);
  filter: blur(8px);
}

.access-copy {
  text-align: center;
}

.access-eyebrow,
.access-intro,
.pin-error,
.device-note {
  margin: 0;
}

.access-eyebrow {
  color: #777c87;
  font-size: 9px;
  font-weight: 730;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 0;
  font-size: clamp(29px, 8.6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.access-intro {
  margin-top: 11px;
  color: #888d97;
  font-size: 13px;
  line-height: 1.45;
}

.pin-form {
  margin-top: 28px;
}

.pin-form label {
  display: block;
  margin: 0 0 8px 3px;
  color: #747984;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pin-form input {
  width: 100%;
  height: 66px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  outline: 0;
  background: rgba(0, 0, 0, 0.23);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: 680 28px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  letter-spacing: 0.42em;
  text-align: center;
  text-indent: 0.42em;
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.pin-form input:focus {
  border-color: rgba(var(--blue-rgb), 0.62);
  background: rgba(var(--blue-rgb), 0.055);
  box-shadow: 0 0 0 4px rgba(var(--blue-rgb), 0.10), inset 0 1px rgba(255, 255, 255, 0.05);
}

.pin-form input[aria-invalid="true"] {
  border-color: rgba(255, 83, 109, 0.55);
}

.pin-error {
  min-height: 25px;
  padding: 7px 3px 0;
  color: #ff7187;
  font-size: 10px;
  font-weight: 580;
  visibility: hidden;
}

.pin-error.is-visible {
  visibility: visible;
}

.pin-form button {
  display: flex;
  width: 100%;
  height: 58px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 19px;
  background: linear-gradient(145deg, #2727ff, #1111c9);
  box-shadow:
    0 14px 36px rgba(var(--blue-rgb), 0.22),
    inset 0 1px rgba(255, 255, 255, 0.21);
  color: white;
  font-size: 13px;
  font-weight: 680;
}

.pin-form button:active {
  transform: scale(0.985);
}

.pin-form button i {
  width: 8px;
  height: 8px;
  border-top: 1.5px solid white;
  border-right: 1.5px solid white;
  transform: rotate(45deg);
}

.device-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 17px;
  color: #666b75;
  font-size: 9px;
  font-weight: 560;
}

.device-note span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #39e49a;
  box-shadow: 0 0 10px rgba(57, 228, 154, 0.6);
}

@media (max-height: 720px) {
  .access-card {
    padding-top: 16px;
    padding-bottom: 17px;
  }

  .access-mark {
    width: 98px;
    height: 98px;
    margin-top: 17px;
    margin-bottom: 18px;
  }

  .access-mark img {
    width: 64px;
    height: 64px;
  }

  .pin-form {
    margin-top: 19px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .access-card {
    animation: card-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes card-in {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

