/* TiheaLab — демо. Характер C «Имя»: тёплый чёрный рамки номера, оранжевый коня плоскостями
   (створка, отзывы, «Tihea» в финале), Russo One + Rubik. Mobile first: база 390 px, расширение через min-width. */
:root {
  --bg: #0c0b0a;
  --bg2: #16130f;
  --fg: #eeeae4;
  --fg2: #cbc6be;
  --mute: #9b968e;
  --acc: #f07a3a;
  --acc-hi: #f58d55;
  --seam: #d3672f;
  --ink: #0c0b0a;
  --line: rgb(238 234 228 / 0.14);
  --pad: max(16px, 4vw);
  --max: 1320px;
  --f-d: "Russo One", "Arial Black", system-ui, sans-serif;
  --f-t: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kit-fg: #eeeae4;
  --kit-bg: #0c0b0a;
  --kit-accent: #f07a3a;
  --kit-line: rgb(238 234 228 / 0.14);
  --kit-radius: 0px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--fg); font: 400 16px/1.55 var(--f-t); -webkit-font-smoothing: antialiased; }
/* height: auto — иначе атрибут height перебивает aspect-ratio и кадр вытягивается в столб (ревью R1) */
img, video { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.name { font-family: var(--f-d); font-weight: 400; color: var(--fg); text-decoration: none; letter-spacing: 0; }
.name__o { color: var(--acc); }
.h2 { margin: 0 0 12px; font-family: var(--f-d); font-weight: 400; font-size: 32px; font-size: clamp(30px, 7.6vw, 58px); line-height: 1.05; text-wrap: balance; }
.lead { margin: 0 0 28px; max-width: 52ch; color: var(--fg2); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 4px; font: 500 16px/1.2 var(--f-t); text-decoration: none; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.btn--lg { min-height: 52px; padding: 0 26px; }
.btn--acc { background: var(--acc); color: var(--ink); }
.btn--acc:hover { background: var(--acc-hi); }
.btn--line { border: 1px solid rgb(238 234 228 / 0.34); color: var(--fg); }
.btn--line:hover { border-color: var(--fg); }

/* шапка */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); background: var(--bg); border-bottom: 1px solid var(--line); }
.top__logo { display: inline-flex; align-items: center; min-height: 44px; font-size: 23px; }
.top__demo { padding: 2px 7px; border: 1px solid var(--line); font-size: 12px; line-height: 1.4; color: var(--mute); }
.top__nav, .top__tel, .top__book { display: none; }
.top__panel[hidden] { display: none; }
.top__call { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; color: var(--fg); }
.top__menu { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer; }
.top__menu svg { width: 26px; height: 26px; }
.top__panel { position: absolute; top: 100%; left: 0; right: 0; display: grid; padding: 4px var(--pad) 12px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgb(0 0 0 / 0.5); }
.top__panel a, .top__panel .nav-lock { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg); font: 400 17px/1.2 var(--f-t); text-align: left; text-decoration: none; cursor: pointer; }
.top__panel > :last-child { border-bottom: 0; }
.nav-lock { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--fg2); font: 400 15px/1.2 var(--f-t); cursor: pointer; }
.nav-lock svg { width: 14px; height: 14px; flex: none; color: var(--acc); }
.nav-lock:hover { color: var(--fg); }
.top__panel .nav-lock svg { width: 16px; height: 16px; }
.top__call svg { width: 24px; height: 24px; }

/* первый экран: телефон — петля во всю ширину, текст под ней в пределах экрана */
.hero { display: grid; }
.hero__media { position: relative; height: max(340px, min(177.78vw, calc(100svh - 56px - 304px))); overflow: hidden; background: #000; }
.hero__loop { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 80%; }
.hero__text { padding: 20px var(--pad) 18px; }
.hero h1 { margin: 0; font-family: var(--f-d); font-weight: 400; font-size: 34px; font-size: clamp(31px, 8.4vw, 72px); line-height: 1.04; text-wrap: balance; }
.hero__sub { margin: 10px 0 0; max-width: 36ch; color: var(--fg2); line-height: 1.45; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 18px; }
.hero__tel { display: inline-flex; align-items: center; min-height: 48px; font-weight: 500; font-size: 17px; text-decoration: none; }
.hero__rating { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 14px; color: var(--mute); }
.hero__rating svg { width: 16px; height: 16px; flex: none; color: var(--fg); }

/* фирменная секция: створка */
.gate { padding: 72px 0 80px; }
.gate__tabs { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.gate__tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 56px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg); font: 500 14px/1.2 var(--f-t); white-space: nowrap; cursor: pointer; transition: background-color .25s, color .25s; }
.gate__tabs button:nth-child(odd) { border-right: 1px solid var(--line); }
.gate__lockico svg { display: block; width: 14px; height: 14px; }
.gate__tabs button[aria-pressed="true"] { background: var(--acc); color: var(--ink); }
.gate__tabs button:not([aria-pressed="true"]):hover { color: var(--acc); }
.gate__pane { margin-top: 20px; }
.gate__pane[hidden] { display: none; }
.gate__stage { position: relative; margin: 0; overflow: hidden; }
.gate__stage img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--bg2); }
.gate__stage figcaption { padding-top: 10px; font-size: 13px; color: var(--mute); }
/* створка: плоскость цвета коня со швами панелей; открыта по умолчанию (без JS), закрывает кадр по .is-shut */
.gate__door { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 4 / 5; display: flex; flex-direction: column; background: var(--acc); transform: translateY(-100%); transition: transform .6s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.gate__door i { flex: 1; border-bottom: 2px solid var(--seam); }
.gate__door i:last-child { flex: 0.6; border-bottom: 8px solid var(--ink); }
.gate__door.is-shut { transform: none; transition-duration: .25s; transition-timing-function: cubic-bezier(.5, 0, .9, .4); }
.gate__door.no-anim { transition: none; }

.rows { margin: 20px 0 0; padding: 0; list-style: none; }
.rows li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rows li:first-child { border-top: 1px solid var(--line); }
.rows span { line-height: 1.4; }
.rows small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--mute); }
.rows b { font-weight: 400; font-size: 14px; color: var(--mute); white-space: nowrap; }
.rows b[data-fact] { font: 400 19px/1.2 var(--f-d); color: var(--fg); }

