:root {
  --bg: #fbf7f2;
  --tint: #f3ebe1;
  --ink: #2c2321;
  --muted: #74655f;
  --line: #e4d8cb;
  --accent: #a85d4f;
  --accent-dark: #8a4a3e;
  --gold: #b48a52;
  --card: #fffdfa;
  --radius: 18px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(44px, 6vw, 76px); letter-spacing: -.01em; }
h1 em { display: block; font-style: italic; font-weight: 500; color: var(--accent); }
h2 { font-size: clamp(32px, 4vw, 50px); max-width: 18em; }
h3 { font-size: 28px; }
p { margin: 0 0 1em; }

.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tint { background: var(--tint); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 16px; border: 1.5px solid var(--accent);
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 24px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.brand b { font-weight: 600; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--accent); }
.burger { display: none; }

/* Первый экран */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 110px); }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }
.hero__photo { margin: 0; position: relative; }
.hero__photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 220px 220px var(--radius) var(--radius); }
.hero__photo figcaption {
  position: absolute; left: -18px; bottom: 32px; background: var(--card);
  padding: 12px 18px; border-radius: 12px; font-size: 14px; color: var(--muted);
  box-shadow: 0 10px 30px rgb(60 40 30 / .12);
}
.facts { list-style: none; padding: 0; margin: 44px 0 0; display: flex; gap: 34px; flex-wrap: wrap; }
.facts li { display: flex; flex-direction: column; max-width: 150px; }
.facts b { font-family: var(--serif); font-size: 36px; font-weight: 600; line-height: 1; color: var(--ink); }
.facts span { font-size: 14px; color: var(--muted); line-height: 1.35; margin-top: 6px; }

/* Карточки направлений */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.card img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.card__body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.card__body p { font-size: 15px; color: var(--muted); flex: 1; }
.card__body a { font-weight: 600; font-size: 15px; text-decoration: none; }

/* Галерея */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 34px; }
.filter {
  font: 600 15px var(--sans); color: var(--ink); background: transparent;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 20px; cursor: pointer;
  transition: all .2s;
}
.filter:hover { border-color: var(--accent); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery { columns: 4 240px; column-gap: 16px; }
.gallery button {
  display: block; width: 100%; padding: 0; margin: 0 0 16px; border: 0; background: none;
  cursor: zoom-in; break-inside: avoid; border-radius: 14px; overflow: hidden;
}
.gallery img { width: 100%; height: auto; transition: transform .5s; }
.gallery button:hover img { transform: scale(1.04); }
.gallery__more { margin-top: 20px; color: var(--muted); }

/* О себе */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.about__photos { position: relative; padding: 0 0 60px 60px; }
.about__cake { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.about__logo {
  position: absolute; left: 0; bottom: 0; width: 42%; border-radius: 50%;
  border: 8px solid var(--bg); z-index: 1;
}
.about__text p { color: var(--muted); }
blockquote { margin: 0; }
.about__text blockquote {
  font-family: var(--serif); font-style: italic; font-size: 27px; line-height: 1.3;
  color: var(--ink); border-left: 3px solid var(--gold); padding-left: 22px; margin-top: 28px;
}

/* Цены */
.prices { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; margin-top: 40px; align-items: start; }
.price-main, .price-list { background: var(--card); border-radius: var(--radius); padding: clamp(26px, 4vw, 42px); border: 1px solid var(--line); }
.price-main__label { font-weight: 600; margin: 0; }
.price-main__value { font-family: var(--serif); font-size: 64px; font-weight: 600; line-height: 1; margin: 10px 0 24px; color: var(--accent); }
.price-main__value small { display: block; font-family: var(--sans); font-size: 15px; color: var(--muted); font-weight: 500; margin-top: 8px; }
.price-main ul { padding-left: 20px; margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.price-main li { margin-bottom: 6px; }
.note { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.price-list table { width: 100%; border-collapse: collapse; font-size: 15px; }
.price-list td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-list tr:last-child td { border-bottom: 0; }
.price-list td:last-child { text-align: right; white-space: nowrap; font-weight: 600; padding-left: 16px; }

/* Шаги */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 22px; }
.steps li::before { content: "0" counter(s); font-family: var(--serif); font-size: 44px; color: var(--gold); line-height: 1; }
.steps b { font-size: 18px; }
.steps span { color: var(--muted); font-size: 15px; }

/* Отзывы */
.reviews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 40px; }
.review { margin: 0; background: var(--card); border-radius: var(--radius); padding: 32px 34px; border: 1px solid var(--line); position: relative; }
.review::before { content: "“"; position: absolute; top: 4px; right: 26px; font-family: var(--serif); font-size: 96px; color: var(--line); line-height: 1; }
.review blockquote { font-size: 17px; position: relative; padding-right: 36px; }
.review figcaption { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--gold); }

/* Контакты */
.contacts__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-list { margin: 0; display: grid; gap: 0; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 10px 30px; }
.contact-list div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 700; }
.contact-list dd { margin: 4px 0 0; }
.contact-list a { text-decoration: none; font-weight: 600; }

.footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: 14px; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { text-decoration: none; }

/* Переключатель шаблонов (место под него внизу подвала) */
.footer { padding-bottom: 76px; }
.tpl-switch {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; padding: 4px; gap: 2px;
  background: rgb(44 35 33 / .9); border-radius: 999px; backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgb(0 0 0 / .2); font: 600 12px var(--sans);
}
.tpl-switch a { color: #d9cbc2; text-decoration: none; padding: 8px 14px; border-radius: 999px; }
.tpl-switch a:hover { color: #fff; }
.tpl-switch a[aria-current] { background: var(--bg); color: var(--ink); }

/* Просмотр фото */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgb(25 18 16 / .92); display: flex; align-items: center; justify-content: center; padding: 40px 70px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 100%; max-width: 100%; border-radius: 10px; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-size: 46px; line-height: 1; padding: 10px 16px; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lightbox__close { top: 10px; right: 14px; }
.lightbox__prev { left: 8px; }
.lightbox__next { right: 8px; }

/* Адаптив */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 18px;
    transform: translateY(-120%); transition: transform .3s; z-index: -1;
  }
  .nav.is-open { transform: none; }
  .nav a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 44px; height: 44px; margin-left: 4px; background: none; border: 0; cursor: pointer; padding: 10px;
  }
  .burger span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s; }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .header__cta { margin-left: auto; }
  .hero__inner, .about, .prices, .contacts__inner { grid-template-columns: 1fr; }
  .hero__photo { max-width: 520px; }
  .hero__photo figcaption { left: 12px; }
  .reviews { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .header__cta { display: none; }
  .burger { margin-left: auto; }
  .brand { font-size: 21px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .gallery { columns: 2; column-gap: 10px; }
  .gallery button { margin-bottom: 10px; }
  .facts { gap: 22px; }
  .facts b { font-size: 30px; }
  .hero__actions .btn { width: 100%; }
  .about__photos { padding: 0 0 40px 40px; }
  .price-main__value { font-size: 52px; }
  .review { padding: 26px 22px; }
  .lightbox { padding: 60px 8px; }
  .lightbox__nav { top: auto; bottom: 6px; }
}
