/* TeleX landing — dark, Telegram-flavoured */
:root {
  --bg: #0b0b0f;
  --surface: #16161b;
  --surface-2: #1d1d23;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f4f7;
  --text-2: #a3a3ad;
  --accent: #6c9bff;
  --accent-fill: #3d7cf5;
  --radius: 22px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 Roboto, -apple-system, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Ambient background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.g1 { width: 620px; height: 620px; left: -160px; top: -200px; background: #2f5ff0; }
.g2 { width: 520px; height: 520px; right: -180px; top: 120px; background: #7a3ff0; opacity: 0.35; }
.g3 { width: 700px; height: 700px; left: 30%; top: 1400px; background: #1b7fd6; opacity: 0.18; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 15, 0.6); backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { color: var(--text-2); font-weight: 500; transition: color 0.2s; }
.links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, #4c8cff, var(--accent-fill));
  box-shadow: 0 8px 24px rgba(61, 124, 245, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(61, 124, 245, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }
.ico { width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 56px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-2); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ecf6e; box-shadow: 0 0 10px #3ecf6e; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.02em; margin: 20px 0 18px; font-weight: 900; }
.grad { background: linear-gradient(90deg, #7fb1ff, #9b7bff 55%, #ff8fd0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--text-2); max-width: 560px; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { color: #7d7d88; font-size: 14px; margin-top: 18px; }
.center { text-align: center; }

.hero-phones { position: relative; height: 620px; }
.phone {
  margin: 0; border-radius: 38px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 9px #1a1a1f, 0 0 0 10px #2b2b33, 0 30px 80px rgba(0, 0, 0, 0.6);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.hero-phones .phone { position: absolute; width: 280px; aspect-ratio: 390 / 844; }
.hero-phones .front { right: 70px; top: 0; animation: float 7s ease-in-out infinite; }
.hero-phones .back { right: 0; top: 70px; transform: rotate(7deg) scale(0.9); opacity: 0.75; filter: saturate(0.9); }
@keyframes float { 50% { transform: translateY(-12px); } }

/* Sections */
.section { padding: 72px 20px; }
#shots.section { padding-left: 0; padding-right: 0; }
.head { text-align: center; margin-bottom: 40px; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 12px; font-weight: 800; }
.head p { color: var(--text-2); font-size: 18px; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  padding: 26px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 40px rgba(0, 0, 0, 0.35); }
.card h3 { margin: 16px 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--text-2); font-size: 15.5px; }
.sq {
  position: relative; display: inline-block; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(180deg, var(--a), var(--b)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.sq::after {
  content: ''; position: absolute; inset: 7px; background: #fff;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}

/* Screenshot rail */
.shots {
  display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px max(20px, calc(50vw - 550px)) 30px;
  scrollbar-width: none; outline: none;
}
.shots::-webkit-scrollbar { display: none; }
.shot { margin: 0; flex: 0 0 auto; width: 250px; scroll-snap-align: center; text-align: center; }
.shot .phone { aspect-ratio: 390 / 844; border-radius: 32px; }
.shot figcaption { margin-top: 20px; color: var(--text-2); font-weight: 500; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { padding: 26px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.steps b {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(108, 155, 255, 0.15); color: var(--accent); font-size: 18px;
}
.steps h3 { margin: 14px 0 6px; font-size: 19px; }
.steps p { margin: 0; color: var(--text-2); }

/* Download */
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dl-card {
  display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); color: var(--text);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.2s ease, background 0.2s ease;
}
.dl-card:hover { transform: translateY(-2px); background: var(--surface-2); }
.dl-card b { display: block; font-size: 18px; }
.dl-card small { color: var(--text-2); font-size: 14px; }
.arrow { margin-left: auto; width: 10px; height: 10px; border-top: 2px solid var(--text-2); border-right: 2px solid var(--text-2); transform: rotate(45deg); flex-shrink: 0; }

/* FAQ */
details {
  border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; overflow: hidden;
}
summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 22px; font-weight: 600; font-size: 17px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ''; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform 0.25s ease;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details p { margin: 0; padding: 0 22px 20px; color: var(--text-2); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); margin-top: 40px; }
.foot-in { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.foot p { margin: 0; color: #7d7d88; font-size: 14px; max-width: 640px; }
.foot .by a { color: var(--text-2); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta { justify-content: center; }
  .hero-phones { height: 560px; max-width: 420px; width: 100%; margin: 0 auto; }
  .hero-phones .front { right: auto; left: 50%; margin-left: -150px; }
  .hero-phones .back { right: 50%; margin-right: -200px; }
  .grid, .steps, .dl { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .links { display: none; }
  .nav-in { justify-content: space-between; }
  .section { padding: 56px 16px; }
  .grid, .steps, .dl { grid-template-columns: 1fr; }
  .btn { height: 50px; padding: 0 20px; }
  .cta .btn { flex: 1 1 100%; justify-content: center; }
  .cta .btn-ghost { flex: 1 1 calc(50% - 6px); }
  .hero-phones { height: 500px; }
  .hero-phones .phone { width: 220px; }
  .hero-phones .front { margin-left: -125px; }
  .hero-phones .back { margin-right: -150px; }
  .shot { width: 210px; }
  .lead { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-phones .front { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