/* вкладка «Пришлю фото»: закрытая оценка по фото, интерфейс без данных */
.shots { display: grid; grid-template: 1.25fr 1fr / 1fr 1fr; gap: 6px; aspect-ratio: 4 / 5; padding: 6px; background: var(--bg2); }
.shot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; border: 2px dashed rgb(240 122 58 / 0.55); color: var(--acc); text-align: center; }
.shot--seat { grid-column: 1 / -1; }
.shot svg { width: 44px; height: 44px; margin-bottom: 4px; }
.shot b { font: 400 18px/1.1 var(--f-d); color: var(--fg); }
.shot span { font-size: 13px; color: var(--mute); }
.gate__lock { cursor: pointer; }
.gate__soon { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--bg); border: 1px solid var(--acc); color: var(--acc); font: 500 12px/1.2 var(--f-t); }
.gate__soon svg { width: 14px; height: 14px; }
.gate__form { margin-top: 20px; cursor: pointer; }
.gate__form .rows { margin-top: 0; }
.gate__send { width: 100%; margin-top: 20px; border: 0; cursor: pointer; }
.gate__lock.is-knock, .gate__form.is-knock { animation: none; }

/* услуги */
.svc { padding: 72px 0 80px; border-top: 1px solid var(--line); }
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 68px; padding: 16px 0; border: 0; background: none; color: var(--fg); font: 400 21px/1.2 var(--f-d); text-align: left; cursor: pointer; }
.acc__btn svg { width: 24px; height: 24px; flex: none; transition: transform .3s; }
.acc__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.acc__btn:hover span { color: var(--acc); }
.acc__body { display: grid; gap: 20px; padding: 4px 0 32px; }
.acc__body .rows { margin: 0; }
.acc__media { margin: 0; max-width: 440px; }
.acc__media > img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.acc__media figcaption { padding-top: 8px; font-size: 13px; color: var(--mute); }

/* работы: одна сцена — кадр (до/после, ролик, фото) и лента всех работ */
.works { padding: 72px 0 80px; border-top: 1px solid var(--line); }
.works .h2 { margin-bottom: 28px; }
.wk { gap: 14px; }
.wk__frame { --wk-h: min(72svh, 118vw); position: relative; overflow: hidden; display: grid; place-items: center; height: var(--wk-h); background: var(--bg2); }
/* поля вокруг вертикального кадра — размытое продолжение самого кадра, а не чёрная заливка */
.wk__frame::before { content: ""; position: absolute; inset: -24px; background: var(--wk-bg, none) center / cover; filter: blur(26px) brightness(.62) saturate(1.2); }
.wk__stage { position: relative; --wk-r: 0.5625; width: min(100%, calc(var(--wk-r) * var(--wk-h))); margin: 0; }
.wk__cap { min-height: 4.4em; margin: 0; max-width: 60ch; font-size: 15px; line-height: 1.45; color: var(--fg2); }
.wk__rail { gap: 6px; }
.wk .kit-works__item { width: 88px; border-width: 2px; }
.wk .kit-works__item[aria-pressed="true"] { border-color: var(--acc); }
.more { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 20px; font-weight: 500; text-underline-offset: 5px; }
.more svg { width: 18px; height: 18px; }

/* студия */
.studio { padding: 56px 0; background: var(--bg2); }
.studio__in { display: grid; gap: 24px; }
.studio__media { margin: 0; }
.studio__media video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; background: #000; }
.studio__quote { margin: 8px 0 0; max-width: 30ch; font-size: 20px; line-height: 1.35; }
.studio__src { margin: 10px 0 0; font-size: 14px; color: var(--mute); }
.studio__addr { margin: 16px 0 0; max-width: 46ch; color: var(--fg2); }

