/* ============================================================
   Hemstitch — дизайн-слой «Лён и нить».
   Зона: токены, шрифты, шапка/подвал (классы GeneratePress),
   контентные блоки из раздела D. Компоненты плагина — в hs.css.
   Mobile-first, без внешних запросов.
   ============================================================ */

/* --- 01. Локальные шрифты (сабсеты кириллица + латиница) --- */
@font-face {
	font-family: "Prata";
	src: url("fonts/prata-cyrillic.woff2") format("woff2");
	font-weight: 400; font-style: normal; font-display: swap;
	unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Prata";
	src: url("fonts/prata-latin.woff2") format("woff2");
	font-weight: 400; font-style: normal; font-display: swap;
	unicode-range: U+0000-00FF, U+2000-206F, U+20A0-20CF;
}
@font-face {
	font-family: "Golos Text";
	src: url("fonts/golos-cyrillic.woff2") format("woff2");
	font-weight: 400 900; font-style: normal; font-display: swap;
	unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Golos Text";
	src: url("fonts/golos-latin.woff2") format("woff2");
	font-weight: 400 900; font-style: normal; font-display: swap;
	unicode-range: U+0000-00FF, U+2000-206F, U+20A0-20CF;
}

/* --- 02. Токены (плагин читает их через var(--hs-*, fallback)) --- */
:root {
	--hs-bg: #FAF6F0;            /* тёплый лён */
	--hs-surface: #FFFDF9;       /* карточки и поля */
	--hs-ink: #2E2A25;           /* основной текст */
	--hs-muted: #6F675C;         /* вторичный текст, ≈5.2:1 на льне */
	--hs-accent: #A98B5F;        /* латунная нить — ТОЛЬКО декор: линии, рамки */
	--hs-accent-ink: #7A6238;    /* тёмная латунь для текста-акцента, ≈5.4:1 */
	--hs-accent-soft: #EFE6D8;   /* подложки, фокус-кольца */
	--hs-line: #E7DFD3;          /* тонкие линии */
	--hs-ok: #3E6B34;            /* успех, ≈5.8:1 */
	--hs-ok-bg: #EAF0E4;
	--hs-err: #A03D22;           /* ошибка, ≈6.1:1 */
	--hs-err-bg: #F7E8E2;
	--hs-radius: 14px;
	--hs-radius-sm: 10px;
	--hs-shadow: 0 10px 30px rgba(46, 42, 37, .08);
	--hs-shadow-lg: 0 18px 50px rgba(46, 42, 37, .16);
	--hs-font-display: "Prata", Georgia, "Times New Roman", serif;
	--hs-font-body: "Golos Text", -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* --- 03. База --- */
html { scroll-behavior: smooth; }
body {
	background: var(--hs-bg);
	color: var(--hs-ink);
	font-family: var(--hs-font-body);
	font-size: clamp(1rem, .95rem + .3vw, 1.0625rem);
	line-height: 1.65;
}
::selection { background: var(--hs-accent-soft); }
:focus-visible {
	outline: 2px solid var(--hs-accent-ink);
	outline-offset: 3px;
}
a { color: var(--hs-ink); text-decoration-color: var(--hs-accent); text-underline-offset: 3px; }
a:hover { color: var(--hs-accent-ink); }

/* --- 04. Шапка и вордмарк (родные классы GeneratePress) --- */
.site-header { background: var(--hs-bg); border-bottom: 1px solid var(--hs-line); }
.main-title {
	font-family: var(--hs-font-display);
	font-weight: 400;
	font-size: clamp(1.25rem, 2.5vw, 1.6rem);
	letter-spacing: .02em;
	line-height: 1.25;
}
.main-title a { color: var(--hs-ink); text-decoration: none; display: inline-block; }
/* Пунктирная «строчка» под вордмарком — чисто декоративный приём CSS */
.main-title a::after {
	content: ""; display: block; height: 1px; margin-top: 6px;
	background-image: repeating-linear-gradient(90deg, var(--hs-accent) 0 6px, transparent 6px 12px);
}
.main-navigation a { font-weight: 500; }

/* --- 05. Типографика контента --- */
.entry-content h1 { font-family: var(--hs-font-display); font-weight: 400; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.2; margin: 0 0 1.2rem; }
.entry-content h2 { font-family: var(--hs-font-display); font-weight: 400; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.25; margin: 2.4rem 0 1rem; }
.entry-content h3 { font-family: var(--hs-font-display); font-weight: 400; font-size: clamp(1.15rem, 2vw, 1.4rem); margin: 1.8rem 0 .8rem; }
.entry-content p { margin: 0 0 1.1em; max-width: 72ch; }
.entry-content li { max-width: 72ch; }
.hs-lead { font-size: clamp(1.05rem, 1rem + .6vw, 1.25rem); line-height: 1.6; }

/* --- 06. Декоративная «строчка»-разделитель --- */
.hs-stitch {
	border: 0; height: 1px; margin: 2.5rem 0; opacity: .8;
	background-image: repeating-linear-gradient(90deg, var(--hs-accent) 0 7px, transparent 7px 14px);
}

/* --- 07. Вордмарк-компонент (подвал, hero) --- */
.hs-wordmark { font-family: var(--hs-font-display); font-size: 1.4rem; display: inline-block; line-height: 1.3; }
.hs-wordmark::after {
	content: ""; display: block; height: 1px; margin-top: 6px;
	background-image: repeating-linear-gradient(90deg, var(--hs-accent) 0 6px, transparent 6px 12px);
}

/* --- 08. Hero главной --- */
.hs-hero { display: grid; gap: 28px; align-items: center; }
.hs-hero img {
	width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
	border-radius: var(--hs-radius); border: 1px solid var(--hs-line);
}
.hs-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hs-price {
	display: inline-flex; align-items: baseline; gap: .45em; flex-wrap: wrap;
	padding: 10px 18px; background: var(--hs-accent-soft);
	border: 1px dashed var(--hs-accent); border-radius: 999px;
}
.hs-price strong { font-family: var(--hs-font-display); font-weight: 400; font-size: 1.5rem; }
@media (min-width: 900px) {
	.hs-hero { grid-template-columns: 1.1fr .9fr; }
}

/* --- 09. Список операций --- */
.hs-operations { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 28px; }
.hs-operations li { position: relative; padding-left: 28px; }
.hs-operations li::before { /* маркер-стежок */
	content: ""; position: absolute; left: 0; top: .68em; width: 16px; height: 1px;
	background-image: repeating-linear-gradient(90deg, var(--hs-accent) 0 3px, transparent 3px 6px);
}
@media (min-width: 600px) {
	.hs-operations { grid-template-columns: 1fr 1fr; }
}

/* --- 10. Таблица цен --- */
.hs-table-wrap { overflow-x: auto; }
.hs-price-table { width: 100%; min-width: 520px; border-collapse: collapse; background: var(--hs-surface); border: 1px solid var(--hs-line); }
.hs-price-table th {
	text-align: left; padding: 12px 14px; background: var(--hs-accent-soft);
	border-bottom: 1px dashed var(--hs-accent);
	font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--hs-accent-ink);
}
.hs-price-table td { padding: 12px 14px; border-bottom: 1px solid var(--hs-line); vertical-align: top; }
.hs-price-table tr:last-child td { border-bottom: 0; }
.hs-price-table .hs-num { white-space: nowrap; font-weight: 600; }

