/* PT Serif (ParaType, SIL OFL 1.1, лицензия в fonts/OFL.txt): свой файл, а не системная Georgia,
   которой нет на Android. Две части по unicode-range: браузер берёт только нужную. */
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ptserif-400-cyr-v19.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ptserif-400-lat-v19.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f6f3ee; --ink: #1b1b1b; --muted: #6b6560; --card: #ffffff;
  --line: #e3dbcf; --tag: #efe9df; --ok: #e7f0de;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
::selection { background: var(--ink); color: var(--bg); }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-text-size-adjust: 100%; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.serif { font-family: var(--serif); font-weight: 400; }

.bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(246, 243, 238, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar-name { font-weight: 600; font-size: 15px; text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.bar-name b { font-weight: 600; }
.bar-name small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.work-page .bar-name { flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.2; }
.work-page .bar-name small { font-size: 13px; }
.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 18px;
  border-radius: 12px; border: 1.5px solid var(--ink); text-align: center; cursor: pointer; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-line { background: transparent; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-sm { font-size: 13px; padding: 11px 16px; border-radius: 22px; }
.btn-wide { display: block; width: 100%; }
/* Нажатие: кнопка чуть проседает, интерфейс «слышит» палец. Только transform и цвет, без transition: all. */
.btn, .chip, .tchip, .ttoggle, .freset, .cnav, .gal-nav, .snd { transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.btn:active, .chip:active, .tchip:active, .ttoggle:active, .freset:active, .snd:active { transform: scale(0.97); }
.cnav:active, .gal-nav:active { transform: translateY(-50%) scale(0.94); }
.btn:focus-visible, .chip:focus-visible, .tchip:focus-visible, .ttoggle:focus-visible, .freset:focus-visible,
.svc-go:focus-visible, .card-t:focus-visible, .card-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

main { max-width: 1120px; margin: 0 auto; }
.hero { padding: 36px 16px 28px; }
.hero h1 { font-size: clamp(32px, 8vw, 56px); line-height: 1.08; margin: 0; max-width: 16em; text-wrap: balance; }
.hero p { color: var(--muted); margin: 14px 0 22px; max-width: 36em; }
/* Превью работ справа в первом экране: только компьютер; ролики ставит app.js */
.hero-reel { display: none; }
@media (min-width: 1200px) {
  .hero.has-reel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start; }
  .hero-reel { display: flex; gap: 12px; align-items: center; padding-top: 10px; }   /* верх превью на линии верха заголовка */
  .hero.has-reel h1 { font-size: 50px; }
  .reel-item { display: block; width: 152px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #e9e3d9;
    box-shadow: 0 0 0 1px var(--line);   /* светлые кадры не сливаются с фоном */
    transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
  .reel-item.reel-wide { width: 316px; aspect-ratio: 16 / 9; }   /* широкий ролик в своём формате, по центру рядом с вертикальным */
  .reel-item video, .reel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .reel-item.reel-img { width: auto; height: 270px; }   /* карточка товара в своём формате, высота как у ролика */
  .reel-item:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line), 0 10px 24px -12px rgba(27, 27, 27, .35); }
  .reel-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
}
@media (min-width: 1200px) and (max-width: 1439px) {   /* у узкого компьютера превью ниже: заголовок в 3 строки */
  .reel-item { width: 128px; }
  .reel-item.reel-img { height: 228px; }
}
.hero .hero-free { color: var(--ink); background: var(--ok); border-radius: 12px; padding: 12px 14px; margin: 18px 0 0;
  max-width: 36em; font-size: 15px; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.hero .hero-free p { margin: 0; color: var(--ink); flex: 1 1 18em; }
.hero .hero-free .free-note { display: block; margin-top: 6px; font-size: 14px; color: var(--ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.sec { padding: 40px 16px 8px; scroll-margin-top: 64px; }
.sec h2 { font-size: 28px; line-height: 1.15; margin: 0 0 16px; text-wrap: balance; }

.sec .lead { color: var(--muted); margin: -6px 0 16px; max-width: 40em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip, .tchip, .ttoggle { position: relative; font: inherit; font-size: 13px; min-height: 36px; padding: 6px 13px; border-radius: 18px;
  border: 1px solid #cfc6b8; background: transparent; color: var(--ink); cursor: pointer; }
.chip::before, .tchip::before, .ttoggle::before { content: ""; position: absolute; inset: -4px -3px; }   /* зона нажатия 44 px */
.ttoggle { display: inline-flex; align-items: center; gap: 4px; border-style: dashed; }
.ttoggle svg { width: 14px; height: 14px; transition: transform 200ms var(--ease-out); }
.ttoggle[aria-expanded="true"] { border-style: solid; background: var(--tag); }
.ttoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.chip.on, .tchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tools-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -4px 0 14px; padding: 10px 12px;
  background: var(--tag); border-radius: 14px; }
.tools-lab { font-size: 13px; color: var(--muted); margin-right: 2px; }
.tchip { background: var(--card); }
.tchip small { color: var(--muted); font-size: 11px; margin-left: 2px; }
.tchip.on small { color: #bdb7ae; }
.fstate { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: -4px 0 14px; font-size: 14px; }
.freset { font: inherit; font-size: 13px; min-height: 36px; padding: 6px 13px; border: 0; border-radius: 18px;
  background: var(--tag); color: var(--ink); cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; grid-auto-flow: row dense; }
.card { scroll-margin-top: 76px; display: block; background: var(--card); border-radius: 14px; overflow: hidden; text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.card-wide { grid-column: span 2; }   /* горизонтальный ролик: две колонки в 16:9 */
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.card:target { animation: here 2.4s ease-out; }          /* карточка, к которой вернулись со страницы работы */
.card:target:focus-visible { outline: none; }
@keyframes here { 0%, 40% { box-shadow: 0 0 0 3px var(--ink); } 100% { box-shadow: 0 0 0 3px transparent; } }
.card-m { position: relative; display: block; overflow: hidden; isolation: isolate; }
.card-m img { position: relative; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #e9e3d9;
  transition: transform 300ms var(--ease-out); }
.card-wide .card-m img { aspect-ratio: 16 / 9; }
.card-photo .card-m img { object-fit: contain; background: transparent; }
/* поля у фото не в 9:16: размытая копия той же обложки вместо пустого бежевого */
.card-m[style*="--fill"]::before { content: ""; position: absolute; inset: -24px; z-index: -1;
  background: var(--fill) center / cover; filter: blur(16px) saturate(1.1); opacity: .85; }
/* превью ролика поверх обложки; видно, когда видео реально пошло (app.js, класс pv-on) */
.pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none;
  transition: opacity 200ms var(--ease-out); }
.card.pv-on .pv { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(27, 27, 27, .35); }
  .card:hover .card-m img { transform: scale(1.03); }
  .btn-dark:hover { background: #333; }
  .btn-line:hover, .chip:not(.on):hover, .ttoggle:hover { background: var(--tag); }
  .tchip:not(.on):hover { background: var(--bg); }
  .btn-light:hover { background: var(--tag); border-color: var(--tag); }
}
.card:active { transform: scale(0.985); }
.play { position: absolute; z-index: 2; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .88); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.card-t { display: block; padding: 8px 10px 11px; color: inherit; text-decoration: none; }
.card-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.card-track::-webkit-scrollbar { display: none; }
.card-track img { flex: 0 0 100%; scroll-snap-align: start; }
.cnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border: 0;
  border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .25); }
.cnav::before { content: ""; position: absolute; inset: -4px; }
.cnav svg { width: 18px; height: 18px; }
.gal-nav svg { width: 22px; height: 22px; }
.cnav.prev { left: 4px; }
.cnav.next { right: 4px; }
.ccount { position: absolute; z-index: 2; top: 8px; right: 8px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px;
  font-weight: 600; padding: 3px 8px; border-radius: 10px; }
@media (hover: hover) {
  .card-multi .cnav { opacity: 0; transition: opacity .15s; }
  .card-multi:hover .cnav, .card-multi:focus-within .cnav { opacity: 1; }
}
.card-t b { display: block; font-size: 14px; line-height: 1.25; }
.card-t small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

.free { background: var(--ok); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.svc { background: var(--card); border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; }
.svc-grid { display: grid; gap: 8px; }
.svc-grid .svc { margin: 0; display: flex; flex-direction: column; }
.svc .pk { color: var(--ink); font-weight: 600; }
.svc-cta { margin-top: 14px; }
.svc-more { margin-top: 26px; }
.svc-more summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 12px; }
.svc-more summary::-webkit-details-marker { display: none; }
.svc-more summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg); transition: transform 200ms var(--ease-out); }
.svc-more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.svc-more summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
/* разделы в шапке: только широкий экран */
.bar-nav { display: none; }
@media (min-width: 900px) {
  .bar-nav { display: flex; gap: 24px; margin-left: auto; margin-right: 24px; font-size: 15px; }
  .bar-nav a { text-decoration: none; color: var(--muted); padding: 10px 0; }
  .bar-nav a:hover { color: var(--ink); }
}
.link-go { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; font-weight: 600; font-size: 15px; }
/* телефон и узкий экран: три обложки работ в первом экране (на широком справа играют превью) */
.hero-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; max-width: 420px; }
.hero-strip a { display: block; border-radius: 12px; overflow: hidden; background: #e9e3d9; box-shadow: 0 0 0 1px var(--line); }
.hero-strip img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
@media (min-width: 1200px) { .hero-strip { display: none; } }
.svc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.price { font-weight: 700; white-space: nowrap; }
.svc small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.svc .ex { color: var(--ink); }
.svc-go { display: inline-flex; align-items: center; min-height: 44px; margin: 2px 0 -10px; font-size: 14px; font-weight: 600; }
.like { margin: 18px 0 0; padding: 12px 14px; background: var(--card); border-radius: 12px; font-size: 15px; }
.svc-group { font-size: 22px; margin: 26px 0 12px; }
.faq { display: grid; gap: 8px; max-width: 760px; }
.faq details { background: var(--card); border-radius: 14px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 16px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 9px; width: 9px; height: 9px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 14px; }
.faq details p { margin: 0; padding: 0 16px 14px; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .faq summary:hover { color: #000; } }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 8px; }
.about p { margin: 0 0 10px; }
.facts { list-style: none; padding: 0; margin: 14px 0 12px; display: grid; gap: 8px; max-width: 40em; }
.facts li { background: var(--card); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.tools-line { font-size: 13px; color: var(--muted); }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.tags i { font-style: normal; font-size: 12px; background: var(--tag); padding: 3px 9px; border-radius: 10px; }

.foot { margin: 36px 16px 24px; background: var(--ink); color: #fff; border-radius: 18px; padding: 26px 18px; }
.foot h2 { font-size: 26px; margin: 0 0 8px; }
.foot p { color: #bdb7ae; margin: 0 0 16px; }
.foot-handle { margin: 14px 0 0; font-size: 14px; color: #bdb7ae; }
.foot-handle a { color: #fff; }
/* на сенсорных экранах альбом листается пальцем, стрелки закрывали текст на обложках; счётчик «1 / N» остаётся */
@media (hover: none) { .card-multi .cnav { display: none; } }
.ccount { display: inline-flex; align-items: center; gap: 2px; }
.cswipe { width: 11px; height: 11px; display: none; }
@media (hover: none) { .cswipe { display: block; } }
/* телефон: пока внизу видна кнопка «Написать в Telegram», такая же в шапке прячется */
@media (max-width: 899px) {
  .bar .btn { transition: opacity 200ms var(--ease-out); }
  body.cta-on .bar .btn { opacity: 0; pointer-events: none; }
}
.foot-link { display: block; margin-top: 14px; font-size: 14px; color: #bdb7ae; }

.work { padding: 12px 16px 96px; }
.gal { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; background: #000;
  scrollbar-width: none; max-height: 64vh; margin: 0 auto; }
.gal::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.slide video, .slide img { width: 100%; height: 100%; object-fit: contain; }
.snd { position: absolute; left: 10px; bottom: 10px; z-index: 2; font: inherit; font-size: 13px; color: #fff; background: rgba(0, 0, 0, .55);
  border: 0; border-radius: 22px; min-height: 44px; padding: 10px 14px; cursor: pointer; }
.slide.paused::after { content: "▶"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px;
  border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 24px; display: flex; align-items: center;
  justify-content: center; padding-left: 4px; pointer-events: none; }
.gal-wrap { position: relative; margin: 0 auto; max-width: calc(64vh * var(--ar, 1)); }   /* стрелки по краям ролика */
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border: 0;
  border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.gal-nav.prev { left: 10px; }
.gal-nav.next { right: 10px; }
.dots { display: flex; justify-content: center; flex-wrap: wrap; margin-top: 2px; }
.dot { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.dot::after { content: ""; position: absolute; inset: 17px; border-radius: 50%; background: #cfc6b8; }
.gcount { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }
.dot.on::after { background: var(--ink); }
.work-text h1 { font-size: 30px; line-height: 1.15; margin: 18px 0 6px; }
.work-text .result { font-size: 17px; line-height: 1.45; margin: 12px 0 4px; max-width: 34em; }
.lab { font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.work-text p { margin: 0 0 10px; }
.work-text ul { margin: 0 0 8px; padding-left: 20px; }
.work-text li { margin-bottom: 5px; }
.sub { font-size: 15px; margin: 12px 0 4px; }
.pn { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; font-size: 14px; }
.pn a { color: var(--muted); }
/* Главная, телефон: «Написать» у большого пальца после первого экрана, прячется у подвала (app.js) */
.home-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(246, 243, 238, 0), var(--bg) 35%);
  transition: transform 250ms var(--ease-out), opacity 200ms var(--ease-out); }
.home-cta:not(.show) { transform: translateY(100%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .home-cta { transition: opacity 200ms ease; }
  .home-cta:not(.show) { transform: none; }
  .card, .card-m img, .btn, .chip, .tchip { transition-property: background-color, color, box-shadow, opacity; }
  .card:hover, .card:active, .card:hover .card-m img { transform: none; }
}
.stick { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(246, 243, 238, 0), var(--bg) 35%); }

.nf { padding: 80px 16px; text-align: center; }
.nf h1 { font-size: 34px; margin: 0 0 10px; }
.nf p { color: var(--muted); margin: 0 0 22px; }

@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .sec, .hero { padding-left: 24px; padding-right: 24px; }
  /* края шапки совпадают с краями контента (main 1120 px + поля 24 px) */
  .bar { padding-left: max(24px, calc((100% - 1120px) / 2 + 24px)); padding-right: max(24px, calc((100% - 1120px) / 2 + 24px)); }
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (min-width: 900px) { .home-cta { display: none; } }
@media (min-width: 900px) {
  .gal { max-height: 82vh; }
  .gal-wrap { max-width: calc(82vh * var(--ar, 1)); }
  .work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; padding: 24px 24px 40px; }
  .work-media { position: sticky; top: 76px; }
  .work-text h1 { margin-top: 0; }
  .stick { position: static; margin-top: 16px; padding: 0; background: none; max-width: 420px; }
}
@media (min-width: 1152px) {
  .foot { max-width: 1072px; margin: 36px auto 24px; }
}
