﻿/* ════════════════════════════════════════════════════════════════════
   ОСТРОВ · Дизайн-система «Тихая роскошь»
   Премиум-мебель на заказ · Южно-Сахалинск
   ──────────────────────────────────────────────────────────────────
   Подход: warm minimalism, островная идентичность, редакторская
   типографика, тёплые землистые тона. Никакого «AI-purple»,
   никаких диких градиентов. Сдержанность и точность.
══════════════════════════════════════════════════════════════════ */


/* ────────────────────────────────────────────────────────
   1. CSS PERIMETER · переменные, reset, базовые правила
   ──────────────────────────────────────────────────────── */

/* ── Playfair Display ── */
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-400-latin.woff2') format('woff2'),
       url('assets/fonts/playfair-display-400-cyrillic.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-400-italic-latin.woff2') format('woff2'),
       url('assets/fonts/playfair-display-400-italic-cyrillic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-500-latin.woff2') format('woff2'),
       url('assets/fonts/playfair-display-500-cyrillic.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-500-italic-latin.woff2') format('woff2'),
       url('assets/fonts/playfair-display-500-italic-cyrillic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-600-latin.woff2') format('woff2'),
       url('assets/fonts/playfair-display-600-cyrillic.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-600-italic-latin.woff2') format('woff2'),
       url('assets/fonts/playfair-display-600-italic-cyrillic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-700-latin.woff2') format('woff2'),
       url('assets/fonts/playfair-display-700-cyrillic.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-700-italic-latin.woff2') format('woff2'),
       url('assets/fonts/playfair-display-700-italic-cyrillic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ── Manrope ── */
@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-300-latin.woff2') format('woff2'),
       url('assets/fonts/manrope-300-cyrillic.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-400-latin.woff2') format('woff2'),
       url('assets/fonts/manrope-400-cyrillic.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-500-latin.woff2') format('woff2'),
       url('assets/fonts/manrope-500-cyrillic.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-600-latin.woff2') format('woff2'),
       url('assets/fonts/manrope-600-cyrillic.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-700-latin.woff2') format('woff2'),
       url('assets/fonts/manrope-700-cyrillic.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


:root {
  /* Цветовая палитра */
  --bone:    #F2EDE5;   /* основной фон, тёплый тон */
  --paper:   #FAF7F2;   /* светлее основного, для контраста */
  --ink:     #1A1814;   /* тёмный графит - текст и тёмные секции */
  --ink-2:   #2A2520;   /* мягкий тёмный, чуть теплее */
  --walnut:  #4A3B28;   /* глубокий орех */
  --oak:     #B5926A;   /* тёплый дуб / champagne - акценты */
  --oak-d:   #8B6F47;   /* тёмный дуб для hover */
  --sand:    #E8DCC8;   /* пыльный бежевый */
  --moss:    #6B7D5C;   /* приглушённый сахалинский мох - тонкий акцент */
  --line:    rgba(26, 24, 20, 0.12);
  --line-d:  rgba(245, 241, 234, 0.18);

  /* Типографика */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Шкалы */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-xl: 24px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 96px;
  --sp-9: 128px;

  --container: 1320px;
  --container-narrow: 920px;

  /* Транзиции */
  --t-fast:  140ms cubic-bezier(.2, .7, .3, 1);
  --t-base:  280ms cubic-bezier(.2, .7, .3, 1);
  --t-slow:  600ms cubic-bezier(.2, .7, .3, 1);
}

/* Мобильные значения spacing'а - поджаты, чтобы не было больших пустот между секциями */
@media (max-width: 767px) {
  :root {
    --sp-6: 36px;
    --sp-7: 48px;
    --sp-8: 64px;
    --sp-9: 80px;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Offset для anchor-навигации, чтобы fixed header не перекрывал заголовки секций */
  scroll-padding-top: 100px;
}

/* Cormorant Garamond: принудительно lining-цифры и нормальное тире */
[style*="--font-display"],
.section-num, .section-title, .work-name, .work-cat,
.hero-title, .hero-eyebrow, .lbTitle, .lbName,
.lightbox-title, .lightbox-name,
.review-text, .craftnote-text, .quote-text {
  font-feature-settings: "lnum" 1, "onum" 0, "case" 1;
}

/* Дополнительная страховка для конкретных секций */
section[id] {
  scroll-margin-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bone);
  /* Нормальные (lining) цифры и выключенные лигатуры для всего сайта */
  font-feature-settings: "lnum" 1, "tnum" 0;
  /* Глобальная защита от выходов за границы viewport */
  overflow-x: hidden;
  /* Не даём контенту тянуть страницу шире viewport */
  max-width: 100vw;
  min-width: 320px;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--oak-d); }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--oak); color: var(--paper); }


