/* ============================================================
   Кокошник — кондитерская-кафе (Звенигород)
   Дизайн-токены и вся вёрстка. Источник токенов: docs/brief.md
   ============================================================ */

:root {
  --cherry:       #5C1A27;
  --cherry-deep:  #3E1019;
  --milk:         #FBF6EC;
  --gold:         #B8892B;
  --gold-bright:  #E3C878;
  --tile:         #2F5E63;
  --cocoa:        #2A1B16;

  --font-display: 'Forum', 'Georgia', serif;
  --font-body:    'Golos Text', 'Arial', sans-serif;

  --header-h: 84px;
  --milk-soft: rgba(251, 246, 236, 0.92);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- База ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--cocoa);
  background: var(--milk);
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }

p { margin: 0 0 1em; }

a { color: var(--cherry); }

img, svg, video { max-width: 100%; }

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

.section--dark :focus-visible,
.site-header :focus-visible,
.hero-stage :focus-visible {
  outline-color: var(--gold-bright);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 200;
  padding: 0.6em 1.2em;
  background: var(--cherry-deep);
  color: var(--gold-bright);
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- Общие блоки ---------- */

.container {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}

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

.section {
  position: relative;
  padding-block: clamp(96px, 12vh, 160px);
}

.section--dark {
  background: var(--cherry-deep);
  color: var(--milk-soft);
}

.section--dark h2, .section--dark h3 { color: var(--gold-bright); }
.section--dark a { color: var(--gold-bright); }

.eyebrow {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1em;
}

.section--dark .eyebrow { color: var(--gold-bright); }

/* Светлые секции: едва заметная «канва» из золотых точек — снимает
   ощущение голого документа после кинематографичного hero */
.section--light {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(184, 137, 43, 0.10) 1px, transparent 1.6px);
  background-size: 26px 26px;
}

.section-lead { max-width: 46em; }
.section-note { max-width: 46em; margin-top: 2rem; }
.section-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Орнаментальная линия «вышивка»: точка-ромб-точка (единый паттерн сайта) */
.ornament {
  width: 120px;
  height: 12px;
  margin: 0.6rem 0 3rem;
  background: var(--gold);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 12' width='48' height='12'%3E%3Ccircle cx='9' cy='6' r='1.6'/%3E%3Cpath d='M24 1.4 28.6 6 24 10.6 19.4 6Z'/%3E%3Ccircle cx='39' cy='6' r='1.6'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 12' width='48' height='12'%3E%3Ccircle cx='9' cy='6' r='1.6'/%3E%3Cpath d='M24 1.4 28.6 6 24 10.6 19.4 6Z'/%3E%3Ccircle cx='39' cy='6' r='1.6'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat-x;
          mask-repeat: repeat-x;
  -webkit-mask-position: left center;
          mask-position: left center;
}

.ornament--bright { background: var(--gold-bright); }

/* Списки с золотым ромбом */
.gem-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}
.gem-list li {
  position: relative;
  padding-left: 1.35em;
  margin-bottom: 0.45em;
}
.gem-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.06em;
  font-size: 0.72em;
  color: var(--gold);
}
.section--dark .gem-list li::before { color: var(--gold-bright); }

/* ---------- Кнопки ---------- */

/* Ghost-кнопки (design-fixes-v3, дословно). Единственная залитая — .btn--solid */
.btn {
  display: inline-block;
  padding: 15px 34px;
  border: 1px solid rgba(227, 200, 120, 0.55);
  border-radius: 0;
  background: transparent;
  font: 600 0.8rem/1 'Golos Text', sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E3C878;
  text-decoration: none;
  text-align: center;
  transition: background .3s cubic-bezier(.16,1,.3,1), border-color .3s, color .3s;
}

