/* ==========================================================================
   Общий слой обоих сайтов: сброс, скелет раскладки, поведение.
   Цвета, шрифты и форма задаются темой в themes/<тема>/style.css —
   она подключается после этого файла и переопределяет токены.
   ========================================================================== */

/* --- Токены по умолчанию -------------------------------------------------- */

:root {
  --c-bg:        #FAF6EE;
  --c-fg:        #241C17;
  --c-muted:     #6B5E52;
  --c-surface:   #FFFFFF;
  --c-line:      #E4D6BE;
  --c-lead:      #0E5C6B;
  --c-lead-fg:   #FAF6EE;
  --c-accent:    #E0A126;
  --c-accent-fg: #241C17;
  --c-deep:      #241C17;
  --c-deep-fg:   #FAF6EE;

  --f-display: system-ui, sans-serif;
  --f-body:    system-ui, sans-serif;

  --fs-hero:  clamp(2.35rem, 6.4vw, 4.5rem);
  --fs-h2:    clamp(1.8rem, 4.2vw, 2.9rem);
  --fs-h3:    clamp(1.1rem, 1.6vw, 1.35rem);
  --fs-lead:  clamp(1.05rem, 1.6vw, 1.3rem);
  --fs-body:  clamp(1rem, 0.96rem + 0.25vw, 1.1rem);
  --fs-sm:    0.875rem;
  --fs-eye:   0.76rem;

  --wrap:   1160px;
  --pad:    clamp(1.1rem, 4vw, 2rem);
  --band-y: clamp(3.75rem, 8.5vw, 6.5rem);
  --gap:    clamp(1rem, 2.4vw, 1.75rem);

  --r-card: 18px;
  --r-lg:   28px;
  --r-btn:  999px;

  --hdr-h:  74px;
  --shadow: 0 1px 2px rgba(36,28,23,.05), 0 12px 28px -14px rgba(36,28,23,.28);
}

/* --- Сброс и база --------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Якорь не должен уезжать под липкую шапку. */
  scroll-padding-top: calc(var(--hdr-h) + 12px);
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--f-display);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: .8rem 1.2rem;
  background: var(--c-deep);
  color: var(--c-deep-fg);
}
.skip:focus { left: 0; top: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.band { position: relative; padding-block: var(--band-y); }
.band--tight { padding-block: clamp(2.5rem, 5vw, 3.75rem); }

.band__head { max-width: 52ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.band__head h2 { font-size: var(--fs-h2); margin-bottom: .7rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: var(--fs-eye);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
}
.eyebrow svg { width: 26px; flex: none; }

.lead-txt { font-size: var(--fs-lead); line-height: 1.5; max-width: 46ch; }

/* Разделитель секций. Силуэт задаёт тема: фестон или аркада. */
.cut {
  position: absolute;
  top: -25px;
  left: 0;
  width: 100%;
  height: 26px;
  display: block;
  pointer-events: none;
}

svg.orn-strip { display: block; width: 100%; height: 32px; }

.tilebg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--r-btn);
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--c-accent); color: var(--c-accent-fg); }
.btn--ghost   { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgb(255 255 255 / .14); }
.btn--dark    { background: var(--c-deep); color: var(--c-deep-fg); }

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