/* ────────────────────────────────────────────────────────
   2. КОНТЕЙНЕРЫ И УТИЛИТЫ
   ──────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}
/* Поджимаем padding на самых узких устройствах (Android-телефоны 360px) */
@media (max-width: 374px)  { .container { padding: 0 16px; } }
@media (min-width: 768px)  { .container { padding: 0 var(--sp-5); } }
@media (min-width: 1200px) { .container { padding: 0 var(--sp-6); } }


/* ────────────────────────────────────────────────────────
   3. КНОПКИ
   ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 16px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0;
  transition: all var(--t-base);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  max-width: 100%;
}
@media (max-width: 419px) {
  /* Поджимаем padding на узких устройствах, чтобы текст помещался */
  .btn { padding: 15px 18px; font-size: 13px; letter-spacing: 0.03em; }
}
.btn-sm { padding: 10px 18px; font-size: 12px; }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--walnut);
  border-color: var(--walnut);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* На тёмном фоне */
.dark .btn-primary { background: var(--oak); border-color: var(--oak); color: var(--ink); }
.dark .btn-primary:hover { background: var(--paper); border-color: var(--paper); }
.dark .btn-ghost { color: var(--paper); border-color: var(--paper); }
.dark .btn-ghost:hover { background: var(--paper); color: var(--ink); }


/* ────────────────────────────────────────────────────────
   4. SECTION HEADERS / ОБЩИЕ ШАПКИ СЕКЦИЙ
   ──────────────────────────────────────────────────────── */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-5);
  align-items: start;
  margin-bottom: var(--sp-7);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.section-head-light { border-top-color: var(--line-d); }

.section-num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--oak-d);
  letter-spacing: 0.05em;
  padding-top: var(--sp-2);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-3);
}
.section-title em {
  font-style: italic;
  color: var(--walnut);
}

.section-sub {
  font-size: 17px;
  line-height: 1.55;
  max-width: 540px;
  color: var(--ink-2);
  opacity: 0.78;
}

@media (max-width: 640px) {
  .section-head { grid-template-columns: 1fr; gap: var(--sp-3); }
  .section-num { padding-top: 0; }
  .section-sub { font-size: 15px; }
}


/* ────────────────────────────────────────────────────────
   5. HEADER / НАВИГАЦИЯ
   ──────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(242, 237, 229, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition: all var(--t-base);
}
/* Compact mode: triggered by JS when page is scrolled */
.site-header.compact {
  background: rgba(242, 237, 229, 0.95);
}
.site-header.compact .header-row {
  height: 64px;
}

.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 80px;
  gap: var(--sp-5);
  transition: height var(--t-base);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.01em;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  margin-right: 4px;
  transform: translateY(4px);
}
.brand-name {
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: 17px;
}
.brand-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--oak-d);
  display: none;
}
@media (min-width: 768px) {
  .brand-tag { display: inline; }
}

.nav-main {
  display: none;
  gap: var(--sp-5);
  justify-content: center;
}
.nav-main a {
  font-size: 14px;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
}
.nav-main a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width var(--t-base);
}
.nav-main a:hover::after { width: 100%; }

@media (min-width: 992px) {
  .nav-main { display: flex; }
}

.header-cta {
  display: none;
  align-items: center;
  gap: var(--sp-4);
}
.phone-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
@media (min-width: 768px) {
  .header-cta { display: flex; }
}

/* Mobile toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px; height: 40px;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  width: 24px; height: 1.5px;
  background: var(--ink);
  transition: transform var(--t-base), opacity var(--t-base);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (min-width: 992px) {
  .nav-toggle { display: none; }
}

.nav-drawer {
  position: fixed;
  top: 80px;
  left: 0; right: 0;
  /* Take full viewport below header - fixes overlay bug where hero text bleeds through */
  height: calc(100vh - 80px);
  height: calc(100dvh - 80px);
  z-index: 99;
  background: var(--bone);
  padding: var(--sp-6) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transform: translateY(-110%);
  transition: transform var(--t-base);
  pointer-events: none;
  overflow-y: auto;
  /* Solid backdrop - no see-through */
  box-shadow: 0 8px 32px rgba(26, 24, 20, 0.08);
}
.nav-drawer.open {
  transform: translateY(0);
  pointer-events: auto;
}
/* Lock body scroll while drawer is open to prevent ghost-scrolling under it */
body.nav-open {
  overflow: hidden;
}
.nav-drawer a {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
}
.drawer-contact {
  margin-top: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.nav-drawer a.drawer-phone {
  margin-top: 0;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  color: var(--oak-d);
}
.drawer-socials {
  display: flex;
  gap: var(--sp-3);
}
.nav-drawer a.drawer-social {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.nav-drawer a.drawer-social:hover {
  border-color: var(--oak);
  color: var(--oak-d);
}
.nav-drawer a.drawer-social svg {
  color: var(--oak-d);
}
.messenger-logo {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  object-fit: contain;
  flex: 0 0 auto;
}
.messenger-logo-max {
  filter: none;
}
.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}
@media (min-width: 992px) {
  .nav-drawer { display: none; }
}


/* ────────────────────────────────────────────────────────
   6. HERO / ПЕРВЫЙ ЭКРАН
   ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 80px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 30%, rgba(181, 146, 106, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 80%, rgba(107, 125, 92, 0.10) 0%, transparent 50%),
    var(--bone);
}
@media (max-width: 767px) {
  .hero { padding: 110px 0 60px; min-height: auto; }
}

/* зерно - даёт «тёплый бумажный» эффект */
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' /><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.30  0 0 0 0 0.25  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-7);
  position: relative;
  z-index: 1;
  align-items: end;
}

