﻿
@font-face{font-family:"Poppins";font-style:normal;font-weight:300;font-display:swap;src:url(../fonts/poppins-300.woff2) format("woff2");}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/poppins-400.woff2) format("woff2");}
@font-face{font-family:"Poppins";font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/poppins-500.woff2) format("woff2");}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/poppins-600.woff2) format("woff2");}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/poppins-700.woff2) format("woff2");}

/* Author styles (.modal/.lightbox/.menu display:flex|grid below) always win over the
   UA default [hidden]{display:none} regardless of specificity, so without this the
   hidden dialogs render open on load and can never be closed. Must stay !important. */
[hidden] { display: none !important; }

/* Плавний перехід між сторінками (де браузер підтримує View Transitions API — зараз Chrome/Edge;
   в інших браузерах правило просто ігнорується й перехід лишається миттєвим, як і раніше). */
@view-transition {
  navigation: auto;
}

/* ===== Токени tattoo2 (тема dark) ===== */
:root {
  color-scheme: dark;
  --ground: #10111a; --ground-raised: #171923; --ground-sunken: #08090e;
  --ink: #ffffff; --ink-soft: #cfd1da; --ink-muted: #9296a3;
  --line: #6b6f7e; --line-faint: #ffffff1f;
  --accent: #ee4448; --accent-deep: #b8282d; --on-accent: #10111a;
  --accent-glow: #ee444840; --ink-ghost: #ffffff0f; --focus: #ffffff;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --space-7: 40px; --space-8: 48px; --space-9: 64px; --space-10: 80px; --space-11: 96px; --space-12: 128px; --space-13: 160px;
  --radius-none: 0px; --radius-pill: 999px; --radius-round: 50%;
  --glow-play: 0 0 0 12px #ee444826, 0 0 40px #ee444859;
  --stroke-hair: 1px; --stroke-rule: 2px;
  --rail-width: 128px; --measure-lead: 440px; --measure-body: 420px; --tile-height: 340px;
  --font-sans: "Poppins", "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* адаптація під вузькі екрани: відступ контенту й праве поле */
  --inset: 24px; --pad: 24px; --section-y: var(--space-9);
}

body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-sans); }
*, *::before, *::after { box-sizing: border-box; }
.t2-stage { padding: var(--space-6); }
.t2-row { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; }

/* PillButton */
.t2-pill { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 var(--space-6); border: var(--stroke-hair, 1px) solid var(--accent); border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 500 14px/20px var(--font-sans); text-decoration: none; cursor: pointer; transition: background .2s ease-out, color .2s ease-out, border-color .2s ease-out; }
.t2-pill:hover { background: var(--accent); color: var(--on-accent); }
.t2-pill--solid { background: var(--accent); color: var(--on-accent); }
.t2-pill--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.t2-pill:focus-visible { outline: var(--stroke-rule, 2px) solid var(--focus); outline-offset: 2px; }

/* NavBar */
.t2-nav { display: flex; align-items: center; gap: var(--space-8); height: 96px; padding: 0 var(--space-8); color: var(--ink); font: 400 14px/20px var(--font-sans); }
.t2-nav__brand { font: 700 28px/1 var(--font-sans); letter-spacing: -.01em; }
.t2-nav__links { display: flex; gap: var(--space-7); white-space: nowrap; }
.t2-nav__links li { list-style: none; }
.t2-nav__end, .t2-nav__brand { white-space: nowrap; }
.t2-nav a { color: var(--ink); text-decoration: none; }
.t2-nav__links a:hover, .t2-nav__phone:hover { color: var(--accent); }
.t2-nav__end { display: flex; align-items: center; gap: var(--space-7); margin-left: auto; }
.t2-nav a:focus-visible { outline: var(--stroke-rule, 2px) solid var(--focus); outline-offset: 4px; }

/* SideRail */
.t2-rail { display: flex; flex-direction: column; align-items: center; width: var(--rail-width, 128px); height: 100%; min-height: 240px; padding: var(--space-8) 0; background: var(--ground-sunken); color: var(--ink-muted); }
.t2-rail__menu { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.t2-rail__menu:focus-visible, .t2-rail__links a:focus-visible { outline: var(--stroke-rule, 2px) solid var(--focus); outline-offset: 2px; }
.t2-rail__links { flex: none; display: flex; flex-direction: column; gap: var(--space-6); margin-top: auto; }
.t2-rail__links a { color: var(--ink-muted); font: 400 11px/11px var(--font-sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; writing-mode: vertical-rl; transform: rotate(180deg); }
.t2-rail__links a:hover { color: var(--ink); }
.t2-rail__line { display: block; flex: none; width: var(--stroke-hair, 1px); height: 48px; margin-top: var(--space-6); background: var(--line); }

/* Eyebrow */
.t2-eyebrow { display: flex; align-items: center; gap: var(--space-4); color: var(--ink-muted); font: 500 12px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.t2-eyebrow__rule { display: block; width: 48px; height: var(--stroke-hair, 1px); background: var(--line); }

/* Headline */
.t2-h { margin: 0; color: var(--ink); font: 700 80px/88px var(--font-sans); letter-spacing: -.01em; }
.t2-h--lg { font-size: 48px; line-height: 52px; letter-spacing: -.005em; }
.t2-h__dot { color: var(--accent); }

/* PlayButton */
.t2-play { display: inline-flex; align-items: center; gap: var(--space-3); padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.t2-play__disc { display: grid; place-items: center; flex: none; width: 64px; height: 64px; margin: 12px; border-radius: var(--radius-round); background: var(--accent); color: var(--ink); box-shadow: var(--glow-play, 0 0 0 12px var(--accent-glow)); transition: transform .2s ease-out; }
.t2-play:hover .t2-play__disc { transform: scale(1.06); }
.t2-play:focus-visible { outline: var(--stroke-rule, 2px) solid var(--focus); outline-offset: 4px; }
.t2-play__text { display: flex; flex-direction: column; gap: var(--space-2); }
.t2-play__label { padding-bottom: var(--space-2); border-bottom: var(--stroke-hair, 1px) solid var(--line); color: var(--ink); font: 500 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.t2-play__caption { color: var(--accent); font: 400 12px/16px var(--font-sans); letter-spacing: .04em; }

/* TextLink */
.t2-link { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0 0 var(--space-2); border: 0; border-bottom: var(--stroke-hair, 1px) solid var(--accent-deep); background: none; color: var(--accent); font: 500 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: border-color .2s ease-out; }
.t2-link--ink { border-bottom-color: var(--line); color: var(--ink); }
.t2-link:hover { border-bottom-color: currentColor; }
.t2-link:focus-visible { outline: var(--stroke-rule, 2px) solid var(--focus); outline-offset: 4px; }

/* SliderNav */
.t2-slider { display: flex; gap: var(--space-6); }
.t2-slider__btn { min-width: 56px; padding: 0 0 var(--space-2); border: 0; border-bottom: var(--stroke-hair, 1px) solid var(--line); background: none; color: var(--ink); font: 500 12px/16px var(--font-sans); letter-spacing: .08em; text-align: left; text-transform: uppercase; cursor: pointer; }
.t2-slider__btn--next { border-bottom-color: var(--accent-deep); color: var(--accent); }
.t2-slider__btn:hover { border-bottom-color: currentColor; }
.t2-slider__btn:focus-visible { outline: var(--stroke-rule, 2px) solid var(--focus); outline-offset: 4px; }

/* GhostNumeral */
.t2-ghost { color: var(--ink-ghost); font: 700 80px/80px var(--font-sans); user-select: none; pointer-events: none; }

/* ServiceCard / ServiceGrid */
.t2-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Static blog-card grid (blog index / related articles) — spaced, unlike
   .t2-grid's gapless zebra-striped service/review cards. */
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8) var(--space-6); }
.posts-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .posts-grid, .posts-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .posts-grid, .posts-grid--4 { grid-template-columns: minmax(0, 1fr); } }
.t2-card { display: flex; flex-direction: column; align-items: center; min-height: var(--tile-height, 340px); padding: var(--space-9) var(--space-5) var(--space-7); background: var(--ground-raised); text-align: center; }
.t2-card:nth-child(even) { background: var(--ground-sunken); }
.t2-card__icon { display: grid; place-items: center; width: 96px; height: 96px; border-radius: var(--radius-round); background: var(--line-faint); color: var(--ink-soft); }
.t2-card__title { margin: var(--space-6) 0; color: var(--ink-soft); font: 400 16px/24px var(--font-sans); }
.t2-card .t2-link { margin-top: auto; }

/* DiagonalLines */
.t2-diag { display: block; }
.t2-diag line { stroke: var(--line-faint); stroke-width: 1; vector-effect: non-scaling-stroke; }


/* ===== Сторінка на компонентах tattoo2 ===== */
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: 2px; }
.app { overflow-x: clip; hyphens: manual; }

/* Заголовки: розміри з display-xl / display-lg, стискаються на вузьких екранах */
.t2-h { font-size: clamp(40px, 6.6vw, 80px); line-height: 1.1; overflow-wrap: anywhere; }
.t2-h--lg { font-size: clamp(24px, 6vw, 48px); line-height: 1.08; }
@media (min-width: 1024px) { .t2-h--lg { font-size: clamp(32px, 4.2vw, 48px); } }
.footer .t2-h { font-size: clamp(28px, 8.4vw, 64px); }
.lead { max-width: var(--measure-lead); color: var(--ink-soft); font: 300 18px/28px var(--font-sans); }
.body { max-width: var(--measure-body); color: var(--ink-muted); font: 300 14px/23px var(--font-sans); }
.t2-eyebrow + .t2-h { margin-top: var(--space-5); }
.t2-h + .lead { margin-top: var(--space-5); }
.lead + .body, .lead + .controls, .body + .controls { margin-top: var(--space-6); }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); }