.btn:hover { background: rgba(227, 200, 120, 0.12); border-color: #E3C878; }

.hero-intro .btn { margin-top: 34px; }

/* На светлых секциях инверсия */
.section--light .btn { border-color: rgba(92, 26, 39, 0.45); color: #5C1A27; }
.section--light .btn:hover { background: rgba(92, 26, 39, 0.07); border-color: #5C1A27; }

.btn--solid {
  background: linear-gradient(135deg, #D9B25F, #B8892B);
  border: none;
  color: #2A1010;
}
.btn--solid:hover { background: linear-gradient(135deg, #E3C878, #C99A38); }

/* ---------- Заставка-вензель ---------- */

.preloader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: var(--cherry-deep);
}

html.show-preloader .preloader { display: flex; }

html.show-preloader .preloader {
  animation: preloader-leave 0.6s ease 2.05s forwards;
}

.monogram { stroke: var(--gold); overflow: visible; }

.monogram path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

html.show-preloader .mg-arch   { animation: mg-draw 1.0s ease-out 0.05s forwards; }
html.show-preloader .mg-stem   { animation: mg-draw 0.5s ease-out 0.55s forwards; }
html.show-preloader .mg-arm    { animation: mg-draw 0.5s ease-out 0.85s forwards; }
html.show-preloader .mg-leg    { animation: mg-draw 0.5s ease-out 1.05s forwards; }
html.show-preloader .mg-curl   { animation: mg-draw 0.4s ease-out 1.20s forwards; }
html.show-preloader .mg-gem    { animation: mg-draw 0.35s ease-out 1.30s forwards; }
html.show-preloader .monogram  { animation: mg-glow 0.5s ease 1.62s; }

@keyframes mg-draw { to { stroke-dashoffset: 0; } }

@keyframes mg-glow {
  0%   { filter: none; }
  40%  { filter: drop-shadow(0 0 14px rgba(227, 200, 120, 0.95)) drop-shadow(0 0 34px rgba(184, 137, 43, 0.6)); }
  100% { filter: drop-shadow(0 0 6px rgba(227, 200, 120, 0.35)); }
}

@keyframes preloader-leave {
  to { transform: translateY(-100%); visibility: hidden; }
}

/* ---------- Шапка ---------- */

/* Шапка (design-fixes-v3; классы адаптированы под разметку).
   Стекло лежит на ::before: backdrop-filter на самой шапке делал бы её
   containing block для fixed-оверлея меню (iOS/Chrome), и полноэкранная
   панель схлопывалась бы до размеров шапки */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 84px;
  z-index: 100;
  display: flex;
  align-items: center;
  transition: height .3s;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(42, 11, 17, 0.72);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.site-header.is-solid { height: 68px; }

.site-header.is-solid::before {
  opacity: 1;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.nav {
  width: min(1440px, 100% - 96px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  position: relative;
  z-index: 2;
  font: 400 1.5rem var(--font-display);
  letter-spacing: 0.1em;
  color: #E8D5A3;
  text-decoration: none;
}

.nav__panel {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav__list {
  display: flex;
  gap: 38px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font: 500 0.76rem/1 'Golos Text', sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.62);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}

.nav__link:hover {
  color: #E8D5A3;
  border-color: rgba(227, 200, 120, 0.5);
}

.site-header .btn { padding: 11px 22px; font-size: 0.7rem; }

.nav__burger {
  display: none;
  position: relative;
  z-index: 2;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__burger span {
  display: block;
  height: 1.5px;
  width: 20px;
  background: var(--gold-bright);
  transition: transform 0.3s var(--ease);
}

.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Hero «Золотая метель» ---------- */

.hero-scroll {
  position: relative;
  height: 800vh; /* десктоп: ~8 экранов на полный проход скраба */
  background: var(--cherry-deep);
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media { position: absolute; inset: 0; }

/* Градиентная подложка «золотая метель» — виден до/вместо видео */
.hero-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 42% at 50% 44%, rgba(184, 137, 43, 0.38), transparent 70%),
    radial-gradient(ellipse 30% 22% at 50% 40%, rgba(227, 200, 120, 0.30), transparent 70%),
    radial-gradient(circle 2px at 32% 30%, rgba(227, 200, 120, 0.8), transparent 100%),
    radial-gradient(circle 1.5px at 68% 26%, rgba(227, 200, 120, 0.7), transparent 100%),
    radial-gradient(circle 1.5px at 24% 58%, rgba(227, 200, 120, 0.55), transparent 100%),
    radial-gradient(circle 2px at 76% 62%, rgba(227, 200, 120, 0.6), transparent 100%),
    radial-gradient(circle 1px at 55% 18%, rgba(227, 200, 120, 0.7), transparent 100%),
    radial-gradient(ellipse 120% 60% at 50% 110%, rgba(92, 26, 39, 0.65), transparent 70%),
    var(--cherry-deep);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video--scrub { visibility: hidden; }

.hero-stage.mode-scrub .hero-video--scrub { visibility: visible; }
.hero-stage.mode-scrub .hero-video--loop  { visibility: hidden; }

html.hero-static .hero-video { display: none; }

/* Мягкая «вспышка» силуэта раз в цикл (только визуально) */
.hero-pulse {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 45% 35% at 50% 44%, rgba(227, 200, 120, 0.22), transparent 70%);
  opacity: 0;
  pointer-events: none;
}

.hero-stage.mode-loop .hero-pulse {
  animation: hero-pulse 12s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%, 82%, 100% { opacity: 0; }
  90% { opacity: 1; }
}

/* Золотая вспышка начала взрыва */
.hero-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 45%, rgba(227, 200, 120, 0.55), transparent 75%);
  opacity: 0;
  pointer-events: none;
}

.hero-stage.fx-burst .hero-flash { animation: hero-flash 0.45s ease-out; }
.hero-stage.fx-burst .hero-media { animation: hero-shake 0.12s linear 2; }

@keyframes hero-flash {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes hero-shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2px, -1px); }
  60% { transform: translate(-2px, 1px); }
  100% { transform: translate(0, 0); }
}

/* Глинты на десертах (scrub ~0.45–0.65) */
.hero-glints { position: absolute; inset: 0; pointer-events: none; }

.glint {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--gold-bright);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
}

.hero-stage.fx-glints .glint { animation: glint-twinkle 1.3s ease-in-out infinite; }
.hero-stage.fx-glints .glint:nth-child(2) { animation-delay: 0.35s; }
.hero-stage.fx-glints .glint:nth-child(3) { animation-delay: 0.7s; }

@keyframes glint-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.9; transform: scale(1.15); }
}

