:root {
  --green: #2f9e44;
  --green-dark: #248236;
  --bg: #ffffff;
  --text: #1a1f1a;
  --text-muted: #5a665a;
  --border: #e5ebe5;
  --card: #f6faf6;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 920px; margin: 0 auto; padding: 0 24px; }

header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}

.logo img { width: 28px; height: 28px; border-radius: 6px; }

nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }

nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

.lang-switch { position: relative; }

.lang-switch summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: all 0.15s;
  background: #fff;
}

.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::marker { content: ""; }

.lang-switch summary:hover { border-color: var(--green); color: var(--green); }
.lang-switch[open] summary { border-color: var(--green); color: var(--green); }

.lang-switch .caret { font-size: 9px; line-height: 1; transition: transform 0.2s; }
.lang-switch[open] .caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.04);
  list-style: none;
  min-width: 190px;
  z-index: 30;
  margin: 0;
  animation: lang-fade-in 0.14s ease-out;
}

@keyframes lang-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-menu li { margin: 0; padding: 0; }

.lang-menu li a,
.lang-menu li.lang-soon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.lang-menu .lang-flag {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.lang-menu li a:hover { background: var(--card); color: var(--green); }
.lang-menu li a.active { background: var(--card); color: var(--green); font-weight: 600; }

.lang-menu li.lang-soon { color: var(--text-muted); cursor: not-allowed; opacity: 0.6; }
.lang-menu li.lang-soon::after {
  content: "soon";
  font-size: 10px;
  font-weight: 600;
  margin-left: auto;
  padding: 2px 8px;
  background: var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.install-switch { position: relative; display: inline-flex; }

.install-switch summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  color: var(--text-muted);
  user-select: none;
  transition: color 0.15s;
}

.install-switch summary::-webkit-details-marker { display: none; }
.install-switch summary::marker { content: ""; }

.install-switch summary:hover { color: var(--green); }
.install-switch[open] summary { color: var(--green); }

.install-switch .caret { font-size: 9px; line-height: 1; transition: transform 0.2s; }
.install-switch[open] .caret { transform: rotate(180deg); }

.install-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.04);
  list-style: none;
  min-width: 200px;
  z-index: 30;
  margin: 0;
  animation: lang-fade-in 0.14s ease-out;
}

.install-menu li { margin: 0; padding: 0; }

.install-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.install-menu li a:hover { background: var(--card); color: var(--green); }
.install-menu li a.active { background: var(--card); color: var(--green); font-weight: 600; }

.install-menu .install-os {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

/* Hard-collapse the menus when their <details> is closed. Current Chrome still
   lays out an absolutely-positioned child of a closed <details> (it's invisible
   but keeps its box), so the 190px menu would silently widen the page off the
   right edge. display:none removes the box entirely. */
.lang-switch:not([open]) .lang-menu,
.install-switch:not([open]) .install-menu { display: none; }

.hero {
  padding: 8px 0 8px;
  text-align: center;
}

.hero-image {
  margin: 0 0 12px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(26,31,26,0.12);
  display: block;
}

.hero-slider {
  position: relative;
}

.hero-slides {
  display: grid;
  position: relative;
}

/* "AI-generated" disclosure badge, pinned to the corner of the hero image. */
.hero-ai-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #fff;
  background: rgba(20, 22, 20, 0.6);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.hero-slide {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(26,31,26,0.12);
  opacity: 0;
  transition: opacity 600ms ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(26,31,26,0.22);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.hero-dot:hover {
  background: rgba(26,31,26,0.4);
}

.hero-dot.is-active {
  background: var(--text-strong, #1a1f1a);
  transform: scale(1.2);
}

.hero-text {
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}

.logo-slogan {
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  margin-left: -4px;
  white-space: nowrap;
}

.tagline {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 18px;
}

.hero-eyebrow {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 auto 12px;
}

.hero-captions {
  position: relative;
  min-height: 28px;
  text-align: center;
  margin-top: 10px;
}

.hero-caption {
  position: absolute;
  inset: 0;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transition: opacity .35s ease;
}

.hero-caption.is-active {
  opacity: 1;
}

.description {
  max-width: 660px;
  margin: 0 auto;
  color: var(--text);
  font-size: 16px;
}

.description p + p { margin-top: 14px; }

.downloads {
  padding: 0 0 8px;
}

.downloads h2 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.dl-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  max-width: 640px;
  margin: 0 auto 16px;
}

.dl-warning {
  max-width: 640px;
  margin: 0 auto 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--green);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.dl-warning strong { color: var(--text); }

.dl-step {
  margin-bottom: 32px;
}

.dl-step-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.dl-step-num { display: none; }

.dl-step-head h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text);
}

