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

/* responsive media: never overflow the container */
img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

img,
video {
  height: auto;
}

:root {
  --bg: #020617;
  --surface: #020817;
  --surface-2: #0f172a;
  --border: #1f2937;
  --accent: #38bdf8;
  --accent-2: #f97316;
  --accent-glow: rgba(56, 189, 248, 0.25);
  --accent-dim: rgba(56, 189, 248, 0.15);
  --text: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #9ca3af;
  --success: rgb(34, 197, 94);
  --radius: 20px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(circle at top, #0b1220 0, #020617 42%, #020617 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── Hero background slideshow ── */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: min(115vh, 1050px);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  z-index: 1;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0) 0%, #090f21 100%);
}

/* white shine sweeping across the background.
   The beam is a rotated strip sized in vmax so its width, angle and speed
   look identical on phones, tablets and desktops; the animation is
   transform-only, so it stays on the GPU compositor on all devices. */
.hero-bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -23vmax;
  z-index: 1;
  background:
    /* bright core */
    linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.04) 32%,
      rgba(255, 255, 255, 0.10) 45%,
      rgba(255, 255, 255, 0.17) 50%,
      rgba(255, 255, 255, 0.10) 55%,
      rgba(255, 255, 255, 0.04) 68%,
      transparent 100%),
    /* faint trailing echo */
    linear-gradient(90deg,
      transparent 2%,
      rgba(255, 255, 255, 0.05) 12%,
      transparent 24%);
  mix-blend-mode: screen;
  transform: rotate(24deg) translateX(85vmax);
  will-change: transform;
  animation: heroShine 9s cubic-bezier(0.55, 0, 0.3, 1) infinite;
}

@keyframes heroShine {
  0%        { transform: rotate(24deg) translateX(85vmax); }
  62%, 100% { transform: rotate(24deg) translateX(-85vmax); }
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  filter: brightness(0.72) saturate(0.85);
  /* Ken Burns: every slide drifts continuously (not only the active one),
     so the crossfade always catches it mid-motion — no snap on slide change */
  animation: kbDrift 22s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
  transition:
    opacity 2.6s cubic-bezier(0.4, 0, 0.2, 1),
    filter 3.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity, filter;
}

/* alternate slides drift the opposite way, slightly out of phase */
.hero-slide:nth-child(even) {
  animation-name: kbDriftAlt;
  animation-duration: 26s;
  animation-delay: -9s;
}

.hero-slide.active {
  opacity: 1;
  filter: brightness(1) saturate(1);
}

/* --scroll-y (set by js/parallax.js) shifts the slide down as the page
   scrolls; with a factor < 1 the top gap it opens never enters the viewport.
   Scale never drops below 1.07 so the ±0.7% pan can't expose edges. */
@keyframes kbDrift {
  from { transform: translate3d(-0.7%, calc(var(--scroll-y, 0) * 0.4px), 0) scale(1.07); }
  to   { transform: translate3d(0.7%, calc(var(--scroll-y, 0) * 0.4px - 0.5%), 0) scale(1.17); }
}

@keyframes kbDriftAlt {
  from { transform: translate3d(0.7%, calc(var(--scroll-y, 0) * 0.4px - 0.5%), 0) scale(1.16); }
  to   { transform: translate3d(-0.7%, calc(var(--scroll-y, 0) * 0.4px), 0) scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide.active {
    animation: none;
    transition: opacity 0.6s ease;
    transform: none;
    filter: none;
  }
  .hero-bg::before {
    animation: none;
    opacity: 0;
  }
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.ambient-1 {
  width: 600px; height: 600px;
  top: -200px; left: -200px;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
  animation: drift1 20s ease-in-out infinite;
}
.ambient-2 {
  width: 500px; height: 500px;
  top: 30%; right: -150px;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  animation: drift2 25s ease-in-out infinite;
}
.ambient-3 {
  width: 400px; height: 400px;
  bottom: 10%; left: 20%;
  background: radial-gradient(circle, rgba(59,130,246,0.07) 0%, transparent 70%);
  animation: drift1 18s ease-in-out infinite reverse;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(40px, -30px); }
  66% { transform: translate(-20px, 20px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 40px); }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header (Atlanta: solid blurred sticky bar) ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(2, 6, 23, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.75);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}

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

.logo-img {
  height: 30px;
  width: auto;
  display: block;
}
@media (max-width: 640px) {
  .logo-img { height: 26px; }
}

/* ── Header nav (gradient underline, Atlanta av-nav__link) ── */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}