/* отзывы — оранжевая плоскость */
.rev { padding: 72px 0 64px; background: var(--acc); color: var(--ink); }
.rev__head small { display: inline-block; margin-left: 6px; font: 500 16px/1.4 var(--f-t); vertical-align: middle; }
.rev__list { margin: 28px 0 0; padding: 0; list-style: none; }
.rev__list li { padding: 20px 0; border-top: 1px solid rgb(12 11 10 / 0.26); }
.rev__list p { margin: 0; max-width: 60ch; font-size: 18px; line-height: 1.45; }
.rev__by { display: block; margin-top: 8px; font-size: 14px; color: rgb(12 11 10 / 0.76); }
.more--ink { color: var(--ink); }

/* контакты */
.contacts { padding: 72px 0 80px; }
.contacts__in { display: grid; gap: 32px; }
.contacts__list { margin: 20px 0 0; }
.contacts__list > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contacts__list > div:first-child { border-top: 1px solid var(--line); }
.contacts__list dt { font-size: 13px; color: var(--mute); }
.contacts__list dd { margin: 2px 0 0; font-size: 18px; line-height: 1.4; }
.contacts__list dd a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 5px; }
.contacts__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.contacts__map > a { color: var(--fg); }

/* слово-маска (компонент кита): фото работ внутри букв; Russo One — самый жирный шрифт пары, имитацию жирности не включаем */
.kit-wordmask { font-family: var(--f-d); font-weight: 400; letter-spacing: 0; line-height: 1; text-align: center; }
.wmark { padding: 40px 0 8px; border-top: 1px solid var(--line); }
.wmark .wrap, .foot > .wrap:first-child { container-type: inline-size; }
.wmark__word { font-size: 16cqw; }
.foot__word { margin-bottom: 36px; font-size: 31cqw; }

.foot { padding: 56px 0 104px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot p { margin: 0; max-width: 70ch; }
.foot b { font-weight: 500; color: var(--fg); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); }

.kit-ba__tag { line-height: 1.4; }

/* липкая панель кита */
.kit-bar > a { font: 500 16px/1.2 var(--f-t); border-radius: 4px; }
.kit-bar > a:first-child { border: 1px solid rgb(238 234 228 / 0.34); color: var(--fg); }
.kit-bar > a:last-child { background: var(--acc); color: var(--ink); }

@media (min-width: 600px) {
  .contacts__list > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: baseline; }
  .studio__media { max-width: 420px; }
}

@media (min-width: 900px) {
  .top { gap: 28px; }
  .top__call { display: none; }
  .top__tel { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-weight: 500; text-decoration: none; }
  .top__book { display: inline-flex; min-height: 40px; padding: 0 18px; }
  .lead { font-size: 18px; }
  .studio__in { grid-template-columns: 320px 1fr; gap: 64px; align-items: center; }
  .studio { padding: 72px 0; }
  .studio__media video { aspect-ratio: 9 / 16; object-position: 50% 50%; }
  .studio__quote { font-size: 28px; }
  .foot { padding-bottom: 28px; }
}

@media (min-width: 1024px) {

  .hero { grid-template-columns: 1fr 1fr; min-height: calc(100svh - 56px); }
  .hero__media { order: 2; height: auto; }
  .hero__loop { position: absolute; inset: 0; object-position: 50% 50%; }
  .hero__text { order: 1; align-self: end; padding: 64px 56px 80px max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); }
  .hero__sub { font-size: 18px; margin-top: 16px; }
  .hero__cta { margin-top: 28px; }

  .gate, .svc, .works, .contacts { padding: 112px 0 120px; }
  .gate__box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 512px); grid-template-rows: auto 1fr; column-gap: 72px; }
  .gate__tabs { grid-column: 1; grid-row: 1; grid-template-columns: 1fr; }
  .gate__tabs button { justify-content: flex-start; min-height: 64px; padding: 0 20px; font-size: 20px; text-align: left; }
  .gate__tabs button:nth-child(odd) { border-right: 0; }
  .gate__lockico svg { width: 18px; height: 18px; }
  .gate__pane { display: contents; }
  .gate__pane[hidden] { display: none; }
  .gate__stage { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .gate .rows { grid-column: 1; grid-row: 2; margin-top: 40px; }
  .gate .gate__form { grid-column: 1; grid-row: 2; margin-top: 40px; }
  .gate__form .rows { margin-top: 0; }
  .gate__send { width: auto; }

  .wk { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px 64px; align-items: start; }
  .wk__frame { --wk-h: min(78svh, 720px); }
  .wk__rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; overflow: visible; }
  .wk .kit-works__item { width: 100%; }
  .acc__body { grid-template-columns: 360px minmax(0, 1fr); gap: 56px; align-items: start; }
  .acc__media > img { aspect-ratio: auto; }
  .acc__btn { font-size: 26px; min-height: 80px; }
  .rev { padding: 96px 0 80px; }
  .rev__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
  .contacts__in { grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
}

@media (min-width: 1280px) {
  .top__menu, .top__panel { display: none; }
  .top__nav { display: flex; align-items: center; gap: 22px; margin-left: 12px; }
  .top__nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--fg2); text-decoration: none; }
  .top__nav a:hover { color: var(--fg); }
  .top__book { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gate__door { transition: none; }
}