/* Підкреслення кнопок гортання дорівнює ширині тексту */
.t2-slider__btn { min-width: 0; }
/* «Назад» і «Далі»: колір як у підпису розділу, при наведенні — білий */
.t2-slider .t2-slider__btn { color: var(--ink-muted); border-bottom-color: var(--line); transition: color .2s ease-out, border-color .2s ease-out; }
.t2-slider .t2-slider__btn:hover { color: var(--ink); border-bottom-color: currentColor; }
/* Кругла кнопка-стрілка для гортання (заміна текстових «Назад»/«Далі») */
.t2-arrow { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: var(--stroke-hair) solid var(--line); border-radius: var(--radius-pill); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s ease-out, color .2s ease-out, border-color .2s ease-out; }
/* Наведення (і тап на телефоні): заливається червоним, стрілка стає білою */
.t2-arrow:hover, .t2-arrow:active { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.t2-arrow:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: 2px; }
.t2-arrow svg { display: block; }
.t2-arrow--prev svg { transform: rotate(-90deg); }
.t2-arrow--next svg { transform: rotate(90deg); }
/* Кнопки на червоному тлі: білий напис, біла крапка; при наведенні — біла кнопка, чорний напис і стрілка, білий бордер */
.t2-pill:hover { color: var(--ink); }
.t2-pill--solid { color: var(--ink); font-size: 16px; line-height: 24px; }
.t2-pill--solid:hover { color: var(--ground); }

/* Анімація кнопок-пігулок при наведенні: напис ковзає й тане, замість нього виїжджає той самий напис зі стрілкою,
   а кругла заливка розростається від крапки на всю кнопку. Заливка росте через transform: scale() (композиція на
   GPU, без «ривків» — на відміну від clip-path, який часто рахується на CPU щокадру): JS одноразово підбирає
   кожній кнопці свій масштаб (--fill-scale) під її розмір, тож ріст завжди рівний і встигає точно до кінця переходу. */
.t2-pill { position: relative; overflow: hidden; isolation: isolate; gap: var(--space-2); }
.t2-pill:hover { background: transparent; }
.t2-pill--solid:hover { background: var(--accent); border-color: var(--ink); }
/* Крапка — звичайний елемент рядка (перед текстом, з відступом від нього через gap на кнопці) — сама не рухається. */
.t2-pill-fx__dot { position: relative; z-index: 1; flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }
.t2-pill--solid .t2-pill-fx__dot { background: var(--ink); }
/* Заливка — окреме коло того ж розміру, що й крапка, поставлене точно на її місце (36px — відступ кнопки
   + половина крапки, 50% — по висоті); на ховері воно масштабується (GPU-friendly) до розміру, який JS
   підібрав саме для цієї кнопки, і завдяки overflow:hidden на кнопці рівно вкриває її по краях. */
