:root {
  --cream: #f4f9fc;
  --cream-deep: #e6f4fc;
  --surface: #ffffff;
  --yellow: #0286e0;
  --yellow-deep: #015a9a;
  --ink: #111111;
  --ink-muted: #4a4a4a;
  --ink-soft: #6b6b6b;
  --line: rgba(17, 17, 17, 0.1);
  --danger: #c62828;
  --font: "Nunito", system-ui, sans-serif;
  --max: 44rem;
  --wide: 64rem;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font);
  background: var(--cream);
  line-height: 1.5;
  overflow-x: hidden;
  max-width: 100%;
}

a { color: var(--ink); }
a:hover { color: var(--ink-muted); }

html[dir="rtl"] .nav { justify-content: flex-start; }
html[dir="rtl"] .foot-links { justify-content: flex-end; }

/* Mobile: separate language row at top (flags). Desktop: hidden. */
.lang-bar-mobile {
  position: relative;
  z-index: 2;
  padding: 0.42rem clamp(0.85rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  max-width: 100%;
  overflow-x: hidden;
}
.lang-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
}
.lang-bar-inner button {
  background: none;
  border: none;
  font: inherit;
  font-size: clamp(0.84rem, 3.4vw, 1.02rem);
  line-height: 1;
  cursor: pointer;
  padding: 0.12rem 0.1rem;
  opacity: 0.5;
  filter: grayscale(0.15);
  transition: opacity 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}
.lang-bar-inner button:hover {
  opacity: 0.85;
  filter: none;
}
.lang-bar-inner button.active {
  opacity: 1;
  filter: none;
  transform: scale(1.12);
}
@media (min-width: 720px) {
  .lang-bar-mobile { display: none; }
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 85% -10%, rgba(2, 134, 224, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 45% at 0% 100%, rgba(2, 134, 224, 0.16), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, var(--cream) 45%, var(--cream-deep) 100%);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  position: relative;
  max-width: 100%;
  overflow: hidden;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  min-width: 0;
  flex-shrink: 1;
}
.mark-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mark img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
}
.lang-flags {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.14rem 0.34rem;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: min(52vw, 36rem);
  pointer-events: none;
}
.lang-flags button {
  pointer-events: auto;
  background: none;
  border: none;
  font: inherit;
  font-size: 1.26rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.14rem 0.12rem;
  opacity: 0.5;
  filter: grayscale(0.15);
  transition: opacity 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}
.lang-flags button:hover {
  opacity: 0.85;
  filter: none;
}
.lang-flags button.active {
  opacity: 1;
  filter: none;
  transform: scale(1.14);
}
@media (min-width: 720px) {
  .lang-flags {
    display: flex;
  }
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 700;
  justify-content: flex-end;
}
.nav a {
  text-decoration: none;
  color: var(--ink-muted);
}
.nav a:hover { color: var(--ink); }
/* Mobile: logo + Support; languages in .lang-bar-mobile above */
@media (max-width: 719px) {
  .nav .nav-desktop { display: none; }
}


.hero {
  padding: clamp(0.9rem, 2.8vw, 1.75rem) clamp(1.25rem, 4vw, 3rem) 2.25rem;
  width: 100%;
  max-width: min(var(--wide), 100%);
  margin-left: auto;
  margin-right: auto;
  display: grid;
  gap: 1.75rem;
  align-items: start;
  animation: rise 0.75s ease-out both;
}
.hero > div:first-child {
  min-width: 0;
  max-width: 34rem;
  width: 100%;
}
@media (min-width: 860px) {
  .hero {
    width: fit-content;
    grid-template-columns: minmax(0, 34rem) 22rem;
    gap: 2.5rem;
    align-items: center;
    min-height: 0;
  }
}

