/* Хаер Хэир — анимации и «вау»-блоки. Всё отключается при prefers-reduced-motion. */

/* ---------- интро: знак собирается из штрихов ---------- */
.intro { display: none; }
.has-intro .intro {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 200; background: var(--bg);
  animation: intro-out .9s cubic-bezier(.76, 0, .24, 1) 1.55s forwards;
}
.intro svg { width: 92px; height: auto; color: var(--brass); overflow: visible; }
.intro .b { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); animation: bar-in .55s var(--ease) forwards; }
.intro .b:nth-child(1) { animation-delay: .1s; }
.intro .b:nth-child(2) { animation-delay: .2s; transform-origin: 50% 0; }
.intro .b:nth-child(3) { animation-delay: .3s; transform-origin: 50% 0; }
.intro .b:nth-child(4) { animation-delay: .4s; }
.intro .x { transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); animation: bar-x .5s var(--ease) .75s forwards; }
.intro__word { position: absolute; bottom: 12vh; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .5em; text-transform: uppercase; color: var(--mute); opacity: 0; animation: fade-in .6s ease .8s forwards; }
@keyframes bar-in { to { transform: none; } }
@keyframes bar-x { to { transform: none; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes intro-out { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
.has-intro .intro { clip-path: inset(0 0 0 0); }

/* ---------- первый экран ---------- */
.hero__title .ln { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.hero__title .ln > span { display: block; }
.js .hero__title .ln > span { transform: translateY(105%); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.js.is-loaded .hero__title .ln > span { transform: none; }
.js.is-loaded .hero__title .ln:nth-child(2) > span { transition-delay: .12s; }
.hero__title { position: relative; }
.razor {
  position: absolute; left: -2%; top: 50%; width: 104%; height: 2px; background: linear-gradient(90deg, transparent, var(--brass-2) 20%, #fff 50%, var(--brass-2) 80%, transparent);
  transform: scaleX(0); transform-origin: 0 50%; opacity: 0; pointer-events: none; box-shadow: 0 0 18px rgba(203,178,138,.6);
}
.is-loaded .razor { animation: razor 1.3s cubic-bezier(.7, 0, .2, 1) .55s forwards; }
@keyframes razor {
  0% { transform: scaleX(0); opacity: 1; transform-origin: 0 50%; }
  55% { transform: scaleX(1); opacity: 1; transform-origin: 0 50%; }
  56% { transform-origin: 100% 50%; }
  100% { transform: scaleX(0); opacity: 1; transform-origin: 100% 50%; }
}
.js .hero .fx-up { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js.is-loaded .fx-up { opacity: 1; transform: none; }
.js.is-loaded .fx-up.d1 { transition-delay: .5s; } .js.is-loaded .fx-up.d2 { transition-delay: .65s; } .js.is-loaded .fx-up.d3 { transition-delay: .8s; } .js.is-loaded .fx-up.d4 { transition-delay: .95s; }
.hero__media { will-change: transform; overflow: hidden; }
.hero__media img { transform: scale(1.14); transition: transform 2.6s cubic-bezier(.2, .7, .2, 1); }
.is-loaded .hero__media img { transform: scale(1.02); }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 1px; height: 54px; background: var(--line-2); overflow: hidden; }
.scroll-cue::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--brass); animation: cue 1.8s cubic-bezier(.7, 0, .3, 1) infinite; }
@keyframes cue { to { top: 100%; } }

/* ---------- логотип = прогресс страницы ---------- */
.logo__mark .fill { clip-path: inset(var(--p-inv, 100%) 0 0 0); transition: clip-path .1s linear; }
.logo__mark .base { opacity: .28; }

/* ---------- заголовки по словам ---------- */
.wsplit .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.wsplit .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 70ms); }
.wsplit.is-in .w > span { transform: none; }

/* ---------- картинки: шторка ---------- */
.js .wipe { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1); }
.js .wipe.is-in { clip-path: inset(0 0 0 0); }
.js .wipe img { transform: scale(1.18); transition: transform 1.8s cubic-bezier(.2, .7, .2, 1); }
.js .wipe.is-in img { transform: scale(1); }
.parallax { will-change: transform; }

/* ---------- бегущая строка ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(20px, 3vw, 36px) 0; user-select: none; }
.marquee__row { display: flex; width: max-content; will-change: transform; }
.marquee__row + .marquee__row { margin-top: 6px; }
.marquee__row span { font-family: var(--display); font-weight: 600; font-size: clamp(64px, 10vw, 168px); line-height: .95; text-transform: uppercase; white-space: nowrap; padding-right: .3em; display: inline-flex; align-items: center; gap: .3em; }
.marquee__row span.o { color: transparent; -webkit-text-stroke: 1.2px rgba(238,236,229,.45); }
.marquee__row svg { width: .34em; height: .5em; color: var(--brass); flex: none; }

/* ---------- услуги: фото за курсором ---------- */
.svc-float { position: fixed; left: 0; top: 0; width: 300px; height: 380px; pointer-events: none; z-index: 30; overflow: hidden; opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(-4deg); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.svc-float.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
.svc-float img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); opacity: 0; transition: opacity .3s; }
.svc-float img.on { opacity: 1; }
.fx-float .svc { grid-template-columns: 90px 1fr 180px 160px 48px; }
.fx-float .svc__img { display: none; }
.svc::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(180,155,116,.14), rgba(180,155,116,0) 70%); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease); pointer-events: none; }
.svc:hover::before { transform: none; }
.svc__name { transition: transform .5s var(--ease), color .3s; }
.svc:hover .svc__name { transform: translateX(18px); }
.svc:hover .svc__price { color: var(--brass); }