.dl-step-head p {
  font-size: 14px;
  color: var(--text-muted);
}

.dl-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dl-buttons:has(.dl-stack) { gap: 80px; }

.dl-buttons > .dl-card {
  max-width: 240px;
  justify-self: center;
  width: 100%;
}

.dl-buttons > .dl-card:first-child { justify-self: end; }
.dl-buttons > .dl-card:last-child  { justify-self: start; }

.dl-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dl-stack .dl-card { padding: 8px 14px; gap: 4px; }
.dl-stack .dl-card-icon { width: 22px; height: 22px; }
.dl-stack .dl-card-title { font-size: 14px; }

.dl-buttons .dl-stack:first-child  { justify-self: end; }
.dl-buttons .dl-stack:last-child   { justify-self: start; }

.dl-stack .dl-card {
  width: 260px;
  max-width: 100%;
}

.dl-stack .qr-code {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dl-stack .screenshot-phone {
  margin: 0;
  height: 540px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  transition: filter .25s ease;
}

/* iOS phone with real localized day/night screenshots:
   day shows by default, the night screenshot fades in for the dark theme. */
.phone-themed {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.phone-themed .phone-night {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity .25s ease;
}

/* Tap toggles .is-night (phone-theme.js): tap → dark, tap again → light.
   This is the only mechanism on touch devices. */
.phone-themed,
.dl-stack > .screenshot-phone { cursor: pointer; }
.phone-themed.is-night .phone-night { opacity: 1; }
.dl-stack > .screenshot-phone.is-night {
  filter: invert(0.86) hue-rotate(180deg) brightness(1.08) saturate(1.12);
}

/* Desktop only. Gated behind (hover: hover) so iOS "sticky hover" doesn't fight
   the tap toggle and leave the phone stuck on one theme. */
@media (hover: hover) {
  .dl-stack .screenshot-phone:hover {
    /* Soft iOS-style dark mode: lighter than pure black, vivid accents */
    filter: invert(0.86) hue-rotate(180deg) brightness(1.08) saturate(1.12);
  }
  .phone-themed:hover .phone-night { opacity: 1; }
  /* themed phones use the real night image — not the CSS dark-mode filter */
  .phone-themed .screenshot-phone:hover { filter: none; }
}

.dl-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 26px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}

.dl-card:hover:not(.btn-disabled) {
  border-color: var(--green);
  background: rgba(47,158,68,0.10);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47,158,68,0.12);
}

.dl-card-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.dl-card-icon svg { width: 100%; height: 100%; display: block; }

.dl-card-title { font-size: 16px; font-weight: 700; }
.dl-card-meta { font-size: 12px; color: var(--text-muted); }
.dl-card-version {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  background: rgba(47,158,68,0.12);
  border: 1px solid rgba(47,158,68,0.35);
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.dl-card-version:empty { display: none; }

.dl-card.btn-disabled {
  position: relative;
  pointer-events: none;
  cursor: default;
}
.dl-card.btn-disabled .dl-card-icon,
.dl-card.btn-disabled .dl-card-title,
.dl-card.btn-disabled .dl-card-meta {
  opacity: 0.35;
}
.dl-card-soon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-6deg);
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  white-space: nowrap;
  z-index: 2;
}

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.price-card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 12px 32px rgba(47,158,68,0.12);
}