.header-nav-link {
  position: relative;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.22s ease-out;
}

.header-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: all 0.22s ease-out;
}

.header-nav-link:hover,
.header-nav-link.active {
  color: var(--text);
}
.header-nav-link:hover::after,
.header-nav-link.active::after {
  width: 100%;
}

/* mobile: nav wraps to a second, horizontally scrollable row */
@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 0;
    row-gap: 6px;
  }
  .header-nav {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .header-nav::-webkit-scrollbar { display: none; }
  .header-nav-link { padding: 2px 0 6px; }
}

/* offset section anchors below the sticky header */
#features, #servers, #apps, #pricing, #faq {
  scroll-margin-top: 72px;
}

@media (max-width: 860px) {
  #features, #servers, #apps, #pricing, #faq {
    scroll-margin-top: 104px;
  }
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* compact header: tighter controls */
.header-actions .btn { padding: 7px 13px; }
.header-actions .lang-btn { padding: 6px 11px; font-size: 12px; }

/* ── Language Switcher ── */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease-out;
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
}

.lang-btn svg {
  width: 12px; height: 12px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.lang-switcher.open .lang-btn svg {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(2, 6, 23, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.95);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}

html[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

.lang-switcher.open .lang-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.15s;
  text-align: left;
}

html[dir="rtl"] .lang-option {
  text-align: right;
}

.lang-option:hover {
  background: var(--surface-2);
  color: var(--text);
}

.lang-option.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* rounded outlined flag icons */
.lang-flag {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(2, 6, 23, 0.35);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.flag-ru {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='8' fill='%23ffffff'/%3E%3Crect y='8' width='24' height='8' fill='%230039A6'/%3E%3Crect y='16' width='24' height='8' fill='%23D52B1E'/%3E%3C/svg%3E");
}

.flag-en {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' fill='%23012169'/%3E%3Cpath d='M0 0 24 24M24 0 0 24' stroke='%23ffffff' stroke-width='4'/%3E%3Cpath d='M0 0 24 24M24 0 0 24' stroke='%23C8102E' stroke-width='1.6'/%3E%3Cpath d='M12 0V24M0 12H24' stroke='%23ffffff' stroke-width='7'/%3E%3Cpath d='M12 0V24M0 12H24' stroke='%23C8102E' stroke-width='4'/%3E%3C/svg%3E");
}

.flag-ky {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' fill='%23E8112D'/%3E%3Ccircle cx='12' cy='12' r='6' fill='%23FFEF00'/%3E%3Ccircle cx='12' cy='12' r='3.6' fill='%23E8112D'/%3E%3Ccircle cx='12' cy='12' r='2.8' fill='%23FFEF00'/%3E%3Cpath d='M9.4 12a2.6 2.6 0 0 1 5.2 0M9.8 10.9a3.2 3.2 0 0 1 4.4 0' stroke='%23E8112D' stroke-width='0.8' fill='none'/%3E%3C/svg%3E");
}

/* ── Buttons (Atlanta av-btn: pill, translucent ghost / gradient primary) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: all 0.22s ease-out;
  white-space: nowrap;
  outline: none;
}

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

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
  color: var(--text);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(8, 47, 73, 0.7);
}

.btn-ghost {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.7);
}
.btn-ghost:hover {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
}

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

.btn-lg { padding: 10px 20px; }
.btn-xl { padding: 10px 20px; }

/* ── Hero ── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 32px 0 28px;
  text-align: left;
}

.hero-content {
  min-width: 0;
  position: relative;
  z-index: 1;
  transform: translate3d(0, calc(var(--scroll-y, 0) * -0.06px), 0);
}

/* soft white shine circle behind the astronaut */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(10% - 4.5vw);
  width: clamp(300px, 36vw, 500px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 247, 237, 0.20) 20%,
    rgba(251, 146, 60, 0.13) 45%,
    rgba(249, 115, 22, 0.06) 62%,
    transparent 78%
  );
  filter: blur(30px);
  transform: translateY(-50%);
  z-index: -1;
  pointer-events: none;
  animation: glowPulse 5s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { opacity: 0.65; transform: translateY(calc(-50% + var(--scroll-y, 0) * 0.12px)) scale(0.94); }
  to   { opacity: 1;    transform: translateY(calc(-50% + var(--scroll-y, 0) * 0.12px)) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; }
}

/* twinkling stars behind the astronaut */
.hero-stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transform: translate3d(0, calc(var(--scroll-y, 0) * 0.22px), 0);
}