/* Защита от overflow в потоковой раскладке */
.hero-copy {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--walnut);
  margin-bottom: var(--sp-5);
}
.eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--moss);
  border-radius: 50%;
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5.2vw, 76px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-5);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}
.hero-title em {
  font-style: italic;
  color: var(--walnut);
  font-weight: 400;
}
.hero-title strong {
  font-weight: 700;
  color: var(--oak-d);
}
.hero-title-dash {
  display: inline-block;
}

.hero-lead {
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.55;
  max-width: 520px;
  color: var(--ink-2);
  opacity: 0.85;
  margin-bottom: var(--sp-6);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
}
@media (max-width: 519px) {
  /* На узких экранах кнопки занимают всю ширину */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; width: 100%; }
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  list-style: none;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
@media (max-width: 419px) {
  .hero-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
}
.hero-proof li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hero-proof strong {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.hero-proof span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.65;
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--sp-5);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--walnut);
  opacity: 0.6;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}
/* Header gets .scrolled when user scrolls; hide scroll indicator with it */
body.scrolled .hero-scroll {
  opacity: 0;
  pointer-events: none;
}
.hero-scroll svg line {
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.3); }
  50%      { transform: scaleY(1); }
}
@media (max-width: 768px) { .hero-scroll { display: none; } }


/* ────────────────────────────────────────────────────────
   7. BAND / ТИХОЕ УТВЕРЖДЕНИЕ
   ──────────────────────────────────────────────────────── */
.band {
  padding: var(--sp-8) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.25;
  font-weight: 400;
  max-width: var(--container-narrow);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.band-text em {
  font-style: italic;
  color: var(--walnut);
}


/* ────────────────────────────────────────────────────────
   7b. TRUST BAR — полоса доверия под hero
   ──────────────────────────────────────────────────────── */
.trust-bar {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-6) 0;
}

.trust-bar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 640px)  { .trust-bar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .trust-bar-grid { grid-template-columns: repeat(4, 1fr); } }

.trust-bar-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  color: var(--ink);
}
.trust-bar-item svg {
  flex-shrink: 0;
  color: var(--oak-d);
  margin-top: 2px;
}
.trust-bar-item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trust-bar-item strong {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.trust-bar-item span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  opacity: 0.8;
}



/* ────────────────────────────────────────────────────────
   8. PORTFOLIO / ПОРТФОЛИО
   ──────────────────────────────────────────────────────── */
.portfolio {
  padding: var(--sp-9) 0;
  background: var(--bone);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.filter {
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 100px;
  transition: all var(--t-fast);
}
.filter:hover {
  border-color: var(--ink);
}
.filter.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Works grid - responsive masonry-like, clean clickable cards */
.works {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 640px) {
  .works {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-5) var(--sp-4);
  }
}
@media (min-width: 992px) {
  .works {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6) var(--sp-5);
    grid-auto-flow: dense;
  }
  .work-tall   { grid-row: span 2; }
  .work-tall .work-image { aspect-ratio: 3 / 5; }
  .work-wide   { grid-column: span 2; }
  .work-wide .work-image { aspect-ratio: 21 / 10; }
}

.work {
  display: flex;
  flex-direction: column;
}

/* The card is now a button - entire surface is clickable */
.work-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform var(--t-base);
}
.work-card:hover { transform: translateY(-2px); }
.work-card:focus-visible {
  outline: 2px solid var(--oak);
  outline-offset: 4px;
  border-radius: 2px;
}

.work-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sand) 0%, var(--oak) 100%);
}
.work-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.work-card:hover .work-photo { transform: scale(1.03); }