.t2-pill-fx__fill { position: absolute; top: 50%; left: 36px; z-index: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 999px; background: var(--accent); transform: scale(0); transform-origin: center; transition: transform .31s ease-out; pointer-events: none; will-change: transform; }
.t2-pill--solid .t2-pill-fx__fill { background: var(--ink); }
.t2-pill-fx__label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--space-2); transition: transform .26s ease-out, opacity .26s ease-out; }
.t2-pill-fx__reveal { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-2); opacity: 0; transform: translateX(48px); transition: transform .26s ease-out, opacity .26s ease-out; pointer-events: none; color: inherit; }
.t2-pill--solid .t2-pill-fx__reveal { color: var(--ground); }
.t2-pill-fx__reveal svg { width: 10px; height: 10px; display: block; flex: none; }
.t2-pill:hover .t2-pill-fx__fill { transform: scale(var(--fill-scale, 30)); }
.t2-pill:hover .t2-pill-fx__label { transform: translateX(48px); opacity: 0; }
.t2-pill:hover .t2-pill-fx__reveal { transform: translateX(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .t2-pill-fx__fill, .t2-pill-fx__label, .t2-pill-fx__reveal { transition-duration: .01ms; }
}

/* Плавна поява блоків при скролі: секції трохи «спливають» знизу й проявляються.
   Клас reveal додає лише скрипт (прогресивне посилення) — без JS усе одразу видно. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.16,.8,.24,1), transform .7s cubic-bezier(.16,.8,.24,1); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Кнопка «Догори»: з'являється після прокрутки на певну відстань */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border: 0; border-radius: var(--radius-pill); background: var(--accent); color: var(--ink); cursor: pointer; box-shadow: 0 8px 24px #00000059; opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .25s ease-out, transform .25s ease-out, background .2s ease-out; }
.to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.to-top:hover { background: var(--accent-deep); }
.to-top:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: 2px; }
.to-top svg { display: block; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* Ліва рейка (SideRail) — з ширини 1024px */
.t2-rail { position: fixed; top: 0; left: 0; bottom: 0; height: auto; z-index: 30; display: none; }
/* Іконка меню: два рядки → хрестик, коли меню відкрите */
.burger { position: relative; display: block; width: 24px; height: 24px; }
.burger i { position: absolute; left: 1px; right: 1px; height: 2px; background: currentColor; transform-origin: 50% 50%; transition: top .25s ease-out, transform .25s ease-out, background-color .2s ease-out; }
.burger i:nth-child(1) { top: 7px; }
.burger i:nth-child(2) { top: 15px; }
/* Той самий бургер і на рейці (десктоп), і в шапці (телефон) — обидві кнопки мають [data-open-menu] */
[data-open-menu]:hover .burger i { background: var(--accent); }
[data-open-menu][aria-expanded="true"] .burger i:nth-child(1) { top: 11px; transform: rotate(45deg); }
[data-open-menu][aria-expanded="true"] .burger i:nth-child(2) { top: 11px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .burger i { transition: none; } }
/* Кнопка меню в мобільній шапці: та сама іконка-бургер, що й на рейці десктопу */
.nav-menu-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
/* Верхня панель (NavBar): закріплена зверху екрана, з відступом по 20px згори й знизу від вмісту */
:root { --nav-h: 112px; --nav-h-scrolled: 72px; --nav-h-current: var(--nav-h); }
@media (min-width: 1024px) {
  :root { --inset: clamp(48px, 11vw, 160px); --pad: var(--space-8); --section-y: var(--space-11); }
  .t2-rail { display: flex; }
  .te-page { margin-left: var(--rail-width); }
  :root { --nav-h: 136px; --nav-h-scrolled: 88px; }
}

.te-page { position: relative; }
.t2-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--nav-h); padding: 0 var(--pad); gap: var(--space-5); background: transparent; border-bottom: var(--stroke-hair) solid transparent; transition: background .25s ease-out, border-color .25s ease-out, backdrop-filter .25s ease-out, height .25s ease-out; }
/* Поки сторінка вгорі — хедер прозорий і повної висоти; щойно прокрутили — заповнюється тлом
   і стає нижчим (менше «з'їдає» екран), і на телефоні, і на десктопі */
.t2-nav.is-scrolled { height: var(--nav-h-scrolled); background: #10111ad9; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line-faint); }
@media (prefers-reduced-motion: reduce) { .t2-nav { transition: none; } }
@media (min-width: 1024px) { .t2-nav { left: var(--rail-width); } }
.t2-nav__brand { font-size: 24px; text-decoration: none; }
.t2-nav { font-size: 16px; line-height: 24px; }
.nav-cta { height: 48px; padding: 0 var(--space-6); font-size: 16px; line-height: 24px; }
.t2-nav__links, .t2-nav__phone { display: none; }
.t2-nav__end { gap: var(--space-5); }
.t2-nav__links a[aria-current] { color: var(--accent); }
@media (max-width: 559px) { .nav-cta { display: none; } }
@media (min-width: 1024px) {
  .t2-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-5); }
  .t2-nav__links { justify-self: center; }
  .t2-nav__end { justify-self: end; margin-left: 0; }
  .t2-nav__brand { font-size: 24px; }
  .t2-nav__links { display: flex; gap: var(--space-5); }
  .nav-menu-btn { display: none; }
}
@media (min-width: 1024px) and (max-width: 1119px) { .t2-nav__links { gap: var(--space-4); } }
@media (min-width: 1400px) { .t2-nav__brand { font-size: 28px; } }
@media (min-width: 1520px) {
  .t2-nav__links { gap: var(--space-7); }
  .t2-nav__phone { display: inline; }
  .t2-nav__end { gap: var(--space-7); }
}

/* Секції */
.section { position: relative; padding: var(--section-y) var(--pad) var(--section-y) var(--inset); scroll-margin-top: 0; }
.section--raised { background: var(--ground-raised); }
.section--sunken { background: var(--ground-sunken); }
.section .t2-ghost, .about .t2-ghost { position: absolute; right: var(--space-6); bottom: var(--space-4); }
@media (max-width: 699px) { .section .t2-ghost, .about .t2-ghost { display: none; } }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-5) var(--space-6); }
.sec-head .t2-slider { padding-bottom: var(--space-2); }
/* Телефон: стрілки гортання виїжджають з рядка заголовка й лягають по боках картки, поверх зображення.
   Позицію по вертикалі (top) підбирає JS під фактичну висоту картки — вона різна для кожної з трьох каруселей
   (робіт/майстрів/блогу) і залежить від довжини заголовка розділу, тож фіксований відступ тут не спрацює. */
@media (max-width: 699.98px) {
  #portfolio .sec-head .t2-slider, #masters-section .sec-head .t2-slider, #blog .sec-head .t2-slider {
    position: absolute; left: 0; right: 0; top: 0; z-index: 3;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 var(--space-3); padding-bottom: 0;
    transform: translateY(-50%);
    pointer-events: none;
  }
  #portfolio .sec-head .t2-slider .t2-arrow, #masters-section .sec-head .t2-slider .t2-arrow, #blog .sec-head .t2-slider .t2-arrow {
    pointer-events: auto;
    background: #08090ea3;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    transition: opacity .2s ease-out, background .2s ease-out, color .2s ease-out, border-color .2s ease-out;
  }
  /* Той самий червоний фон + біла стрілка при наведенні/тапі, що й у решти стрілок сайту —
     тут перекриваємо напівпрозорий фон-«підкладку» вище, тож правило потрібне з тим самим рівнем специфічності */
  #portfolio .sec-head .t2-slider .t2-arrow:hover, #masters-section .sec-head .t2-slider .t2-arrow:hover, #blog .sec-head .t2-slider .t2-arrow:hover,
  #portfolio .sec-head .t2-slider .t2-arrow:active, #masters-section .sec-head .t2-slider .t2-arrow:active, #blog .sec-head .t2-slider .t2-arrow:active {
    background: var(--accent); border-color: var(--accent); color: var(--ink);
  }
  /* Стрілка «Назад» ховається, поки картки на початку стрічки — прокручувати нікуди; стрілка «Вперед»
     так само ховається, коли стрічку прокручено до кінця. JS додає клас can-prev / at-end відповідно
     до фактичної позиції прокрутки. */
  #portfolio .sec-head .t2-slider .t2-arrow--prev, #masters-section .sec-head .t2-slider .t2-arrow--prev, #blog .sec-head .t2-slider .t2-arrow--prev {
    opacity: 0; pointer-events: none;
  }
  #portfolio .sec-head .t2-slider .t2-arrow--prev.can-prev, #masters-section .sec-head .t2-slider .t2-arrow--prev.can-prev, #blog .sec-head .t2-slider .t2-arrow--prev.can-prev {
    opacity: 1; pointer-events: auto;
  }
  #portfolio .sec-head .t2-slider .t2-arrow--next.at-end, #masters-section .sec-head .t2-slider .t2-arrow--next.at-end, #blog .sec-head .t2-slider .t2-arrow--next.at-end {
    opacity: 0; pointer-events: none;
  }
  @media (prefers-reduced-motion: reduce) {
    #portfolio .sec-head .t2-slider .t2-arrow, #masters-section .sec-head .t2-slider .t2-arrow, #blog .sec-head .t2-slider .t2-arrow { transition: none; }
  }
}

