/* =========================================================
   Рузя — домашняя кондитерская
   Палитра, шрифты и сетка — в переменных ниже.
   ========================================================= */

:root {
  /* цвет */
  --paper: #F7EFE2;        /* фон страницы, «печёная бумага» */
  --paper-deep: #EFE1CC;   /* полоса каталога */
  --cream: #FCF6EA;        /* карточки, светлый текст на вишнёвом */
  --ink: #2B1A16;          /* основной текст */
  --ink-2: #5C463B;        /* вторичный */
  --muted: #6E5749;        /* подписи, мета */
  --cherry: #5E2033;       /* глубокий вишнёвый, фон hero и формы */
  --cherry-2: #A03B51;     /* акцент: ссылки, активные состояния */
  --line: #E1D0B8;         /* линии и рамки */
  --line-soft: #EADCC8;

  /* шрифты */
  --font-display: 'Alegreya', Georgia, 'Times New Roman', serif;
  --font-ui: 'Golos Text', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* прочее */
  --radius: 4px;
  --page: 1280px;
  --pad: clamp(20px, 4vw, 56px);
}

/* ---------- база ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-transform: lowercase;
}

/* прописная остаётся только в логотипе */
.brand__name,
.footer__name { text-transform: none; }

/* точка после имени */
.dot {
  font-family: var(--font-display);
  color: var(--cherry-2);
  margin-left: -0.05em;
}

.h2 .dot,
.footer__name .dot,
.brand__name .dot { margin-left: -0.03em; }

.hero .dot { color: var(--cream); }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

::selection { background: var(--cherry); color: var(--cream); }

[id] { scroll-margin-top: 88px; }
html.is-locked { overflow: hidden; }

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

.hero :focus-visible,
.order :focus-visible { outline-color: var(--cream); }

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- типографика ---------- */

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.h2--light { color: var(--cream); }

.prose {
  margin: 0 0 1.05em;
  max-width: 60ch;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.62;
  color: var(--ink-2);
}

.prose--lead {
  font-size: clamp(21px, 1.9vw, 26px);
  line-height: 1.42;
  color: var(--ink);
}

.dropcap {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-family: var(--font-display);
  font-size: 2.55em;
  font-weight: 600;
  line-height: 1;
  color: var(--cherry-2);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--wide { width: 100%; }

.btn--solid { background: var(--cherry); color: var(--cream); }
.btn--solid:hover { background: var(--cherry-2); }

.btn--cream { background: var(--cream); color: var(--cherry); }
.btn--cream:hover { background: #fff; }

.btn--ghost { border-color: rgba(252, 246, 234, 0.35); color: var(--cream); }
.btn--ghost:hover { border-color: var(--cream); background: rgba(252, 246, 234, 0.08); }

.btn--ghost-dark { border-color: var(--line); color: var(--ink); }
.btn--ghost-dark:hover { border-color: var(--ink); }

.link-btn {
  padding: 8px 0 4px;
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }

/* ---------- шапка ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 239, 226, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--page);
  height: 72px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1;
  text-decoration: none;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
}


.brand__sub {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--muted);
}

.nav { display: flex; gap: clamp(18px, 2.4vw, 32px); }

.nav__link {
  position: relative;
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--ink-2);
  text-decoration: none;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--cherry-2);
  transition: width 0.25s ease;
}

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { width: 100%; }
.nav__link--mobile { display: none; }

.topbar__actions { display: flex; align-items: center; gap: 10px; }

.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
}

.burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease;
}

.burger[aria-expanded='true'] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--cherry);
  color: var(--cream);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 84px) var(--pad) clamp(44px, 6vw, 80px);
}

.hero__eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.09em;
  color: rgba(252, 246, 234, 0.62);
}

.hero__title { margin: 0; }

.hero__name {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 0 30px;
  font-family: var(--font-display);
  font-size: clamp(92px, 13.2vw, 196px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  transform: scaleY(1.24);
  transform-origin: top left;
}

.hero__tagline {
  display: block;
  max-width: 24ch;
  padding-top: 56px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 400;
  line-height: 1.24;
  color: rgba(252, 246, 234, 0.82);
  animation-delay: 0.08s !important;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero__photo {
  position: relative;
  margin: 0;
  padding: 10px 10px 0;
  background: var(--cream);
  transform: rotate(-1.4deg);
  box-shadow: 0 36px 70px -34px rgba(0, 0, 0, 0.75);
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero__photo figcaption {
  padding: 12px 6px 15px;
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  text-align: center;
  color: var(--ink-2);
}

/* ---------- секции ---------- */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) var(--pad);
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
  align-items: end;
  gap: clamp(24px, 4vw, 64px);
  margin-bottom: clamp(32px, 4vw, 52px);
}