/* --- 11. Галерея работ --- */
.hs-works { display: grid; gap: 20px; grid-template-columns: 1fr; }
.hs-work {
	margin: 0; background: var(--hs-surface); border: 1px solid var(--hs-line);
	border-radius: var(--hs-radius); overflow: hidden; box-shadow: var(--hs-shadow);
	transition: transform .25s ease, box-shadow .25s ease;
}
.hs-work:hover { transform: translateY(-4px); box-shadow: var(--hs-shadow-lg); }
.hs-work img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s ease; }
.hs-work:hover img { transform: scale(1.04); }
.hs-work figcaption { padding: 12px 14px 14px; border-top: 1px dashed var(--hs-line); font-size: .9rem; color: var(--hs-muted); }
.hs-tag { display: block; margin-bottom: 4px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hs-accent-ink); }
@media (min-width: 600px) { .hs-works { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .hs-works { grid-template-columns: repeat(3, 1fr); } }

/* --- 12. Блок «для ателье» --- */
.hs-b2b {
	background: var(--hs-surface); border: 1px dashed var(--hs-accent);
	border-radius: var(--hs-radius); padding: clamp(20px, 4vw, 36px);
}
.hs-b2b h2, .hs-b2b h3 { margin-top: 0; }

/* --- 13. Шаги «как заказать» --- */
.hs-steps { list-style: none; margin: 0; padding: 0; counter-reset: hs-step; display: grid; gap: 18px; }
.hs-steps li { counter-increment: hs-step; position: relative; padding-left: 54px; }
.hs-steps li::before {
	content: counter(hs-step); position: absolute; left: 0; top: 0;
	width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--hs-accent-soft); border: 1px dashed var(--hs-accent);
	color: var(--hs-accent-ink); font-family: var(--hs-font-display); font-size: 1.1rem;
}
@media (min-width: 700px) { .hs-steps { grid-template-columns: 1fr 1fr; } }