/* Герой */
.hero { position: relative; display: flex; flex-direction: column; justify-content: center; background: var(--ground); overflow: hidden; }
.hero-copy { position: relative; z-index: 3; padding: calc(var(--nav-h) + var(--space-7)) var(--pad) var(--space-9) var(--inset); }
.hero-copy .controls { margin-top: var(--space-6); }
/* Фон героя: фото, однотонний оверлей кольору фону та затемнення зліва направо, щоб текст читався */
.hero-bg { position: absolute; inset: 0; z-index: 1; background: #10111a url("../img/hero-bg.jpg") right center / cover no-repeat; pointer-events: none; }
.hero-bg::before { content: ""; position: absolute; inset: 0; background: #10111ac7; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #10111a 0%, #10111af2 40%, #10111a00 100%), linear-gradient(0deg, #10111a 0%, #10111a00 22%); }
@media (min-width: 900px) {
  .hero-copy { padding-top: calc(var(--nav-h) + var(--space-10)); padding-bottom: var(--space-12); }
  .hero-bg::before { background: #10111a8c; }
  .hero-bg::after { background: linear-gradient(90deg, #10111a 0%, #10111af0 30%, #10111a00 78%), linear-gradient(0deg, #10111a 0%, #10111a00 18%); }
}
@media (min-width: 1024px) { .hero { min-height: 80vh; } }

/* Малюнки: моно-лінія 1.25px, без заливки (як іконки tattoo2) */
.line-art { fill: none; stroke: currentColor; stroke-width: 1.25px; stroke-linecap: square; stroke-linejoin: miter; }
.line-art * { vector-effect: non-scaling-stroke; }

/* Портфоліо: стрічка фото-плиток, що виходить за правий край */
.bleed { margin: var(--space-9) calc(var(--pad) * -1) 0 0; }
.works { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.works::-webkit-scrollbar { display: none; }
.works { user-select: none; -webkit-user-select: none; }
.works.dragging { scroll-snap-type: none; }
.works.dragging, .works.dragging .work { cursor: grabbing; }
.work img { -webkit-user-drag: none; user-drag: none; }
.work { position: relative; display: block; flex: 0 0 clamp(240px, 24vw, 300px); aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 10px; background: var(--ground-raised); color: var(--ink-soft); cursor: grab; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
.work:nth-child(even) { background: var(--ground-sunken); }
.work img, .work .ph, .work video { position: absolute; inset: 0; width: 100%; height: 100%; }
.work img, .work video { object-fit: cover; }
.work .ph { display: grid; place-items: center; }
.work .ph svg { display: block; width: 56%; height: auto; max-height: 70%; }
.work > * { transition: transform .3s ease-out; }
.work:hover > * { transform: scale(1.04); }
.work:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: -4px; }
/* Плитка-відео: постер-фото як зазвичай + іконка «плей» по центру поверх нього */
.work-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 999px; background: rgba(8, 9, 14, .55); color: #fff; pointer-events: none; }
.work-play svg { width: 18px; height: 18px; margin-left: 2px; fill: currentColor; }

/* Лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; padding: var(--space-5) var(--pad) var(--space-6); background: var(--ground-sunken); }
.lb-top { display: flex; justify-content: flex-end; }
.lb-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: var(--space-5) 0; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.lb-frame { position: relative; height: 100%; max-height: 100%; aspect-ratio: 4 / 5; max-width: 100%; display: grid; place-items: center; background: var(--ground-raised); color: var(--ink-soft); overflow: hidden; }
.lb-frame:has(img), .lb-frame:has(video) { aspect-ratio: auto; width: min(100%, 760px); background: transparent; }
.lb-frame img, .lb-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lb-frame svg { display: block; width: 60%; height: auto; max-height: 80%; }
.lb-caption { margin: 0; padding: 0 0 var(--space-3); text-align: center; color: var(--ink-muted); font: 300 14px/22px var(--font-sans); }
.lb-caption:empty { display: none; }
.lb-nav { display: flex; justify-content: center; }

/* Послуги: сітка 2 × 2 */
.t2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--space-9); }
.t2-card__icon svg { display: block; width: 44px; height: 44px; }
.prices-grid .t2-card { background: var(--ground-raised); }
.prices-grid .t2-card:nth-child(2), .prices-grid .t2-card:nth-child(3) { background: var(--ground-sunken); }
.prices-grid .svc-text { display: grid; gap: var(--space-2); justify-items: center; margin: var(--space-6) 0; }
.prices-grid .svc-name { margin: 0; }
.svc-price { margin: 0; color: var(--ink-soft); font: 700 16px/24px var(--font-sans); }
.svc-time { margin: 0; color: var(--ink-muted); font: 300 14px/24px var(--font-sans); }
.prices-grid .svc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3) var(--space-6); margin-top: auto; }
.prices-grid .svc-actions .t2-link { margin-top: 0; }
/* Уся картка клікабельна й веде на сторінку послуги (розтягнуте посилання «Детальніше» на всю картку);
   кнопка «Записатися» лишається окремо клікабельною — піднята над цим посиланням через z-index. */
.prices-grid .t2-card { position: relative; cursor: pointer; }
.prices-grid .t2-card .svc-actions a.t2-link--ink::after { content: ""; position: absolute; inset: 0; }
.prices-grid .t2-card .svc-actions [data-book-service] { position: relative; z-index: 1; }
/* При наведенні на картку заголовок послуги й колір посилання не змінюються —
   лише підкреслення кнопки «Детальніше» стає білим. */
.prices-grid .t2-card:hover .svc-actions a.t2-link--ink { border-bottom-color: #fff; }

/* Плитки цін без іконок і з крупнішим текстом (головна та сторінка «Послуги») */
.prices-plain .t2-card { justify-content: center; }
.prices-plain .svc-text { margin: 0 0 var(--space-6); }
.prices-plain .svc-name { font: 400 20px/28px var(--font-sans); }
.prices-plain .svc-price { font: 700 24px/32px var(--font-sans); }
.prices-plain .svc-time { font: 300 16px/24px var(--font-sans); }
.prices-plain .svc-actions { margin-top: 0; }

/* Сторінки послуг */
.view-first { padding-top: calc(var(--nav-h) + var(--space-9)); }
.svc-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-9); align-items: center; }
@media (min-width: 900px) { .svc-detail { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-10); } }
.svc-visual { display: grid; place-items: center; order: -1; }
@media (min-width: 900px) { .svc-visual { order: 0; } }
.svc-visual .disc { display: grid; place-items: center; width: min(320px, 70%); aspect-ratio: 1; border-radius: var(--radius-round); background: var(--ground-raised); color: var(--ink-soft); }
.svc-visual .disc svg { display: block; width: 40%; height: auto; }

