/* ===== Central Turbo PIN Gate ===== */

.pin-gate-page {
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(17, 17, 17, .04), transparent 32%),
    linear-gradient(180deg, #faf8f4 0%, #f4efe8 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pin-gate-shell {
  width: min(100%, 380px);
  display: grid;
  justify-items: center;
  gap: 16px;
}

.pin-gate-header {
  width: 100%;
  display: flex;
  justify-content: center;
  animation: pinGateHeaderIn .42s cubic-bezier(.22, 1, .36, 1) both;
}

.pin-gate-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.pin-gate-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 36px;
  display: block;
  animation: pinGateLogoIn .54s cubic-bezier(.22, 1, .36, 1) .04s both;
}

.pin-gate-brand-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.pin-gate-company {
  margin: 0;
  color: #18181b;
  font-size: 15px;
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: .02em;
  font-family: inherit;
}

.pin-gate-subtitle {
  margin: 0;
  color: #57534e;
  font-size: 13px;
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -.01em;
  font-family: inherit;
}

.pin-gate-message {
  width: min(100%, 340px);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  font-family: inherit;
  animation: pinGateMessageIn .22s ease both;
}

.pin-gate-message-info {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.pin-gate-message-error {
  color: #b42318;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.pin-gate-form {
  width: 100%;
  display: grid;
  justify-items: center;
  animation: pinGateBoxIn .48s cubic-bezier(.22, 1, .36, 1) .08s both;
}

.pin-gate-box {
  width: min(100%, 340px);
  min-height: 74px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  border: 1px solid #ddd5ca;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 16px 42px rgba(17, 17, 17, .06);
  cursor: text;
  overflow: hidden;
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease,
    background .22s ease;
}

.pin-gate-box.is-focused {
  border-color: #b8aea2;
  background: #fff;
  box-shadow:
    0 18px 48px rgba(17, 17, 17, .08),
    0 0 0 5px rgba(17, 17, 17, .04);
  transform: translateY(-1px);
}

.pin-gate-box.is-error {
  border-color: #fecaca;
  background: #fffafa;
  animation: pinGateShake .3s ease both;
}

.pin-gate-box.is-checking {
  border-color: #111;
  background: #fff;
  box-shadow:
    0 20px 54px rgba(17, 17, 17, .10),
    0 0 0 5px rgba(17, 17, 17, .055);
}

.pin-gate-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: .01;
  color: transparent;
  background: transparent;
  caret-color: transparent;
}

.pin-gate-input:focus {
  outline: none;
}

.pin-gate-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  transition:
    opacity .28s ease,
    transform .28s cubic-bezier(.22, 1, .36, 1),
    filter .28s ease;
}

.pin-gate-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid #cfd2d6;
  background: #f6f7f8;
  box-shadow: inset 0 1px 2px rgba(17, 17, 17, .04);
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

.pin-gate-dot.is-filled {
  background: #111;
  border-color: #111;
  transform: scale(1.05);
  box-shadow: 0 8px 18px rgba(17, 17, 17, .18);
  animation: pinGateDotPop .18s cubic-bezier(.22, 1, .36, 1) both;
}

.pin-gate-dot.is-active {
  border-color: #a1a1aa;
  animation: pinGateActiveBreath 1.15s ease-in-out infinite;
}

.pin-gate-loader {
  position: absolute;
  inset: 50% auto auto 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
  transition:
    opacity .28s ease,
    transform .28s cubic-bezier(.22, 1, .36, 1);
}

.pin-gate-loader span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #111;
  opacity: .28;
  transform: translateY(0) scale(.86);
}

.pin-gate-loader span:nth-child(1) {
  animation-delay: 0s;
}

.pin-gate-loader span:nth-child(2) {
  animation-delay: .16s;
}

.pin-gate-loader span:nth-child(3) {
  animation-delay: .32s;
}

.pin-gate-box.is-checking .pin-gate-dots {
  opacity: 0;
  transform: translateY(-4px) scale(.96);
  filter: blur(2px);
}

.pin-gate-box.is-checking .pin-gate-loader {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pin-gate-box.is-checking .pin-gate-loader span {
  animation: pinGateLoaderDot 1.05s cubic-bezier(.45, 0, .2, 1) infinite;
}

.pin-gate-box.is-error .pin-gate-dot {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 8px 18px rgba(239, 68, 68, .20);
}

@keyframes pinGateHeaderIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes pinGateLogoIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pinGateBoxIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes pinGateMessageIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pinGateDotPop {
  0% {
    transform: scale(.84);
  }

  72% {
    transform: scale(1.16);
  }

  100% {
    transform: scale(1.05);
  }
}

@keyframes pinGateActiveBreath {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(17, 17, 17, .03);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 7px rgba(17, 17, 17, .055);
  }
}

@keyframes pinGateLoaderDot {
  0%, 100% {
    opacity: .28;
    transform: translateY(0) scale(.86);
  }

  35% {
    opacity: 1;
    transform: translateY(-2px) scale(1);
  }

  70% {
    opacity: .45;
    transform: translateY(0) scale(.92);
  }
}

@keyframes pinGateShake {
  0%, 100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-3px);
  }

  50% {
    transform: translateX(3px);
  }

  75% {
    transform: translateX(-2px);
  }
}

@media (max-width: 560px) {
  .pin-gate-page {
    padding: 18px;
  }

  .pin-gate-shell {
    width: 100%;
    gap: 15px;
  }

.pin-gate-brand {
  gap: 8px;
}

.pin-gate-logo {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.pin-gate-company {
  font-size: 14px;
}

.pin-gate-subtitle {
  font-size: 12px;
}

  .pin-gate-box {
    width: min(100%, 320px);
    min-height: 70px;
    border-radius: 26px;
  }

  .pin-gate-dots {
    gap: 11px;
  }

  .pin-gate-dot {
    width: 15px;
    height: 15px;
  }

  .pin-gate-loader {
    gap: 6px;
  }

  .pin-gate-loader span {
    width: 6px;
    height: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin-gate-header,
  .pin-gate-logo,
  .pin-gate-form,
  .pin-gate-message,
  .pin-gate-box,
  .pin-gate-dot,
  .pin-gate-dots,
  .pin-gate-loader,
  .pin-gate-loader span {
    animation: none !important;
    transition: none !important;
    filter: none !important;
  }
}