/* "Open" hint on hover - circle with arrow */
.work-image::after {
  content: '';
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'><path d='M1 7H13M13 7L7.5 1.5M13 7L7.5 12.5' stroke='%231a1814' stroke-width='1.5' stroke-linecap='round'/></svg>") center / 14px no-repeat;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.work-card:hover .work-image::after,
.work-card:focus-visible .work-image::after {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none) {
  /* On touch devices, show the hint always */
  .work-image::after {
    opacity: 1;
    transform: translateY(0);
  }
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.work-cat {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--oak-d);
}
.work-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ────────────────────────────────────────────────────────
   LIGHTBOX - project detail modal
   ──────────────────────────────────────────────────────── */
.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  margin: 0;
}
.lightbox::backdrop {
  background: rgba(15, 13, 10, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-inner {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  width: min(100%, 1100px);
  max-height: calc(100vh - 32px);
  margin: 16px;
  border-radius: 4px;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: lbIn 0.3s ease;
}

@keyframes lbIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 768px) {
  .lightbox-inner {
    grid-template-columns: 1.2fr 1fr;
    max-height: calc(100vh - 64px);
    margin: 32px;
  }
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  cursor: pointer;
  z-index: 2;
  transition: background var(--t-fast), color var(--t-fast);
}
.lightbox-close:hover {
  background: var(--ink);
  color: var(--paper);
}

.lightbox-figure {
  margin: 0;
  background: var(--bone);
  min-height: 240px;
  max-height: 50vh;
  overflow: hidden;
}
@media (min-width: 768px) {
  .lightbox-figure { max-height: 100%; }
}
.lightbox-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lightbox-nav {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  padding: 6px;
  background: rgba(26, 24, 20, 0.72);
  color: var(--paper);
  border: 1px solid rgba(250, 247, 242, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox-nav-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background var(--t-fast);
}
.lightbox-nav-btn:hover,
.lightbox-nav-btn:focus-visible {
  background: rgba(250, 247, 242, 0.14);
  outline: none;
}
.lightbox-counter {
  min-width: 46px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(250, 247, 242, 0.8);
}
@media (max-width: 767px) {
  .lightbox-nav {
    top: 192px;
    bottom: auto;
  }
}

.lightbox-body {
  padding: var(--sp-5);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
@media (min-width: 768px) {
  .lightbox-body { padding: var(--sp-6); }
}

.lightbox-badge {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--oak-d);
}
.lightbox-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--oak);
}
.lightbox-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
.lightbox-title em { font-style: italic; color: var(--oak); }
.lightbox-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}
.lightbox-specs {
  list-style: none;
  padding: var(--sp-4) 0 0;
  margin: var(--sp-3) 0 0;
  display: grid;
  gap: var(--sp-2);
  border-top: 1px solid var(--line);
}
.lightbox-specs li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--sp-3);
  font-size: 13px;
  align-items: baseline;
}
.lightbox-specs span {
  color: var(--oak-d);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}
.lightbox-specs b { font-weight: 500; }
.lightbox-cta {
  margin-top: var(--sp-4);
  align-self: flex-start;
}

/* CTA-card - closes the masonry grid + serves as CTA */
.work-cta {
  display: flex;
}
@media (min-width: 992px) {
  .work-wide-cta { grid-column: span 2; }
}
.cta-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-6);
  width: 100%;
  min-height: 100%;
  aspect-ratio: 4 / 5;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transition: background var(--t-base);
  position: relative;
  overflow: hidden;
}
@media (min-width: 992px) {
  .work-wide-cta .cta-card {
    aspect-ratio: 21 / 10;
  }
}
.cta-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(181, 146, 106, 0.18), transparent 60%);
  pointer-events: none;
}
.cta-card:hover { background: #221f1a; }
.cta-card > * { position: relative; z-index: 1; }

.cta-card-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--oak);
}
.cta-card-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.cta-card-text {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(245, 241, 234, 0.75);
  max-width: 28em;
}
.cta-card-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 1px solid var(--oak);
  padding-bottom: 6px;
  width: fit-content;
  transition: gap var(--t-fast);
}
.cta-card:hover .cta-card-cta {
  gap: var(--sp-3);
}

.portfolio-counter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--walnut);
  letter-spacing: 0.02em;
}

.portfolio-footer {
  margin-top: var(--sp-7);
  text-align: center;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}


/* ────────────────────────────────────────────────────────
   9. MATERIALS & TECHNOLOGIES / МАТЕРИАЛЫ
   ──────────────────────────────────────────────────────── */
.materials {
  padding: var(--sp-9) 0;
  background: var(--ink);
  color: var(--paper);
}
.materials .section-title { color: var(--paper); }
.materials .section-title em { color: var(--oak); }
.materials .section-num { color: var(--oak); }
.materials .section-sub { color: var(--paper); opacity: 0.7; }

.brands {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-d);
  margin-bottom: var(--sp-9);
  border: 1px solid var(--line-d);
}
@media (min-width: 640px) { .brands { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .brands { grid-template-columns: repeat(3, 1fr); } }

.brand-card {
  background: var(--ink);
  padding: var(--sp-6) var(--sp-5);
  transition: background var(--t-base);
}
.brand-card:hover {
  background: var(--ink-2);
}
.brand-card header {
  margin-bottom: var(--sp-4);
}
.brand-origin {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oak);
  margin-bottom: var(--sp-2);
}
.brand-card h3 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-card p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.75;
  margin-bottom: var(--sp-4);
}
.brand-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: 12px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-d);
}
.brand-card li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  opacity: 0.85;
}
.brand-card li::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--oak);
  flex-shrink: 0;
}

