/* Шрифты лежат в static/fonts — без запросов к Google */
@font-face {
  font-family: "Source Sans 3";
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215;
}
@font-face {
  font-family: "Source Sans 3";
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Заголовки */
@font-face {
  font-family: "Playfair Display";
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/playfair-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215;
}
@font-face {
  font-family: "Playfair Display";
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/playfair-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Все цвета сайта — здесь */
:root {
  --paper: #fbf5ea;   /* фон, «бумага» */
  --card: #fffdf8;
  --sand: #f1e6d2;
  --ink: #2a1c15;     /* текст и тёмные блоки */
  --muted: #7a6a5e;
  --clay: #c4502f;    /* терракотовый: главная кнопка, акценты */
  --gold: #d8a23a;
  --line: #eadfcb;
  --tg: #229ed9;      /* кнопка Telegram */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --shadow: 0 14px 34px rgba(90, 50, 20, 0.16);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  padding-bottom: 78px; /* место под нижнюю панель на телефоне */
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); font-weight: 800; margin-bottom: 20px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 18px; }
main { flex: 1; }
main.wrap { padding-top: 18px; padding-bottom: 44px; }

/* ---------- Шапка ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--paper); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 1.3rem var(--serif); white-space: nowrap; }
.logo img { width: 58px; height: 24px; }
.top__right { display: flex; align-items: center; gap: 14px; }
.top__tel { display: none; font-weight: 700; white-space: nowrap; }

.lang { display: flex; gap: 10px; font-weight: 700; font-size: 0.85rem; }
.lang a { padding: 4px 0; color: var(--muted); }
.lang a[aria-current] { color: var(--clay); box-shadow: inset 0 -2px 0 var(--clay); }

.nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 0; font-weight: 600; }
.nav a:hover { color: var(--clay); }

/* текущий раздел: <body data-section="..."> совпадает с <a data-s="..."> */
[data-section="photo"] [data-s="photo"],
[data-section="albums"] [data-s="albums"],
[data-section="ad"] [data-s="ad"],
[data-section="contacts"] [data-s="contacts"] { color: var(--clay); }

.burger { display: none; }

@media (max-width: 859px) {
  .js .burger {
    display: grid;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 12px 9px;
    margin-right: -9px;
    align-content: center;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .burger span { height: 2px; background: var(--ink); transition: transform 0.2s, opacity 0.2s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* меню выпадает под шапкой */
  .nav { position: absolute; top: 100%; left: 0; right: 0; padding: 4px 18px 16px; background: var(--paper); box-shadow: 0 16px 24px rgba(90, 50, 20, 0.14); }
  .js .nav { display: none; }
  .js .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: 14px 0; border-top: 1px solid var(--line); font: 700 1.3rem var(--serif); }
  /* без JS меню просто стоит строкой под шапкой */
  html:not(.js) .top__in { height: auto; flex-wrap: wrap; padding-top: 8px; }
  html:not(.js) .nav { position: static; order: 3; flex-basis: 100%; padding: 0 0 8px; box-shadow: none; }
  html:not(.js) .nav ul { flex-direction: row; flex-wrap: wrap; gap: 0 18px; }
  html:not(.js) .nav a { border: 0; font: 600 1rem "Source Sans 3", sans-serif; padding: 6px 0; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  transition: filter 0.15s, background-color 0.15s, color 0.15s;
}
.btn:hover { filter: brightness(1.08); }
.btn--call { background: var(--clay); color: #fff; }
.btn--tg { background: var(--tg); color: #fff; }
.btn--ghost { border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); filter: none; }
.btns { display: grid; gap: 10px; margin-top: 22px; }

/* ---------- Главная: первый экран ---------- */
.hero { display: grid; gap: 26px; padding: 14px 0 6px; }
.kicker { color: var(--clay); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.2rem, 9.6vw, 4rem); margin: 8px 0 12px; }
.hero h1 i, .hero h1 em { color: var(--clay); font-style: italic; }
.hero p { margin: 0; max-width: 30em; color: var(--muted); font-size: 1.1rem; }

.arch { position: relative; margin-bottom: 14px; }
.arch__main { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border: 6px solid var(--card); border-radius: 999px 999px 18px 18px; box-shadow: var(--shadow); }
.arch__mini { position: absolute; left: -4px; bottom: -14px; width: 42%; aspect-ratio: 4 / 3; object-fit: cover; border: 5px solid var(--card); border-radius: 14px; box-shadow: 0 8px 20px rgba(90, 50, 20, 0.2); }
.stamp { position: absolute; right: -4px; bottom: 18px; display: grid; place-items: center; width: 104px; height: 104px; padding: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 6px 16px rgba(90, 50, 20, 0.25); font-weight: 800; font-size: 0.82rem; line-height: 1.15; text-align: center; transform: rotate(-10deg); }

/* ---------- Переключатель «Фото / Реклама» (телефон) ---------- */
.tabs { display: none; }
.js .tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 40px 0 14px; padding: 4px; border-radius: 999px; background: var(--sand); }
.tabs button { padding: 11px 0; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

.cols { display: grid; gap: 32px; }
.col h2 { margin-bottom: 14px; font-size: 1.7rem; }
html:not(.js) .cols { padding-top: 40px; }
@media (max-width: 859px) {
  .js .col h2 { display: none; }
  .js .cols[data-show="photo"] [data-col="ad"],
  .js .cols[data-show="ad"] [data-col="photo"] { display: none; }
}

/* ---------- Услуги списком, как прайс ---------- */
.list { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.row { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
a.row:hover { background: #fff8ec; }
.row img, .row .ph { width: 76px; height: 76px; border-radius: 14px; }
.row img { object-fit: cover; }
.row .ph { display: grid; place-items: center; background: var(--sand); color: var(--clay); font: 800 1.6rem var(--serif); }
.row b { display: block; font-size: 1.05rem; line-height: 1.25; }
.row small { color: var(--muted); font-size: 0.9rem; }
.row .tag { max-width: 6.5em; color: var(--clay); font-weight: 800; line-height: 1.2; text-align: right; }
.row .go { color: var(--muted); font-size: 1.5rem; }

.block { padding-top: 44px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block__head h2 { font-size: 1.8rem; }
.block__head a { color: var(--clay); font-weight: 700; white-space: nowrap; }

/* ---------- Работы и видео ---------- */
.works { display: grid; gap: 14px; }
.work { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 0; border-radius: 20px; background: #000; }
.work img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work b { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(30, 15, 5, 0.85)); color: #fff; }
a.work::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232a1c15' d='M9.5 7v10l8-5z'/%3E%3C/svg%3E") center / 24px no-repeat;
  transition: transform 0.2s;
}
a.work:hover::after { transform: scale(1.12); }

/* на главной работы листаются вбок пальцем */
@media (max-width: 859px) {
  .works--reel { grid-auto-flow: column; grid-auto-columns: 78%; margin: 0 -18px; padding: 0 18px 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .works--reel .work { aspect-ratio: 4 / 3; scroll-snap-align: center; }
}

.album + .album { margin-top: 40px; }
.album h2 { margin-bottom: 14px; font-size: 1.5rem; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.gallery a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--sand); }
.gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Страница услуги ---------- */
.crumb { margin: 0 0 14px; }
.crumb a { color: var(--clay); font-weight: 700; }

.service { display: grid; gap: 22px; }
.service__img { display: block; overflow: hidden; border: 6px solid var(--card); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.service__img img { width: 100%; max-height: 70vh; object-fit: contain; }
.service h1 { margin-bottom: 12px; }
.price { display: inline-block; margin: 0 0 6px; padding: 5px 14px; border-radius: 999px; background: var(--gold); font-weight: 800; }
.prose p { margin: 0.8em 0; font-size: 1.08rem; }

/* ---------- Тёмный блок с контактами ---------- */
.where { display: grid; gap: 18px; padding: 24px 20px; border-radius: 24px; background: var(--ink); color: var(--paper); }
.where h2 { font-size: 1.8rem; }
.where p { margin: 8px 0 0; opacity: 0.85; }
.where dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.where dt { color: var(--gold); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.where dd { margin: 2px 0 0; font-weight: 700; line-height: 1.3; }
.where .wide { grid-column: 1 / -1; }
.where a { white-space: nowrap; }
.where a:hover { color: var(--gold); }

.contacts { display: grid; gap: 16px; }
.map { min-height: 420px; overflow: hidden; border-radius: 24px; background: var(--sand); }

.notfound { padding: 48px 0; text-align: center; }
.notfound p { margin: 0 0 6px; color: var(--clay); font: 800 4.5rem/1 var(--serif); }
.notfound .btn { display: inline-flex; margin-top: 12px; }

/* ---------- Подвал ---------- */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.foot__in { display: grid; gap: 20px 40px; padding-top: 28px; padding-bottom: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.foot h2 { margin-bottom: 6px; color: var(--ink); font-size: 1.1rem; }
.foot p { margin: 0; }
.foot a { color: var(--ink); font-weight: 700; white-space: nowrap; }
.foot a:hover { color: var(--clay); }

/* Нижняя панель — только на телефоне */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; background: var(--card); box-shadow: 0 -2px 16px rgba(90, 50, 20, 0.16); }
.bar .btn { min-height: 52px; }

/* ---------- Просмотр фото во весь экран ---------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(30, 18, 10, 0.96); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: #1e120a; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lightbox button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: var(--gold); color: var(--ink); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: calc(50% - 24px); }
.lb-next { right: 12px; top: calc(50% - 24px); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

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

/* ---------- Широкий экран ---------- */
@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .bar { display: none; }
  .js .tabs { display: none; }
  .top__tel { display: block; }
  .top__in { height: 76px; }
  main.wrap { padding-top: 32px; padding-bottom: 72px; }
  .home { padding-bottom: 72px; }

  .hero { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 60px; padding: 36px 0 20px; }
  .btns { grid-auto-flow: column; justify-content: start; }
  .cols { grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 56px; }
  .block { padding-top: 64px; }
  .works { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; }

  .list--wide { display: grid; grid-template-columns: 1fr 1fr; }
  .list--wide .row:nth-child(2) { border-top: 0; }
  .list--wide .row:nth-child(odd) { border-right: 1px solid var(--line); }

  .service { grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
  .where { grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 40px; }
  .contacts { grid-template-columns: 400px 1fr; gap: 24px; align-items: start; }
  .contacts .where { grid-template-columns: 1fr; padding: 28px; }
}

@media (max-width: 859px) { .home { padding-bottom: 40px; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