.svc-slider { position: relative; width: min(420px, 100%); }
.svc-slides { position: relative; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--ground-raised); }
.svc-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease-out; }
.svc-slide.is-active { opacity: 1; }
.svc-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.svc-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(4px); }
/* Horizontal chevrons at every width (studio-arrow turns them vertical on desktop). */
.svc-arrow.svc-arrow--prev svg { transform: rotate(-90deg); }
.svc-arrow.svc-arrow--next svg { transform: rotate(90deg); }
@media (min-width: 900px) {
  .svc-detail:has(.svc-slider) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .svc-slider { width: min(560px, 100%); }
}
.svc-arrow--prev { left: var(--space-3); }
.svc-arrow--next { right: var(--space-3); }
.svc-dots { display: flex; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); }
.svc-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--radius-round); background: var(--line); cursor: pointer; transition: background .2s ease-out, transform .2s ease-out; }
.svc-dot:hover { background: var(--ink-soft); }
.svc-dot[aria-current="true"] { background: var(--accent); transform: scale(1.25); }
.svc-dot:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: 2px; }
.facts { margin: var(--space-7) 0 0; border-top: var(--stroke-hair) solid var(--line); max-width: var(--measure-body); }
.facts > div { display: flex; justify-content: space-between; gap: var(--space-5); padding: var(--space-4) 0; border-bottom: var(--stroke-hair) solid var(--line); }
.facts dt { color: var(--ink-muted); font: 500 12px/24px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.facts dd { margin: 0; color: var(--ink); font: 700 16px/24px var(--font-sans); text-align: right; }
.svc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); margin-top: var(--space-7); }
.svc-steps { max-width: 720px; }
.svc-others { margin-top: var(--space-9); }
.svc-others-links { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); margin-top: var(--space-5); }
.t2-card__title .price { font-weight: 700; }
.t2-card__meta { margin: 0 0 var(--space-6); color: var(--ink-muted); font: 300 14px/23px var(--font-sans); }
@media (max-width: 559px) {
  .t2-grid { grid-template-columns: minmax(0, 1fr); }
  .prices-grid .t2-card:nth-child(2), .prices-grid .t2-card:nth-child(4) { background: var(--ground-sunken); }
  .prices-grid .t2-card:nth-child(3) { background: var(--ground-raised); }
}
.price-note { margin-top: var(--space-6); max-width: 640px; }

/* Майстри: 3 картки в ряд, на телефоні — по одній зі свайпом */
.masters { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: var(--space-7) calc(var(--pad) * -1) 0 calc(var(--inset) * -1); padding: 0 var(--pad) 0 var(--inset); scroll-padding-inline: var(--inset); }
.masters::-webkit-scrollbar { display: none; }
.master { position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ground-sunken); border-radius: 10px; }
.master .photo { position: absolute; inset: 0; }
.master .photo svg, .master .photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.master .photo img { object-fit: cover; }
/* Дані майстра лежать поверх фото; м'який градієнт знизу (темний → прозорий) тримає текст читабельним */
.master .info { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: start; gap: var(--space-2); padding: var(--space-11) var(--space-5) var(--space-5); background: linear-gradient(0deg, var(--ground-sunken) 0%, #08090ed9 45%, #08090e00 100%); }
.master .rank, .profile-photo .rank { position: absolute; top: var(--space-5); left: var(--space-5); z-index: 2; padding: 6px 10px; background: #08090ecc; color: var(--ink-soft); font: 500 12px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.master .name { color: var(--ink); font: 700 24px/32px var(--font-sans); }
.master-actions { position: relative; z-index: 2; display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-3) var(--space-5); margin-top: var(--space-3); }
.master { cursor: pointer; }
.stars { display: flex; gap: var(--space-1); margin-top: var(--space-1); }
.stars svg { display: block; width: 18px; height: 18px; fill: var(--accent); }
.masters-nav { display: flex; }
/* Телефон: свайп вбік, у кадрі — один майстер за раз */
@media (max-width: 699.98px) {
  .masters:not(.masters--grid) { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .masters:not(.masters--grid).dragging { scroll-snap-type: none; cursor: grabbing; }
  /* На телефоні «Записатися» в картці майстра — на всю ширину і трохи вища; «Про майстра» — рядком під нею.
     .info — грід з justify-items:start, тому сам .master-actions теж треба розтягнути (justify-self),
     інакше він лишається по ширині вмісту й «на всю ширину» рахується не від картки, а від нього самого. */
  .master .master-actions { flex-direction: column; align-items: stretch; justify-self: stretch; gap: var(--space-3); }
  .master .master-book { width: 100%; height: 52px; font-size: 15px; }
  .master .master-about { align-self: center; }
}
@media (min-width: 700px) {
  .masters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin: var(--space-9) 0 0 0; padding: 0; }
  .masters-nav { display: none; }
}

/* Сторінка «Майстри»: плитка без слайдера */
.masters.masters--grid { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; margin: var(--space-8) 0 0 0; padding: 0; }
@media (min-width: 700px) { .masters.masters--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--space-9) 0 0 0; } }

/* Персональна сторінка майстра */
.profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); margin-top: var(--space-7); }
@media (min-width: 900px) { .profile { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-10); align-items: center; } }
.profile-photo { position: relative; margin: 0; width: 100%; max-width: 520px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 10px; background: var(--ground-sunken); }
.profile-photo svg, .profile-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.profile-photo img { object-fit: cover; }
.profile-text .stars { margin-top: var(--space-4); }
.profile-text .lead { margin-top: var(--space-5); }
/* Текст, факти й кнопки в правій колонці мають однакову максимальну ширину, тож їхній правий
   край співпадає в одну лінію — інакше рядок з кнопками «виступає» ширше за текст і таблицю фактів. */
.profile-text .lead, .profile-text .svc-cta { max-width: var(--measure-body); }
.profile-bio { display: grid; gap: var(--space-4); max-width: var(--measure-body); margin-top: var(--space-5); color: var(--ink-muted); font: 300 16px/26px var(--font-sans); }
.profile-bio p { margin: 0; }
.works-grid.works-grid--master { margin-top: var(--space-7); }