.section__lead {
  max-width: 40ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- история ---------- */

.story__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: start;
  gap: clamp(40px, 7vw, 96px);
}

.story__text { max-width: 640px; }
.story__text .h2 { margin-bottom: 26px; }
.story__text .h2 { text-transform: none; }

.story__sign {
  margin: 22px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  color: var(--cherry-2);
}

.story__aside { display: grid; gap: 28px; }

.story__photo { margin: 0; }

.story__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

.story__photo figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.facts { margin: 0; border-top: 1px solid var(--line); }

.facts__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt { font-size: 13px; color: var(--muted); }

.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink);
}

/* ---------- каталог ---------- */

.catalog {
  background: var(--paper-deep);
  box-shadow: 0 0 0 100vmax var(--paper-deep);
  clip-path: inset(0 -100vmax);
}

.catalog__head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  align-items: end;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: clamp(26px, 3.4vw, 44px);
}

.catalog__intro {
  max-width: 52ch;
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
}

.catalog__more {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}

.catalog__more a {
  color: var(--cherry-2);
  text-underline-offset: 3px;
}

.tabs {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  margin-bottom: clamp(26px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 14px 0;
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected='true'] { color: var(--ink); }

.tab[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--cherry-2);
}

.tab__count { font-size: 12px; color: var(--muted); }

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 3.4vw, 46px) clamp(26px, 4vw, 56px);
}

/* ---------- галерея ---------- */

.gallery-page {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 90px) var(--pad) clamp(70px, 9vw, 120px);
}
.gallery-page__head {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 36px;
  align-items: end;
  margin-bottom: clamp(28px, 5vw, 62px);
}
.gallery-page__back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--cherry);
  text-underline-offset: 4px;
}
.gallery-page__title {
  margin: 0;
  font: 700 clamp(54px, 7vw, 96px)/.98 var(--font-display);
  letter-spacing: -.025em;
  text-transform: none;
}
.gallery-page__intro {
  max-width: 37ch;
  margin: 0 0 5px;
  font: 400 clamp(18px, 1.6vw, 22px)/1.45 var(--font-display);
  color: var(--ink-2);
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(96px, 10vw, 144px);
  grid-auto-flow: dense;
  gap: clamp(7px, 1vw, 12px);
}
.gallery__item {
  position: relative;
  min-width: 0;
  grid-row: span 2;
  overflow: hidden;
  padding: 0;
  background: var(--paper-deep);
  text-align: left;
}
.gallery__item--small { grid-row: span 1; }
.gallery__item--large { grid-column: span 2; grid-row: span 3; }
.gallery__item--wide { grid-column: span 2; grid-row: span 2; }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item span {
  position: absolute;
  inset: auto 0 0;
  padding: 32px 12px 12px;
  background: linear-gradient(transparent, rgba(35, 17, 17, .8));
  color: var(--cream);
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  transition: opacity .2s;
}
.gallery__item:hover span, .gallery__item:focus-visible span { opacity: 1; }
.gallery__empty { grid-column: 1 / -1; color: var(--muted); }
.gallery-page__end { margin: 46px 0 0; font: italic 22px var(--font-display); }
.gallery-page__end a { color: var(--cherry); text-underline-offset: 4px; }

