:root {
  --bg: #090909;
  --bg-elevated: #121212;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-blur: blur(24px) saturate(1.4);
  --text: #f5f5f7;
  --text-muted: rgba(245, 245, 247, 0.62);
  --text-on-light: #1d1d1f;
  --text-on-light-muted: rgba(29, 29, 31, 0.62);
  --accent: #2aabee;
  --accent-soft: rgba(42, 171, 238, 0.18);
  --border-light: rgba(255, 255, 255, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --max: 720px;
  --screenshot-ratio: 591 / 1280;
  --screenshot-width: 591px;
  --screenshot-height: 1280px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Ambient background */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
}

.ambient__orb--1 {
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, #1a3a4a 0%, transparent 70%);
  animation: drift 18s var(--ease-out) infinite alternate;
}

.ambient__orb--2 {
  width: min(60vw, 420px);
  height: min(60vw, 420px);
  bottom: 10%;
  right: -10%;
  background: radial-gradient(circle, #2a2040 0%, transparent 70%);
  animation: drift 22s var(--ease-out) infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 60px) scale(1.12); }
}

.hero,
main,
.footer {
  position: relative;
  z-index: 1;
}

/* Hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 64px;
  position: relative;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.25s var(--ease-out);
}

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

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 0 32px;
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 12vw, 7rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 30%, rgba(255, 255, 255, 0.55));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 14px;
}

.hero__lead {
  max-width: 28em;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 900px);
  height: 40%;
  background: radial-gradient(ellipse at center bottom, rgba(42, 171, 238, 0.12), transparent 70%);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  transition: transform 0.35s var(--ease-spring), background 0.25s, box-shadow 0.25s, color 0.25s;
}

.btn:hover {
  transform: scale(1.03);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: #fff;
  color: var(--text-on-light);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.12);
}

.btn--primary:hover {
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.18);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--telegram {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 40px rgba(42, 171, 238, 0.35);
  min-height: 60px;
  padding: 0 32px;
  font-size: 1.1rem;
}

.btn--telegram:hover {
  box-shadow: 0 16px 48px rgba(42, 171, 238, 0.45);
}

.btn__icon {
  flex-shrink: 0;
}

.btn--block {
  width: 100%;
}

/* Sections */
.story,
.apps,
.install,
.steps,
.help {
  padding: 48px 24px 80px;
}

.section-head {
  max-width: var(--max);
  margin: 0 auto 36px;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.story__inner,
.install__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.prose {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prose p {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 36em;
}

.prose__accent {
  color: var(--text) !important;
  font-weight: 600;
}

.apps__grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .apps__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.app-card {
  background: var(--surface);
  backdrop-filter: var(--surface-blur);
  -webkit-backdrop-filter: var(--surface-blur);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--text-on-light);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-card__os {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.app-card__emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.app-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--text-on-light);
}

.app-card__text {
  color: var(--text-on-light-muted);
  font-size: 1rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 8px;
}

.install__inner .btn {
  margin-top: 24px;
}

/* Steps */
.steps__list {
  list-style: none;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  counter-reset: step;
}

.card {
  background: var(--surface);
  backdrop-filter: var(--surface-blur);
  -webkit-backdrop-filter: var(--surface-blur);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--text-on-light);
}

.step__meta {
  padding: 22px 24px 0;
}

.step__num {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.step__media {
  display: block;
  width: min(320px, calc(100% - 48px));
  margin: 20px auto 0;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #111;
  aspect-ratio: var(--screenshot-ratio);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.step__media:hover {
  transform: scale(1.02);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.step__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.step__media:hover img {
  transform: none;
}

.step__media:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.step__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  color: var(--text-on-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.step__media:hover .step__zoom,
.step__media:focus-visible .step__zoom {
  opacity: 1;
  transform: translateY(0);
}

.step__body {
  padding: 22px 24px 28px;
}

.step__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text-on-light);
}

.step__text {
  color: var(--text-on-light-muted);
  font-size: 1.02rem;
}

/* Help / Support */
.help__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.help__lead {
  color: var(--text-muted);
  margin: 14px 0 28px;
  max-width: 32em;
  font-size: 1.08rem;
}

/* Spoiler */
.spoiler {
  width: 100%;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.spoiler__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  transition: background 0.25s;
}

.spoiler__summary::-webkit-details-marker {
  display: none;
}

.spoiler__summary::marker {
  content: "";
}

.spoiler__summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.spoiler__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.45s var(--ease-out), background 0.25s, color 0.25s;
}

.spoiler[open] .spoiler__icon {
  transform: rotate(180deg);
  background: var(--accent-soft);
  color: var(--accent);
}

.spoiler__content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}

.spoiler[open] .spoiler__content,
.spoiler.is-closing .spoiler__content {
  grid-template-rows: 1fr;
}

.spoiler.is-closing .spoiler__content {
  grid-template-rows: 0fr;
}

.spoiler__inner {
  overflow: hidden;
  min-height: 0;
  padding: 0 22px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease-out) 0.05s, transform 0.4s var(--ease-out), padding 0.45s var(--ease-out);
}

.spoiler[open] .spoiler__inner {
  padding: 0 22px 22px;
  opacity: 1;
  transform: translateY(0);
}

.spoiler.is-closing .spoiler__inner {
  opacity: 0;
  transform: translateY(-8px);
  padding: 0 22px;
}

.spoiler.is-closing .spoiler__icon {
  transform: rotate(0deg);
}

.faq + .faq {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.faq h4 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.faq p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  padding: 32px 24px 48px;
  text-align: center;
}

.footer__text {
  color: rgba(245, 245, 247, 0.35);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal[data-delay] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ambient__orb {
    animation: none;
  }

  .spoiler__content,
  .spoiler__inner,
  .spoiler__icon {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  display: grid;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.lightbox.is-open .lightbox__backdrop {
  opacity: 1;
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(var(--screenshot-width), calc(100vw - 48px));
  max-height: min(90vh, 100%);
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transition: opacity 0.4s var(--ease-out), transform 0.45s var(--ease-spring);
}

.lightbox.is-open .lightbox__dialog {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(var(--screenshot-width), calc(100vw - 48px));
  max-height: min(90vh, var(--screenshot-height));
  border-radius: 22px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  object-fit: contain;
  background: #111;
}

.lightbox__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background 0.25s, transform 0.3s var(--ease-spring);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.06);
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .hero {
    padding: 20px 18px 48px;
  }

  .story,
  .apps,
  .install,
  .steps,
  .help {
    padding: 32px 18px 64px;
  }

  .step__media {
    width: min(300px, calc(100% - 40px));
    margin-top: 16px;
  }

  .step__body {
    padding: 18px 20px 24px;
  }

  .btn {
    width: 100%;
  }

  .hero__cta {
    flex-direction: column;
  }

  .lightbox__close {
    top: -52px;
    right: -4px;
  }
}
