:root {
  --bg: #f6f1e7;
  --paper: #fffdf8;
  --ink: #1c1916;
  --muted: #5e584e;
  --line: #d8d0c2;
  --accent: #8f2d1c;
  --free: #215c32;
  --busy: #8a5a12;
  --closed: #8f2d1c;
  --select: #ead3c4;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Source Sans 3", "Segoe UI", "Noto Sans", sans-serif;
  --pad: 20px;
  --max: 1240px;
}

html[data-theme="dark"] {
  --bg: #1a1814;
  --paper: #24211c;
  --ink: #f3efe6;
  --muted: #b7b0a4;
  --line: #3d3830;
  --accent: #e07a68;
  --free: #8fce9a;
  --busy: #e2b56a;
  --closed: #e07a68;
  --select: #5a332c;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #1a1814;
    --paper: #24211c;
    --ink: #f3efe6;
    --muted: #b7b0a4;
    --line: #3d3830;
    --accent: #e07a68;
    --free: #8fce9a;
    --busy: #e2b56a;
    --closed: #e07a68;
    --select: #5a332c;
    color-scheme: dark;
  }
}

html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}

img { max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--select);
  color: var(--ink);
}

html[data-lang="ru"] .en,
html:not([data-lang]) .en { display: none; }

html[data-lang="en"] .ru { display: none; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
}

.skip:focus { top: 12px; z-index: 5; }

.wrap {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.bar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 14px 0;
}

.bar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-left: auto;
}

.brand {
  margin-right: 12px;
  font-family: var(--serif);
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.nav a {
  text-decoration: none;
  font-size: 0.98rem;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 0.92rem;
}

.status [data-for] { display: none; }

body[data-status="free"] .status { color: var(--free); }
body[data-status="busy"] .status { color: var(--busy); }
body[data-status="closed"] .status { color: var(--closed); }
body[data-status="free"] .status [data-for="free"],
body[data-status="busy"] .status [data-for="busy"],
body[data-status="closed"] .status [data-for="closed"] { display: inline; }

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
}

.switch {
  display: inline-flex;
  border: 1px solid var(--line);
}

.switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.78rem/1 var(--sans);
  min-height: 32px;
  padding: 0 8px;
  cursor: pointer;
}

html[data-lang="ru"] [data-lang-set="ru"],
html[data-lang="en"] [data-lang-set="en"],
html[data-currency="kzt"] [data-currency-set="kzt"],
html[data-currency="rub"] [data-currency-set="rub"],
html[data-currency="usd"] [data-currency-set="usd"] {
  background: var(--ink);
  color: var(--paper);
}

.theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.92rem;
}

.theme input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.theme-track {
  width: 38px;
  height: 22px;
  border: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
}

.theme-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--ink);
}

html[data-theme="dark"] .theme-knob { transform: translateX(16px); }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-knob { transform: translateX(16px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.btn-fill {
  background: var(--ink);
  color: var(--paper);
}

.btn:hover,
.btn-fill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hero { padding: 42px 0 8px; }

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: end;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
}

.portfolio {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.portfolio a { color: var(--accent); }

.hero-actions,
.order-actions,
.pay-actions,
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-actions { margin-top: 16px; }

section { padding: 28px 0 6px; }

h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.note { margin: 0 0 16px; color: var(--muted); }

.cards,
.steps {
  display: grid;
  gap: 18px;
}

.card,
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 16px 16px 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-index {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.95rem;
}

h3 { margin: 0; font-size: 1.35rem; }

.card p,
.step p { margin: 0; }

.card .text,
.step p { color: var(--muted); }

.tiers {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tiers li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.tier-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.tiers .tier-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.price {
  margin: 0;
  font-family: var(--serif);
  font-weight: 650;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.price [data-show] { display: none; }

html[data-currency="kzt"] .price [data-show="kzt"],
html[data-currency="rub"] .price [data-show="rub"],
html[data-currency="usd"] .price [data-show="usd"] { display: inline; }

html.no-js .price {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

html.no-js .price [data-show] { display: inline; }

.price-inline {
  font-family: var(--sans);
  font-size: 1em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.tiers li > .price {
  width: 100%;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: 1.45rem;
}

.price.price-inline {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1em;
  font-weight: 600;
}

.card-links { margin-top: auto; }

.order-btn-tg { flex: 1 1 180px; }
.order-btn-dc { flex: 0 0 auto; }

.step h3 { margin-bottom: 6px; font-size: 1.2rem; }

.order {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
}

footer {
  padding: 22px 0 36px;
  color: var(--muted);
  font-size: 0.92rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

dialog {
  width: min(520px, calc(100% - 24px));
  max-height: min(90vh, 680px);
  overflow: auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 22px;
}

dialog::backdrop { background: rgba(28, 25, 22, 0.45); }

dialog h2 { margin-top: 0; }

#pay-list { display: grid; gap: 12px; margin: 16px 0; }

.pay-row {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pay-name {
  margin: 0;
  font-weight: 700;
}

#pay-list p { margin: 0; color: var(--muted); }

.pay-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.pay-links a { color: var(--accent); }

.pay-row code {
  font-family: ui-monospace, monospace;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

#pay-live {
  min-height: 1.2em;
  margin: 0 0 8px;
  color: var(--free);
}

.faq { display: grid; }

.faq details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
}

.faq details p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 78ch;
}

@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
    gap: 56px;
  }

  .hero-side .facts {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 0;
  }
}

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
