/* Recreation of the reference Telegram "join channel" landing page.
   Geometry, colours and type sizes below were measured pixel-by-pixel from the
   reference screenshot (2904x1536 @2x => CSS px = measured px / 2). */

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

:root {
  --blue: #4288d0;
  --blue-hover: #3a7cc0;
  --text: #1f2839;
  --text-muted: #495466;
  --card: #fff;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Telegram wallpaper: smooth gradient + doodle pattern ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #b9c8a2;
  background-image: url("/img/wallpaper.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.bg-pattern {
  position: absolute;
  inset: 0;
  background-image: url("/img/pattern.svg");
  background-position: center;
  background-repeat: repeat;
  background-size: 293px auto;   /* tile period measured from the reference */
  mix-blend-mode: overlay;
  opacity: .4;
}

/* ---------- Fixed white top bar ---------- */

.head {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  height: 48px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #20293a;
}

.brand-logo { width: 27px; height: 27px; display: block; }

.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.1px; }

/* ---------- Layout ---------- */

.wrap {
  padding: 48px 8px 32px;
}

/* The card sits centred in the first screen, exactly as in the reference;
   the fine print follows underneath it. */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

@supports (height: 100dvh) {
  .hero { min-height: calc(100dvh - 80px); }
}

/* ---------- Card ---------- */

.card {
  width: 100%;
  max-width: 397px;
  padding: 32px 16px;
  text-align: center;
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.avatar {
  display: block;
  width: 110px;
  height: 110px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.title {
  margin: 26px 0 0;
  font-size: 24px;
  line-height: 28px;
  font-weight: 700;
  color: var(--text);
}

.hint {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
  color: var(--text-muted);
}

.hint:first-of-type { margin-top: 50px; }

.hint-tight { margin-top: 7px; }

.hint-strong { font-weight: 700; color: var(--text); }

.hint strong { font-weight: 700; color: var(--text); }

.hint-cta { margin-top: 14px; }

.emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-weight: 400;
}

/* ---------- Join button ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 179px;
  height: 41px;
  margin: 35px auto 0;
  border-radius: 21px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease;
}

.btn:hover, .btn:focus-visible { background: var(--blue-hover); }

.btn:active { transform: translateY(1px); }

.btn:focus-visible { outline: 2px solid #1f2839; outline-offset: 2px; }

/* ---------- Fine print ---------- */

.disclaimer {
  width: 100%;
  max-width: 397px;
  margin: 24px auto 0;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.55;
  color: #2b3a2f;
  text-align: left;
}

.disclaimer p { margin: 0 0 10px; }

.disclaimer p:last-child { margin-bottom: 0; }

.disclaimer strong { font-weight: 700; }

@media (max-width: 420px) {
  .wrap { padding: 48px 10px 28px; }
  .hero { min-height: calc(100vh - 100px); }
  .head { padding: 0 16px; }
  .card { padding: 28px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
