/* Страница входа (ADR-007, client/landing.ts). Тот же язык, что у заставки
   загрузки: тёмный зал, тёплый свет лампы сверху и пирамида — только здесь
   шары настоящие, из того же спрайта, что на табло. Минимум: название, форма
   и ничего, что отвлекало бы от «войти». */

/* Вошедший на страницу входа не видит игры: её здесь и нет, но разметка
   табло и окон статикой лежит в той же странице. */
body.landing > :not(#landing) { display: none !important; }

#landing {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: calc(24px + var(--safe-t, 0px)) 16px calc(24px + var(--safe-b, 0px));
  box-sizing: border-box;
  background:
    /* лампа над столом */
    radial-gradient(ellipse 70% 55% at 50% -8%, rgba(255, 206, 128, 0.14), rgba(255, 206, 128, 0) 70%),
    /* сукно где-то внизу, в полутьме */
    radial-gradient(ellipse 75% 45% at 50% 108%, rgba(34, 110, 62, 0.2), rgba(34, 110, 62, 0) 70%),
    #0e0e11;
  color: #ece7dc;
  font-family: Rubik, system-ui, sans-serif;
}
#landing[hidden] { display: none; }

.ld-box {
  width: min(340px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  animation: ld-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Пирамида: пятнадцать шаров, скатываются по одному. */
.ld-rack { display: grid; gap: 3px; justify-items: center; margin-bottom: 26px; }
.ld-rack div { display: flex; gap: 3px; }
.ld-rack i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-image:
    radial-gradient(circle at 34% 27%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 46%),
    var(--sprite);
  background-size: 100% 100%, 1600% 100%;
  background-position: center, calc(var(--n) * 100% / 15) 0;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.35),
    inset -3px -4px 7px rgba(0, 0, 0, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.45);
  animation: ld-ball 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) var(--d, 0ms) both;
}

.ld-title {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #f1d77c, #c9a227);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ld-tag {
  margin: 8px 0 28px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a8478;
}

.ld-form { width: 100%; display: grid; gap: 10px; }
.ld-form[hidden] { display: none; }
.ld-form input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(236, 231, 220, 0.1);
  border-radius: 12px;
  background: rgba(236, 231, 220, 0.04);
  color: #ece7dc;
  /* 16px, не меньше: мельче — и Safari на iPhone зумит страницу при фокусе. */
  font: 16px/1 Rubik, system-ui, sans-serif;
  transition: border-color 0.15s, background 0.15s;
}
.ld-form input::placeholder { color: rgba(236, 231, 220, 0.34); }
.ld-form input:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(236, 231, 220, 0.06);
}
.ld-form button {
  height: 46px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #e6c75e, #c9a227);
  color: #1b1607;
  font: 600 15px/1 Rubik, system-ui, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.22);
  transition: transform 0.1s, filter 0.15s, box-shadow 0.15s;
}
.ld-form button:hover { filter: brightness(1.06); box-shadow: 0 10px 28px rgba(201, 162, 39, 0.3); }
.ld-form button:active { transform: translateY(1px); }
.ld-form button:disabled { filter: saturate(0.4) brightness(0.8); cursor: default; }
.ld-form button:focus-visible { outline: 2px solid rgba(241, 215, 124, 0.7); outline-offset: 3px; }

.ld-err {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #f0a597;
}
.ld-err:empty { display: none; }

.ld-foot {
  margin: 26px 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(138, 132, 120, 0.7);
}
.ld-foot a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(138, 132, 120, 0.35); }
.ld-foot a:hover { color: #c9c2b3; }

@keyframes ld-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes ld-ball {
  from { opacity: 0; transform: translateY(-14px) scale(0.6); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ld-box, .ld-rack i { animation: none; }
}
