/* v17 «Запрошення блогеру» — общее: токены, типографика, компоненты.
   Вёрстки: v17-m.css (телефон, [data-layout=m]) и v17-d.css (компьютер, [data-layout=d]). */

:root {
  --paper: #f5efe6;
  --card: #fffaf3;
  --ink: #1d1a22;
  --ink-2: #5d5664;
  --line: #e2d8cb;
  --accent: #7b3fe4;
  --accent-ink: #ffffff;
  --gold: #b07d22;
  --ok: #1f7a4f;
  --bad: #b3261e;
  --warn: #8a5a00;
  --stage-bg: #ebe2d6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15121a; --card: #1f1a26; --ink: #f2ece4; --ink-2: #b4abb9; --line: #342d3d;
    --accent: #b28cff; --accent-ink: #160f22; --gold: #e0b45c; --ok: #6fd3a0; --bad: #ff8a80; --warn: #f0c060;
    --stage-bg: #221c2a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15121a; --card: #1f1a26; --ink: #f2ece4; --ink-2: #b4abb9; --line: #342d3d;
  --accent: #b28cff; --accent-ink: #160f22; --gold: #e0b45c; --ok: #6fd3a0; --bad: #ff8a80; --warn: #f0c060;
  --stage-bg: #221c2a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.boot { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fatal { padding: 24px; }

/* ---------------------------------------------------------------- шапка */
.top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.brand { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.demo-badge, .demo-chip { font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 99px; border: 1px dashed var(--gold); color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }
.demo-chip { margin-left: 6px; vertical-align: 2px; }
.sp { flex: 1; }
.tbtn { min-width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; }
.moon { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset -5px -3px 0 0 var(--ink); }

/* ---------------------------------------------------------------- кинетика заголовков */
.kin { display: inline; }
.kw { display: inline-block; clip-path: inset(-0.12em -0.2em -0.22em -0.2em); vertical-align: top; margin-right: 0.22em; }
.kw:last-child { margin-right: 0; }
.ki { display: inline-block; }
.ready .h1 .ki { animation: rise 0.8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 120ms); }
.sec h2 .kin .ki { transform: translateY(110%); }
.sec h2 .kin.in .ki { transform: none; transition: transform 0.7s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 70ms); }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }

