/* PelvicGym — страница скачивания. Тёплая бежевая палитра из приложения. */
:root {
  color-scheme: light;
  --bg: #f6f3ef;
  --panel: #ffffff;
  --panel-2: #f8f0eb;
  --ink: #2e2d2d;
  --ink-soft: #5b544e;
  --muted: #8a827a;
  --accent: #e2ac7a;
  --accent-2: #d9975b;
  --accent-ink: #2e2d2d;
  --border: #e7ded4;
  --ok: #34c759;
  --wait: #f0a13a;
  --logo-filter: none;
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1040px;
  --shadow: 0 10px 30px rgba(62, 52, 45, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #130b04;
    --panel: #231911;
    --panel-2: #2a2018;
    --ink: #f5efe8;
    --ink-soft: #d9cfc3;
    --muted: #a89f96;
    --accent: #e2ac7a;
    --accent-2: #eabb8c;
    --accent-ink: #211711;
    --border: #3a2c20;
    --logo-filter: invert(1) brightness(1.6);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
/* Атрибут hidden должен побеждать любые display-правила ниже (у .btn, .mac-choice,
   .release-badge задан display, который иначе перебивает [hidden]{display:none}). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.brand-badge { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); }
.brand-logo { height: 21px; width: auto; filter: var(--logo-filter); }
.support { color: var(--muted); font-size: 14px; }
.support:hover { color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 64px 22px 40px; }
.release-badge { display: inline-flex; align-items: center; gap: 9px; background: var(--panel-2); border: 1px solid var(--border); color: var(--ink-soft); border-radius: 999px; padding: 6px 14px; font-size: 13px; margin-bottom: 22px; }
.release-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.release-badge b { font-weight: 700; color: var(--ink); }
.hero h1 { font-size: 40px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -.5px; }
.lead { color: var(--ink-soft); font-size: 18px; margin: 0 0 28px; max-width: 44ch; }

.primary-loading { color: var(--muted); padding: 10px 0; }

.btn { display: inline-flex; align-items: center; gap: 14px; padding: 15px 26px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease; text-align: left; }
.btn:active { transform: translateY(1px); }
.btn-ico { display: inline-flex; }
.btn-ico svg { width: 26px; height: 26px; }
.btn-text { display: flex; flex-direction: column; }
.btn-title { font-size: 16px; }
.btn-sub { font-size: 12.5px; font-weight: 400; opacity: .82; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-2); }
.btn-pending { background: var(--panel-2); color: var(--ink-soft); border-color: var(--border); cursor: default; }
.btn-ghost { background: var(--panel); border-color: var(--border); color: var(--ink); }

.spinner, .card-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--wait) 30%, transparent); border-top-color: var(--wait); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.mac-choice { display: flex; flex-wrap: wrap; gap: 12px; }
.primary-hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.mobile-note p { font-size: 17px; }
.copied { color: var(--ok); font-size: 14px; margin-left: 10px; }

/* Hero art */
.hero-art { position: relative; }
.hero-photo { width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--border); box-shadow: var(--shadow); object-fit: cover; aspect-ratio: 11 / 13; display: block; }
.hero-logo { position: absolute; right: -14px; bottom: -14px; width: 96px; height: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); filter: var(--logo-filter); }

/* Platforms */
.platforms { padding: 30px 22px 8px; }
.platforms-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.platforms-head h2 { font-size: 22px; margin: 0; }
.platforms-note { color: var(--muted); font-size: 13px; }
.platforms-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pcard { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s ease, transform .12s ease; }
.pcard.ready:hover { border-color: var(--accent); transform: translateY(-1px); }
.pcard .pico { width: 30px; height: 30px; color: var(--ink-soft); flex: none; }
.pcard .pico svg { width: 30px; height: 30px; }
.pcard .pmeta { flex: 1; min-width: 0; }
.pcard .ptitle { display: block; font-weight: 600; font-size: 15px; }
.pcard .psub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.pcard .pright { text-align: right; flex: none; }
.pcard a.pdl { display: inline-flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 14px; color: var(--ink); }
.pcard a.pdl:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pcard .psize { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.badge-wait { display: inline-flex; align-items: center; gap: 7px; color: var(--wait); font-size: 13px; font-weight: 600; }

.mac-firstrun { margin-top: 20px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.mac-firstrun summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.mac-firstrun[open] summary { margin-bottom: 12px; }
.mac-lead { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; }
.mac-warn { background: color-mix(in srgb, var(--wait) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--wait) 45%, var(--border)); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; line-height: 1.5; margin: 0 0 16px; }
.mac-method { margin: 0 0 16px; }
.mac-method:last-child { margin-bottom: 0; }
.mac-method h4 { margin: 0 0 8px; font-size: 15px; }
.mac-method ol { margin: 0; padding-left: 22px; }
.mac-method li { margin: 7px 0; font-size: 14px; line-height: 1.5; }
.mac-firstrun code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); font-size: 12.5px; }
.mac-cmd { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 8px 0; overflow-x: auto; }
.mac-cmd code { background: none; border: 0; padding: 0; font-size: 12.5px; white-space: pre; }
kbd { display: inline-block; background: var(--panel-2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font-size: 12px; font-family: inherit; line-height: 1.7; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.hint code { background: var(--panel-2); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border); font-size: 12px; }

/* Requirements */
.req { padding: 34px 22px 60px; }
.req h2 { font-size: 20px; margin: 0 0 16px; }
.req-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.req-grid > div { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.req-grid b { font-size: 15px; }
.req-grid span { color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.foot-brand img { filter: var(--logo-filter); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 40px 22px 24px; gap: 28px; }
  .hero-art { order: -1; max-width: 300px; }
  .hero h1 { font-size: 31px; }
  .req-grid { grid-template-columns: 1fr; }
}