/* Tech grid */
.tech-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 768px) { .tech-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tech-grid { grid-template-columns: repeat(4, 1fr); } }

.tech-item {
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--line-d);
}
.tech-num {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
  color: var(--oak);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}
.tech-item h4 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
}
.tech-item p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.75;
}

/* ─── Suppliers directory (full brand list) ─── */
.suppliers {
  margin-top: var(--sp-8);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--line-d);
}
.suppliers-head {
  max-width: 720px;
  margin-bottom: var(--sp-6);
}
.suppliers-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--oak);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
  text-transform: lowercase;
}
.suppliers-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--paper);
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
}
.suppliers-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--paper);
  opacity: 0.7;
}
.suppliers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}
@media (min-width: 700px) { .suppliers-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); } }

.supplier-col h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--oak);
  letter-spacing: 0.02em;
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line-d);
}
.supplier-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.supplier-col li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: 15px;
  color: var(--paper);
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.supplier-col li span {
  font-weight: 500;
  letter-spacing: 0.01em;
}
.supplier-col li em {
  font-style: normal;
  font-size: 12px;
  color: var(--oak);
  letter-spacing: 0.04em;
  opacity: 0.75;
}

/* ─── Craftnote callout (assembly hardware) ─── */
.craftnote {
  margin-top: var(--sp-7);
  padding: var(--sp-6);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-d);
  border-radius: 2px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-5);
  align-items: start;
}
@media (max-width: 639px) {
  .craftnote {
    grid-template-columns: 1fr;
    padding: var(--sp-5);
    gap: var(--sp-4);
  }
}
.craftnote-mark {
  color: var(--oak);
  flex-shrink: 0;
}
.craftnote-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--oak);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
}
.craftnote-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--paper);
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: none;
}
.craftnote-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--paper);
  opacity: 0.85;
  margin-bottom: var(--sp-4);
}
.craftnote-text em {
  font-style: italic;
  color: var(--oak);
  font-family: var(--font-display);
  font-size: 17px;
}
.craftnote-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2) var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-d);
}
@media (min-width: 700px) {
  .craftnote-list { grid-template-columns: repeat(2, 1fr); }
}
.craftnote-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--sp-2);
}
.craftnote-list b {
  font-weight: 500;
  font-size: 14px;
  color: var(--paper);
  letter-spacing: 0.02em;
}
.craftnote-list span {
  font-size: 12px;
  color: var(--paper);
  opacity: 0.55;
  line-height: 1.4;
}


/* ────────────────────────────────────────────────────────
   10. CALCULATOR / КВИЗ
   ──────────────────────────────────────────────────────── */
.calculator {
  padding: var(--sp-9) 0;
  background: var(--paper);
}

.quiz {
  max-width: var(--container-narrow);
  margin: 0 auto;
  background: var(--bone);
  padding: var(--sp-6);
  position: relative;
  border: 1px solid var(--line);
}
@media (min-width: 768px) { .quiz { padding: var(--sp-7) var(--sp-8); } }

.quiz-progress {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.quiz-progress-bar {
  flex: 1;
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  --progress: 0.166;
}
.quiz-progress-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--progress));
  transition: transform var(--t-slow);
}
.quiz-progress-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.65;
  white-space: nowrap;
}

.quiz-step { display: none; min-height: 320px; }
.quiz-step.active { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quiz-q {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-5);
}

/* Подсказка под вопросом - даёт понять, что шаг можно пропустить */
.quiz-hint {
  margin-top: calc(var(--sp-5) * -1 + var(--sp-2));
  margin-bottom: var(--sp-5);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  opacity: 0.7;
  max-width: 520px;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
@media (min-width: 640px) { .quiz-options { grid-template-columns: repeat(2, 1fr); } }

/* Особый стиль для опции «Ничего из перечисленного» - она занимает всю ширину
   и визуально отделена от обычных опций. */
.quiz-option-none {
  grid-column: 1 / -1;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
  background: transparent !important;
  font-style: italic;
  color: var(--ink-2);
  opacity: 0.85;
}
.quiz-option-none:hover {
  opacity: 1;
  background: var(--bone) !important;
}

.quiz-options label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 16px 20px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.4;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}
.quiz-options label span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quiz-options label input {
  margin-top: 0;
  flex-shrink: 0;
}
@media (max-width: 479px) {
  .quiz-options label {
    padding: 14px 16px;
    font-size: 14px;
  }
}

.quiz-options label:hover {
  border-color: var(--ink);
  background: var(--bone);
}
.quiz-options label.invalid {
  border-color: var(--walnut);
  background: rgba(74, 59, 40, 0.04);
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.quiz-options input { 
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all var(--t-fast);
}
.quiz-options input[type="checkbox"] { border-radius: 0; }
.quiz-options input:checked {
  border-color: var(--ink);
  background: var(--ink);
}
.quiz-options input:checked::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--paper);
  border-radius: 50%;
}
.quiz-options input[type="checkbox"]:checked::after {
  border-radius: 0;
  inset: 0;
  background: var(--ink);
  border: 4px solid var(--ink);
}
.quiz-options input[type="checkbox"]:checked::before {
  content: '';
  position: absolute;
  top: 3px; left: 6px;
  width: 4px; height: 9px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  z-index: 1;
}
.quiz-options label:has(input:checked) {
  border-color: var(--ink);
  background: var(--paper);
}
.quiz-options em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oak-d);
}

