/* SecretsConnect — веб. Токены Nocturne из miniapp/src/theme.css (не подбирать заново).
   Правило бренда: акцент — линия, рамка и свечение, никогда не заливка больших площадей. */
:root {
  --ground: #161826;
  --surface: #232532;
  --surface-hover: #292b31;
  --accent: #9184d9;
  --accent-200: #e7e5fe;
  --accent-300: #d2cefd;
  --accent-400: #b5abfc;
  --accent-800: #423a6a;
  --accent-900: #2b2741;
  --text: #e9e9ed;
  --text-2: #cfd3e5;
  --text-3: #b2b6ca;
  --muted: #9397ab;
  --muted-2: #75798c;
  --muted-3: #595d6c;
  --hairline: #3f424d;
  --divider: rgba(233, 233, 237, 0.08);
  --ok: #8fd6a8;
  --err: #f0a3a3;
  --status-gradient: linear-gradient(160deg, #2b2741, #1e2030);
  --glow: 0 0 28px rgba(145, 132, 217, 0.22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 15px/1.55 var(--font);
  min-height: 100vh;
}
a { color: var(--accent-300); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-200); }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; margin: 0; line-height: 1.12; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- шапка ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 500; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 1px var(--hairline); }
.top-link { font-size: 13.5px; color: var(--text-3); }

/* ---------- раскладка ---------- */
.layout { display: grid; gap: 40px; padding: 12px 0 56px; }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; padding-top: 40px; align-items: start; }
  .side { position: sticky; top: 24px; grid-column: 2; grid-row: 1 / span 2; }
  .hero { grid-column: 1; }
  .rest { grid-column: 1; }
}

/* ---------- hero ---------- */
.hero h1 { font-size: clamp(34px, 9.4vw, 64px); margin: 14px 0 16px; }
.proof { margin-top: 0; }
@media (min-width: 960px) { .rest { margin-top: -8px; } }
.hero h1 em { font-style: normal; color: var(--accent-400); }
.lead { color: var(--text-2); font-size: 16.5px; max-width: 34em; }
.proof .keyline { margin-top: 0; }
.keyline {
  margin-top: 26px;
  border-radius: 14px;
  background: var(--status-gradient);
  box-shadow: 0 0 0 1px var(--accent-800);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}
.keyline code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.keyline code b { font-weight: 400; color: var(--muted-2); letter-spacing: 0.1em; }
.keyline small { font-size: 12.5px; color: var(--muted); }

.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; }
.facts li { display: grid; grid-template-columns: 34px 1fr; padding: 13px 0; border-top: 1px solid var(--divider); }
.facts li:last-child { border-bottom: 1px solid var(--divider); }
.facts .n { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 2px; }
.facts strong { display: block; font-weight: 500; }
.facts span { color: var(--muted); font-size: 13.5px; }
@media (min-width: 640px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
  .facts li { grid-template-columns: 1fr; gap: 8px; border-bottom: 1px solid var(--divider); }
}

/* ---------- покупка ---------- */
.buy {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--hairline);
  padding: 20px 16px;
  scroll-margin-top: 16px;
}
@media (min-width: 400px) { .buy { padding: 22px 20px; } }
.buy h2 { font-size: 21px; margin: 6px 0 16px; }
.plans { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.plan {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--ground);
  box-shadow: 0 0 0 1px var(--hairline);
  cursor: pointer;
  transition: box-shadow .15s;
}
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan .dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted-3); }
.plan:has(input:checked) { box-shadow: 0 0 0 1px var(--accent), var(--glow); }
.plan:has(input:checked) .dot { background: var(--accent); box-shadow: inset 0 0 0 4px var(--ground), 0 0 0 1.5px var(--accent); }
.plan:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan .t { font-weight: 500; display: block; }
.plan .h { font-size: 12.5px; color: var(--muted); display: block; }
.plan .p { font-family: var(--mono); font-size: 15px; white-space: nowrap; text-align: right; line-height: 1.3; }
.plan .p small { color: var(--muted); font-size: 11.5px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.row .lbl { font-size: 14px; }
.row .lbl small { display: block; color: var(--muted); font-size: 12.5px; }
.stepper { display: flex; align-items: center; border-radius: 12px; box-shadow: 0 0 0 1px var(--hairline); }
.stepper button { width: 44px; height: 44px; font-size: 20px; color: var(--text-2); }
.stepper button:disabled { color: var(--muted-3); cursor: default; }
.stepper output { min-width: 30px; text-align: center; font-family: var(--mono); font-size: 16px; }

.field { display: block; margin-top: 18px; }
.field span { display: block; font-size: 14px; margin-bottom: 6px; }
.field span small { color: var(--muted); font-size: 12.5px; }
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  background: var(--ground);
  box-shadow: 0 0 0 1px var(--hairline);
  font-size: 16px; /* iOS не зумит при фокусе */
}
.field input::placeholder { color: var(--muted-3); }
.field input:focus { outline: none; box-shadow: 0 0 0 1px var(--accent); }

