/* ============================================================
   Виктория Буланова — персональная онлайн-галерея
   Стиль: минимализм на белом, единая sans-serif типографика
   ============================================================ */

/* --- Шрифт Manrope (Cyrillic + Latin) подключается из index.html
       через preconnect к fonts.googleapis.com --- */

/* --- Цветовая палитра и переменные --- */
:root {
  --bg: #ffffff;
  --bg-soft: #faf9f6;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-faint: #a8a8a8;
  --border: #ececea;
  --border-strong: #1a1a1a;
  --accent: #5a3f7a;        /* приглушённый фиолетовый из логотипа */
  --accent-hover: #432e5d;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad-y: clamp(72px, 12vw, 160px);

  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Сброс --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  /* Убираем серый highlight при тапе на iOS Safari/Chrome Android */
  -webkit-tap-highlight-color: transparent;
}

/* Принудительно светлая тема — не даём мобильным браузерам (Samsung Internet,
   Chrome с auto-dark, Яндекс.Браузеру) инвертировать цвета под системной тёмной. */
html {
  color-scheme: light;
  background-color: #ffffff;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--accent);
}

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

h1, h2, h3, h4 {
  font-weight: 300;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

p {
  margin: 0 0 1em;
}

/* --- Контейнер --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow {
  max-width: 880px;
}

/* --- Утилиты --- */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-faint  { color: var(--text-faint); }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.divider {
  width: 40px;
  height: 1px;
  background: var(--text);
  margin: 32px auto;
  opacity: 0.4;
}

/* ============================================================
   ХЕДЕР
   ============================================================ */
.site-header {
  position: -webkit-sticky;        /* iOS Safari 12 и старше */
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

/* Если у браузера нет поддержки backdrop-filter (Firefox без флага и т.п.),
   делаем фон чуть менее прозрачным, чтобы текст под хедером не просвечивал. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(255, 255, 255, 0.97);
  }
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 112px;
  gap: 32px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.site-logo__img {
  height: 88px;
  width: auto;
  transition: transform var(--transition);
}

.site-logo:hover .site-logo__img {
  transform: scale(1.04);
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.site-logo__name {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.site-logo__role {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Навигация */
.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-nav__link {
  position: relative;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 8px 0;
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.site-nav__link:hover::after,
.site-nav__link.is-active::after {
  transform: scaleX(1);
}

.site-nav__link.is-active {
  color: var(--text);
}

/* ============================================================
   ЗАТЕМНЯЮЩИЙ СЛОЙ ПОД МОБИЛЬНЫМ МЕНЮ
   Появляется между страницей и панелью меню. На десктопе скрыт.
   ============================================================ */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(18, 18, 22, 0.55);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 45;          /* выше контента (z<50), ниже меню (z=55) */
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 280ms;
}

.nav-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
}

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

/* Мобильное меню */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================================================
   ГЕРОЙ / БАННЕР (главная)
   ============================================================ */
.hero {
  position: relative;
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: var(--section-pad-y);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: center;
}

.hero__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-soft);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms ease;
}

.hero__media:hover img {
  transform: scale(1.03);
}

.hero__content {
  max-width: 540px;
}

.hero__name {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 16px;
}