.quiz-note {
  font-size: 14px;
  color: var(--ink-2);
  opacity: 0.7;
  margin-bottom: var(--sp-5);
  max-width: 500px;
}

.quiz-form {
  display: grid;
  gap: var(--sp-4);
}
.quiz-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.quiz-field > span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.7;
}
.quiz-field input[type="text"],
.quiz-field input[type="tel"] {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  font-size: 16px;
  border-radius: 0;
  transition: border-color var(--t-fast);
}
.quiz-field input:focus {
  outline: none;
  border-color: var(--ink);
}
.quiz-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.quiz-field-check {
  flex-direction: row;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--ink-2);
}
.quiz-field-check input {
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.quiz-field-check input:checked {
  background: var(--ink);
  border-color: var(--ink);
}
.quiz-field-check input:checked::after {
  content: '';
  position: absolute;
  top: 2px; left: 5px;
  width: 5px; height: 10px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.quiz-status {
  margin: var(--sp-4) 0 0;
  padding: 12px 14px;
  border-left: 2px solid var(--walnut);
  background: rgba(74, 59, 40, 0.06);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}
.quiz-status[data-state="info"] {
  border-left-color: var(--moss);
  background: rgba(107, 125, 92, 0.08);
}

.quiz-done { text-align: center; padding: var(--sp-6) 0; }
.quiz-done-text {
  font-size: 17px;
  line-height: 1.55;
  max-width: 480px;
  margin: 0 auto var(--sp-5);
  color: var(--ink-2);
  opacity: 0.8;
}
.quiz-done-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  margin: 0 auto var(--sp-4);
}
.quiz-done-actions[hidden] { display: none; }
.quiz-done-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px; height: 80px;
  background: var(--moss);
  color: var(--paper);
  border-radius: 50%;
  margin: var(--sp-4) auto;
}

.quiz-nav {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  gap: var(--sp-3);
}
.quiz-nav .btn {
  position: relative;
  min-height: 44px;
  touch-action: manipulation;
  transform: none;
}
.quiz-nav .btn:hover {
  transform: none;
}
.quiz-nav .btn-primary {
  min-width: 132px;
}
.quiz-nav .btn-ghost[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
@media (max-width: 479px) {
  .quiz-nav {
    align-items: stretch;
  }
  .quiz-nav .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
  }
}


/* ────────────────────────────────────────────────────────
   11. PROCESS / ПРОИЗВОДСТВО НА САХАЛИНЕ
   ──────────────────────────────────────────────────────── */
.process {
  padding: var(--sp-9) 0;
  background: var(--ink-2);
  color: var(--paper);
}
.process .section-title { color: var(--paper); }
.process .section-title em { color: var(--oak); }
.process .section-num { color: var(--oak); }
.process .section-sub { color: var(--paper); opacity: 0.7; }

.process-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
}
@media (min-width: 992px) {
  .process-layout {
    grid-template-columns: 5fr 6fr;
    gap: var(--sp-8);
    align-items: start;
  }
}

.process-image {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--walnut) 0%, var(--ink) 100%);
  overflow: hidden;
}
.process-image-tag {
  position: absolute;
  bottom: var(--sp-5);
  left: var(--sp-5);
  background: var(--paper);
  color: var(--ink);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 80%;
}
.process-image-tag strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.process-image-tag span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oak-d);
}

.process-steps {
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: step;
}
.process-steps li {
  padding: var(--sp-5) 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "num title"
    "num desc";
  column-gap: var(--sp-4);
  row-gap: var(--sp-2);
  border-top: 1px solid var(--line-d);
  align-items: start;
  /* Лёгкая диагональ: каждый следующий шаг чуть смещён вправо */
  transition: padding-left var(--t-base);
}
.process-steps li:last-child {
  border-bottom: 1px solid var(--line-d);
}
@media (min-width: 992px) {
  .process-steps li:nth-child(2) { padding-left: var(--sp-3); }
  .process-steps li:nth-child(3) { padding-left: calc(var(--sp-3) * 2); }
  .process-steps li:nth-child(4) { padding-left: calc(var(--sp-3) * 3); }
  .process-steps li:nth-child(5) { padding-left: calc(var(--sp-3) * 2); }
  .process-steps li:nth-child(6) { padding-left: var(--sp-3); }
}
.process-step-num {
  grid-area: num;
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  font-weight: 400;
  color: var(--oak);
  line-height: 1;
  min-width: 60px;
  padding-top: 4px;
}
.process-steps h4 {
  grid-area: title;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  /* Заголовки всегда слева, читаются естественно */
  text-align: left;
}
.process-steps p {
  grid-area: desc;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.7;
  max-width: 480px;
  text-align: left;
}