.h1 { font: 600 clamp(40px, 11vw, 92px)/0.98 var(--serif); letter-spacing: -0.02em; margin: 6px 0 8px; }
.h1 .accent .ki { font-style: italic; color: var(--accent); }
.to { margin: 0; color: var(--ink-2); font-size: 15px; }
.to-name { color: var(--ink); }
.wordmark { margin: 0 0 10px; font: 500 22px/1.25 var(--serif); overflow-wrap: anywhere; }
.lw-word { font-weight: 700; letter-spacing: 0.02em; }
.lw-by { color: var(--ink-2); font-style: italic; }
.lw-name { color: var(--gold); font-style: italic; font-weight: 700; }
.lw-name .lt { display: inline-block; }
.ready .lw-name .lt { animation: ink 0.5s ease-out both; animation-delay: calc(var(--i) * 45ms); }
@keyframes ink { from { opacity: 0; transform: translateY(0.3em); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.lead { color: var(--ink-2); margin: 0; max-width: 36em; }

/* ---------------------------------------------------------------- сцена */
.stage { position: relative; overflow: hidden; background: var(--stage-bg); border-radius: var(--r); transition: background-color 0.5s; touch-action: none; }
.stage.is-bad::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 3px #c62828, inset 0 0 60px rgb(198 40 40 / 0.35); border-radius: inherit; }
.stage.is-busy .stage-canvas { filter: saturate(0.7) brightness(0.92); transition: filter 0.3s; }
.stage.on-dark { background: radial-gradient(120% 90% at 50% 30%, #3a3142, #16121b); }
.stage.on-light { background: radial-gradient(120% 90% at 50% 30%, #fbf6ee, #e7ddcf); }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.stage-canvas:active { cursor: grabbing; }
.stage.show-photo .stage-canvas { visibility: hidden; }
.fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.skeleton { position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 3 / 4; translate: -50% -55%; border-radius: 40% 40% 18% 18%; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 0.35) 50%, transparent 70%) 0 0 / 220% 100%, var(--sw, #c8b8e0); opacity: 0.55; animation: shimmer 1.4s linear infinite; }
.stage:not(.is-loading):not(.is-down) .skeleton, .stage.has-photo .skeleton { display: none; }
.stage.is-down .skeleton { animation: none; opacity: 0.4; }
@keyframes shimmer { to { background-position: -220% 0, 0 0; } }
.pill { position: absolute; left: 12px; bottom: 12px; margin: 0; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 8px 12px; border-radius: 99px; background: rgb(255 255 255 / 0.88); color: #1d1a22; font-size: 13px; font-weight: 600; line-height: 1.2; box-shadow: 0 4px 16px rgb(0 0 0 / 0.12); backdrop-filter: blur(6px); }
.pill i { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #9a8fa5; }
.pill[data-state="ok"] i { background: #1f9a5f; }
.pill[data-state="wait"] i { background: #b07d22; animation: pulse 1s ease-in-out infinite; }
.pill[data-state="bad"] i { background: #c62828; }
.pill[data-state="down"] i { background: #6b6470; }
@keyframes pulse { 50% { opacity: 0.3; } }
.drag { position: absolute; right: 12px; top: 12px; margin: 0; padding: 6px 10px; border-radius: 99px; font-size: 12px; background: rgb(0 0 0 / 0.35); color: #fff; pointer-events: none; transition: opacity 0.4s; }
.stage.touched .drag, .stage.is-loading .drag, .stage.is-down .drag { opacity: 0; }
.no3d { position: absolute; left: 12px; right: 12px; top: 12px; margin: 0; font-size: 13px; color: var(--ink-2); }

/* ---------------------------------------------------------------- керування */
.label { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.02em; }
.items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; min-height: 44px; transition: border-color 0.2s, transform 0.2s; }
.item[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.item:active { transform: scale(0.97); }
.ithumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; display: block; background: radial-gradient(circle at 50% 45%, var(--sw, #ccc) 0 34%, #2a2430 35%); }
.ithumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iname { font-size: 13px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--c); cursor: pointer; padding: 0; position: relative; }
.sw::after { content: ""; position: absolute; inset: -6px; }
.sw[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent); }
.row2 { display: grid; gap: 0 16px; }
.field.off .name-in { opacity: 0.55; }
.name-in { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font: 600 18px var(--serif); }
.name-in:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.hint, .note { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.note { color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; }
.chip[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.says { margin-top: 14px; padding: 10px 14px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.says .label { margin-top: 0; }
.says ul { margin: 0; padding-left: 18px; font-size: 14px; }
.says li + li { margin-top: 4px; }
.says[data-state="bad"] { border-color: var(--bad); }
.says[data-state="bad"] li { color: var(--bad); }
.says[data-state="bad"] li:last-child { color: var(--ink-2); }
.says[data-state="down"] { border-style: dashed; }
.ghost { margin-top: 10px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; font-weight: 600; }
.under { margin-top: 12px; }
.facts { margin: 0; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.attr { margin: 4px 0 0; font-size: 11px; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- секції */
.sec { padding: 56px 16px; }
.kicker { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); font-weight: 700; }
.sec h2 { font: 600 clamp(28px, 7.4vw, 52px)/1.06 var(--serif); letter-spacing: -0.015em; margin: 0 0 14px; }
.body { color: var(--ink-2); margin: 0 0 18px; max-width: 38em; }
.small { font-size: 12px; color: var(--ink-2); margin: 8px 0 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s, transform 0.6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }

/* ролі */
.carousel { position: relative; }
.track { display: grid; gap: 12px; }
.rcard { padding: 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.rcard h3 { margin: 0 0 10px; font: 600 22px/1.2 var(--serif); }
.rcard ul { margin: 0; padding: 0; list-style: none; }
.rcard li { position: relative; padding-left: 26px; margin: 10px 0; }
.rcard li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.rcard.money { background: var(--ink); color: var(--paper); border-color: var(--ink); display: flex; flex-direction: column; justify-content: center; }
.rcard.money h3 { font-size: 30px; color: var(--paper); }
.rcard.money p { margin: 0; opacity: 0.85; }
.swipe { display: none; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: width 0.3s, background 0.3s; }
.dots i.on { width: 20px; border-radius: 4px; background: var(--accent); }

/* вето */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: baseline; }
.steps b { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.sample { position: relative; display: block; width: 100%; max-width: 360px; aspect-ratio: 4 / 5; margin: 24px auto 0; border: 0; border-radius: var(--r); background: var(--card); box-shadow: 0 18px 40px rgb(0 0 0 / 0.12); cursor: pointer; padding: 0; overflow: hidden; }
.sample-ph { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, var(--sw, #c8b8e0) 0 26%, #241e2b 27%); }
.sample-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stamp { position: absolute; left: 50%; top: 52%; translate: -50% -50%; rotate: -12deg; padding: 8px 18px; border: 4px solid currentColor; border-radius: 10px; font: 800 30px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; background: rgb(255 255 255 / 0.82); white-space: nowrap; }
.stamp.yes { color: #1f7a4f; }
.stamp.no { color: #b3261e; }
.stamp.hit { animation: stamp 0.45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stamp { from { scale: 2.2; opacity: 0; } to { scale: 1; opacity: 1; } }
.sample-tip { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 13px; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / 0.6); }

/* продажі */
.ledger { border-radius: var(--r); background: var(--card); border: 1px solid var(--line); padding: 8px 14px 12px; }
.ledger table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ledger th { text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 600; padding: 8px 6px 8px 0; border-bottom: 1px solid var(--line); }
.ledger td { padding: 10px 6px 10px 0; border-bottom: 1px dashed var(--line); vertical-align: top; overflow-wrap: anywhere; }
.ledger tr:last-child td { border-bottom: 0; }
.st { display: inline-block; padding: 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.st1 { background: color-mix(in srgb, var(--gold) 20%, transparent); }
.st2 { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.share { margin-top: 14px; padding: 16px 18px; border-radius: var(--r); border: 1.5px dashed var(--gold); }
.share h3 { margin: 0 0 6px; font: 600 20px var(--serif); }
.share p { margin: 0; color: var(--ink-2); }

/* картка фана — одна й маленька */
.fan-card { display: flex; gap: 14px; align-items: center; max-width: 420px; padding: 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 28px rgb(0 0 0 / 0.08); }
.fan-ph { flex: none; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 45%, var(--sw, #c8b8e0) 0 30%, #241e2b 31%); }
.fan-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fan-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fan-body b { font: 700 18px/1.2 var(--serif); overflow-wrap: anywhere; }
.fan-body span { font-size: 13px; color: var(--ink-2); }
.ad { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.fan-btn { align-self: flex-start; margin-top: 4px; padding: 4px 14px; border-radius: 99px; background: var(--accent); color: var(--accent-ink) !important; font-weight: 700; }

/* заявка */
.apply { display: grid; gap: 14px; max-width: 560px; }
.ff { display: grid; gap: 6px; }
.ff label { font-size: 14px; font-weight: 600; }
.ff input, .ff select { height: 48px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); }
.ff input:focus, .ff select:focus { border-color: var(--accent); outline: none; }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.err { margin: 0; min-height: 1.2em; color: var(--bad); font-size: 14px; }
.cta { min-height: 54px; border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 17px; cursor: pointer; transition: transform 0.15s; }
.cta:active { transform: scale(0.98); }
.done { max-width: 560px; padding: 20px; border-radius: var(--r); background: var(--card); border: 1.5px solid var(--ok); }
.done h3 { margin: 0 0 8px; font: 600 24px var(--serif); }

.foot { padding: 28px 16px 120px; color: var(--ink-2); font-size: 13px; border-top: 1px solid var(--line); }
.foot p { margin: 0 0 6px; }

.sticky-cta { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .sec h2 .kin .ki { opacity: 1; transform: none; }
}