.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.hdr__in { display: flex; align-items: center; gap: 1rem; min-height: var(--hdr-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  margin-inline-end: auto;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  background: var(--c-lead);
  color: var(--c-lead-fg);
}
.brand__mark svg { width: 28px; }
.brand__txt { display: grid; line-height: 1.2; }
.brand__name { font-family: var(--f-display); font-size: 1.18rem; }
.brand__sub  { font-size: .76rem; color: var(--c-muted); }

.nav { display: flex; align-items: center; gap: 1rem; }
.nav__list { display: flex; flex-wrap: nowrap; gap: .1rem; }
.nav__list a {
  display: block;
  padding: .5rem .58rem;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.nav__list a:hover { background: var(--c-line); }
/* Подсвечивается секция, которую видно сейчас. */
.nav__list a[aria-current="true"] { color: var(--c-lead); font-weight: 700; }

.nav__side { display: flex; align-items: center; gap: .6rem; }

.lang {
  padding: .45rem .7rem;
  border: 1.5px solid var(--c-line);
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-decoration: none;
}
.lang:hover { border-color: var(--c-lead); color: var(--c-lead); }

.btn--call {
  padding: .6rem 1.05rem;
  background: var(--c-lead);
  color: var(--c-lead-fg);
  font-size: .9rem;
  white-space: nowrap;
}

.burger {
  display: none;
  width: 46px; height: 46px;
  padding: 0;
  border: 1.5px solid var(--c-line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px; height: 2px;
  margin: 4px auto;
  background: var(--c-fg);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

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

/* Задаётся скриптом, чтобы без JS содержимое осталось видимым. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* --- Аккордеон ------------------------------------------------------------ */

.acc { display: grid; gap: .7rem; }

.acc__item {
  background: var(--c-surface);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-card);
  overflow: hidden;
}

.acc__btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.05rem 1.3rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: start;
  color: inherit;
  cursor: pointer;
}
.acc__btn:hover { color: var(--c-lead); }
/* Только подпись тянется на всю ширину. Значок исключён явно: иначе этот
   селектор перебивает его flex:none и значок растягивается в линию. */
.acc__btn > span:not(.acc__sign) { flex: 1; }

.acc__sign {
  position: relative;
  width: 18px; height: 18px;
  flex: none;
  color: var(--c-lead);
}
.acc__sign::before,
.acc__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  translate: 0 -50%;
  transition: transform .25s ease, opacity .25s ease;
}
.acc__sign::after { rotate: 90deg; }
.acc__btn[aria-expanded="true"] .acc__sign::after { transform: scaleX(0); opacity: 0; }

/* Высота анимируется скриптом через inline-стиль. */
.acc__panel {
  height: 0;
  overflow: hidden;
  transition: height .32s cubic-bezier(.22,.61,.36,1);
}
.acc__in { padding: 0 1.3rem 1.3rem; }

/* Без JS панели просто открыты. */
html:not(.js) .acc__panel { height: auto; }
html:not(.js) .acc__sign  { display: none; }

/* --- Форма ---------------------------------------------------------------- */

.form {
  padding: clamp(1.4rem, 3vw, 2.25rem);
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.form h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: .5rem; }
.form__lead { font-size: .95rem; color: var(--c-muted); margin-bottom: 1.5rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: .4rem; font-size: var(--fs-sm); font-weight: 600; }
.field input,
.field textarea {
  width: 100%;
  padding: .8rem 1rem;
  border: 1.5px solid var(--c-line);
  border-radius: 12px;
  background: var(--c-bg);
  font: inherit;
  font-size: 1rem;
  color: inherit;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-lead);
  background: var(--c-surface);
}
.field--bad input, .field--bad textarea { border-color: #B03A2E; }
.field__err { display: none; margin-top: .35rem; font-size: var(--fs-sm); color: #B03A2E; }
.field--bad .field__err { display: block; }

.check { display: flex; gap: .65rem; align-items: flex-start; margin-bottom: 1.3rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; flex: none; accent-color: var(--c-lead); }
.check label { font-size: .9rem; color: var(--c-muted); font-weight: 400; }

/* Ловушка для ботов: человек её не видит и не заполняет. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__note { display: none; margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 12px; font-size: .95rem; }
.form__note--ok  { display: block; background: #E8F2EC; color: #1C5C3B; }
.form__note--bad { display: block; background: #FBEAE7; color: #8C2C22; }

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

.dl { display: grid; gap: 1.1rem; }
.dl dd { margin: 0; }
.dl__k {
  font-size: var(--fs-eye);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.dl__v { font-size: 1.05rem; }
.dl__v a { text-decoration: none; border-bottom: 1.5px solid var(--c-lead); }

.map { margin-top: var(--gap); border-radius: var(--r-lg); overflow: hidden; background: var(--c-line); aspect-ratio: 16 / 9; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map--empty { display: grid; place-items: center; color: var(--c-muted); font-size: var(--fs-sm); }

.note-empty {
  padding: .8rem 1.15rem;
  margin-bottom: var(--gap);
  border-left: 4px solid var(--c-accent);
  background: var(--c-line);
  border-radius: 0 12px 12px 0;
  font-size: var(--fs-sm);
  color: var(--c-muted);
}

.grid-ph { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-ph .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); }
.ph-slot {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  background: var(--c-line);
  display: grid;
  place-items: center;
  color: var(--c-muted);
  opacity: .5;
}
.ph-slot svg { width: 52px; }

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

@media (max-width: 1150px) {
  .burger { display: block; order: 3; }

  .nav {
    position: fixed;
    inset: var(--hdr-h) 0 auto;
    display: grid;
    gap: 1.25rem;
    padding: 1.25rem var(--pad) 2rem;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow);
    translate: 0 -8px;
    opacity: 0;
    visibility: hidden;
    transition: translate .2s ease, opacity .2s ease, visibility .2s;
  }
  .nav[data-open="true"] { translate: 0; opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; gap: .15rem; }
  .nav__list a { padding: .7rem .8rem; font-size: 1rem; }
  .nav__side { justify-content: space-between; }
  .btn--call { flex: 1; justify-content: center; }
}

@media (max-width: 560px) {
  .grid-ph { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}

/* Кнопка вместо карты, когда встроить её нечем. */
.map-link { margin-top: var(--gap); }
