/* Mewsage landing. Colours and shapes come from app/Sources/Mewsage/Theme.swift:
   cream fur, the pink bag, the thick dark outline, rounded everything. Always light. */
:root {
  --ink: #3b2924;
  --ink-soft: rgba(59, 41, 36, .62);
  --cream: #fff4ea;
  --paper: #fffdf9;
  --pink: #f69eb9;
  --blush: #ffe0e8;
  --sky: #c7e6f0;
  --mint: #8fd4a6;
  --line: 2px;
  --r: 18px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* system fonts only: nothing loads from abroad */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 600 16px/1.45 var(--font);
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.12; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- shared pieces ---------- */
.card {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 0 4px 0 var(--ink);
}
.tag {
  display: inline-block;
  background: var(--cream);
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--ink);
  padding: 4px 12px 5px;
  font-weight: 900;
  font-size: 18px;
}
.tag-sm { font-size: 13px; padding: 2px 9px 3px; border-radius: 9px; box-shadow: 0 2px 0 var(--ink); }
.btn {
  display: block;
  width: 100%;
  text-align: center;
  border: var(--line) solid var(--ink);
  border-radius: 99px;
  background: var(--pink);
  box-shadow: 0 4px 0 var(--ink);
  padding: 14px 20px;
  font-weight: 900;
  font-size: 18px;
  transition: transform .06s, box-shadow .06s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
a.btn { text-decoration: none; text-align: center; }
.btn-big { font-size: 19px; padding: 16px 20px; }
.btn-alt { background: var(--paper); font-size: 17px; margin-top: 12px; }
.quiet {
  background: none; border: 0; padding: 6px 4px;
  color: var(--ink-soft); font-weight: 800; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px;
}
.field {
  width: 100%;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  padding: 13px 14px;
  font: 700 17px var(--font);
  color: var(--ink);
  outline: none;
}
.field:focus { box-shadow: 0 0 0 4px var(--blush); }
.sub { color: var(--ink-soft); font-size: 15px; }
.center { text-align: center; }
.small { font-size: 12px; margin-top: 10px; }


/* ---------- sprites: one horizontal strip per animation, stepped by CSS ---------- */
.sprite {
  --n: 1; --fps: 12;
  width: var(--w); height: var(--h);
  background-repeat: no-repeat;
  background-size: calc(var(--w) * var(--n)) 100%;
  flex: none;
}
.sprite.anim { animation: play calc(var(--n) / var(--fps) * 1s) steps(var(--n)) infinite; }
@keyframes play { to { background-position-x: calc(var(--w) * var(--n) * -1); } }
.cat     { --w: 104px; --h: 104px; }
.cat-sm  { --w: 56px;  --h: 56px; }
.bed     { --w: 124px; --h: 114px; }
.bed-sm  { --w: 78px;  --h: 72px; }
.center-sprite { margin: 0 auto 6px; }

/* ---------- header + hero ---------- */
.top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 0;
  background: var(--sky);
}
.hero {
  background: var(--sky);
  border-bottom: var(--line) solid var(--ink);
  border-radius: 0 0 32px 32px;
  padding: 18px 16px 26px;
  display: grid;
  grid-template-areas: "title" "mac" "lead" "cta";
  gap: 16px;
}
.hero h1 { grid-area: title; font-size: clamp(34px, 10vw, 60px); }
.lead { grid-area: lead; font-size: 17px; font-weight: 700; }
.cta { grid-area: cta; display: grid; gap: 8px; justify-items: center; text-align: center; }
.platforms { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.platforms .tag { color: var(--ink); text-decoration: none; }
.platforms .tag:active { transform: translateY(2px); box-shadow: none; }
.under { font-size: 14px; font-weight: 800; margin-top: 4px; }
.fine { font-size: 12.5px; color: var(--ink-soft); }

/* the MacBook */
.mac { grid-area: mac; width: 100%; max-width: 560px; justify-self: center; }
.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 7px solid var(--ink);
  border-radius: 16px 16px 4px 4px;
  overflow: hidden;
  transition: background .4s;
}
.mac-base {
  height: 12px; margin: 0 -6%;
  background: #d9d2cc;
  border: var(--line) solid var(--ink);
  border-radius: 2px 2px 14px 14px;
  position: relative;
}
.mac-base::after {
  content: ""; position: absolute; left: 50%; top: -2px; transform: translateX(-50%);
  width: 18%; height: 5px; background: #bfb6af; border-radius: 0 0 6px 6px;
}
.menubar {
  position: absolute; inset: 0 0 auto; height: 7%;
  background: rgba(255, 253, 249, .55);
  display: flex; justify-content: space-between; align-items: center; padding: 0 3%;
  font-size: clamp(7px, 1.6vw, 10px); font-weight: 900;
}
.menubar span:first-child { width: 8%; height: 40%; background: var(--ink); border-radius: 3px; opacity: .7; }
.win {
  position: absolute; left: 10%; top: 27%; width: 50%; height: 52%;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px;
  box-shadow: 0 3px 0 rgba(59, 41, 36, .35);
}
.win-bar { display: flex; gap: 4px; padding: 5px 6px; border-bottom: 1px solid rgba(59, 41, 36, .15); }
.win-bar i { width: 7px; height: 7px; border-radius: 50%; background: #f2a1a1; border: 1px solid var(--ink); }
.win-bar i:nth-child(2) { background: #f5d48c; }
.win-bar i:nth-child(3) { background: var(--mint); }
.win-lines { padding: 8% 8%; display: grid; gap: 7%; height: 75%; align-content: start; }
.win-lines b { height: 5px; border-radius: 3px; background: rgba(59, 41, 36, .16); }
.win-lines b.short { width: 60%; }
.on-win { position: absolute; right: 10%; bottom: 100%; margin-bottom: -6px; --w: clamp(42px, 13vw, 76px); --h: var(--w); }
.bed-spot { position: absolute; right: 4%; bottom: 13%; display: grid; justify-items: center; gap: 2px; }
.bed-sm { --w: clamp(64px, 20vw, 120px); --h: calc(var(--w) * .917); }
.bed-chip {
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 99px;
  font-size: clamp(9px, 2.4vw, 12px); font-weight: 900; padding: 0 8px; white-space: nowrap;
}
.dock {
  position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%);
  display: flex; gap: 5px; padding: 4px 6px;
  background: rgba(255, 253, 249, .55); border-radius: 9px;
}
.dock i { width: clamp(10px, 3vw, 18px); aspect-ratio: 1; border-radius: 4px; background: var(--paper); border: 1px solid rgba(59, 41, 36, .4); }
.dock i:nth-child(2) { background: var(--pink); }
.dock i:nth-child(4) { background: var(--mint); }

/* ---------- the hero MacBook's wallpaper ---------- */
.wall[data-wall="pink"]     { background: radial-gradient(circle at 20% 30%, #fff3 0 8%, transparent 9%), radial-gradient(circle at 75% 70%, #fff3 0 12%, transparent 13%), linear-gradient(160deg, #ffd9e6, #f6a7c3); }

/* ---------- sections ---------- */
.block { padding: 40px 16px 0; max-width: 980px; margin: 0 auto; }
.block h2 { font-size: clamp(27px, 7.4vw, 40px); margin-bottom: 8px; }
.block > .sub { margin-bottom: 18px; }
.block > h2 + .skills, .block > h2 + .card, .block > h2 + .faq { margin-top: 16px; }


.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* the sprite row is as tall as the tallest sprite (the bed), sprites sit on its bottom: every title starts on one line */
.skill { padding: 12px 12px 14px; display: grid; grid-template-rows: 114px auto; justify-items: center; text-align: center; gap: 6px; align-content: start; }
.skill .sprite { margin-bottom: 2px; align-self: end; }
.skill h3 { font-size: 16px; }

.cert {
  width: 220px; aspect-ratio: 9 / 16;
  background: radial-gradient(circle at 50% 36%, #fff 0 34%, transparent 35%), var(--blush);
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--ink);
  display: grid; justify-items: center; align-content: center; gap: 6px;
  padding: 16px; text-align: center;
  transform: rotate(-2deg);
}
.cert-top { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: var(--ink-soft); }
.cert-cat { --w: 130px; --h: 130px; }
.cert-name { font-size: 34px; font-weight: 900; line-height: 1; word-break: break-word; }
.cert-text { font-size: 14px; font-weight: 800; }
.cert-date { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }

#price h2 { text-align: center; }
.price { padding: 18px 16px 18px; max-width: 460px; margin: 0 auto; }
.price-head { display: flex; align-items: center; gap: 10px; }
.price-num { font-size: 44px; font-weight: 900; line-height: 1; }
.price-sub { color: var(--ink-soft); font-weight: 800; }
.ticks { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; }
.ticks li::before { content: "♥"; color: var(--pink); margin-right: 8px; -webkit-text-stroke: 1px var(--ink); }
.price-buy { display: grid; gap: 10px; }
.price-buy .fine { text-align: center; }
/* for those who already have a code: its own button, set apart from buying */
.have-code { display: grid; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: var(--line) dashed var(--ink-soft); text-align: center; font-weight: 800; color: var(--ink-soft); }
.have-code .btn { color: var(--ink); }
.price-buy .btn-alt { margin-top: 0; }
.price .under { text-align: center; color: var(--ink-soft); font-weight: 700; font-size: 13px; }



.faq { display: grid; gap: 10px; }
.faq details { padding: 0; box-shadow: 0 3px 0 var(--ink); }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 900; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 16px 14px; color: var(--ink-soft); font-size: 15px; }
.support { margin-top: 18px; max-width: 320px; }

.foot { margin: 48px 0 0; padding: 26px 16px; text-align: center; font-size: 13px; color: var(--ink-soft); display: grid; gap: 6px; justify-items: center; }


/* ---------- checkout sheet ---------- */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 480px; max-height: 92dvh;
  background: transparent; color: var(--ink); overflow: visible;
}
.sheet::backdrop { background: rgba(59, 41, 36, .45); }
.sheet-in {
  position: relative;
  background: var(--cream);
  border: var(--line) solid var(--ink); border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  max-height: 92dvh; overflow-y: auto;
}
.sheet h3 { font-size: 26px; margin-bottom: 14px; text-align: center; }
.sheet section { display: none; }
.sheet-in[data-step="name"] [data-pane="name"],
.sheet-in[data-step="done"] [data-pane="done"],
.sheet-in[data-step="gift"] [data-pane="gift"],
.sheet-in[data-step="wait"] [data-pane="wait"],
.sheet-in[data-step="fail"] [data-pane="fail"],
.sheet-in[data-step="codes"] [data-pane="codes"],
.sheet-in[data-step="mac"] [data-pane="mac"] { display: grid; gap: 10px; }
.x {
  position: absolute; right: 12px; top: 10px; width: 34px; height: 34px;
  border: var(--line) solid var(--ink); border-radius: 50%; background: var(--paper);
  font-size: 20px; font-weight: 900; line-height: 1;
}
.lbl { font-size: 14px; font-weight: 900; margin-top: 4px; }
.sheet .fine { text-align: center; }
.code-card {
  display: grid; justify-items: center; gap: 2px;
  background: var(--paper); border: var(--line) dashed var(--ink); border-radius: 16px; padding: 10px 12px 6px;
}
.code { font-size: 26px; font-weight: 900; letter-spacing: .06em; font-variant-numeric: tabular-nums; user-select: all; }
.cert-mini { width: 170px; justify-self: center; margin-bottom: 8px; }
.cert-mini .cert-cat { --w: 96px; --h: 96px; }
.cert-mini .cert-name { font-size: 26px; }

/* ---------- desktop ---------- */
@media (min-width: 860px) {
  .top { padding: 22px 40px 0; }
  .hero {
    grid-template-areas: "title mac" "lead mac" "cta mac";
    grid-template-columns: 1fr 1.15fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 48px; row-gap: 18px;
    padding: 36px 40px 56px;
  }
  .hero h1 { align-self: end; }
  .cta { justify-items: start; text-align: left; align-content: start; max-width: 380px; }
  .mac { align-self: center; }
  .on-win { --w: 76px; }
  .bed-sm { --w: 120px; }
  .skills { grid-template-columns: repeat(4, 1fr); }
  /* the price card spreads out: price and what you get on the left, buying on the right */
  .price { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 28px 32px; }
  .price .ticks { margin-bottom: 0; }
  .sheet { margin: auto; }
  .sheet-in { border-radius: 26px; border-bottom: var(--line) solid var(--ink); }
}

/* ---------- legal pages: the offer, privacy, contacts ---------- */
.doc-top { background: var(--sky); border-bottom: var(--line) solid var(--ink); padding: 14px 16px; }
.doc-top a { text-decoration: none; }
.doc { max-width: 760px; margin: 0 auto; padding: 28px 16px 0; }
.doc h1 { font-size: clamp(28px, 7vw, 40px); margin-bottom: 6px; }
.doc .meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }
.doc h2 { font-size: 21px; margin: 28px 0 10px; }
.doc p, .doc li { font-weight: 600; font-size: 15.5px; line-height: 1.6; }
.doc p + p { margin-top: 10px; }
.doc ol, .doc ul { padding-left: 22px; margin: 8px 0; }
.doc li + li { margin-top: 6px; }
.doc .card { padding: 16px; margin: 14px 0; box-shadow: 0 3px 0 var(--ink); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc td { padding: 8px 4px; border-bottom: 1px solid rgba(59, 41, 36, .15); vertical-align: top; }
.doc td:first-child { color: var(--ink-soft); width: 42%; padding-right: 12px; }
.doc .toc a { font-weight: 800; }
.foot nav a { margin: 0 4px; }


.err { color: #b3261e; font-size: 14px; font-weight: 800; text-align: center; }
.my-codes { margin-left: auto; }
.code-list { display: grid; gap: 10px; }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; text-align: left; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 14px; }
.code-row b { display: block; font-size: 16px; }
.code-row span { font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.cert-gift { background: radial-gradient(circle at 50% 30%, #fff 0 30%, transparent 31%), var(--sky); }
.cert-mini.cert-gift { width: 210px; }
.cert-gift .cert-name { font-size: 22px; }
.cert-code { white-space: nowrap; font-size: 17px; font-weight: 900; letter-spacing: .05em; background: var(--paper); border: 1.5px dashed var(--ink); border-radius: 10px; padding: 3px 8px; user-select: all; }
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  background: var(--ink); color: var(--cream); border-radius: 14px; padding: 10px 14px; font-size: 14px; font-weight: 800; text-align: center;
}

/* the notice about cookie and Яндекс Метрика (app.js) */
.cookies {
  position: fixed; z-index: 50; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px;
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r); box-shadow: 0 4px 0 var(--ink);
  font-size: 13px; line-height: 1.35;
}
.cookies[hidden] { display: none; }
.cookies .btn { width: auto; flex: none; padding: 6px 16px; font-size: 14px; }

/* ---------- 404 ---------- */
.lost { display: grid; justify-items: center; text-align: center; gap: 14px; padding-top: 40px; }
.lost img { width: 160px; height: 160px; }
.lost .btn { max-width: 320px; }

/* the email for the receipt, above the buy buttons */
.email-field { text-align: center; }

/* before ЮKassa: <html class="soon"> hides everything about buying and shows a disabled "Скоро в продаже" */
.soon .for-sale, :root:not(.soon) .soon-only { display: none; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- the install guide for Windows (/windows) ----------
   The Windows windows are drawn here in CSS, close to the real ones,
   so the steps read at a glance; the pink ring marks what to press. */
.guide { max-width: 720px; margin: 0 auto; padding: 28px 16px 48px; }
.guide-hero { display: grid; justify-items: center; text-align: center; gap: 10px; margin-bottom: 26px; }
.guide-hero h1 { font-size: clamp(30px, 8vw, 44px); }

.calm { padding: 18px; margin: 28px 0; }
.calm h2 { font-size: 20px; margin-bottom: 8px; }
.calm > p { font-size: 15.5px; line-height: 1.55; }
.promises { display: grid; gap: 10px; margin-top: 14px; }
.promise { display: flex; gap: 10px; align-items: flex-start; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 14px; padding: 10px 12px; }
.promise i { flex: none; width: 30px; height: 30px; border-radius: 50%; border: var(--line) solid var(--ink); display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 15px; }
.promise b { display: block; font-size: 15px; }
.promise span { font-size: 14px; color: var(--ink-soft); line-height: 1.4; }

.steps { display: grid; gap: 18px; list-style: none; padding: 0; margin: 0; }
.step { padding: 18px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-num { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--pink); border: var(--line) solid var(--ink); box-shadow: 0 3px 0 var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 19px; }
.step h2 { font-size: 21px; }
.step > p { font-size: 15.5px; line-height: 1.55; }
.step > p + p { margin-top: 8px; }
.step .btn { margin-top: 14px; }

/* a Windows window, drawn */
.shot { margin-top: 14px; border: var(--line) solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 var(--ink); }
.smart { background: #0f5ba7; color: #fff; padding: 20px 20px 16px; font-family: "Segoe UI", system-ui, sans-serif; font-weight: 400; }
.smart h3 { font-family: inherit; font-weight: 300; font-size: clamp(19px, 5vw, 24px); line-height: 1.2; margin-bottom: 12px; }
.smart p { font-size: 13.5px; line-height: 1.45; opacity: .95; }
.smart .more { display: inline-block; margin-top: 10px; text-decoration: underline; font-size: 13.5px; }
.smart dl { margin: 12px 0 0; font-size: 13.5px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.smart dt { opacity: .85; }
.smart dd { margin: 0; }
.smart-buttons { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.smart-buttons span { border: 2px solid #fff; padding: 5px 14px; font-size: 13.5px; }
.wizard { background: #fff; font-family: "Segoe UI", system-ui, sans-serif; font-weight: 400; color: #1b1b1b; }
.wizard-title { background: #f3f3f3; border-bottom: 1px solid #ddd; padding: 8px 12px; font-size: 13px; }
.wizard-body { padding: 16px 18px; font-size: 14px; line-height: 1.45; display: flex; gap: 14px; align-items: center; }
.wizard-body b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.wizard-body img { width: 48px; height: 48px; flex: none; }
.wizard-buttons { border-top: 1px solid #ddd; padding: 10px 12px; display: flex; justify-content: flex-end; gap: 8px; }
.wizard-buttons span { border: 1px solid #999; border-radius: 4px; padding: 4px 16px; font-size: 13px; background: #fdfdfd; }
.desk { background: linear-gradient(160deg, #cfe3f5, #e8d9ef); height: 190px; position: relative; }
.desk .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: rgba(240, 240, 245, .92); border-top: 1px solid rgba(0, 0, 0, .12); }
.desk .sign { position: absolute; right: 18px; bottom: 26px; display: grid; justify-items: center; }
.desk .board { background: #fff8ee; border: 2px solid var(--ink); border-radius: 8px; padding: 2px 8px; font-weight: 900; font-size: 12px; transform: rotate(5deg); margin-bottom: -8px; position: relative; z-index: 1; }
/* what to press */
.press { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 4px; box-shadow: 0 0 0 9px rgba(246, 158, 185, .35); }

.guide .faq { margin-top: 30px; display: grid; gap: 10px; }
.guide .faq h2 { font-size: 24px; margin-bottom: 4px; }
.guide .faq details { padding: 14px 16px; box-shadow: 0 3px 0 var(--ink); }
.guide .faq summary { font-weight: 900; font-size: 16px; cursor: pointer; }
.guide .faq details p { margin-top: 8px; font-size: 15px; line-height: 1.55; }
.guide .help { text-align: center; margin-top: 28px; display: grid; gap: 10px; justify-items: center; }
.guide .help .btn { max-width: 340px; }
/* was inline: the sites' CSP allows no inline styles abroad (region.ts). Above .step > p by specificity */
.step .note { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.shot + .note { margin-top: 12px; }
.guide-cat { --n: 2; --fps: 3; background-image: url(/assets/sprites/wave.webp); }
.desk-cat { --w: 84px; --h: 84px; background-image: url(/assets/sprites/sit.webp); }
.promise .mint { background: var(--mint); }
.promise .blush { background: var(--blush); }