.price-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.price-card .tier-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.price-card .price {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.price-card .price-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.price-card ul {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
  flex-grow: 1;
}

.price-card li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: 14px;
  color: var(--text);
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.price-card li.dim {
  color: var(--text-muted);
}

.price-card li.dim::before {
  content: "—";
  color: var(--text-muted);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.btn:hover:not(.btn-disabled) {
  border-color: var(--green);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(47,158,68,0.12);
}

.btn-primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.btn-primary:hover:not(.btn-disabled) {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: white;
}

.btn-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-disabled .badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  background: var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  margin-left: 6px;
}

/* "Coming soon..." stamp overlay — works on any element with this class */
.coming-soon-overlay {
  position: relative;
}
/* "Coming soon..." stamp overlay — works on any element with this class */
.coming-soon-overlay::before {
  content: "Coming soon…";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  padding: 10px 28px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  border-radius: 8px;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  text-align: center;
}
/* For the price element — stretch the stamp at least as wide as the price */
.price.coming-soon-overlay::before {
  min-width: 110%;
  font-size: 16px;
  padding: 7px 14px;
}
/* For dl-stack (phone image + store button) — pin the stamp to the bottom of the phone */
.dl-stack.coming-soon-overlay::before {
  top: auto;
  bottom: 80px;
  transform: translate(-50%, 0) rotate(-8deg);
}

/* Disabled link placeholder — looks like a soft, italic "under construction" tag */
.link-disabled {
  display: inline-block;
  padding: 2px 10px;
  background: var(--border, #e5e7eb);
  color: var(--text-muted, #6b7280);
  border-radius: 4px;
  font-size: 0.9em;
  font-style: italic;
  cursor: not-allowed;
  user-select: none;
}

.btn .icon { font-size: 20px; }

.note {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.note a { color: var(--green); }

footer {
  border-top: 1px solid var(--border);
  padding: 14px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

footer .footer-links {
  margin: 0 0 10px 0;
  font-size: 15px;
}

footer .footer-links a {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

footer .footer-links a:hover { text-decoration: underline; }

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

footer p a:hover { text-decoration: underline; }

.screenshot {
  display: block;
  margin: 24px auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(26,31,26,0.14);
}

.screenshot-phone {
  max-width: 260px;
  border-radius: 28px;
  background: #000;
  padding: 4px;
}

.screenshot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin: 24px 0;
}

.screenshot-row .screenshot {
  margin: 0;
}

.screenshot-window {
  max-width: 560px;
  border: 1px solid var(--border);
  background: #fff;
}

.screenshot-caption {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: -12px 0 24px;
  font-style: italic;
}

.page {
  padding: 56px 0 80px;
  max-width: 720px;
  margin: 0 auto;
}

.page h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.page h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 12px;
}

.page p { margin-bottom: 14px; }

.page ol, .page ul { margin: 12px 0 18px 24px; }

.page li { margin-bottom: 8px; }

.page code {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.callout {
  background: var(--card);
  border-left: 3px solid var(--green);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 18px 0;
  font-size: 15px;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .tagline { font-size: 17px; }
  .dl-buttons { grid-template-columns: 1fr; }
  .dl-stack .screenshot-phone { height: auto; width: 100%; }
  .price-grid { grid-template-columns: 1fr; }

  /* Stack the header: logo on top, nav centered below. A single row can't
     hold logo + all nav links on narrow phones (esp. longer locales like RU),
     so we go vertical and let the nav wrap instead of overflowing. */
  header .container { flex-direction: column; gap: 12px; }
  nav { flex-wrap: wrap; justify-content: center; gap: 12px 18px; font-size: 14px; }

  /* keep the compact logo (slogan eats width we don't have) */
  .logo-slogan { display: none; }

  /* Dropdowns stay absolute (a closed <details> keeps them collapsed, so they
     never affect layout/width). Anchor the open menu to the centered nav
     itself — not the off-centre toggle — so it always opens centered on screen
     and can't run off either edge, whichever toggle was tapped. */
  nav { position: relative; }
  .lang-switch, .install-switch { position: static; }
  .lang-menu, .install-menu {
    left: 50%;
    right: auto;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 8px;
    max-width: calc(100vw - 20px);
  }

  /* Center download cards/screenshots in the single column. The 2-up layout
     nudges first/last items toward the middle gutter via justify-self
     end/start — in one column that pins them to the right/left edges. */
  .dl-buttons > .dl-card:first-child,
  .dl-buttons > .dl-card:last-child,
  .dl-buttons .dl-stack:first-child,
  .dl-buttons .dl-stack:last-child { justify-self: center; }

  /* tame oversized headings on narrow screens */
  .downloads h2 { font-size: 23px; }
  .page h1 { font-size: 26px; }

  /* keep the "Coming soon…" stamp from overflowing narrow price cards */
  .price.coming-soon-overlay::before { min-width: auto; }
}