.total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--divider); }
.total .sum { font-family: var(--mono); font-size: 30px; letter-spacing: -0.02em; }
.total .calc { font-size: 12.5px; color: var(--muted); text-align: right; }

.cta {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  color: var(--accent-200);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--glow);
  transition: background .15s, box-shadow .15s;
}
.cta:hover { background: rgba(145, 132, 217, 0.1); color: var(--accent-200); }
.cta:disabled { border-color: var(--muted-3); color: var(--muted); box-shadow: none; cursor: progress; }
.note { margin-top: 12px; font-size: 12.5px; color: var(--muted); text-align: center; }
.err { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(240, 163, 163, 0.08); box-shadow: 0 0 0 1px rgba(240, 163, 163, 0.3); color: var(--err); font-size: 13.5px; }
.err[hidden] { display: none; }
.skeleton { height: 62px; border-radius: 14px; background: var(--ground); box-shadow: 0 0 0 1px var(--hairline); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.alt { margin-top: 14px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ---------- секции ---------- */
.sec { margin-top: 56px; }
.sec h2 { font-size: clamp(24px, 6vw, 32px); margin: 8px 0 18px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; padding: 16px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.steps li::before { content: "0" counter(s); font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.steps strong { font-weight: 500; display: block; margin-bottom: 4px; }
.steps p { color: var(--text-3); font-size: 14px; }
.apps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.apps a { padding: 8px 12px; border-radius: 10px; box-shadow: 0 0 0 1px var(--hairline); color: var(--text-2); text-decoration: none; font-size: 13.5px; }
.apps a:hover { box-shadow: 0 0 0 1px var(--accent); }
.apps a small { color: var(--muted); }

.faq details { border-top: 1px solid var(--divider); }
.faq details:last-child { border-bottom: 1px solid var(--divider); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 32px 16px 0; position: relative; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font: 20px var(--mono); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--text-3); font-size: 14.5px; max-width: 40em; }

.foot { padding: 28px 0 40px; border-top: 1px solid var(--divider); color: var(--muted-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- order.html ---------- */
.state { max-width: 560px; margin: 0 auto; padding: 24px 0 56px; }
.state h1 { font-size: clamp(28px, 8vw, 40px); margin: 10px 0 12px; }
.state .lead { font-size: 15.5px; }
.receipt { margin-top: 22px; display: grid; gap: 0; }
.receipt div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--divider); font-size: 14px; }
.receipt div:last-child { border-bottom: 1px solid var(--divider); }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; text-align: right; }
.spin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--hairline); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.keybox { margin-top: 22px; padding: 16px; border-radius: 16px; background: var(--status-gradient); box-shadow: 0 0 0 1px var(--accent-800); }
.keybox .url { font-family: var(--mono); font-size: 14px; color: var(--accent-200); word-break: break-all; line-height: 1.5; margin: 8px 0 14px; user-select: all; }
.btns { display: grid; gap: 8px; }
.btn { display: block; width: 100%; padding: 14px; border-radius: 12px; text-align: center; text-decoration: none; font-weight: 500; font-size: 15px; box-shadow: 0 0 0 1px var(--hairline); color: var(--text); background: var(--surface); }
.btn:hover { box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
.btn--main { background: transparent; border: 1px solid var(--accent); box-shadow: var(--glow); color: var(--accent-200); }
.btn--main:hover { background: rgba(145, 132, 217, 0.1); color: var(--accent-200); }
@media (min-width: 480px) { .btns--2 { grid-template-columns: 1fr 1fr; } }
.qr { display: grid; justify-items: center; gap: 8px; margin-top: 18px; }
.qr canvas { width: 220px; height: 220px; border-radius: 12px; background: #fff; image-rendering: pixelated; }
.qr small { color: var(--muted); font-size: 12.5px; text-align: center; }
.remind { margin-top: 18px; padding: 12px 14px; border-radius: 12px; box-shadow: 0 0 0 1px var(--hairline); font-size: 13.5px; color: var(--text-3); }
.remind b { color: var(--text); font-weight: 500; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--hairline); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; z-index: 9; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; scroll-behavior: auto !important; }
}