.star {
  position: absolute;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 L14.6 8.8 L20.8 9.4 L16.1 13.6 L17.5 19.8 L12 16.5 L6.5 19.8 L7.9 13.6 L3.2 9.4 L9.4 8.8 Z' fill='%23fde047' stroke='%23fde047' stroke-width='3.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.85));
  animation: starTwinkle 3s ease-in-out infinite;
}

.star-1 { top: 16%; right: 7%;  width: 14px; height: 14px; animation-duration: 2.6s; }
.star-2 { top: 30%; right: 29%; width: 9px;  height: 9px;  animation-duration: 3.4s; animation-delay: 0.6s; }
.star-3 { top: 60%; right: 5%;  width: 11px; height: 11px; animation-duration: 2.9s; animation-delay: 1.1s; }
.star-4 { top: 76%; right: 24%; width: 16px; height: 16px; animation-duration: 3.8s; animation-delay: 0.3s; }
.star-5 { top: 10%; right: 21%; width: 8px;  height: 8px;  animation-duration: 2.3s; animation-delay: 1.6s; }
.star-6 { top: 46%; right: 33%; width: 7px;  height: 7px;  animation-duration: 3.1s; animation-delay: 0.9s; }

@keyframes starTwinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.15) rotate(20deg); }
}

@media (prefers-reduced-motion: reduce) {
  .star { animation: none; opacity: 0.6; }
}

/* ── Floating astronaut (vertically centered, near the text column) ── */
.hero-man {
  display: block;
  position: absolute;
  right: 10%;
  top: 50%;
  width: clamp(230px, 27vw, 370px);
  height: auto;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 24px 50px rgba(2, 6, 23, 0.6));
  animation:
    manEnter 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both,
    manFloat 7s ease-in-out 1.3s infinite;
}

@keyframes manEnter {
  from { opacity: 0; transform: translateY(calc(-50% + 40px)) rotate(4deg); }
  to   { opacity: 1; transform: translateY(-50%) rotate(0deg); }
}

@keyframes manFloat {
  0%, 100% { transform: translateY(calc(-50% + var(--scroll-y, 0) * 0.12px)) rotate(0deg); }
  25%      { transform: translateY(calc(-50% - 16px + var(--scroll-y, 0) * 0.12px)) rotate(-2deg); }
  60%      { transform: translateY(calc(-50% + 10px + var(--scroll-y, 0) * 0.12px)) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-man { animation: none; transform: translateY(-50%); }
}

@media (max-width: 1080px) {
  .hero-man { width: clamp(200px, 26vw, 280px); opacity: 0.85; }
}

@media (max-width: 860px) {
  .hero-man { display: none; }
  .hero::after { display: none; }
  .hero-stars { display: none; }
}

.hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* status dot */
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ticker: message slides up and out, next slides in from below */
.hero-badge-msg {
  display: inline-block;
  transition: transform 0.28s ease-in, opacity 0.28s ease-in;
}

.hero-badge-msg.swap-out {
  transform: translateY(-9px);
  opacity: 0;
}

.hero-badge-msg.swap-in {
  animation: msgIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes msgIn {
  from { transform: translateY(9px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge-msg { transition: none; }
  .hero-badge-msg.swap-in { animation: none; }
}

.hero h1 {
  font-family: 'Turret Road', 'Tektur', system-ui, sans-serif;
  font-size: clamp(1.65rem, 2.6vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 12px;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero h1 .grad {
  background: linear-gradient(120deg, #38bdf8, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Video-in-text (MagicUI VideoText style) ── */
.video-text {
  position: relative;
  isolation: isolate;
  display: block;
  height: 2em;
  width: 100%;
  margin-top: 0.08em;
  animation: vtGlow 3.5s ease-in-out infinite alternate;
}

@keyframes vtGlow {
  from {
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35)) drop-shadow(0 0 22px rgba(14, 165, 233, 0.18));
  }
  to {
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.6)) drop-shadow(0 0 34px rgba(14, 165, 233, 0.32));
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-text {
    animation: none;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.4));
  }
}

.video-text-mask {
  position: absolute;
  inset: 0;
  display: block;
  mask-size: auto 100%;
  -webkit-mask-size: auto 100%;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: 0% 50%;
  -webkit-mask-position: 0% 50%;
}

.video-text-mask video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 0 20px;
  font-weight: 400;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ── Hero stats strip (count-up numbers) ── */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin-top: 16px;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.hero-stat {
  padding: 0 18px;
  border-left: 1px solid rgba(148, 163, 184, 0.2);
  min-width: 0;
}
.hero-stat:first-child {
  padding-left: 0;
  border-left: none;
}

.hero-stat-value {
  font-family: 'Orbitron', 'Turret Road', 'Tektur', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hero-stat-value .stat-suffix {
  font-size: 0.8em;
  color: var(--accent);
}

/* the no-logs zero glows green — it's the selling point */
.hero-stat-zero {
  color: var(--success);
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.45);
}

.hero-stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1px;
}

.point-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green { background: var(--success); }
.dot-blue { background: var(--accent); }
.dot-orange { background: #f6a054; }

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-card {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, #0f172a 0%, rgba(10, 15, 26, 0.94) 52%, rgba(10, 15, 26, 0.94) 100%);
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.65);
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero-card-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero-card-row strong {
  color: var(--success);
  font-weight: 700;
}

.hero-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.72rem;
}

.metric-label {
  color: var(--text-muted);
}

.metric-value {
  font-size: 0.82rem;
  color: var(--text);
  text-align: right;
}

.metric-tag {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text);
  white-space: nowrap;
}

/* ── Section ── */
/* fluid rhythm: spacing scales continuously with the viewport */
section { padding: clamp(14px, 2.5vw, 24px) 0; }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-title {
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 420px;
}

/* ── Features Grid ── */
/* ── Section head (title block + optional side button) ── */
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head + .benefits-grid,
.section-head + .pricing-grid,
.section-head + .faq {
  margin-top: 0;
}

.ghost-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.22s ease-out;
}
.ghost-pill:hover {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
}