.gallery-viewer {
  position: fixed;
  inset: 0;
  width: min(100vw - 20px, 1160px);
  max-width: none;
  max-height: calc(100dvh - 20px);
  border: 0;
  padding: 48px 62px 24px;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 20px 60px rgba(0,0,0,.32);
}
.gallery-viewer::backdrop { background: rgba(20, 10, 12, .88); }
.gallery-viewer__figure { margin: 0; text-align: center; }
.gallery-viewer__figure img {
  width: 100%;
  height: min(76dvh, 780px);
  object-fit: contain;
}
.gallery-viewer figcaption { margin-top: 12px; font-size: 14px; }
.gallery-viewer__close, .gallery-viewer__prev, .gallery-viewer__next {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--cream);
  font-size: 28px;
  line-height: 1;
}
.gallery-viewer__close { right: 12px; top: 8px; }
.gallery-viewer__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.gallery-viewer__next { right: 8px; top: 50%; transform: translateY(-50%); }
.gallery-viewer :focus-visible { outline-color: var(--cream); }
@media (max-width: 900px) {
  .gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-page__head { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 600px) {
  .gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 96px; gap: 6px; }
  .gallery__item--large { grid-row: span 3; }
  .gallery__item--wide { grid-row: span 2; }
  .gallery-viewer { padding: 44px 42px 18px; }
  .gallery-viewer__figure img { height: min(72dvh, 670px); }
  .gallery__item span { opacity: 1; font-size: 11px; padding: 20px 8px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery__item img, .gallery__item span { transition: none; }
}

/* ---------- подсказка под вкладками ---------- */

.catnote {
  margin: calc(clamp(26px, 3vw, 40px) * -1) 0 clamp(26px, 3vw, 40px);
}

.catnote__btn {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  padding: 8px 0;
  text-align: left;
}

.catnote__q {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.4vw, 18px);
  font-style: italic;
  color: var(--cherry-2);
  border-bottom: 1px dashed rgba(160, 59, 81, 0.45);
  transition: border-color 0.2s, color 0.2s;
}

.catnote__btn:hover .catnote__q {
  color: var(--cherry);
  border-bottom-style: solid;
}

.catnote__hint {
  font-size: 13px;
  color: var(--muted);
}

.catnote__sign {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--cherry-2);
  transition: transform 0.25s ease;
}

.catnote__btn:hover .catnote__sign { transform: rotate(90deg); }

/* окно-подсказка */

.sheet--note { width: min(860px, calc(100% - 32px)); }

.sheet--note .sheet__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }

.note-sheet__list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.note-sheet__list b { font-weight: 600; color: var(--ink); }

.note-sheet__list--dots li {
  position: relative;
  padding-left: 16px;
}

.note-sheet__list--dots li::before {
  content: '·';
  position: absolute;
  left: 2px;
  font-weight: 700;
  color: var(--cherry-2);
}

.note-sheet__table {
  display: grid;
  margin: 0 0 18px;
  border-top: 1px solid var(--line);
}