/* Выход в фон: градиент над нижними ~30vh sticky-контейнера */
.hero-exit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30vh;
  background: linear-gradient(to bottom, transparent, var(--cherry-deep));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s linear;
}

html.hero-static .hero-exit { opacity: 1; }

/* Hero-текст: нижняя левая зона (design-fixes-v3, дословно) */
.hero-intro {
  position: absolute;
  left: clamp(48px, 8vw, 128px);
  bottom: 16vh;
  /* 520px из v3 давал касание слогана с силуэтом; по п.5 документа сужаем
     блок (замер: зазор ≥60px на 1280/1440/1920 при 22.5vw) */
  max-width: min(520px, 22.5vw);
  text-align: left;
  z-index: 3;
  color: var(--milk);
}

.hero-intro__title {
  font-family: 'Forum', serif;
  font-size: clamp(2.8rem, 4.2vw, 4rem);
  letter-spacing: 0.05em;
  color: #E8D5A3;
  text-shadow: 0 0 48px rgba(227, 200, 120, 0.28);
  margin: 0;
}

.hero-intro__tagline {
  margin-top: 14px;
  font: 400 0.9rem/1.5 'Golos Text', sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.75);
  /* nowrap из v3 снят: строка шире блока и въезжала в силуэт (п.5: сужать
     блок, не двигать текст) — перенос на две строки внутри max-width */
}

.hero-intro__lead {
  margin-top: 22px;
  max-width: 44ch;
  font: 400 0.98rem/1.75 'Golos Text', sans-serif;
  color: rgba(251, 246, 236, 0.68);
}

