/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d1117;
  --bg-section: #0a0e14;
  --bg-card: #111720;
  --bg-card-hover: #161e2a;
  --accent: #4A9EFF;
  --accent-2: #7B5CF0;
  --accent-hover: #3a8eef;
  --text: #e6edf3;
  --text-muted: #7d8590;
  --text-subtle: #30363d;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --border: #21262d;
  --border-bright: #30363d;
  --bg-overlay: rgba(13, 17, 23, 0.92);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  text-decoration: none;
}

.logo__icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo__icon--sm {
  width: 32px;
  height: 32px;
}

.logo__text {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1;
}

.logo__text--sm {
  font-size: 1.15rem;
}

.logo__text--grad {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Nav links ── */
.header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--border);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 7px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(74, 158, 255, 0.06);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 8px 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
}

.mobile-nav.open { display: flex; }

.mobile-nav__link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 24px;
  transition: color 0.15s;
}

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

.mobile-nav__cta {
  color: var(--accent);
  font-weight: 600;
}

/* ─── */
.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 14px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.5px;
  font-family: var(--font);
}

.lang-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.lang-btn:hover:not(.active) {
  color: var(--text);
  background: var(--border);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  font-family: var(--font);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(74, 158, 255, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(74, 158, 255, 0.4);
  filter: brightness(1.1);
}

.btn--hero {
  padding: 16px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.btn--large {
  padding: 16px 40px;
  font-size: 1rem;
}

.tg-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Hero ── */
.hero {
  padding: 140px 0 80px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}

/* Dot-grid background pattern */
.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(74, 158, 255, 0.35) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, black 30%, transparent 100%);
  pointer-events: none;
  opacity: 0.55;
}

/* Ambient glows */
.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
}

.hero__glow--blue {
  width: 700px;
  height: 500px;
  top: -160px;
  left: -200px;
  background: rgba(74, 158, 255, 0.18);
  animation: glow-drift 12s ease-in-out infinite alternate;
}

.hero__glow--purple {
  width: 600px;
  height: 500px;
  top: -120px;
  right: -150px;
  background: rgba(123, 92, 240, 0.16);
  animation: glow-drift 15s ease-in-out infinite alternate-reverse;
}

@keyframes glow-drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, 30px) scale(1.05); }
  66%  { transform: translate(-20px, 50px) scale(0.97); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  position: relative;
  width: 100%;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 158, 255, 0.08);
  border: 1px solid rgba(74, 158, 255, 0.25);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}

.badge-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}

.badge-logo--ym {
  border-radius: 50%;
  background: #FF5226;
  padding: 2px;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--text);
  max-width: 800px;
}

h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

/* Fanned card stack */
.hero__cards {
  position: relative;
  width: 320px;
  height: 380px;
  margin-top: 16px;
  cursor: pointer;
}

.hero__card {
  position: absolute;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-bright);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.45s ease, box-shadow 0.45s ease;
}

.hero__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__card--back {
  width: 200px;
  height: 267px;
  left: -20px;
  top: 50px;
  transform: rotate(-8deg);
  opacity: 0.7;
  z-index: 1;
}

.hero__card--mid {
  width: 210px;
  height: 280px;
  left: 55px;
  top: 20px;
  transform: rotate(-2deg);
  opacity: 0.85;
  z-index: 2;
}

.hero__card--front {
  width: 225px;
  height: 300px;
  right: -20px;
  top: 0;
  transform: rotate(5deg);
  z-index: 3;
}

/* Hover: fan out */
.hero__cards:hover .hero__card--back {
  transform: rotate(-18deg) translateX(-60px) translateY(10px);
  opacity: 1;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8);
}

.hero__cards:hover .hero__card--mid {
  transform: rotate(0deg) translateY(-16px);
  opacity: 1;
  box-shadow: 0 32px 80px rgba(74, 158, 255, 0.2);
}

.hero__cards:hover .hero__card--front {
  transform: rotate(14deg) translateX(60px) translateY(10px);
  opacity: 1;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8);
}

/* ── Steps ── */
.steps {
  padding: 100px 0;
  background: var(--bg-section);
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  letter-spacing: -0.8px;
  color: var(--text);
}

.steps__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 20px 0;
}

.step-row--reverse { direction: rtl; }
.step-row--reverse > * { direction: ltr; }