.hero__role {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero__quote {
  position: relative;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  color: var(--text);
  padding-left: 24px;
  border-left: 1px solid var(--accent);
  margin: 0 0 36px;
}

.hero__intro {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* --- Кнопка --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
}

.btn--solid {
  background: var(--text);
  color: var(--bg);
}

.btn--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn__arrow {
  display: inline-block;
  transition: transform var(--transition);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* ============================================================
   ОБЩИЕ СЕКЦИИ
   ============================================================ */
.section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}

.section--soft {
  background: var(--bg-soft);
}

.section__head {
  text-align: center;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section__title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 200;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.section__lead {
  max-width: 640px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--text-muted);
}

/* --- Превью галереи на главной --- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.featured-card {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.featured-card:hover img {
  transform: scale(1.05);
}

.featured-card__label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   ГАЛЕРЕЯ — вкладки и карточки
   ============================================================ */
.gallery-page {
  padding-top: clamp(56px, 8vw, 96px);
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 56px);
  margin-bottom: clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.gallery-tabs::-webkit-scrollbar {
  display: none;
}

.gallery-tab {
  position: relative;
  padding: 16px 4px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: center;
  transition: color var(--transition);
}

.gallery-tab__count {
  display: inline-block;
  font-size: 10px;
  vertical-align: top;
  margin-left: 4px;
  opacity: 0.7;
}

.gallery-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.gallery-tab.is-active {
  color: var(--text);
}

.gallery-tab.is-active::after {
  transform: scaleX(1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.painting-card {
  position: relative;
  display: block;
  background: var(--bg-soft);
  overflow: hidden;
  cursor: zoom-in;
}

.painting-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.painting-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease, opacity var(--transition);
}

.painting-card:hover .painting-card__media img {
  transform: scale(1.04);
}

.painting-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.painting-card:hover .painting-card__overlay {
  opacity: 1;
}

.painting-card__zoom {
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.painting-card__info {
  padding: 20px 4px 4px;
}

.painting-card__title {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 6px;
}

.painting-card__meta {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.painting-card__status {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.painting-card__status--available { color: var(--accent); }
.painting-card__status--sold      { color: var(--text-faint); }

.gallery-empty {
  grid-column: 1 / -1;
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
}

/* ============================================================
   ЛАЙТБОКС
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 14, 18, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 60px);
}

.lightbox.is-open {
  display: flex;
  animation: fadeIn 280ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox__stage {
  position: relative;
  width: 100%;
  max-width: 1400px;
  max-height: 100%;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
}

.lightbox__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 90vh;
  min-height: 0;
}

.lightbox__media img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__card {
  color: #ffffff;
  padding: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.lightbox__title {
  font-size: 24px;
  font-weight: 300;
  margin: 0 0 24px;
  line-height: 1.25;
}

.lightbox__meta {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}

.lightbox__meta li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.lightbox__meta dt,
.lightbox__meta .meta-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.lightbox__meta .meta-value {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  text-align: right;
}

.lightbox__status {
  display: inline-block;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  border-radius: 50%;
  transition: background var(--transition), border-color var(--transition);
  font-size: 18px;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.lightbox__close {
  top: -8px;
  right: -8px;
}

.lightbox__nav--prev { left: -8px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 332px; top: 50%; transform: translateY(-50%); }

/* ============================================================
   СТРАНИЦА «О ХУДОЖНИКЕ»
   ============================================================ */
.about-hero {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.about-hero__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.about-hero__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
}

.about-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero__name {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 200;
  margin: 0 0 12px;
}

.about-hero__role {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.about-hero__intro {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
}

.about-block {
  margin-top: clamp(40px, 5vw, 72px);
}

.about-block__title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.about-block__body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.about-block__body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-block__body li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

.about-block__body li:last-child {
  border-bottom: none;
}

/* ============================================================
   БЛОК «АВТОПОРТРЕТ» (страница «О художнике»)
   ============================================================ */
.self-portrait {
  padding: clamp(72px, 10vw, 128px) 0;
}

.self-portrait__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}

.self-portrait__card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.self-portrait__frame {
  background: var(--bg-soft);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 36px);
  overflow: hidden;
  transition: transform 600ms ease;
}

.self-portrait__card:hover .self-portrait__frame {
  transform: translateY(-4px);
}

.self-portrait__frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.10);
}

.self-portrait__caption {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  letter-spacing: 0.01em;
}

.self-portrait__caption span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 640px) {
  .self-portrait__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.about-philosophy {
  background: var(--bg-soft);
  padding: clamp(56px, 8vw, 96px) 0;
}

.philosophy-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  margin-top: 48px;
}

.pillar {
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.pillar__title {
  font-size: 19px;
  font-weight: 400;
  margin: 0 0 8px;
}

.pillar__text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* --- Поля формы --- */
.form-field {
  display: block;
}

.form-field__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-field__input,
.form-field__textarea {
  width: 100%;
  min-height: 44px;            /* touch-таргет по гайдлайнам Apple */
  padding: 14px 0;
  font-family: inherit;
  font-size: 16px;             /* >=16px, чтобы iOS Safari не зумил при фокусе */
  font-weight: 300;
  line-height: 1.4;
  color: var(--text);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;            /* iOS добавляет скругление по умолчанию */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: text;
  transition: border-color var(--transition);
}

.form-field__textarea {
  resize: vertical;
  min-height: 120px;
}

.form-field__input:focus,
.form-field__textarea:focus {
  border-bottom-color: var(--text);
}

.form-field__input::placeholder,
.form-field__textarea::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

/* Защита от тёмного автозаполнения в WebKit/Chromium */
.form-field__input:-webkit-autofill,
.form-field__textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--text);
}