/* Сдвиг видео вправо на десктопе; JS дрейфует к центру при скролле.
   ВАЖНО: в нашем футадже кокошник у правого края окна при 0%, поэтому
   покой = 0% (эквивалент «68%» из v3 для зеркальной геометрии кадра) */
.hero-video { object-fit: cover; object-position: 0% center; }

.hero-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--gold-bright);
  opacity: 0.45;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: opacity 0.4s var(--ease);
  animation: hint-pulse 2.6s ease-in-out infinite;
}

.hero-stage.mode-scrub .hero-hint { opacity: 0; animation: none; }

html.hero-static .hero-hint { display: none; }

@keyframes hint-pulse {
  0%, 100% { opacity: 0.35; transform: translate(-50%, 0); }
  50% { opacity: 0.6; transform: translate(-50%, 5px); }
}

/* Финальный блок на бархате — «гравюра» (design-fixes-v3 §7, дословно) */
.hero-finale {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 52px 88px;
  max-width: calc(100vw - 32px);
  z-index: 3;
  visibility: hidden;
  pointer-events: none;
}

.hero-finale.is-visible { visibility: visible; pointer-events: auto; }

/* Рамка и радиальная подложка — появляются последними в каскаде */
.hero-finale::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgba(227, 200, 120, 0.28);
  background: radial-gradient(ellipse at center, rgba(20, 6, 9, 0.34), rgba(20, 6, 9, 0.06) 70%, transparent);
  opacity: 0;
  transition: opacity 0.65s var(--ease);
}

/* Золотые ромбы по углам рамки (::after — верхний левый, остальные — span) */
.hero-finale::after,
.hero-finale__corner {
  position: absolute;
  color: #B8892B;
  font-size: 10px;
  font-style: normal;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.65s var(--ease);
}

.hero-finale::after { content: "◆"; top: -7px; left: -7px; }
.hero-finale__corner--tr { top: -7px; right: -7px; }
.hero-finale__corner--bl { bottom: -7px; left: -7px; }
.hero-finale__corner--br { bottom: -7px; right: -7px; }

.hero-finale__monogram { width: 54px; height: 54px; }

.hero-finale__name {
  font: 400 2.6rem var(--font-display);
  letter-spacing: 0.1em;
  color: #E8D5A3;
  text-shadow: 0 0 36px rgba(227, 200, 120, 0.3);
  margin: 14px 0 0;
}

.ornament-line {
  width: 150px;
  height: 9px;
  margin: 18px 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 9'%3E%3Cpath d='M6 4.5H52' stroke='%23B8892B' stroke-width='1'/%3E%3Ccircle cx='60' cy='4.5' r='2' fill='%23B8892B'/%3E%3Cpath d='M75 0.5 79 4.5 75 8.5 71 4.5Z' fill='%23B8892B'/%3E%3Ccircle cx='90' cy='4.5' r='2' fill='%23B8892B'/%3E%3Cpath d='M98 4.5H144' stroke='%23B8892B' stroke-width='1'/%3E%3C/svg%3E") center/contain no-repeat;
}

.hero-finale__tagline {
  font: 500 0.82rem/1 'Golos Text', sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.8);
  margin: 0;
}

.hero-finale__invite {
  font: 400 1.02rem/1.6 'Golos Text', sans-serif;
  color: rgba(251, 246, 236, 0.72);
  margin: 20px 0 0;
  max-width: 40ch;
}

.hero-finale__actions {
  display: flex;
  gap: 16px;
  margin-top: 30px;
}

.hero-finale__meta {
  font: 500 0.7rem/1 'Golos Text', sans-serif;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.45);
  margin: 26px 0 0;
}

