/* Orbi Studio: бумажная палитра канала. Крем, чёрные чернила, жёлтый маркер, розовый аксолотль. */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Onest:wght@400;500;600;700&family=Unbounded:wght@600;700;800&display=swap');

:root {
  --paper: #f4ecdd;
  --paper-2: #ece0c9;
  --card: #fffaf0;
  --ink: #26211c;
  --muted: #6d645a;
  --yellow: #ffd44d;
  --yellow-2: #ffe58f;
  --pink: #ff7aa8;
  --pink-2: #ffd3e1;
  --sky: #8fd3ea;
  --violet: #7b6cf6;
  --green: #43b581;
  --red: #e5534b;
  --line: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);
  --radius: 18px;
  --font-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Unbounded', 'Onest', system-ui, sans-serif;
  --font-hand: 'Caveat', 'Segoe Script', cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* акварельные пятна на фоне */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 380px at 8% 6%, rgba(255, 122, 168, .16), transparent 70%),
    radial-gradient(560px 420px at 96% 28%, rgba(143, 211, 234, .22), transparent 70%),
    radial-gradient(520px 420px at 50% 100%, rgba(255, 212, 77, .20), transparent 70%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.hand { font-family: var(--font-hand); font-weight: 700; font-size: 1.35em; color: var(--muted); }
.muted { color: var(--muted); }
.mark { background: linear-gradient(transparent 58%, var(--yellow) 58% 92%, transparent 92%); padding: 0 .1em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- навигация ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(244, 236, 221, .88); backdrop-filter: blur(10px); border-bottom: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.05rem var(--font-head); }
.logo { flex: none; }
.logo img { width: 42px; height: 42px; object-fit: contain; }
.nav-links { display: flex; gap: 4px; margin-left: 14px; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover, .nav-links a[aria-current] { background: var(--yellow-2); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.langs { display: inline-flex; border: var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.langs button { border: 0; background: transparent; font: 700 .8rem var(--font-body); padding: 6px 11px; cursor: pointer; color: var(--ink); }
.langs button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.burger { display: none; border: var(--line); background: var(--card); border-radius: 12px; width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer;
  padding: 13px 22px; border: var(--line); border-radius: 14px; background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--yellow); }
.btn.pink { background: var(--pink); }
.btn.small { padding: 8px 14px; font-size: .9rem; border-radius: 11px; box-shadow: 3px 3px 0 var(--ink); }
.btn.ghost { box-shadow: none; background: transparent; }
.btn.danger { background: var(--pink-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }

/* ---------- карточки и поля ---------- */
.card { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: var(--line); border-radius: 999px; background: var(--card); font-weight: 600; font-size: .85rem; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-weight: 700; font-size: .92rem; }
.field small { color: var(--muted); }
input[type='text'], input[type='email'], input[type='password'], textarea, select {
  width: 100%; font: 500 1rem var(--font-body); color: var(--ink);
  padding: 12px 14px; background: #fff; border: var(--line); border-radius: 12px; outline: none;
}
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 4px var(--yellow); }
textarea { min-height: 130px; resize: vertical; }
input[type='range'] { width: 100%; accent-color: var(--ink); height: 28px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; gap: 8px; padding: 11px 18px; border: var(--line); border-radius: 14px; background: #fff;
  font-weight: 700; box-shadow: 3px 3px 0 var(--ink); transition: .12s;
}
.choice input:checked + span { background: var(--yellow); }
.choice input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }
.err { color: #b3261e; font-weight: 600; min-height: 1.4em; }
.ok { color: #1f7a4f; font-weight: 600; }

/* ---------- герой ---------- */
.hero { padding: 54px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 1.15rem; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 22px; }
.price-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.price-chips .chip b { font-family: var(--font-head); }
.hero-visual { position: relative; }
.frame { position: relative; border: var(--line); border-radius: 22px; overflow: hidden; background: #000; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; cursor: pointer; padding: 0; width: 100%; display: block; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%;
  background: var(--yellow); border: var(--line); display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .15s;
}
.play::after { content: ''; border-left: 22px solid var(--ink); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.frame:hover .play { transform: scale(1.1) rotate(-4deg); }
.sticker { position: absolute; filter: drop-shadow(3px 4px 0 rgba(38, 33, 28, .18)); pointer-events: none; }
.hero-visual .s1 { width: 150px; left: -34px; bottom: -40px; transform: rotate(-6deg); animation: bob 4s ease-in-out infinite; }
.hero-visual .note {
  position: absolute; right: -12px; top: -22px; background: var(--yellow); border: var(--line); padding: 8px 16px;
  font: 700 1.5rem var(--font-hand); transform: rotate(5deg); box-shadow: var(--shadow);
}
@keyframes bob { 50% { transform: rotate(-6deg) translateY(-8px); } }

/* ---------- секции ---------- */
section { padding: 64px 0; }
.sec-head { max-width: 40em; margin-bottom: 30px; }
.sec-head .hand { display: block; margin-bottom: 4px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding-top: 34px; }
.step::before {
  counter-increment: s; content: counter(s); position: absolute; left: 18px; top: -18px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--pink); border: var(--line); display: grid; place-items: center; font: 800 1.1rem var(--font-head);
}
.tabs { display: inline-flex; gap: 8px; margin-bottom: 22px; }
.tab { border: var(--line); background: var(--card); padding: 9px 18px; border-radius: 999px; font: 700 .95rem var(--font-body); cursor: pointer; }
.tab[aria-selected='true'] { background: var(--ink); color: var(--paper); }
.grid-long { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.grid-short { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.vid { display: block; text-align: left; padding: 0; cursor: pointer; background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; font: inherit; color: inherit; transition: transform .12s, box-shadow .12s; width: 100%; }
.vid:hover { transform: translate(-2px, -3px) rotate(-.4deg); box-shadow: 7px 8px 0 var(--ink); }
.vid .th { position: relative; aspect-ratio: 16 / 9; background: #222; border-bottom: var(--line); }
.vid.vertical .th { aspect-ratio: 9 / 14; }
.vid .th img { width: 100%; height: 100%; object-fit: cover; }
.vid .th .dur { position: absolute; right: 8px; bottom: 8px; background: var(--ink); color: #fff; border-radius: 6px; font: 700 .75rem var(--font-body); padding: 2px 7px; }
.vid .th .soon { position: absolute; left: 8px; top: 8px; background: var(--pink); border: var(--line); border-radius: 999px; font: 700 .72rem var(--font-body); padding: 2px 9px; }
.vid .meta { padding: 12px 14px 14px; }
.vid .meta b { display: block; line-height: 1.25; font-size: .95rem; }
.vid .meta span { color: var(--muted); font-size: .82rem; }
.samples { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: center; margin-top: 46px; }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.files li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border: var(--line); border-radius: 12px; }
.files .ico { width: 38px; height: 38px; border-radius: 10px; border: var(--line); display: grid; place-items: center; font: 700 .72rem var(--font-body); background: var(--sky); flex: none; }
.files .grow { flex: 1; min-width: 0; }
.files .grow b { display: block; overflow-wrap: anywhere; }
.files .grow span { overflow-wrap: anywhere; }
.samples > *, .calc > *, .hero .wrap > * { min-width: 0; }
.free { background: var(--green); color: #fff; border: var(--line); border-radius: 999px; font: 700 .72rem var(--font-body); padding: 2px 9px; }

/* ---------- калькулятор ---------- */
.calc { display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px; align-items: start; }
.total { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.total .sum { font: 800 3rem var(--font-head); color: var(--yellow); line-height: 1.1; }
.total ul { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.total li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(244, 236, 221, .35); padding-bottom: 7px; }
.total .incl { color: var(--yellow-2); font-size: .92rem; }
.total .btn { width: 100%; }
.short-row { display: flex; align-items: center; gap: 16px; }
.short-row output { font: 800 1.6rem var(--font-head); min-width: 2.2ch; text-align: right; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 820px; }
details { background: var(--card); border: var(--line); border-radius: 14px; padding: 4px 18px; box-shadow: 3px 3px 0 var(--ink); }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
summary::after { content: '+'; font: 700 1.4rem/1 var(--font-head); }
details[open] summary::after { content: '–'; }
details p { color: var(--muted); }

.cta-band { background: var(--yellow); border: var(--line); border-radius: 26px; box-shadow: var(--shadow-lg); padding: 38px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.cta-band img { width: 170px; }
footer { border-top: var(--line); padding: 30px 0 46px; margin-top: 30px; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }

/* ---------- модальное окно видео ---------- */
dialog { border: var(--line); border-radius: 20px; padding: 0; background: #000; box-shadow: var(--shadow-lg); width: min(960px, 94vw); max-width: none; overflow: visible; }
dialog::backdrop { background: rgba(38, 33, 28, .68); backdrop-filter: blur(3px); }
dialog.vertical { width: min(380px, 92vw); }
dialog .player { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; }
dialog.vertical .player { aspect-ratio: 9 / 16; }
dialog iframe { width: 100%; height: 100%; border: 0; display: block; }
dialog .x { position: absolute; right: -10px; top: -14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: var(--line); background: var(--yellow); cursor: pointer; font: 800 1rem var(--font-body); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- кабинет и формы ---------- */
.page { padding: 38px 0 70px; min-height: 70vh; }
.narrow { width: min(520px, 100% - 32px); margin-inline: auto; }
.auth-card { margin-top: 20px; }
.split { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.order-list { display: grid; gap: 12px; }
.order-item { text-align: left; background: var(--card); border: var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; box-shadow: 3px 3px 0 var(--ink); width: 100%; }
.order-item[aria-current='true'] { background: var(--yellow-2); }
.order-item b { display: block; overflow-wrap: anywhere; }
.badge { display: inline-block; border: var(--line); border-radius: 999px; padding: 2px 10px; font: 700 .76rem var(--font-body); background: #fff; }
.badge.awaiting_payment { background: var(--yellow); }
.badge.payment_review { background: var(--sky); }
.badge.in_production { background: var(--pink-2); }
.badge.delivered { background: var(--green); color: #fff; }
.badge.cancelled { background: #ddd; color: #555; }
.timeline { display: flex; gap: 0; margin: 14px 0 22px; flex-wrap: wrap; }
.timeline div { flex: 1 1 120px; padding: 10px 12px; border: var(--line); margin-left: -2px; background: #fff; font-weight: 600; font-size: .85rem; text-align: center; }
.timeline div:first-child { border-radius: 12px 0 0 12px; margin-left: 0; }
.timeline div:last-child { border-radius: 0 12px 12px 0; }
.timeline .done { background: var(--green); color: #fff; }
.timeline .now { background: var(--yellow); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 14px 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.pay { background: var(--yellow-2); border: var(--line); border-radius: 14px; padding: 16px; margin: 16px 0; }
.chat { display: grid; gap: 10px; margin: 12px 0; max-height: 340px; overflow: auto; padding-right: 4px; }
.msg { max-width: 82%; padding: 10px 14px; border: var(--line); border-radius: 14px; background: #fff; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg small { display: block; color: var(--muted); font-size: .75rem; }
.msg.studio { background: var(--pink-2); margin-left: auto; }
.empty { text-align: center; padding: 40px 12px; color: var(--muted); }
.empty img { width: 150px; margin: 0 auto 10px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: var(--line); border-radius: 14px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(38, 33, 28, .18); font-size: .92rem; }
th { background: var(--paper-2); font-weight: 700; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--yellow-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 22px; }
.stat { background: var(--card); border: var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: 3px 3px 0 var(--ink); }
.stat b { display: block; font: 800 1.5rem var(--font-head); }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(30px); opacity: 0; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 12px 20px; font-weight: 600; transition: .25s; z-index: 99; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* появление при прокрутке */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } .hero-visual .s1 { animation: none; } html { scroll-behavior: auto; } }

@media (max-width: 920px) {
  .hero .wrap, .calc, .samples, .split, .cta-band { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .total { position: static; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; background: var(--paper); border-bottom: var(--line); padding: 12px 16px; margin: 0; }
  .nav-links.open { display: flex; }
  .burger { display: block; }
  .hero-visual .s1 { width: 110px; left: -8px; }
  .cta-band img { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .kv { grid-template-columns: 1fr; }
  .nav .wrap { gap: 8px; }
  .logo span { display: none; }
  .nav-end { gap: 6px; }
  .logo img { width: 34px; height: 34px; }
  .langs button { padding: 6px 8px; }
  .burger { width: 40px; height: 40px; }
  .files li { flex-wrap: wrap; }
  .nav-end .btn.primary, .nav-end a[href="/admin"] { display: none; }
}

/* форма загрузки в админке: поля в ряд, а не на всю ширину */
.inline > select, .inline > input[type="file"] { width: auto; flex: 0 1 auto; }

/* оферта и политика */
.doc { max-width: 780px; }
.doc h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 6px; }
.doc h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.doc p, .doc li { line-height: 1.6; }
.doc ol, .doc ul { padding-left: 22px; }