/* ────────────────────────────────────────────────────────
   12. TESTIMONIALS / ОТЗЫВЫ
   ──────────────────────────────────────────────────────── */
.testimonials {
  padding: var(--sp-9) 0;
  background: var(--bone);
}

.reviews {
  counter-reset: trust-card;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 768px) { .reviews { grid-template-columns: repeat(3, 1fr); } }

.review {
  counter-increment: trust-card;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
}
.review::before {
  content: '0' counter(trust-card);
  position: absolute;
  top: 20px; right: 24px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  color: var(--oak);
  opacity: 0.65;
}
.review blockquote {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink);
  flex: 1;
  padding-right: 56px;
}
.review figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.review figcaption strong {
  font-weight: 500;
  font-size: 14px;
}
.review figcaption span {
  font-size: 12px;
  color: var(--ink-2);
  opacity: 0.6;
  letter-spacing: 0.02em;
}


/* ────────────────────────────────────────────────────────
   13. FAQ
   ──────────────────────────────────────────────────────── */
.faq {
  padding: var(--sp-9) 0;
  background: var(--paper);
}
.faq-container { max-width: var(--container-narrow); }

.faq-list {
  display: flex;
  flex-direction: column;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  letter-spacing: -0.005em;
  transition: color var(--t-fast);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--oak-d);
  transition: transform var(--t-base);
  flex-shrink: 0;
}
.faq summary:hover { color: var(--walnut); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 0 var(--sp-5);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  opacity: 0.85;
  max-width: 720px;
}


/* ────────────────────────────────────────────────────────
   14. FINAL CTA
   ──────────────────────────────────────────────────────── */
.final-cta {
  padding: var(--sp-9) 0;
  background: var(--oak);
  color: var(--ink);
}
.final-cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: end;
}
@media (min-width: 768px) {
  .final-cta-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: var(--sp-7);
  }
}

.final-cta-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}
.final-cta-title em {
  font-style: italic;
  color: var(--paper);
}
.final-cta-text {
  font-size: 17px;
  line-height: 1.55;
  max-width: 540px;
  color: var(--walnut);
}
.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.final-cta .btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.final-cta .btn-primary:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.final-cta .btn-ghost {
  border-color: var(--ink);
}
.final-cta .btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}


/* ────────────────────────────────────────────────────────
   15. FOOTER
   ──────────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--sp-8) 0 var(--sp-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--line-d);
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand .brand-mark {
  background: var(--oak);
  color: var(--ink);
}
.footer-brand .brand-name { font-family: var(--font-body); }
.footer-tag {
  margin-top: var(--sp-4);
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.6;
  max-width: 320px;
}

.footer-col h5 {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oak);
  margin-bottom: var(--sp-3);
  font-weight: 500;
}
.footer-col p {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.8;
}
.footer-col a:hover { color: var(--oak); }

.footer-bottom {
  padding-top: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: 12px;
  opacity: 0.5;
  letter-spacing: 0.02em;
}


/* ────────────────────────────────────────────────────────
   15b. PHOTO TREATMENT (work + process)
   ──────────────────────────────────────────────────────── */
.work-photo,
.process-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s cubic-bezier(.22, .61, .36, 1), filter .6s ease;
  filter: saturate(0.92) contrast(1.02);
}
.work:hover .work-photo,
.work:focus-within .work-photo {
  transform: scale(1.04);
  filter: saturate(1) contrast(1.04);
}
.process-image:hover .process-photo {
  transform: scale(1.02);
}

/* Mobile: trim aspect ratio so portraits don't dominate the screen */
@media (max-width: 639px) {
  .work-image { aspect-ratio: 5 / 4; }
}


/* ────────────────────────────────────────────────────────
   15c. REVEAL ON SCROLL (progressive enhancement)
   Elements stay visible without JS; only when JS adds .reveal,
   they become hidden until the .reveal-in class is added.
   ──────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s cubic-bezier(.22, .61, .36, 1),
    transform 0.9s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.reveal.reveal-in {
  opacity: 1;
  transform: none;
}


/* ────────────────────────────────────────────────────────
   15d. FLOATING CONTACT WIDGET
   ──────────────────────────────────────────────────────── */
.float-contact {
  position: fixed;
  bottom: var(--sp-4);
  right: var(--sp-4);
  z-index: 90;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: var(--sp-3);
}

.float-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.25), 0 2px 8px rgba(26, 24, 20, 0.15);
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
}
.float-trigger:hover {
  background: var(--walnut);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(26, 24, 20, 0.35), 0 4px 12px rgba(26, 24, 20, 0.2);
}
.float-trigger::after {
  /* Пульс-индикатор «новое сообщение»  */
  content: '';
  position: absolute;
  top: 4px; right: 4px;
  width: 10px; height: 10px;
  background: var(--moss);
  border: 2px solid var(--bone);
  border-radius: 50%;
  animation: floatPulse 2.4s ease-in-out infinite;
}
@keyframes floatPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.85); opacity: 0.7; }
}