.step-row__visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.step-row:hover .step-row__visual {
  border-color: var(--border-bright);
}

.step-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.step-row__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(74, 158, 255, 0.3);
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.step-icon.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.step-row__num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 2px;
  opacity: 0.7;
}

.step-row__text h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.step-row__text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 380px;
}

.step-row__connector {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

/* Phone mockup wrapper for real screenshots */
.step-phone {
  position: relative;
  display: inline-block;
  background: #0d1117;
  border-radius: 36px;
  border: 2px solid var(--border-bright);
  box-shadow:
    0 0 0 6px #0a0e14,
    0 0 0 7px var(--border),
    0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  max-width: 240px;
  margin: 0 auto;
}

.step-phone::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 5px;
  background: var(--border-bright);
  border-radius: 3px;
  z-index: 2;
}

.step-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 34px;
}

/* CTA free badge */
.cta-block__free-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.3);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 100px;
  margin-bottom: 8px;
}

/* ── Gallery ── */
.gallery {
  padding: 100px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery__grid img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid var(--border-bright);
}

.gallery__grid img:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.gallery__cta {
  display: flex;
  justify-content: center;
  margin-top: 52px;
}

/* ── Final CTA block ── */
.cta-block {
  padding: 120px 0;
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.cta-block__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(74, 158, 255, 0.1) 0%, rgba(123, 92, 240, 0.08) 40%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}

.cta-block__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  position: relative;
}

.cta-block__inner .section-title {
  margin-bottom: 0;
}

.cta-block__sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Footer ── */
.footer {
  padding: 28px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  opacity: 0.8;
}

.footer__copy {
  color: var(--text-subtle);
  font-size: 0.85rem;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.footer a:hover { color: var(--accent); }

/* ── Focus states ── */
.lang-btn:focus-visible,
.btn:focus-visible,
.footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero {
    padding: 110px 0 60px;
    min-height: auto;
    align-items: flex-start;
  }

  .hero__bg-grid { opacity: 0.25; }
  .hero__glow { filter: blur(60px); }
  .hero__glow--blue { width: 340px; height: 260px; top: -80px; left: -80px; }
  .hero__glow--purple { width: 280px; height: 260px; top: -60px; right: -60px; }

  h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    letter-spacing: -1px;
  }

  .hero__sub { font-size: 1rem; }

  .hero__cards {
    width: 280px;
    height: 320px;
  }

  .hero__card--back { width: 170px; height: 227px; }
  .hero__card--mid  { width: 180px; height: 240px; }
  .hero__card--front { width: 190px; height: 254px; }

  .header__nav { display: none; }
  .burger { display: flex; }

  .step-row {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 16px 0;
  }

  /* Text always first on mobile */
  .step-row__text { order: 1; }
  .step-row__visual { order: 2; }
  .step-row--reverse { direction: ltr; }

  .step-row__text h3 { font-size: 1.2rem; }
  .step-row__connector { padding: 0; }

  /* Gallery: one card at a time, full width */
  .gallery__grid {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 0 40px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gallery__grid::-webkit-scrollbar { display: none; }

  .gallery__grid img {
    min-width: calc(100vw - 80px);
    max-width: calc(100vw - 80px);
    scroll-snap-align: center;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
  }

  /* Hero cards: auto fan-out on mobile (no hover) */
  .hero__cards .hero__card--back {
    transform: rotate(-18deg) translateX(-60px) translateY(10px);
    opacity: 1;
  }

  .hero__cards .hero__card--mid {
    transform: rotate(0deg) translateY(-16px);
    opacity: 1;
  }

  .hero__cards .hero__card--front {
    transform: rotate(14deg) translateX(60px) translateY(10px);
    opacity: 1;
  }

  .cta-block { padding: 72px 0; }

  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ── FAQ ── */
.faq {
  padding: 100px 0;
  background: var(--bg-section);
  border-top: 1px solid var(--border);
}

.faq__list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__item:first-child {
  border-top: 1px solid var(--border);
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  transition: color 0.15s;
}

.faq__q:hover { color: var(--accent); }

.faq__arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.faq__q[aria-expanded="true"] .faq__arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq__a {
  padding-bottom: 20px;
}

.faq__a p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ── Scroll-reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__glow--blue,
  .hero__glow--purple {
    animation: none;
  }

  .step-icon {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
