/* Broker access — екран входу. Токени взяті з src/sass/partials/_variables.scss теми. */

@font-face {
  font-family: "Abc Areal";
  src: url("../../../fonts/abc/ABCAreal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Abc Areal";
  src: url("../../../fonts/abc/ABCAreal-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ba-text: #ffffff;
  --ba-muted: rgba(255, 255, 255, 0.72);
  --ba-faint: rgba(255, 255, 255, 0.5);
  --ba-bg-primary: #A9A9A933;
  --ba-bg-secondary: #2F2F2F66;
  --ba-card: rgb(169 169 169 / 30%);
  --ba-error: #ffb4a8;
  --ba-radius: 30px;
  --ba-ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body.ba {
  min-height: 100dvh;
  background: #1c1c1c;
  color: var(--ba-text);
  font-family: "Abc Areal", system-ui, sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
}

/* ---------- фон ---------- */

.ba__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #4a4a4a 0%, #1c1c1c 70%);
}

.ba__bg img,
.ba__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: ba-zoom 24s var(--ba-ease) forwards;
}

.ba__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- layout ---------- */

.ba__main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: max(32px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

.ba__logo {
  display: block;
  width: auto;
  max-width: min(260px, 60vw);
  max-height: 96px;
  object-fit: contain;
  animation: ba-rise .8s var(--ba-ease) both;
}

.ba__logo-text {
  font-size: 28px;
  letter-spacing: -0.02em;
  animation: ba-rise .8s var(--ba-ease) both;
}

/* ---------- glass card (як .glass + .popup__contact-wrapper у темі) ---------- */

.ba__card {
  position: relative;
  width: 440px;
  max-width: 100%;
  padding: 40px;
  border-radius: var(--ba-radius);
  background: var(--ba-card);
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: ba-rise .8s .1s var(--ba-ease) both;
  transition: height .4s var(--ba-ease);
}

.glass::before,
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.glass::before {
  border: 1px solid hsl(0deg 0% 100% / 80%);
  mask-image: linear-gradient(170deg, hsl(0, 0%, 100%), hsla(0, 0%, 100%, 0) 50%);
  -webkit-mask-image: linear-gradient(170deg, hsl(0, 0%, 100%), hsla(0, 0%, 100%, 0) 50%);
}

.glass::after {
  border: 1px solid hsl(0deg 0% 100% / 80%);
  mask-image: linear-gradient(175deg, hsla(0, 0%, 100%, 0) 50%, hsl(0, 0%, 100%));
  -webkit-mask-image: linear-gradient(175deg, hsla(0, 0%, 100%, 0) 50%, hsl(0, 0%, 100%));
}

/* ---------- кроки ---------- */

.ba__step {
  display: none;
  flex-direction: column;
  margin: 0;
}

.ba__step.is-active {
  display: flex;
  animation: ba-fade .45s var(--ba-ease) both;
}

.ba__eyebrow {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ba-faint);
  margin-bottom: 10px;
}

.ba__title {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.ba__text {
  margin: 0 0 32px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ba-muted);
}

.ba__text strong {
  color: var(--ba-text);
  font-weight: 500;
  word-break: break-all;
}

/* ---------- поле (підкреслення, як у формах теми) ---------- */

.ba__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ba__field + .ba__field {
  margin-top: 22px;
}

.ba__label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ba-faint);
}

.ba__input {
  width: 100%;
  padding: 8px 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 0;
  background: transparent;
  color: var(--ba-text);
  font: inherit;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.02em;
  outline: none;
  transition: border-color .3s;
  -webkit-appearance: none;
  appearance: none;
}

.ba__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.ba__input:focus {
  border-bottom-color: var(--ba-text);
}

.ba__input:-webkit-autofill {
  -webkit-text-fill-color: var(--ba-text);
  transition: background-color 9999s;
}

.ba__input--code {
  font-size: 30px;
  letter-spacing: 0.5em;
  font-variant-numeric: tabular-nums;
}

.is-invalid .ba__input {
  border-bottom-color: var(--ba-error);
  animation: ba-shake .4s;
}

.ba__error {
  min-height: 22px;
  margin: 10px 0 18px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ba-error);
}

/* ---------- кнопка (білий pill, як submit у попапі контактів) ---------- */

.ba__button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--ba-radius);
  background: var(--ba-text);
  color: #000;
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.04em;
  cursor: pointer;
  transition: opacity .3s, transform .3s var(--ba-ease);
}

.ba__button:hover {
  opacity: .88;
}

.ba__button:active {
  transform: scale(.985);
}

.ba__button:focus-visible,
.ba__link:focus-visible {
  outline: 2px solid var(--ba-text);
  outline-offset: 3px;
}

.ba__button.is-loading {
  pointer-events: none;
}

.ba__button.is-loading span {
  opacity: 0;
}

.ba__button.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: ba-spin .7s linear infinite;
}

.ba__links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.ba__links--stack {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.ba__hint {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ba-faint);
}

.ba__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ba-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition: color .3s;
}

.ba__link:hover {
  color: var(--ba-text);
}

.ba__link:disabled {
  cursor: default;
  text-decoration: none;
  color: var(--ba-faint);
}

.ba__footnote {
  margin: 0;
  max-width: 440px;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ba-faint);
  animation: ba-rise .8s .2s var(--ba-ease) both;
}

/* ---------- mobile ---------- */

@media (max-width: 650px) {
  .ba__main {
    gap: 24px;
  }

  .ba__card {
    padding: 32px 24px 28px;
  }

  .ba__title {
    font-size: 28px;
  }

  .ba__logo {
    max-height: 72px;
  }
}

/* ---------- анімації ---------- */

@keyframes ba-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes ba-fade {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
}

@keyframes ba-zoom {
  to {
    transform: scale(1);
  }
}

@keyframes ba-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ba-shake {
  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