/* Каскад появления сверху вниз: stagger 90 ms, 650 ms, подъём 14px */
.hero-finale > :not(.hero-finale__corner) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.hero-finale.is-visible > :not(.hero-finale__corner) { opacity: 1; transform: none; }
.hero-finale.is-visible .hero-finale__monogram { opacity: 0.9; transition-delay: 0s; }
.hero-finale.is-visible .hero-finale__name     { transition-delay: 0.09s; }
.hero-finale.is-visible .ornament-line          { transition-delay: 0.18s; }
.hero-finale.is-visible .hero-finale__tagline  { transition-delay: 0.27s; }
.hero-finale.is-visible .hero-finale__invite   { transition-delay: 0.36s; }
.hero-finale.is-visible .hero-finale__actions  { transition-delay: 0.45s; }
.hero-finale.is-visible .hero-finale__meta     { transition-delay: 0.54s; }
.hero-finale.is-visible::before,
.hero-finale.is-visible::after,
.hero-finale.is-visible .hero-finale__corner   { opacity: 1; transition-delay: 0.63s; }

/* Пульс по карте вибраций привязан к появлению блока */
.hero-finale.is-visible .btn--solid { animation: gold-pulse 2.2s ease 0.7s 2; }

@keyframes gold-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227, 200, 120, 0); }
  50% { box-shadow: 0 0 28px 4px rgba(227, 200, 120, 0.55); }
}

/* Статичный режим hero (reduced-motion / saveData / ошибка видео) */
html.hero-static .hero-scroll { height: auto; }
html.hero-static .hero-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
}
html.hero-static .hero-finale { display: none; }

/* ---------- Секция Меню (тёмная) ---------- */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 1rem;
}

.menu-card {
  position: relative;
  background: rgba(251, 246, 236, 0.04);
  border: 1px solid rgba(227, 200, 120, 0.14);
  border-radius: 6px;
  padding: 36px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.menu-card::before {
  content: "◆";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 12px;
  background: var(--cherry-deep);
  color: var(--gold-bright);
  font-size: 11px;
  line-height: 16px;
  opacity: 0.85;
}

.menu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(227, 200, 120, 0.4);
}

.menu-card p { font-size: 0.98rem; }
.menu-card p:last-child { margin-bottom: 0; }

/* Статичные искры золотой пыли (без canvas) */
.spark {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--gold-bright);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0.5;
  pointer-events: none;
}

.spark--sm { width: 6px; height: 6px; opacity: 0.35; }

/* ---------- О нас: переход тёмное → светлое ---------- */

/* Переход тёмное → светлое (background-color, чтобы не затирать «канву») */
.section-about {
  background-color: var(--milk);
  padding-top: clamp(15rem, 32vh, 21rem);
}

.section-about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(12rem, 26vh, 17rem);
  background: linear-gradient(to bottom, var(--cherry-deep), rgba(62, 16, 25, 0));
  pointer-events: none;
}

/* ---------- Карточки светлых секций ---------- */

.two-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  margin-top: 1.2rem;
}

.card {
  position: relative;
  background: #FFFDF6;
  border: 1px solid rgba(184, 137, 43, 0.25);
  border-radius: 6px;
  padding: 36px;
  box-shadow: 0 12px 34px rgba(92, 26, 39, 0.06);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* Ромб «вышивки» на верхней кромке — фирменный шов карточек */
.card::before {
  content: "◆";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 12px;
  background: #FFFDF6;
  color: var(--gold);
  font-size: 11px;
  line-height: 16px;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 137, 43, 0.45);
  box-shadow: 0 18px 44px rgba(92, 26, 39, 0.10);
}

.card h3 { color: var(--cherry); }
.card > p { font-size: 0.98rem; }
.card .gem-list { margin-bottom: 0; }
.card .gem-list li { font-size: 0.98rem; }

/* Акцент «изразец» на карточках праздников — дозированно */
.card--arch { border-color: rgba(47, 94, 99, 0.35); }
.card--arch::before { color: var(--tile); }
.card--arch:hover { border-color: rgba(47, 94, 99, 0.6); }

.section-holidays { background-color: rgba(246, 236, 214, 0.55); }