.note-sheet__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.note-sheet__row b {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.card {
  display: grid;
  grid-template-columns: clamp(120px, 15vw, 168px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 0 clamp(16px, 2vw, 24px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.card__media {
  position: relative;
  grid-row: 1 / -1;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  border-radius: 3px;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card:hover .card__media img { transform: scale(1.045); }

.card__plus {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 18px;
  line-height: 1;
  color: var(--cherry);
  background: rgba(252, 246, 234, 0.94);
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.card:hover .card__plus { transform: scale(1.08); background: #fff; }

.card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
}

.card__name {
  font-family: var(--font-display);
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.card:hover .card__name { color: var(--cherry-2); }

.card__tagline {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
}

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.card__weight { font-size: 13px; color: var(--muted); }

.card__price {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.card__hint {
  font-size: 13px;
  color: var(--cherry-2);
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover .card__hint,
.card:focus-visible .card__hint { opacity: 1; }

.catalog__allergen {
  max-width: 68ch;
  margin: clamp(30px, 4vw, 48px) 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.catalog__allergen strong {
  font-weight: 600;
  color: var(--ink-2);
}

/* ---------- отзывы: доска пожеланий ---------- */

.board {
  position: relative;
  padding: clamp(30px, 4.4vw, 58px) clamp(20px, 3.6vw, 52px) clamp(34px, 4vw, 52px);
  background-color: #B78D66;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 236, 205, 0.2), transparent 46%),
    radial-gradient(circle at 82% 76%, rgba(90, 52, 30, 0.28), transparent 52%),
    repeating-linear-gradient(92deg, rgba(74, 42, 22, 0.07) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(3deg, rgba(255, 240, 214, 0.05) 0 1px, transparent 1px 7px);
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px rgba(60, 32, 14, 0.28),
    inset 0 0 90px rgba(52, 26, 10, 0.35),
    0 30px 60px -40px rgba(43, 26, 22, 0.6);
}

.board__pin {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  border: 1px dashed rgba(255, 236, 205, 0.28);
  border-radius: 2px;
}

.board__grid {
  position: relative;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(18px, 2.6vw, 34px) clamp(16px, 2.2vw, 28px);
  padding: clamp(6px, 1vw, 14px) 0;
}

.note {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 1 clamp(196px, 22%, 262px);
  margin: 6px 0 2px;
  padding: 30px clamp(18px, 1.8vw, 24px) 20px;
  color: #34211B;
  background: #FBE7C8;
  transform: rotate(var(--tilt, 0deg));
  box-shadow:
    0 1px 2px rgba(53, 28, 12, 0.22),
    0 18px 26px -18px rgba(53, 28, 12, 0.55);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s;
}

/* скотч сверху */
.note::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 78px;
  height: 24px;
  background: rgba(252, 246, 234, 0.55);
  box-shadow: 0 1px 2px rgba(53, 28, 12, 0.14);
  transform: translateX(-50%) rotate(-2.5deg);
}

.note:nth-child(even)::before { transform: translateX(-50%) rotate(2deg); }

/* легкий «бумажный» наклон нижнего края */
.note::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 14px;
  background: linear-gradient(rgba(120, 80, 40, 0), rgba(120, 80, 40, 0.07));
}

.note:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow:
    0 1px 2px rgba(53, 28, 12, 0.22),
    0 26px 34px -20px rgba(53, 28, 12, 0.6);
  z-index: 2;
}

.note--rose { background: #F8DCD8; }
.note--lemon { background: #FAEDBE; }
.note--peach { background: #F9DDBF; }
.note--sage { background: #E2E8CC; }
.note--lilac { background: #EADFEC; }

.note__text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.note__author {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  padding-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #6B4A3C;
}

.note__author::before { content: '— '; }

.note--wide {
  flex-basis: min(100%, 560px);
}

@media (max-width: 1100px) {
  .note { flex-basis: 288px; }
}

.board__caption {
  position: relative;
  margin: clamp(22px, 3vw, 34px) 0 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  text-align: center;
  color: rgba(252, 240, 222, 0.88);
}

.board__caption a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.board__caption a:hover { color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  .note { transition: none; }
  .note:hover { transform: rotate(var(--tilt, 0deg)); }
}

/* ---------- заказ ---------- */

.order {
  background: var(--cherry);
  color: var(--cream);
  padding: clamp(64px, 8vw, 120px) 0;
}

.order__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  align-items: start;
  gap: clamp(40px, 6vw, 80px);
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.order__lead {
  max-width: 46ch;
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: rgba(252, 246, 234, 0.74);
}

.steps {
  display: grid;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.steps__item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(252, 246, 234, 0.16);
}

.steps__num {
  padding-top: 3px;
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  color: rgba(252, 246, 234, 0.5);
}

.steps__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.steps__text {
  max-width: 42ch;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(252, 246, 234, 0.68);
}

.order__contacts {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid rgba(252, 246, 234, 0.16);
}

.order__contacts-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.order__contacts-text {
  max-width: 44ch;
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(252, 246, 234, 0.68);
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contacts a {
  font-size: 14.5px;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(252, 246, 234, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.contacts a span { margin-left: 6px; color: rgba(252, 246, 234, 0.55); }
.contacts a:hover { border-color: var(--cream); }

/* ---------- форма ---------- */

.order__form-wrap {
  padding: clamp(22px, 3vw, 34px);
  background: var(--cream);
  border-radius: 6px;
  color: var(--ink);
  box-shadow: 0 40px 80px -44px rgba(0, 0, 0, 0.7);
}

.form__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.form__sub {
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #FFFDF7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.field input::placeholder,
.field textarea::placeholder { color: #A38D7C; }

.field textarea { min-height: 84px; resize: vertical; }

.field select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%235C463B' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field__error {
  display: none;
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--cherry-2);
}

.field.has-error input { border-color: var(--cherry-2); }
.field.has-error .field__error { display: block; }

.form__note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* экран после отправки */

.form-done__kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--cherry-2);
}

.form-done__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.form-done__text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.msg {
  position: relative;
  margin: 0 0 18px;
  background: #FFFDF7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.msg__text {
  max-height: 220px;
  margin: 0;
  padding: 14px 46px 14px 14px;
  overflow: auto;
  font: 13px/1.55 var(--font-ui);
  white-space: pre-wrap;
  color: var(--ink-2);
}

.msg__copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.msg__copy svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msg__copy:hover { color: var(--ink); border-color: var(--ink-2); }

.msg__copy.is-done {
  color: var(--cream);
  background: var(--cherry);
  border-color: var(--cherry);
}

.form-done__actions { display: grid; gap: 10px; }

/* ---------- подвал ---------- */

.footer {
  padding-top: clamp(44px, 6vw, 64px);
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(36px, 5vw, 52px);
}

.footer__name {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.footer__tag {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.footer__nav,
.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer__nav a,
.footer__contacts a {
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.2s;
}

.footer__nav a:hover,
.footer__contacts a:hover { color: var(--cherry-2); }

.footer__bottom { border-top: 1px solid var(--line); }

.footer__bottom p {
  max-width: var(--page);
  margin: 0 auto;
  padding: 18px var(--pad);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- карточка десерта ---------- */

.sheet {
  width: min(1000px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--cream);
  border: 0;
  border-radius: 6px;
}

.sheet::backdrop {
  background: rgba(28, 14, 18, 0.62);
  backdrop-filter: blur(3px);
}

.sheet__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.sheet__media {
  min-height: 100%;
  margin: 0;
  background: var(--paper-deep);
}

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

.sheet__body { padding: clamp(24px, 3.4vw, 44px); }

.sheet__cat {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.sheet__badge {
  display: inline-block;
  margin-left: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0;
  color: var(--cherry-2);
}

.sheet__name {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.sheet__desc {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
}

.specs { margin: 0 0 20px; border-top: 1px solid var(--line); }

.specs__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.specs dt { flex: 0 0 auto; color: var(--muted); }
.specs dd { margin: 0; text-align: right; }

.allergens { margin-bottom: 24px; }

.allergens__label {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.allergens__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.allergens__list li {
  padding: 4px 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #FFFDF7;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.sheet__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sheet__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}

.sheet__note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(252, 246, 234, 0.94);
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
}

.sheet__close span {
  position: absolute;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}

.sheet__close span:first-child { transform: rotate(45deg); }
.sheet__close span:last-child { transform: rotate(-45deg); }

/* заглушка вместо фото */

.is-empty {
  min-height: 180px;
  background: var(--paper-deep);
}

.is-empty::after {
  content: 'фото';
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 140px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--muted);
  opacity: 0.7;
}

.hero__photo.is-empty { min-height: 460px; }
.hero__photo.is-empty::after { color: var(--muted); }

/* ---------- анимация первого экрана ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow,
  .hero__tagline,
  .hero__actions,
  .hero__photo {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero__photo { animation-delay: 0.06s; animation-name: rise-photo; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes rise-photo {
    from { opacity: 0; transform: rotate(-3.4deg) translateY(10px); }
    to { opacity: 1; transform: rotate(-1.4deg); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

@media (max-width: 1080px) {
  .catalog__grid { grid-template-columns: 1fr; }
  .card { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__photo { max-width: 520px; transform: none; }
  .hero__photo img { aspect-ratio: 4 / 3; }
  .story__grid { grid-template-columns: 1fr; }
  .story__aside { grid-template-columns: 1fr 1fr; align-items: start; }
  .order__inner { grid-template-columns: 1fr; }
  .order__form-wrap { max-width: 560px; }
  .note--wide { flex-basis: 100%; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }

  @media (prefers-reduced-motion: no-preference) {
    .hero__photo { animation-name: rise; }
  }
}

@media (max-width: 860px) {
  .burger { display: flex; }

  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px var(--pad) 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }

  .nav__link {
    padding: 14px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }

  .nav__link::after { display: none; }

  .nav__link--mobile {
    display: block;
    padding-top: 20px;
    border-bottom: 0;
    color: var(--cherry-2);
  }
}

@media (max-width: 680px) {
  .catalog__head,
  .section__head { grid-template-columns: 1fr; align-items: start; gap: 14px; }
  .catalog__more { text-align: left; margin-top: 4px; }
  .catalog__grid { grid-template-columns: 1fr; gap: 26px; }
  .card { grid-template-columns: 1fr; gap: 14px; }
  .card__media { aspect-ratio: 16 / 10; }
  .card__body { min-height: 0; }
  .card__meta { padding-top: 12px; }
  .note { flex-basis: 100%; }
  .catnote__hint { display: none; }
  .story__aside { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer__inner { grid-template-columns: 1fr; }
  .brand__sub { display: none; }
  .topbar__inner { height: 64px; }
  .nav { top: 64px; }
  .sheet__grid { grid-template-columns: 1fr; }
  .sheet--note .sheet__media { max-height: 220px; }
  .sheet__media { max-height: 320px; }
  .sheet__media img { aspect-ratio: 4 / 3; height: 320px; }
  .sheet { max-height: calc(100vh - 24px); }
}