/* Сторінка «Студія»: головне фото + вертикальна стрічка мініатюр зі стрілками */
.studio-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-top: var(--space-8); }
.studio-main { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; background: var(--ground-raised); color: var(--ink-soft); overflow: hidden; cursor: zoom-in; }
.studio-main img, .studio-main .ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.studio-main img { object-fit: cover; }
.studio-main img.bg { filter: blur(28px) brightness(.55); transform: scale(1.15); }
.studio-main img.fg { object-fit: contain; }.studio-main .ph { display: grid; place-items: center; }
.studio-main .ph svg { display: block; height: 46%; width: auto; }
.studio-main:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: -4px; }
.studio-caption { display: flex; justify-content: space-between; gap: var(--space-5); margin: var(--space-3) 0 0; color: var(--ink-muted); font: 500 12px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.studio-count { flex: none; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.studio-rail { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.studio-thumbs { position: relative; display: flex; flex: 1 1 auto; gap: var(--space-3); min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.studio-thumbs::-webkit-scrollbar { display: none; }
.studio-thumb { position: relative; flex: 0 0 96px; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--ground-raised); color: var(--ink-soft); cursor: pointer; opacity: .6; transition: opacity .2s ease-out; scroll-snap-align: start; }
.studio-thumb:hover, .studio-thumb[aria-current="true"] { opacity: 1; }
.studio-thumb[aria-current="true"] { outline: var(--stroke-rule) solid var(--accent); outline-offset: -2px; }
.studio-thumb:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: -2px; opacity: 1; }
.studio-thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.studio-thumb .ph svg, .studio-thumb img { display: block; }
.studio-thumb .ph svg { height: 56%; width: auto; }
.studio-thumb img { width: 100%; height: 100%; object-fit: cover; }
.studio-arrow { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: var(--stroke-hair) solid var(--accent); border-radius: var(--radius-pill); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s ease-out, color .2s ease-out; }
.studio-arrow:hover { background: var(--accent); color: var(--on-accent); }
.studio-arrow:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: 2px; }
.studio-arrow svg { display: block; }
.studio-arrow--prev svg { transform: rotate(-90deg); }
.studio-arrow--next svg { transform: rotate(90deg); }
@media (min-width: 900px) {
  .studio-gallery { grid-template-columns: minmax(0, 1fr) 148px; column-gap: var(--space-5); align-items: start; }
  .studio-stage { min-width: 0; }
  /* колонка мініатюр не задає висоту ряду: вона дорівнює висоті головного фото */
  .studio-rail { position: relative; align-self: stretch; flex-direction: column; }
  .studio-rail > * { position: relative; }
  .studio-gallery { grid-template-rows: auto; }
  .studio-stage { grid-column: 1; grid-row: 1; }
  .studio-rail { grid-column: 2; grid-row: 1; height: 0; min-height: 100%; }
  .studio-thumbs { flex-direction: column; width: 100%; overflow-x: hidden; overflow-y: auto; scroll-snap-type: y proximity; min-height: 0; }
  .studio-thumb { flex: 0 0 auto; width: 100%; }
  .studio-arrow--prev svg { transform: none; }
  .studio-arrow--next svg { transform: rotate(180deg); }
}
.studio-about { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
@media (min-width: 1100px) { .studio-about { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-10); align-items: start; } }
.studio-about .facts { margin-top: var(--space-7); }
.studio-about .notes { margin-top: var(--space-9); }

/* Хлібні крихти */
.crumbs { margin: 0 0 var(--space-6); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin: 0; padding: 0; list-style: none; font: 500 12px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.crumbs li { display: flex; align-items: center; gap: var(--space-3); min-width: 0; color: var(--ink); }
.crumbs li + li::before { content: "/"; color: var(--ink-muted); }
.crumbs a { color: var(--ink-muted); text-decoration: none; transition: color .2s ease-out; }
.crumbs a:hover { color: var(--accent); }
.crumbs a:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: 4px; }
.crumbs + .post-head, .crumbs + .profile { margin-top: 0; }

/* Сторінка «Дякуємо за запис» */
.thanks-summary { max-width: 640px; margin-top: var(--space-8); padding: var(--space-6); background: var(--ground-raised); }
.thanks-summary pre { margin: var(--space-4) 0 0; color: var(--ink-soft); font: 300 15px/24px var(--font-sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.thanks-note { margin: var(--space-5) 0 0; color: var(--ink-muted); font: 300 14px/23px var(--font-sans); }
.thanks-note a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-deep); text-underline-offset: 4px; }
.thanks-note a:hover { color: var(--accent); }
.thanks-next { margin-top: var(--space-9); }

/* Запис на сеанс */
.book { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-9); align-items: center; }
@media (min-width: 1100px) { .book { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--space-11); } }
.steps { counter-reset: step; margin-top: var(--space-7); border-top: var(--stroke-hair) solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4) 0; border-bottom: var(--stroke-hair) solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); color: var(--ink-muted); font: 700 20px/28px var(--font-sans); }
.steps b { display: block; color: var(--ink); font: 400 16px/24px var(--font-sans); }
.steps span { color: var(--ink-muted); font: 300 14px/23px var(--font-sans); }