/* ── Benefits ── */
.benefits-grid {
  display: grid;
  /* auto-fit: 3 → 2 → 1 columns continuously, no breakpoint jumps */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: clamp(8px, 1.2vw, 12px);
}

.benefit-card {
  background: var(--surface);
  border: 1px solid rgba(31, 41, 55, 0.9);
  border-radius: 16px;
  padding: 14px;
}

.card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.benefit-card .card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 6px 0 8px;
}

.benefit-card .card-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
  color: var(--text-muted);
}

/* ── Servers Grid ── */
.servers-grid {
  display: grid;
  /* fills as many columns as fit; card floor keeps names readable */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 8px;
  margin-top: 12px;
}

.server-card {
  background: var(--surface);
  border: 1px solid rgba(31, 41, 55, 0.9);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  transition: all 0.3s;
}

.server-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* ── Apps grid (compact chips) ── */
#apps {
  padding: 18px 0;
}
#apps .section-head {
  margin-bottom: 12px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 8px;
}

.app-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid rgba(31, 41, 55, 0.9);
  color: var(--text-muted);
  min-width: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s ease-out;
}

.app-tile:hover {
  border-color: rgba(148, 163, 184, 0.4);
  transform: translateY(-1px);
}

.app-icon {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
  grid-row: 1 / 3;
}

.app-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.app-platforms {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Visitor OS chip + matching-app highlight ── */
.os-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
  font-size: 12px;
  color: var(--text-secondary);
}
.os-chip svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
.os-chip strong { color: var(--accent); font-weight: 600; }

.app-tile.os-match {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.09), rgba(15, 23, 42, 0.6));
}
.app-tile.os-match:hover { border-color: rgba(56, 189, 248, 0.7); }
.app-tile .os-hit { color: var(--accent); font-weight: 700; }

/* green "recommended" mark on selected apps */
.app-rec {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: var(--success);
  color: #04120a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg), 0 0 10px rgba(34, 197, 94, 0.45);
}

.app-rec svg {
  width: 10px;
  height: 10px;
}


.server-flag { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }

.server-flag svg {
  display: block;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.server-info { flex: 1; min-width: 0; }

.server-info h4 {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 1px;
  overflow-wrap: break-word;
}

.server-info p {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
  flex-shrink: 0;
}

/* compact cards: keep only the pulsing dot */
.server-status span:not(.status-dot) { display: none; }

html[dir="rtl"] .server-status { margin-left: 0; margin-right: auto; }

.status-dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Pricing ── */
#pricing {
  padding: 18px 0;
}
#pricing .section-head {
  margin-bottom: 12px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.price-card {
  background: var(--surface);
  border: 1px solid rgba(31, 41, 55, 0.9);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.price-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.price-card.featured {
  border-color: rgba(56, 189, 248, 0.35);
}

.price-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.7);
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.price-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.price-amount {
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  display: inline;
}

.price-amount sup {
  font-size: 11px;
  font-weight: 600;
  vertical-align: top;
  margin-top: 4px;
}