/* ============================================================
   СТРАНИЦА «КОНТАКТЫ»
   ============================================================ */
.contacts-hero {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 80px);
  text-align: center;
}

.contacts-hero__title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 200;
  margin: 0 0 16px;
}

.contacts-hero__lead {
  max-width: 600px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--text-muted);
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding-bottom: var(--section-pad-y);
  align-items: start;
}

.contact-block {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.contact-block__label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.contact-block__value {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 300;
  margin: 0;
}

.contact-block__value a:hover {
  color: var(--accent);
}

.messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.messenger-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: background var(--transition), color var(--transition);
}

.messenger-pill:hover {
  background: var(--text);
  color: var(--bg);
}

.contact-form__title {
  font-size: 22px;
  font-weight: 300;
  margin: 0 0 24px;
}

.contact-form__fields {
  display: grid;
  gap: 20px;
}

.contact-form__submit {
  justify-self: start;
  margin-top: 12px;
}

.contact-form__note {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 20px;
}

.delivery-block {
  margin-top: 64px;
  padding: 40px;
  background: var(--bg-soft);
}

.delivery-block h3 {
  font-size: 19px;
  font-weight: 400;
  margin: 0 0 16px;
}

.delivery-block p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ============================================================
   ФУТЕР
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.site-footer__title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 16px;
}

.site-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__list li {
  padding: 4px 0;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 960px) {
  /* Меню — боковая панель (~85% ширины), справа от viewport.
     Слева остаётся виден затемнённый + размытый фон страницы.
     Хедер из-за backdrop-filter становится containing block для fixed-детей,
     поэтому используем явные viewport-единицы. */
  .site-nav {
    position: fixed;
    top: 112px;
    right: 0;
    width: min(85vw, 360px);
    height: calc(100vh - 112px);
    height: calc(100dvh - 112px);
    /* Сначала непрозрачный fallback, потом значение из CSS-переменной. */
    background-color: #ffffff;
    background-color: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 32px var(--gutter);
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
    z-index: 55;            /* выше затемняющего слоя */
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav__link {
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    font-size: 17px;
  }

  .site-nav__link::after { display: none; }

  .nav-toggle {
    display: flex;
  }

  .hero__grid,
  .about-hero__grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid,
  .gallery-grid,
  .philosophy-pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox {
    padding: 16px 16px 88px;  /* нижний padding под фикс-кнопки навигации */
  }

  .lightbox__stage {
    grid-template-columns: 1fr;
    gap: 16px;
    max-height: none;
  }

  .lightbox__card {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding: 16px 0 0;
    max-height: 30vh;
    overflow-y: auto;
  }

  .lightbox__title {
    font-size: 19px;
    margin-bottom: 16px;
  }

  .lightbox__meta li {
    padding: 10px 0;
  }

  .lightbox__media {
    max-height: 50vh;
  }

  .lightbox__media img {
    max-height: 50vh;
  }

  /* На мобильном кнопки позиционируются от всего лайтбокса (фиксированно),
     а не от .lightbox__stage — иначе наезжают на контент карточки. */
  .lightbox__close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

  .lightbox__nav {
    position: fixed;
    bottom: 16px;
    top: auto;
    transform: none;
    width: 52px;
    height: 52px;
  }

  .lightbox__nav--prev { left: 16px; }
  .lightbox__nav--next { right: 16px; }

  .delivery-block {
    padding: 28px 24px;
    margin-top: 40px;
  }

  /* Минимальный touch-таргет 44px по гайдлайнам Apple/Google */
  .gallery-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* На узком экране вкладки скроллятся горизонтально — выровнять по левому
     краю, чтобы первой была видна «Все», а не обрезанная посередине. */
  .gallery-tabs {
    justify-content: flex-start;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .site-header__inner {
    height: 88px;
  }

  .site-nav {
    top: 88px;
    height: calc(100vh - 88px);
    height: calc(100dvh - 88px);
  }

  .site-logo__img {
    height: 68px;
  }

  .site-logo__text {
    display: none;
  }

  .featured-grid,
  .gallery-grid,
  .philosophy-pillars,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .btn {
    padding: 14px 24px;
    font-size: 12px;
  }
}

/* --- Доступность --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus-кольцо. :focus-visible поддерживается Safari 15.4+,
   для старого Safari fallback на :focus с :not(:focus-visible) */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