/* ---------- Атмосфера: галерея-плейсхолдеры в арках ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  margin-top: 2.2rem;
}

.ph {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.1rem 1.1rem 2.2rem;
  color: var(--gold-bright);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Cpath d='M150 0 C186 44 250 50 276 102 C293 137 300 165 300 208 L300 400 L0 400 L0 208 C0 165 7 137 24 102 C50 50 114 44 150 0 Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Cpath d='M150 0 C186 44 250 50 276 102 C293 137 300 165 300 208 L300 400 L0 400 L0 208 C0 165 7 137 24 102 C50 50 114 44 150 0 Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  transition: transform 0.3s ease;
}

.ph:hover { transform: translateY(-5px); }

/* Фактура «кружева» внутри арок: заглушки выглядят задуманным декором,
   а не пустыми блоками, пока нет фотографий */
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(227, 200, 120, 0.16) 1.5px, transparent 2.1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.ph figcaption::before {
  content: "◆";
  display: block;
  margin-bottom: 7px;
  font-size: 8px;
  color: var(--gold-bright);
  opacity: 0.85;
}

.ph--1 { background: linear-gradient(160deg, #4a141f, var(--cherry) 55%, #6d2432); }
.ph--2 { background: linear-gradient(200deg, var(--cherry) 10%, #4a141f 60%, #351018); }
.ph--3 { background: linear-gradient(160deg, #2a545a, var(--tile) 55%, #3d6f75); }
.ph--4 { background: linear-gradient(200deg, #6d2432, var(--cherry) 45%, #4a141f); }

.ph__arch {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  color: var(--gold);
  opacity: 0.85;
}

.ph figcaption {
  position: relative;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* ---------- Футер ---------- */

.footer { padding-bottom: 3rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
  margin-top: 1.5rem;
}

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

.contact-list li {
  margin-bottom: 1.3rem;
  padding-left: 1.35em;
  position: relative;
}

.contact-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.15em;
  font-size: 0.7em;
  color: var(--gold-bright);
}

.contact-list__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 0.15em;
}

.contact-list a { text-decoration-color: rgba(227, 200, 120, 0.5); }

/* Яндекс.Карта (запасной вариант-iframe) */
.map-embed {
  min-height: 280px;
  border: 1px solid rgba(227, 200, 120, 0.35);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(251, 246, 236, 0.03);
}

/* Стилизованная карта-иллюстрация: у неё своя вишнёвая рама с орнаментом,
   поэтому без нашей рамки и фона; клик открывает Яндекс.Карты */
.map-embed--image {
  display: block;
  min-height: 0;
  border: none;
  background: none;
  border-radius: 10px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.map-embed--image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.map-embed--image:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(227, 200, 120, 0.25);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
}

.footer-social { margin-top: 2.5rem; }

.footer-social__link {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.footer-cta { margin-top: 2rem; margin-bottom: 0; }

/* ---------- Появление при скролле ---------- */

/* Скрываем до появления только при работающем JS (html.js ставит main.js) */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Адаптив ---------- */

@media (orientation: portrait), (max-width: 768px) {
  .hero-scroll { height: 540vh; } /* авторские тайминги: видео ~295vh, доезд ~39vh, надпись на ~332vh + стоянка ~108vh */

  /* Вертикальная композиция (v3): текст снизу по центру, видео без сдвига */
  .hero-video { object-position: center; }

  .hero-intro {
    left: 24px;
    right: 24px;
    bottom: 12vh;
    max-width: none;
    text-align: center;
  }

  .hero-intro__tagline { white-space: normal; letter-spacing: 0.22em; }

  /* «Гравюра» на мобайле (v3 §7): компактная — целиком помещается
     на чистой полосе бархата (~55% высоты экрана после доезда 2x) */
  .hero-finale { padding: 26px 20px; width: calc(100vw - 40px); top: 45%; }

  /* Подложка мобильной «гравюры» — дымчатое стекло: читаемость гарантирована
     на любом кадре (проверено автотестом: тарелка под блоком не мешает) */
  .hero-finale::before {
    background: rgba(26, 8, 12, 0.45);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
  }

  /* Строка адреса попадает на светлую тарелку финального кадра —
     тёмная тень для контраста (значения v3 не меняются) */
  .hero-finale__meta {
    text-shadow: 0 1px 10px rgba(20, 6, 9, 0.95), 0 0 3px rgba(20, 6, 9, 0.9);
  }
  .hero-finale__monogram { width: 38px; height: 38px; }
  .hero-finale__name { font-size: 1.9rem; margin-top: 8px; }
  .hero-finale .ornament-line { margin: 10px 0; }
  .hero-finale__tagline { font-size: 0.7rem; letter-spacing: 0.2em; }
  .hero-finale__invite { display: none; }
  .hero-finale__actions { margin-top: 18px; }
  .hero-finale__actions .btn { padding: 12px 26px; }
  .hero-finale__meta { margin-top: 16px; font-size: 0.62rem; letter-spacing: 0.18em; }
  .hero-finale__meta-dot { display: none; }
  .hero-finale__meta-part { display: block; }
  .hero-finale__meta-part + .hero-finale__meta-part { margin-top: 7px; }

  .hero-finale__actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

}

@media (max-width: 960px) {
  .menu-grid { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  /* На мобиле шапка sticky, а не fixed: fixed-элементы дёргаются во время
     анимации тулбаров iOS Safari при скролле вверх, sticky композитится
     внутри скролл-слоя и не прыгает. Отрицательный margin убирает её из
     потока; высота на мобиле константна, так что сдвигов контента нет */
  .site-header, .site-header.is-solid { height: var(--header-h); }

  /* Шапка на телефоне всегда плотная: прозрачная версия над светлыми
     секциями и во встроенных браузерах была нечитаемой и «призрачной» */
  .site-header::before {
    opacity: 1;
    background: rgba(42, 11, 17, 0.82);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
  }

  .site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
  }

  /* Шапка на телефоне непрозрачная, поэтому hero живёт ПОД ней: прилипает
     под шапкой и тянется до низа вьюпорта (dvh — без полосы при
     сворачивании панелей Safari). Кадру хватает тёмного поля над короной,
     чтобы cover-кроп не резал кокошник */
  .hero-stage {
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
  }

  .nav { width: calc(100% - 3rem); }

  .nav__burger { display: flex; }

  /* Полноэкранный оверлей меню. Явные размеры в dvh/svh вместо inset:
     во встроенных браузерах (Telegram) inset-панель схлопывалась
     до полосы шапки и пункты просвечивали сквозь контент */
  .nav__panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100svh;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.4rem;
    padding: var(--header-h) 1.5rem 2rem;
    background: var(--cherry-deep);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
  }

  .nav__panel.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 1.9rem;
    text-align: center;
  }

  .nav__link {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.05em;
    color: var(--milk);
    padding: 0;
  }

  .nav__cta { margin-top: 0.6rem; }

  .two-cols { grid-template-columns: 1fr; }

  .section-cta .btn { flex: 1 1 auto; }

  /* На телефонах абзац приветствия скрыт — только h1, слоган, CTA */
  .hero-intro__lead { display: none; }

  /* Компактный ритм секций на телефоне: без мёртвых пустых экранов */
  .section { padding-block: 64px; }
  .section-about { padding-top: 8rem; }
  .section-about::before { height: 5.5rem; }
  .ornament { margin-bottom: 1.8rem; }
  .section-note { margin-top: 1.4rem; }
  .section-cta { margin-top: 1.4rem; }
  .card, .menu-card { padding: 26px 20px; }
  .menu-grid { gap: 1.2rem; }
  .two-cols { gap: 1.2rem; }
  .footer { padding-bottom: 2.2rem; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  /* Две колонки арок вместо одной гигантской на экран */
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; max-width: none; margin-inline: 0; }
  .ph { padding: 0.9rem 0.9rem 1.5rem; }
  .ph figcaption { font-size: 0.64rem; letter-spacing: 0.06em; }
}

/* ---------- Reduced motion: статичный сайт ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }

  .preloader { display: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .hero-hint { display: none; }
}
