:root {
  --bg: #0b0b0e;
  --card: #14141a;
  --border: #24242c;
  --border-strong: #2e2e38;
  --text: #f1f1f3;
  --muted: #8a8a94;
  --dim: #5a5a64;
  --accent: #7c5cff;
  --accent-hover: #9479ff;
  --success: #22c55e;
  --success-hover: #16a34a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(124, 92, 255, 0.1), transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  overflow-x: hidden;
}

main {
  width: 100%;
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 1;
}


.hero {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-copy { text-align: left; }
.hero-shot {
  position: relative;
  overflow: visible;
}
.hero-shot img {
  width: 140%;
  max-width: none;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(124, 92, 255, 0.1);
}

.brand {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #fff 0%, #b8b8c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tag {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

#download-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px 36px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 14px;
  transition: background .15s, transform .1s, box-shadow .15s;
  font-family: inherit;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.25);
}
#download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
}
#download-btn > span[data-lang] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
#download-btn > span[data-lang][hidden] { display: none !important; }
#download-btn small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.trial {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
  list-style: none;
}
.feat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.feat-icon {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 2px;
  line-height: 1;
}
.feat strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.feat-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--dim);
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
footer a:hover { color: var(--text); }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.lang-switch { display: inline-flex; gap: 8px; align-items: center; font-size: 11px; }
.lang-switch a {
  color: var(--dim);
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  transition: color .15s, background .15s;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { color: var(--text); background: var(--card); }
.lang-switch .sep { color: var(--dim); }

/* Buttons in CTA row contain language-scoped <span> blocks with a nested <small>.
   When the outer span is hidden via i18n [hidden], the whole block disappears.
   Each visible span must lay out like the original structure. */
.cta-row > * > span[data-lang] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.cta-row > * > span[data-lang][hidden] { display: none !important; }
.cta-row > * > span[data-lang] > small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
}

/* ----- Buy overlay (shown when ?machine=<id> is present) ----- */
.buy-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.buy-overlay[hidden] { display: none; }
.buy-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.buy-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-card, #1d1d24), var(--card));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 30px 24px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.buy-card .brand { margin: 0 0 18px; }
.buy-card h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}
.buy-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 auto 20px;
  max-width: 320px;
}
.buy-price {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.buy-price span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0;
}
#buy-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
#buy-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.buy-foot {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}
.buy-foot a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.buy-foot a:hover { color: var(--text); }
body.buy-open { overflow: hidden; }

/* ----- Legal pages ----- */
main.legal {
  max-width: 680px;
  gap: 20px;
  padding-top: 8px;
  align-items: stretch;
  text-align: left;
}
main.legal .back {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
main.legal .back:hover { color: var(--text); }
main.legal h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
main.legal h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text);
}
main.legal section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
main.legal p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}
main.legal p:last-child { margin-bottom: 0; }
main.legal p.muted.small { margin-bottom: 0; }
main.legal ul, main.legal ol {
  margin: 6px 0 6px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
main.legal li { margin-bottom: 4px; }
main.legal strong { color: var(--text); font-weight: 600; }
main.legal a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--dim);
  text-underline-offset: 2px;
  transition: text-decoration-color .15s;
}
main.legal a:hover { text-decoration-color: var(--accent); }
main.legal footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--dim);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
main.legal footer a { color: var(--muted); text-decoration: none; }
main.legal footer a:hover { color: var(--text); }

/* ----- Recover page ----- */
main.recover { max-width: 460px; align-items: stretch; }
.recover-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.back {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 4px;
  transition: color .15s;
}
.back:hover { color: var(--text); }
.recover-card h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.recover-card .tag {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 6px;
  max-width: none;
  line-height: 1.5;
}
.recover-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.recover-form input[type=email] {
  flex: 1;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.recover-form input[type=email]::placeholder { color: var(--dim); }
.recover-form input[type=email]:focus { border-color: var(--accent); }
.recover-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.recover-form button:hover:not(:disabled) { background: var(--accent-hover); }
.recover-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.rec-msg {
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
  line-height: 1.45;
}
.rec-msg.ok { color: var(--success); }
.rec-msg.err { color: #f87171; }

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .hero-copy { text-align: center; }
  .hero-shot img { width: 100%; }
}
@media (max-width: 520px) {
  body { padding: 20px 16px; }
  main { gap: 24px; }
  #download-btn { width: 100%; padding: 14px 20px; }
  .feats { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 8px; text-align: center; }
  .recover-card { padding: 22px 20px 18px; }
  .recover-form { flex-direction: column; }
  .recover-form button { width: 100%; }
}