form { display: grid; gap: var(--space-5); padding: clamp(24px, 5.6vw, 80px); background: var(--ground-raised); }
.book form { container-type: inline-size; }
@container (max-width: 440px) { .book form .row2 { grid-template-columns: minmax(0, 1fr); } }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--space-5); }
@media (max-width: 559px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: var(--space-2); }
label.lab { color: var(--ink-muted); font: 500 12px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
input[type="text"], input[type="tel"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; padding: 13px var(--space-4); border: var(--stroke-hair) solid var(--line); border-radius: var(--radius-none);
  background: var(--ground-sunken); color: var(--ink); font: 400 16px/24px var(--font-sans);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: var(--stroke-rule) solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
.check { display: flex; align-items: flex-start; gap: var(--space-3); color: var(--ink-soft); font: 300 14px/22px var(--font-sans); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); }
.hint { max-width: 40ch; color: var(--ink-muted); font: 300 13px/20px var(--font-sans); }
.out { display: none; padding: var(--space-4); border: var(--stroke-hair) solid var(--line); color: var(--ink-soft); font: 300 14px/22px var(--font-sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.out.on { display: block; }
.out strong { display: block; margin-bottom: var(--space-2); color: var(--accent); font: 500 12px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.book .t2-diag { position: absolute; top: var(--space-6); right: var(--space-6); opacity: .9; pointer-events: none; }
@media (max-width: 899px) { .book-wrap .t2-diag { display: none; } }

/* Питання */
.faq { margin-top: var(--space-9); max-width: 820px; border-top: var(--stroke-hair) solid var(--line); }
.faq details { border-bottom: var(--stroke-hair) solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-5) 0; list-style: none; cursor: pointer; color: var(--ink); font: 400 18px/28px var(--font-sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: var(--stroke-hair) solid var(--accent); border-bottom: var(--stroke-hair) solid var(--accent); transform: rotate(45deg); transition: transform .2s ease-out; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq p { padding: 0 0 var(--space-5); max-width: 60ch; color: var(--ink-muted); font: 300 14px/23px var(--font-sans); }


/* Блог */
.posts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8) var(--space-6); margin-top: var(--space-9); }
.post-card { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: var(--space-5); }
.post-photo { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--ground-raised); color: var(--ink-soft); overflow: hidden; }
.section--raised .post-photo { background: var(--ground-sunken); }
.post-photo svg { display: block; width: 26%; height: auto; max-height: 72%; transition: transform .3s ease-out; }
.post-card:hover .post-photo svg { transform: scale(1.06); }
.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.post-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin: 0; color: var(--ink-muted); font: 500 12px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.post-title { margin: 0; color: var(--ink); font: 700 clamp(22px, 2.2vw, 26px)/1.25 var(--font-sans); text-wrap: balance; }
.post-title a { color: inherit; text-decoration: none; transition: color .2s ease-out; }
.post-title a:hover { color: var(--accent); }
.post-desc { max-width: 52ch; margin: 0; color: var(--ink-muted); font: 300 15px/24px var(--font-sans); }
.post-card .t2-link { margin-top: auto; }
.post-desc { margin-bottom: var(--space-3); }
@media (min-width: 700px) and (max-width: 1279px) {
  .post-card { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto; gap: var(--space-6); align-items: center; }
  .post-photo { aspect-ratio: 4 / 3; }
  .posts--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .posts .post-title { min-height: 2.5em; }
  .posts--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Блог на головній: карусель останніх статей */
.posts-track { display: flex; gap: var(--space-6); overflow-x: auto; padding-right: var(--pad); scroll-snap-type: x proximity; scrollbar-width: none; user-select: none; -webkit-user-select: none; }
.posts-track::-webkit-scrollbar { display: none; }
.posts-track.dragging { scroll-snap-type: none; cursor: grabbing; }
.posts-track .post-card { flex: 0 0 min(360px, 78%); scroll-snap-align: start; scroll-snap-stop: always; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: var(--space-5); align-items: stretch; }
.posts-track .post-photo { aspect-ratio: 16 / 10; }
@media (min-width: 700px) { .posts-track .post-card { flex-basis: clamp(300px, 31%, 400px); } }
.post-card--plain { position: relative; cursor: pointer; }
.post-card--plain .post-title a::after { content: ""; position: absolute; inset: 0; }
.post-card--plain:hover .post-title a { color: var(--accent); }
.post-card--plain .post-desc { margin-bottom: 0; }
.posts-track .post-photo, .posts-track .post-photo svg { -webkit-user-drag: none; }
.post-head { margin-top: var(--space-7); max-width: 900px; }
.post-h1 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.1; text-wrap: balance; }
.post-head .post-meta { margin-top: var(--space-5); }
.post-cover { display: grid; place-items: center; aspect-ratio: 21 / 9; max-width: 1000px; margin: var(--space-8) 0; background: var(--ground-raised); color: var(--ink-soft); }
.post-cover svg { display: block; height: 66%; width: auto; }
.post-text { max-width: 68ch; color: var(--ink-soft); font: 300 17px/1.75 var(--font-sans); }
.post-text .lead { max-width: none; margin: 0 0 var(--space-7); font-size: 20px; line-height: 1.6; color: var(--ink); }
.post-text h2 { margin: var(--space-9) 0 var(--space-4); color: var(--ink); font: 700 clamp(22px, 2.6vw, 28px)/1.25 var(--font-sans); text-wrap: balance; }
.post-text p { margin: 0 0 var(--space-5); }
.post-text ul { margin: 0 0 var(--space-5); padding: 0; list-style: none; border-top: var(--stroke-hair) solid var(--line); }
.post-text li { padding: var(--space-4) 0; border-bottom: var(--stroke-hair) solid var(--line); }
.post-text li b { color: var(--ink); font-weight: 500; }
.post-text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-deep); text-underline-offset: 4px; transition: color .2s ease-out; }
.post-text a:hover { color: var(--accent); }
.post-text a.t2-pill, .post-text a.t2-link, .post-text a.t2-pill:hover, .post-text a.t2-link:hover { text-decoration: none; }

/* Спільний підвал */
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5) var(--space-7); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); }
.footer .legal { margin-top: var(--space-8); }
.sec-more { margin-top: var(--space-6); }

/* Сторінка «Роботи» */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-7); }
.works-empty { margin-top: var(--space-7); color: var(--ink-muted); font: 300 16px/24px var(--font-sans); }
.t2-pill.chip { height: 40px; padding: 0 var(--space-5); }
.t2-pill.chip[aria-pressed="true"] { background: var(--accent); color: var(--ink); }

/* "Завантаження…" state on the works load-more button: no fill, no border,
   just a faint white label so it visibly steps back while the request runs. */
.t2-pill.is-loading, .t2-pill.is-loading:hover {
  background: transparent !important;
  border-color: transparent !important;
  color: rgba(255, 255, 255, .5) !important;
}
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: var(--space-7) 0 0 0; }
@media (min-width: 700px) { .works-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .works-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .works-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.works-grid .work { flex: none; width: 100%; cursor: pointer; background: var(--ground-raised); }
.works-grid .work:nth-child(even) { background: var(--ground-raised); }

/* Сторінка «Послуги» */
.notes { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); margin-top: var(--space-8); }
@media (min-width: 900px) { .notes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7); } }
.notes > div { display: grid; gap: var(--space-2); align-content: start; padding-top: var(--space-4); border-top: var(--stroke-hair) solid var(--line); }
.notes b { color: var(--ink); font: 400 18px/28px var(--font-sans); }
.notes span { color: var(--ink-muted); font: 300 14px/23px var(--font-sans); max-width: 36ch; }

/* Сторінка «Контакти» */
.contacts-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-9); margin-top: var(--space-9); }
@media (min-width: 1100px) { .contacts-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--space-10); align-items: start; } }
.contacts-layout .cgrid { grid-template-columns: minmax(0, 1fr); margin-top: 0; gap: var(--space-7); }
@media (min-width: 560px) and (max-width: 1099px) { .contacts-layout .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.map-col { display: grid; gap: var(--space-5); justify-items: start; }
.map { position: relative; width: 100%; aspect-ratio: 4 / 3; min-height: 300px; background: var(--ground-raised); overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: invert(92%) hue-rotate(180deg) saturate(.55) contrast(.92); }
.map-fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--space-3); padding: var(--space-5); text-align: center; text-decoration: none; color: var(--ink-soft);
  background-image: repeating-linear-gradient(115deg, transparent 0 58px, var(--line-faint) 58px 59px), repeating-linear-gradient(25deg, transparent 0 74px, var(--line-faint) 74px 75px); }
.map-fallback .t2-card__icon { margin-bottom: var(--space-3); }
.map-addr { color: var(--ink); font: 400 18px/28px var(--font-sans); }
.map-open { color: var(--accent); font: 500 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.map-fallback:hover .map-open { color: var(--ink); }
.map-route { text-decoration: none; }

/* Підвал і контакти */
.footer { position: relative; padding: var(--space-9) var(--pad) var(--space-6) var(--inset); background: var(--ground-sunken); }
.cgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-7) var(--space-6); margin-top: var(--space-9); }
@media (max-width: 1099px) { .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .cgrid { grid-template-columns: minmax(0, 1fr); } }
.cgrid .t2-eyebrow { margin-bottom: var(--space-4); }
.cgrid p { color: var(--ink-soft); font: 300 16px/26px var(--font-sans); overflow-wrap: anywhere; }
.cgrid a { text-decoration: none; }
.cgrid a:hover { color: var(--accent); }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); margin-top: var(--space-11); padding-top: var(--space-5); border-top: var(--stroke-hair) solid var(--line); color: var(--ink-muted); font: 400 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }

/* Модальне вікно запису до майстра */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--space-5); background: #08090ed9; overflow-y: auto; }
.modal-panel { position: relative; width: min(520px, 100%); max-height: 100%; overflow-y: auto; padding: var(--space-6); background: var(--ground-raised); }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }
.modal-panel .t2-h { margin-top: var(--space-4); font-size: clamp(30px, 6vw, 40px); }
.modal-for { margin-top: var(--space-3); color: var(--ink-muted); font: 300 14px/23px var(--font-sans); }
.modal-for b { color: var(--ink); font-weight: 500; }
.modal-panel form { margin-top: var(--space-6); padding: 0; background: none; }
.modal-panel .t2-pill { width: 100%; height: 52px; }
.row2.single { grid-template-columns: minmax(0, 1fr); }
.modal-done { margin-top: var(--space-6); display: grid; gap: var(--space-5); }

/* Кнопка «Обрати майстра» у формі і вікно вибору */
.pick-btn { width: 100%; height: 52px; padding: 0 var(--space-4); }
.pick-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-btn.is-picked { border-color: var(--ink-soft); }
.pick-btn.is-picked:hover { border-color: var(--accent); }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin: 0; color: var(--ink-muted); font: 300 12px/18px var(--font-sans); }
.file-meta .t2-link { padding-bottom: var(--space-1); }
.pick-list { margin-top: var(--space-6); border-top: var(--stroke-hair) solid var(--line); }
.pick-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); width: 100%; padding: var(--space-4) 0; border: 0; border-bottom: var(--stroke-hair) solid var(--line); background: none; color: inherit; font-family: var(--font-sans); text-align: left; cursor: pointer; }
.pick-row:focus-visible { outline-offset: -2px; }
.pick-thumb { position: relative; display: block; width: 88px; height: 88px; overflow: hidden; background: var(--ground-sunken); }
.pick-thumb svg, .pick-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.pick-info { display: grid; gap: var(--space-1); min-width: 0; }
.pick-rank { color: var(--ink-muted); font: 500 12px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.pick-name { color: var(--ink); font: 700 20px/28px var(--font-sans); transition: color .2s ease-out; }
.pick-row:hover .pick-name { color: var(--accent); }
.pick-info .stars svg { width: 14px; height: 14px; }
.pick-cta { padding-bottom: var(--space-2); border-bottom: var(--stroke-hair) solid var(--accent-deep); color: var(--accent); font: 500 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.pick-row[aria-pressed="true"] .pick-cta { color: var(--ink); border-bottom-color: var(--line); }
@media (max-width: 479px) {
  .pick-row { grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--space-3); }
  .pick-thumb { width: 72px; height: 72px; }
}

/* Повноекранне меню (кнопка на рейці) */
.menu { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; padding: var(--space-6) var(--pad) var(--space-7); background: var(--ground-sunken); overflow-y: auto; opacity: 0; transform: translateY(-16px); transition: opacity .32s ease-out, transform .32s ease-out; }
.menu.is-open { opacity: 1; transform: translateY(0); }
@media (min-width: 1024px) { .menu { left: var(--rail-width); } }
/* Рядок з лого у повноекранному меню виставлений так, щоб лого лишалося точно там, де воно є в хедері:
   та сама висота (--nav-h-current — з урахуванням стану скролу), піднятий на верхній відступ .menu,
   щоб рахунок висоти йшов від самого верху екрана, як і в закріпленому хедері. */
.menu-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); height: var(--nav-h-current); margin-top: calc(var(--space-6) * -1); }
.menu-list { display: grid; gap: var(--space-4); margin: auto 0; padding: var(--space-9) 0; }
.menu-list a { color: var(--ink); font: 700 clamp(28px, 5vw, 48px)/1.1 var(--font-sans); text-decoration: none; opacity: 0; transform: translateY(12px); transition: color .2s ease-out, opacity .3s ease-out, transform .3s ease-out; }
.menu.is-open .menu-list a { opacity: 1; transform: translateY(0); }
.menu-list a:nth-child(1) { transition-delay: .04s; }
.menu-list a:nth-child(2) { transition-delay: .08s; }
.menu-list a:nth-child(3) { transition-delay: .12s; }
.menu-list a:nth-child(4) { transition-delay: .16s; }
.menu-list a:nth-child(5) { transition-delay: .2s; }
.menu-list a:nth-child(6) { transition-delay: .24s; }
.menu-list a:nth-child(7) { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .menu, .menu-list a { transition: none; opacity: 1; transform: none; }
}
.menu-list a:hover { color: var(--accent); }
.menu-foot { color: var(--ink-muted); font: 300 14px/23px var(--font-sans); }
.menu-foot a { color: var(--ink); text-decoration: none; }

/* ===== Додано для WordPress-версії (нема в оригінальному артефакті) ===== */

/* Плейсхолдер, коли в CPT-записі (портфоліо/послуга/відгук) ще не завантажили фото */
.work .no-photo, .t2-card__icon.no-photo { display: grid; place-items: center; width: 100%; height: 100%; background: var(--line-faint); color: var(--ink-muted); }
.work .no-photo svg { width: 40%; height: auto; }

/* Блок «Про студію» на головній (в оригіналі — окрема сторінка «Студія», тут стисло на головній) */
.about-block { display: grid; gap: var(--space-6); max-width: var(--measure-body); }

/* Відгуки клієнтів (в оригінальному дизайні секції відгуків немає — додано під ACF/CPT testimonial за завданням) */
.reviews-grid .t2-card { text-align: left; align-items: flex-start; }
.review-quote { color: var(--ink-soft); font: 300 15px/24px var(--font-sans); flex: 1; }
.review-name { margin-top: var(--space-5); color: var(--ink); font: 500 14px/20px var(--font-sans); }
.review-stars svg { width: 14px; height: 14px; fill: var(--accent); display: inline-block; }

/* Google-reviews widget (Trustindex "Widgets for Google Reviews" plugin):
   its own CSS ships a bundled "Trustindex Poppins" face on every element,
   which doesn't match the real Poppins/Montserrat instance the rest of the
   site uses — force it back onto our font stack. */
.reviews-widget .ti-widget, .reviews-widget .ti-widget * { font-family: var(--font-sans) !important; }
.reviews-widget .ti-widget .ti-inner,
.reviews-widget .ti-widget.ti-goog .ti-review-item > .ti-inner { background: #08090e !important; background-color: #08090e !important; }

/* Контакти (в оригіналі дані розкидані по nav/footer/меню — тут зведено в один блок під ACF-поля) */
.contact-facts { margin: var(--space-7) 0 0; border-top: var(--stroke-hair) solid var(--line); max-width: var(--measure-body); }
.contact-facts > div { display: flex; justify-content: space-between; gap: var(--space-5); padding: var(--space-4) 0; border-bottom: var(--stroke-hair) solid var(--line); }
.contact-facts dt { color: var(--ink-muted); font: 500 12px/24px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.contact-facts dd { margin: 0; color: var(--ink); font: 500 15px/24px var(--font-sans); text-align: right; }
.contact-socials { display: flex; gap: var(--space-6); margin-top: var(--space-6); }