/* --- 14. FAQ-аккордеон (нативные details, без JS) --- */
.hs-faq { border-bottom: 1px dashed var(--hs-line); }
.hs-faq summary {
	position: relative; padding: 16px 44px 16px 0; cursor: pointer;
	font-weight: 600; list-style: none;
}
.hs-faq summary::-webkit-details-marker { display: none; }
.hs-faq summary::after {
	content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
	font-family: var(--hs-font-display); font-size: 1.4rem; color: var(--hs-accent-ink);
}
.hs-faq[open] summary::after { content: "−"; }
.hs-faq summary:hover { color: var(--hs-accent-ink); }
.hs-faq p { margin: 0; padding: 0 0 16px; color: var(--hs-muted); }

/* --- 15. Карточки аудиторий --- */
.hs-audience { display: grid; gap: 16px; }
.hs-card { background: var(--hs-surface); border: 1px solid var(--hs-line); border-radius: var(--hs-radius); padding: 20px; }
.hs-card h3 { margin-top: 0; }
@media (min-width: 700px) { .hs-audience { grid-template-columns: repeat(3, 1fr); } }

/* --- 16. Заметка на полях --- */
.hs-note {
	background: var(--hs-accent-soft); border-left: 3px solid var(--hs-accent);
	border-radius: 0 var(--hs-radius-sm) var(--hs-radius-sm) 0;
	padding: 14px 16px; font-size: .95rem;
}

/* --- 17. Подвал (GeneratePress) --- */
.site-footer { background: var(--hs-ink); color: #EDE6DA; }
.footer-widgets { padding: 40px 0 20px; }
.site-footer a { color: #EDE6DA; text-decoration-color: var(--hs-accent); }
.site-footer a:hover { color: #FFFFFF; }
.hs-footer-grid { display: grid; gap: 24px; }
.hs-footer-wordmark { font-family: var(--hs-font-display); font-size: 1.3rem; color: #FFFDF9; display: inline-block; line-height: 1.3; }
.hs-footer-wordmark::after {
	content: ""; display: block; height: 1px; margin-top: 6px;
	background-image: repeating-linear-gradient(90deg, var(--hs-accent) 0 6px, transparent 6px 12px);
}
.hs-footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hs-footer-small { font-size: .85rem; color: #B8AE9F; } /* ≈6.5:1 на чернильном фоне */
.site-info { background: var(--hs-ink); color: #B8AE9F; border-top: 1px dashed rgba(169, 139, 95, .5); font-size: .85rem; }
.site-info a { color: #B8AE9F; }
@media (min-width: 700px) { .hs-footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }

/* --- 18. Якорь формы: отступ при переходе /kontakty/#zayavka --- */
#zayavka { scroll-margin-top: 90px; }

/* --- 19. Уважение к настройкам пользователя --- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* --- 20. Просмотр работы крупно (лайтбокс нашей галереи) ---
   Классы и id — из плагина: .hs-work-link + #hs-lightbox. --- */
.hs-work-link { display: block; line-height: 0; }
#hs-lightbox {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(30, 27, 23, .86);
}
#hs-lightbox figure { margin: 0; max-width: min(1100px, 94vw); max-height: 92vh; display: flex; flex-direction: column; gap: 12px; }
#hs-lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; border-radius: 10px; background: var(--hs-surface); }
#hs-lightbox figcaption { color: #F3EDE3; font-size: .95rem; text-align: center; }
#hs-lightbox button {
  position: fixed; top: 18px; right: 22px; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%;
  background: transparent; color: #fff; font-size: 20px; cursor: pointer;
}
#hs-lightbox button:hover { border-color: #fff; }

/* место под кнопку чата, чтобы она не закрывала последний ряд галереи */
.hs-works { margin-bottom: 96px; }

/* --- 23. Cookie-уведомление (только технические cookie) --- */
.hs-cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9995;
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--hs-ink); color: #EDE6DA;
  box-shadow: 0 -10px 30px rgba(46, 42, 37, .18);
}
.hs-cookie-text { margin: 0; font-size: .9rem; line-height: 1.5; max-width: 78ch; }
.hs-cookie-text a { color: #FFFDF9; text-decoration-color: var(--hs-accent); }
.hs-cookie-btn {
  flex: none; padding: 10px 22px; border: 1px solid var(--hs-accent); border-radius: 999px;
  background: transparent; color: #FFFDF9; font: inherit; font-weight: 600; cursor: pointer;
}
.hs-cookie-btn:hover { background: var(--hs-accent); color: #2E2A25; }
@media (max-width: 480px) { .hs-cookie { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); } }