/* ---------- собери визит ---------- */
.builder { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.builder__group + .builder__group { margin-top: 36px; }
.builder__group > p { margin-bottom: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span {
  display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 16px 20px; border: 1px solid var(--line-2);
  transition: border-color .25s, background .25s, color .25s, transform .25s var(--ease);
}
.opt span b { font-weight: 500; font-size: 16px; }
.opt span small { font-size: 13px; color: var(--mute); }
.opt:hover span { border-color: var(--ink-2); }
.opt input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-2px); }
.opt input:checked + span small { color: #5b574f; }
.opt input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 3px; }

.receipt { position: sticky; top: calc(var(--header-h) + 24px); background: var(--ink); color: var(--bg); padding: 34px 34px 30px; font-size: 15px; transform: rotate(1deg); box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.receipt::before, .receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; background: radial-gradient(circle at 6px 0, transparent 6px, var(--ink) 6.5px) 0 0 / 12px 12px repeat-x; }
.receipt::before { top: -12px; transform: rotate(180deg); }
.receipt::after { bottom: -12px; }
.receipt__head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed #b9b5aa; padding-bottom: 18px; margin-bottom: 14px; }
.receipt__head svg { width: 28px; color: var(--bg); }
.receipt__head span { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #6b675f; text-align: right; line-height: 1.6; }
.receipt__lines { min-height: 120px; }
.receipt__line { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; animation: print .45s var(--ease) both; }
.receipt__line s { color: #8e8a80; margin-right: 8px; }
.receipt__empty { color: #8e8a80; padding: 8px 0; }
@keyframes print { from { opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0); } }
.receipt__save { display: none; margin-top: 10px; padding: 10px 12px; background: var(--brass); color: var(--bg); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.receipt__save.on { display: block; animation: print .45s var(--ease) both; }
.receipt__total { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px dashed #b9b5aa; margin-top: 16px; padding-top: 18px; }
.receipt__total b { font-family: var(--display); font-weight: 600; font-size: 64px; line-height: .9; }
.receipt__total small { display: block; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #6b675f; }
.receipt .btn { width: 100%; margin-top: 24px; background: var(--bg); color: var(--ink); }
.receipt .btn:hover { background: #2a2b27; }
.receipt__note { font-size: 12px; color: #6b675f; margin-top: 12px; text-align: center; }
.stamp { position: absolute; right: 22px; bottom: 120px; width: 96px; height: 96px; border: 2px solid var(--brass); border-radius: 50%; display: grid; place-items: center; color: var(--brass); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; text-align: center; line-height: 1.3; transform: rotate(-16deg) scale(0); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
.stamp.on { transform: rotate(-16deg) scale(1); opacity: .9; }

/* ---------- мастера: 3D-наклон ---------- */
.masters { perspective: 1200px; }
.master__ph { transform-style: preserve-3d; transition: transform .6s var(--ease); }
.master__ph .big-n { position: absolute; right: 12px; bottom: -8px; font-family: var(--display); font-weight: 600; font-size: 150px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(238,236,229,.7); transform: translateZ(40px); pointer-events: none; }
.master__ph::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.14), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.master:hover .master__ph::after { opacity: 1; }

/* ---------- работы: горизонтальная лента ---------- */
.hscroll { position: relative; }
.hscroll__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding-top: var(--header-h); }
.hscroll__track { display: flex; gap: clamp(14px, 1.6vw, 24px); padding: 0 var(--gutter); will-change: transform; }
.hscroll__item { position: relative; flex: none; height: min(62vh, 620px); overflow: hidden; background: var(--bg-3); }
.hscroll__item img { height: 100%; width: auto; max-width: none; object-fit: cover; filter: grayscale(1) contrast(1.06); transition: filter .6s var(--ease), transform 1s var(--ease); }
.hscroll__item:hover img { filter: grayscale(0); transform: scale(1.03); }
.hscroll__item figcaption { position: absolute; left: 18px; bottom: 16px; right: 18px; display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.hscroll__item figcaption b { font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: 0; color: var(--brass); }
.hscroll__end { flex: none; width: min(460px, 80vw); height: min(62vh, 620px); border: 1px solid var(--line-2); display: flex; flex-direction: column; justify-content: space-between; padding: 36px; }
.hscroll__end .h2 { font-size: clamp(56px, 6vw, 96px); }
.hscroll__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 0 var(--gutter); margin-bottom: clamp(24px, 3vw, 40px); max-width: calc(var(--wrap) + var(--gutter) * 2); width: 100%; margin-left: auto; margin-right: auto; }
.hscroll__bar { height: 1px; background: var(--line); margin: clamp(24px, 3vw, 40px) var(--gutter) 0; position: relative; }
.hscroll__bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brass); width: calc(var(--hp, 0) * 100%); }

/* ---------- отзывы: две бегущие колонки ---------- */
.rev-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; height: 640px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent); }
.rev-col { display: flex; flex-direction: column; gap: 16px; animation: col-up 38s linear infinite; }
.rev-col.down { animation-name: col-down; }
.rev-cols:hover .rev-col { animation-play-state: paused; }
@keyframes col-up { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 8px)); } }
@keyframes col-down { from { transform: translateY(calc(-50% - 8px)); } to { transform: translateY(0); } }