.price-period {
  display: inline;
  font-size: 11px;
  color: var(--text-muted);
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  margin: 8px 0 10px;
}

.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.price-features li .check {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  flex-shrink: 0;
}

.price-cta {
  display: block;
  text-align: center;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.22s ease-out;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
}

.price-cta:hover {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
}

.price-card.featured .price-cta {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
}

.price-card.featured .price-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(8, 47, 73, 0.7);
}

/* ── CTA Banner ── */
.cta-banner {
  background: radial-gradient(circle at top left, var(--surface) 0, var(--bg) 55%, var(--bg) 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.65);
}

.cta-banner h2 {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.cta-banner p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

/* ── FAQ ── */
.faq {
  display: grid;
  gap: 10px;
}

.faq-item {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.faq-icon {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  font-size: 13px;
  color: var(--text-muted);
  transition: max-height 0.22s ease-out, padding-bottom 0.22s ease-out;
}

.faq-a-inner {
  padding: 8px 0 14px;
}

.faq-item.is-open .faq-a {
  /* generous cap so long answers are never clipped on narrow screens */
  max-height: 60em;
  padding-bottom: 6px;
}

.faq-item.is-open .faq-icon {
  background: rgba(15, 23, 42, 0.9);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.footer-top {
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
}

.footer-logo {
  display: inline-block;
}
.footer-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(55, 65, 81, 0.9);
  color: var(--text-muted);
}

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-col-links {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
}
.footer-col-links li { margin-bottom: 5px; }
.footer-col-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 10px 0 16px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── No-TG hint ── */
/* ── "Telegram blocked?" fallback — amber alert card ── */
.no-tg-hint {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(249, 115, 22, 0.04) 60%);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.no-tg-hint .hint-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

.no-tg-hint a {
  position: relative;
  color: #fde68a;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s;
}

/* animated underline: draws in from the left on hover */
.no-tg-hint a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, #fbbf24, rgba(251, 191, 36, 0.2));
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.no-tg-hint a:hover { color: #fef3c7; }
.no-tg-hint a:hover::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .no-tg-hint { animation: none; }
  .no-tg-hint a::after { transition: none; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-card { max-width: 460px; }
}

@media (max-width: 768px) {
  .hero { padding: 22px 0 32px; }
  .hero h1 { font-size: 1.6rem; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 340px; margin-left: auto; margin-right: auto; }
  .cta-banner { align-items: flex-start; }
  .header-actions .btn-ghost { display: none; }
  .section-head { flex-direction: column; }

  /* footer: 2-column grid, brand block on its own full row */
  .footer-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }
  .footer-top > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .hero h1 { font-size: clamp(1.3rem, 7vw, 1.6rem); }
  .section-title { font-size: 20px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; }
  .no-tg-hint { align-items: flex-start; border-radius: var(--radius-md); }
  .no-tg-hint .hint-icon { margin-top: 2px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
  .hero-stat { padding: 0; border-left: none; }
  .apps-grid { grid-template-columns: 1fr; }
  .servers-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 18px 16px; }
  .cta-banner .btn { width: 100%; }
  .ghost-pill { width: 100%; }
  .footer-top { grid-template-columns: 1fr; }
}

/* ── Advanced device adaptation ── */

/* notched phones: keep content out of the display cutouts
   (≤480px variant lives in the mobile block above) */
@media (min-width: 481px) {
  .container {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
}

/* mobile browsers: size the hero bg against the *small* viewport so the
   collapsing URL bar never causes a jump or a gap */
@supports (height: 100svh) {
  .hero-bg { height: min(115svh, 1050px); }
}

/* touch devices: comfortable tap targets regardless of screen size */
@media (pointer: coarse) {
  .btn,
  .ghost-pill,
  .lang-btn {
    min-height: 42px;
  }
  .price-cta { padding-top: 11px; padding-bottom: 11px; }
  .faq-q { min-height: 48px; }
  .header-nav-link { padding-top: 8px; padding-bottom: 8px; }
  .app-tile { min-height: 48px; }
}

/* headlines break into balanced lines; body text avoids orphans */
.hero h1,
.section-title,
.cta-banner h2 {
  text-wrap: balance;
}
.hero-sub,
.section-sub,
.card-text,
.faq-a-inner,
.cta-banner p {
  text-wrap: pretty;
}

/* phones in landscape: shorter hero, no astronaut */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 14px 0 20px; }
  .hero-man,
  .hero-stars { display: none; }
}

/* very large screens: let the layout breathe */
@media (min-width: 1600px) {
  .container { max-width: 1240px; }
}