.brand {
  margin: 0 0 0 -3px;
  font-size: clamp(2.2325rem, 6.84vw, 5.13rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.hero h1 {
  margin: 0.7rem 0 0;
  font-size: clamp(0.945rem, 2.16vw, 1.485rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--yellow-deep);
  width: 100%;
  max-width: 34rem;
  white-space: nowrap;
}
[data-i18n-shrink] {
  white-space: nowrap;
  max-width: 100%;
  overflow: visible;
}
.lede {
  margin: 0.85rem 0 0;
  max-width: 34rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 600;
  overflow-wrap: break-word;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
/* Hero platform row: 2×2 on mobile, 4 equal columns on desktop */
.platform-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.65rem;
  width: 100%;
  max-width: 34rem;
  margin-top: 0.9rem;
}
@media (min-width: 720px) {
  .platform-downloads {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem 0.55rem;
    margin-top: 0.85rem;
  }
}
.platform-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}
.platform-cell .btn-platform {
  width: 100%;
}
.platform-caption {
  margin: 0;
  width: 100%;
  font-size: clamp(0.528rem, 1.14vw, 0.624rem);
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
  color: var(--ink-muted);
  letter-spacing: -0.015em;
  white-space: nowrap;
}
@media (max-width: 719px) {
  .platform-caption {
    font-size: clamp(0.576rem, 2.88vw, 0.696rem);
    line-height: 1.28;
  }
}
.platform-caption-plus {
  color: var(--ink);
  font-weight: 900;
  opacity: 0.55;
}
.platform-caption-free {
  display: inline;
  padding: 0.05rem 0.24rem;
  border-radius: 3px;
  background: rgba(2, 134, 224, 0.28);
  color: var(--ink);
  font-size: inherit;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.98rem;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--yellow);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
}
.btn-primary:hover { background: var(--yellow-deep); color: #ffffff; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}
.btn-platform {
  gap: 0.35rem;
  padding: 0.64rem 0.45rem;
  border-radius: 10px;
  color: #fff;
  font-size: clamp(0.72rem, 2.4vw, 0.86rem);
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.1);
  white-space: normal;
  text-align: center;
  min-width: 0;
  line-height: 1.15;
}
.btn-platform:hover { color: #fff; }
.btn-appstore.btn-platform:hover { color: #111; }
.btn-platform .platform-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  display: block;
}
.btn-android {
  background: #3ddc84;
}
.btn-android:hover { background: #32c974; }
.btn-appstore {
  background: linear-gradient(180deg, #d8d8dc 0%, #a8a8ad 100%);
  color: #1a1a1a;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-appstore:hover {
  background: linear-gradient(180deg, #cbcbcf 0%, #96969b 100%);
  color: #111;
}
.btn-windows {
  background: #0078d4;
}
.btn-windows:hover { background: #0066b8; }
.btn-mac {
  background: #111111;
}
.btn-mac:hover { background: #000000; }

.hero-visual {
  width: min(100%, 22rem);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.12);
  justify-self: center;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.strip {
  display: grid;
  gap: 1rem;
  max-width: var(--wide);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 2.5rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
  font-weight: 600;
  animation: rise 0.9s 0.1s ease-out both;
}
.strip p {
  margin: 0;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.strip strong { color: var(--yellow-deep); font-weight: 800; }
@media (min-width: 800px) {
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
}

.disclaimer {
  max-width: var(--wide);
  margin: 0 auto 2rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}
.disclaimer-box {
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1.5px solid rgba(17, 17, 17, 0.14);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.disclaimer-box strong { color: var(--ink); }

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 2rem) 3.5rem;
  animation: rise 0.55s ease-out both;
  overflow-wrap: anywhere;
}
.page h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.page .meta {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
}
.page h2 {
  margin: 1.85rem 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 800;
}
.page p, .page li {
  color: var(--ink-muted);
  font-weight: 600;
  line-height: 1.6;
}
.page ul { padding-left: 1.2rem; }
.page a { font-weight: 800; text-underline-offset: 2px; }

.foot {
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem) 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}
.foot a {
  color: var(--ink-muted);
  text-decoration: none;
}
.foot a:hover { color: var(--ink); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero, .strip, .page, .hero-visual { animation: none; }
}

/* Mobile/tablet: hero -50px upshift + larger brand */
@media (max-width: 900px) {
  main.hero {
    padding-top: calc(50px + clamp(0.9rem, 2.8vw, 1.75rem) - 50px) !important;
  }
  .brand {
    margin-left: -2px;
    font-size: clamp(2.7025rem, 8.28vw, 6.21rem);
  }
}

/* Desktop: push hero block down from header (mobile unchanged above) */
@media (min-width: 901px) {
  main.hero {
    padding-top: calc(clamp(0.9rem, 2.8vw, 1.75rem) + 50px) !important;
  }
}

/* Statcounter noscript fallback — keep invisible layout-wise */
.statcounter { position: absolute; width: 0; height: 0; overflow: hidden; }