.float-icon-chat,
.float-icon-close {
  position: absolute;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.float-icon-close {
  opacity: 0;
  transform: rotate(-45deg) scale(0.8);
}
.float-trigger[aria-expanded="true"] .float-icon-chat {
  opacity: 0;
  transform: rotate(45deg) scale(0.8);
}
.float-trigger[aria-expanded="true"] .float-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.float-trigger[aria-expanded="true"]::after {
  display: none;
}

.float-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: all var(--t-base);
}
.float-trigger[aria-expanded="true"] + .float-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.float-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 12px 18px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(26, 24, 20, 0.12), 0 1px 4px rgba(26, 24, 20, 0.08);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all var(--t-fast);
}
.float-link:hover {
  transform: translateX(-3px);
  box-shadow: 0 6px 20px rgba(26, 24, 20, 0.18), 0 2px 6px rgba(26, 24, 20, 0.1);
  color: var(--ink);
}
.float-wa svg   { color: #25D366; }
.float-tg svg   { color: #229ED9; }
.float-max .messenger-logo { width: 20px; height: 20px; }
.float-phone svg { color: var(--oak-d); }
.float-max  svg   { color: #5B5EA6; } /* MAX brand */

@media (max-width: 639px) {
  .float-contact {
    bottom: var(--sp-3);
    right: var(--sp-3);
  }
  .float-trigger {
    width: 52px; height: 52px;
  }
}


/* ────────────────────────────────────────────────────────
   16. ACCESSIBILITY · REDUCED MOTION
   ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Fail-safe: ensure reveal elements are always visible */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* Failsafe: карточки портфолио всегда видны независимо от JS */
.work {
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 374px) {
  .quiz {
    padding: var(--sp-4);
  }
  .quiz-options label {
    padding: 12px 14px;
    gap: 12px;
  }
  .quiz-nav .btn {
    font-size: 13px;
    padding-left: 10px;
    padding-right: 10px;
  }
}
/* Focus styles */
:focus-visible {
  outline: 2px solid var(--oak);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════
   TIMELINE — Этапы реализации проекта
══════════════════════════════════════════════════════════ */

.timeline-section {
  padding: var(--sp-9) 0;
  background: var(--bone);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  max-width: 820px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.timeline-step:last-child {
  border-bottom: none;
}

.timeline-step--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .timeline-step {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.timeline-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--oak-d);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-content {
  padding-top: 6px;
}

.timeline-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--oak-d);
  display: block;
  margin-bottom: var(--sp-2);
  opacity: 0.75;
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: var(--sp-3);
  color: var(--ink);
}

.timeline-content p {
  font-size: 15px;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 640px;
  margin-bottom: var(--sp-3);
}

.timeline-duration {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--oak-d);
  padding: 5px 13px;
  border: 1px solid var(--oak);
  border-radius: 100px;
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 640px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-step {
    grid-template-columns: 42px 1fr;
    gap: var(--sp-3);
  }

  .timeline-icon {
    width: 42px;
    height: 42px;
  }

  .timeline-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* ══ PRICE HINTS (ориентировочные цены перед квизом) ══════════════ */
.price-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.price-hint-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  min-width: 130px;
  flex: 1 1 130px;
  max-width: 180px;
}

.price-hint-cat {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 500;
}

.price-hint-val {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .price-hints {
    gap: 8px;
  }
  .price-hint-item {
    min-width: 110px;
    padding: 10px 14px;
    max-width: calc(50% - 4px);
  }
}


/* ────────────────────────────────────────────────────────
   17. STICKY MOBILE CTA BAR
   ──────────────────────────────────────────────────────── */
.mobile-cta-bar {
  display: none;
}

@media (max-width: 767px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-cta-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .02em;
    text-decoration: none;
    color: rgba(255,255,255,.75);
    transition: color .15s, background .15s;
    border-right: 1px solid rgba(255,255,255,.08);
  }
  .mobile-cta-btn:last-child { border-right: none; }
  .mobile-cta-btn:active { background: rgba(255,255,255,.06); color: #fff; }

  .mobile-cta-phone { color: rgba(255,255,255,.75); }
  .mobile-cta-wa    { color: #25D366; }
  .mobile-cta-quiz  {
    background: var(--oak);
    color: #fff;
    font-weight: 600;
    border-right: none;
  }
  .mobile-cta-quiz:active { background: var(--oak-d); }

  /* Отступ снизу чтобы float-panel не перекрывалась */
  .float-contact { bottom: calc(64px + env(safe-area-inset-bottom) + 16px); }

  /* Отступ для страницы чтобы sticky bar не перекрывал контент */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}
