/* Сторінка завантаження й запрошення. Токени й компоненти — у /static/shared/neon.css. */

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 700 20px/1 var(--font-display);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }

/* ---- Hero ---- */
.hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(36px, 8vw, 88px) 0 clamp(28px, 5vw, 48px);
  text-align: center;
}
.hero-title {
  max-width: 16ch;
  font-size: clamp(32px, 6.4vw, 64px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
.hero-title .grad-text { filter: drop-shadow(0 0 28px rgba(34, 211, 238, 0.35)); }
.lead {
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 17px);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
.ios-note { font-weight: 500; font-size: 14px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin: 4px 0 0;
}
.meta div { display: grid; gap: 2px; }
.meta dt {
  font: 600 11px/1.3 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta dd { margin: 0; font-family: var(--font-display); font-size: 15px; }

.sha {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 8px 8px 8px 14px;
  text-align: left;
}
.sha-label { font: 600 11px/1 var(--font-display); letter-spacing: 0.12em; color: var(--cyan); flex: none; }
.sha-value { min-width: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* ---- Код запрошення ---- */
.invite {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(560px, 100%);
  margin-top: 6px;
  padding: 26px 22px 22px;
  overflow: hidden;
}
/* Промінь сканера, що повільно проходить карткою. */
.invite::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.12) 70%, rgba(34, 211, 238, 0.35) 98%, transparent);
  animation: scan 4.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  pointer-events: none;
}
@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(350%); opacity: 0; }
}
.invite-label {
  font: 600 11px/1 var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.invite-code {
  font-family: var(--font-mono);
  font-size: clamp(26px, 7.4vw, 46px);
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.4));
  user-select: all;
  white-space: nowrap;
}

/* ---- Переваги ---- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.feature {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 60px -24px rgba(0, 0, 0, 0.7), 0 0 40px -18px rgba(34, 211, 238, 0.6);
}
.feature p { font-size: 14px; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px currentColor, 0 0 24px -6px currentColor;
}
.feature-icon svg { width: 24px; height: 24px; }
.fi-cyan { color: var(--cyan); }
.fi-violet { color: var(--violet); }
.fi-magenta { color: var(--magenta); }

/* ---- Інструкція + QR ---- */
.duo {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.steps, .qr-card { padding: 26px; }
.steps h2, .qr-card h2 { margin-bottom: 14px; }
.step-list {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step-list li {
  position: relative;
  padding-left: 44px;
  color: var(--muted);
  font-size: 14px;
  counter-increment: step;
}
.step-list li b { color: var(--text); font-weight: 600; }
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font: 700 14px/1 var(--font-display);
  color: #fff;
  background: var(--brand);
  box-shadow: 0 0 18px -4px rgba(34, 211, 238, 0.7);
}
.hint { font-size: 13px; color: var(--muted); }
.qr-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 14px;
  text-align: center;
}
.qr-card h2 { margin-bottom: 0; }
.page-url { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* ---- Відбиток AS ---- */
.trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  margin-bottom: 24px;
}
.trust-text { display: grid; gap: 8px; max-width: 62ch; }
.trust-text p { font-size: 14px; }
.fingerprint {
  flex: none;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(5, 6, 11, 0.55);
  box-shadow: inset 0 0 0 1px rgba(163, 230, 53, 0.45), 0 0 26px -8px rgba(163, 230, 53, 0.6);
  color: var(--lime);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 8px 0 max(28px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 12px;
}

/* На iPhone головна кнопка — підказка про TestFlight. */
.is-ios .ios-note { box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.6); color: var(--amber); }

@media (max-width: 820px) {
  .duo { grid-template-columns: 1fr; }
  .trust { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .cta { width: 100%; }
  .cta .btn { width: 100%; }
  .ios-note { white-space: normal; text-align: center; line-height: 1.3; }
  .sha { flex-wrap: wrap; }
  .steps, .qr-card, .trust, .feature { padding: 20px; }
  .fingerprint { font-size: 16px; white-space: normal; }
  .invite-code { letter-spacing: 0.06em; }
}