/* ---------- заливка текста при прокрутке ---------- */
.fill-text { color: transparent; -webkit-text-stroke: 1.5px rgba(238,236,229,.5); background: linear-gradient(90deg, var(--ink) 0 50%, transparent 50% 100%) no-repeat; background-size: 200% 100%; background-position: calc(100% - var(--f, 0) * 100%) 0; -webkit-background-clip: text; background-clip: text; }

/* ---------- курсор ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button, .has-cursor label { cursor: none; }
  .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; }
  .cursor__dot { position: fixed; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--brass); }
  .cursor__ring { position: fixed; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 1px solid rgba(238,236,229,.5); display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s; }
  .cursor__ring span { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--bg); opacity: 0; transition: opacity .2s; white-space: nowrap; font-weight: 600; }
  .cursor.is-link .cursor__ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-color: var(--brass); }
  .cursor.is-label .cursor__ring { width: 104px; height: 104px; margin: -52px 0 0 -52px; background: var(--brass); border-color: var(--brass); }
  .cursor.is-label .cursor__ring span { opacity: 1; }
  .cursor.is-hidden { opacity: 0; }
}

@media (max-width: 960px) {
  .builder { grid-template-columns: 1fr; }
  .receipt { position: relative; top: 0; transform: none; }
  .hscroll { height: auto !important; }
  .hscroll__sticky { position: relative; height: auto; padding: clamp(80px, 10vw, 140px) 0; }
  .hscroll__track { transform: none !important; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hscroll__track::-webkit-scrollbar { display: none; }
  .hscroll__item, .hscroll__end { scroll-snap-align: start; height: 440px; }
  .hscroll__bar { display: none; }
  .rev-cols { height: auto; -webkit-mask-image: none; mask-image: none; grid-template-columns: 1fr; }
  .rev-col { animation: none; }
  .rev-col .dup { display: none; }
}
@media (max-width: 680px) {
  .opt span { min-width: 0; }
  .opts { display: grid; grid-template-columns: 1fr 1fr; }
  .receipt { padding: 28px 22px 24px; }
  .receipt__total b { font-size: 54px; }
  .master__ph .big-n { font-size: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .has-intro .intro { display: none; }
  .js .hero__title .ln > span, .wsplit .w > span { transform: none !important; transition: none; }
  .js .hero .fx-up { opacity: 1; transform: none; }
  .razor, .scroll-cue { display: none; }
  .js .wipe { clip-path: none; }
  .js .wipe img, .hero__media img { transform: none; }
  .rev-col { animation: none; }
  .rev-col .dup { display: none; }
  .rev-cols { height: auto; -webkit-mask-image: none; mask-image: none; }
  .hscroll { height: auto !important; }
  .hscroll__sticky { position: relative; height: auto; padding: 120px 0; }
  .hscroll__track { transform: none !important; overflow-x: auto; }
  .fill-text { color: var(--ink); -webkit-text-stroke: 0; background: none; }
}

/* заголовок секции не сжимается до слова в строке */
.sec-head__l > .h2 { flex: 0 0 auto; max-width: 100%; }
