:root {
  --bg: #050508;
  --text: #f4f6fb;
  --muted: rgba(244, 246, 251, 0.68);
  --cyan: #33c7f2;
  --purple: #8f45fa;
  --glass: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.1);
  /* Rounded sans — closer to the app’s SF Rounded look */
  --display: "Nunito", "Sora", system-ui, sans-serif;
  --sans: "Sora", "Nunito", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

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

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(143, 69, 250, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(51, 199, 242, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 80%, rgba(143, 69, 250, 0.14), transparent 45%),
    #050508;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-purple {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  background: var(--purple);
  top: -8%;
  left: -10%;
}

.orb-cyan {
  width: min(42vw, 360px);
  height: min(42vw, 360px);
  background: var(--cyan);
  right: -8%;
  top: 28%;
  animation-delay: -4s;
  opacity: 0.35;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, 36px, 0) scale(1.08); }
}

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand img {
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(51, 199, 242, 0.18);
}

nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  color: var(--text) !important;
}

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

.lang-wrap {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 0.15rem;
}

#lang-select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 9.5rem;
  padding: 0.45rem 1.75rem 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a7e6ff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 0.65rem center / 10px,
    rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

#lang-select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

html[dir="rtl"] #lang-select {
  padding: 0.45rem 0.7rem 0.45rem 1.75rem;
  background-position: left 0.65rem center;
}

html[dir="rtl"] .strip p:first-child {
  border-radius: 0 18px 18px 0;
}

html[dir="rtl"] .strip p:last-child {
  border-radius: 18px 0 0 18px;
}

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  text-align: center;
}

.hero-brand {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(2.35rem, 6.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  background: linear-gradient(120deg, #fff 10%, var(--cyan) 45%, var(--purple) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.9s ease both;
}

.hero h1 {
  margin: 0 auto 1rem;
  max-width: 18ch;
  font-family: var(--display);
  font-size: clamp(1.45rem, 3.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: rgba(255, 255, 255, 0.92);
  animation: rise 0.9s ease 0.08s both;
}

.hero-lead {
  margin: 0 auto 1.75rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
  animation: rise 0.9s ease 0.16s both;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: rise 0.9s ease 0.24s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #041018;
  background: linear-gradient(120deg, var(--cyan), #7ad7ff 40%, #b08cff);
  box-shadow:
    0 10px 40px rgba(51, 199, 242, 0.28),
    0 4px 18px rgba(143, 69, 250, 0.22);
}

.hero-note {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(244, 246, 251, 0.45);
}

.hero-stage {
  position: relative;
  margin: 3.5rem auto 0;
  /* Wide enough that long labels (Перевести, Übersetzen) clear the glass */
  width: min(100%, 520px);
  min-height: 400px;
  display: grid;
  place-items: center;
  overflow: visible;
  animation: rise 1s ease 0.32s both;
}

.word-cloud {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.wc {
  position: absolute;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(0.78rem, 2vw, 0.92rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(167, 230, 255, 0.78);
  white-space: nowrap;
  animation: pulse-word 5s ease-in-out infinite;
}

.wc.gold {
  color: #f0d060;
}

/* Orbit ring — sit in the margin outside the glass, never on its edge */
.wc-n  { top: 0.5rem; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.wc-ne { top: 18%; right: 1.1rem; animation-delay: 0.2s; }
.wc-e  { top: 50%; right: 0.35rem; transform: translateY(-50%); animation-delay: 0.4s; }
.wc-se { bottom: 18%; right: 1.25rem; animation-delay: 0.6s; }
.wc-s  { bottom: 0.5rem; left: 50%; transform: translateX(-50%); animation-delay: 0.8s; }
.wc-sw { bottom: 18%; left: 1.25rem; animation-delay: 1s; }
.wc-w  { top: 50%; left: 0.35rem; transform: translateY(-50%); animation-delay: 1.2s; }
.wc-nw { top: 18%; left: 1.1rem; animation-delay: 1.4s; }

@keyframes pulse-word {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hero-phone {
  position: relative;
  z-index: 1;
  width: min(72%, 236px);
  padding: 1.65rem 1.25rem 1.45rem;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--stroke);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.hero-phone img {
  display: block;
  margin: 0 auto 1rem;
  border-radius: 26px;
}

.hero-phone p {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #fff;
}

.hero-phone strong {
  color: var(--cyan);
  font-weight: 800;
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 1120px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.strip p {
  margin: 0;
  padding: 1.25rem 1rem;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 0.95rem;
}

.strip strong {
  color: var(--text);
  font-weight: 600;
}

.strip p:first-child {
  border-radius: 18px 0 0 18px;
}

.strip p:last-child {
  border-radius: 0 18px 18px 0;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cards article {
  padding: 1.4rem 1.35rem;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--stroke);
}

.cards h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cyan);
}

.cards p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-split {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
  color: var(--muted);
}

.checklist li {
  padding-left: 1.5rem;
  position: relative;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
}

.callout {
  padding: 1.5rem;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(143, 69, 250, 0.22), rgba(51, 199, 242, 0.08));
  border: 1px solid rgba(176, 140, 255, 0.28);
}

.callout-label {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
}

.callout p:last-child {
  margin: 0;
  color: var(--muted);
}

.cta-band {
  text-align: center;
  padding-bottom: 5rem;
}

.cta-band .section-lead {
  margin-left: auto;
  margin-right: auto;
}

.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--stroke);
  display: grid;
  gap: 1.25rem;
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.footer-brand img {
  border-radius: 9px;
}

.footer-brand p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.footer-copy {
  margin: 0;
  color: rgba(244, 246, 251, 0.35);
  font-size: 0.82rem;
}

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.legal-page h1 {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.legal-page .meta {
  color: var(--muted);
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
}

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

@media (max-width: 820px) {
  .strip {
    grid-template-columns: 1fr;
  }

  .strip p:first-child,
  .strip p:last-child {
    border-radius: 16px;
  }

  .cards,
  .section-split {
    grid-template-columns: 1fr;
  }

  nav a:not(.nav-cta) {
    display: none;
  }

  .hero-stage {
    width: min(100%, 360px);
    min-height: 340px;
  }

  .hero-phone {
    width: min(68%, 200px);
  }

  .wc {
    font-size: 0.72rem;
  }

  .wc-ne { right: 0.35rem; }
  .wc-e  { right: 0.1rem; }
  .wc-se { right: 0.45rem; }
  .wc-sw { left: 0.45rem; }
  .wc-w  { left: 0.1rem; }
  .wc-nw { left: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
