/* =========================================================
   ВЕРАНДА — базовые стили
   Палитра: тёмный лес, тёплый крем, латунь
   ========================================================= */

/* ---------- Токены ---------- */
:root {
  /* цвета */
  --ink:        #101a14;
  --forest:     #14251c;
  --forest-2:   #1b3327;
  --green:      #2c4a38;
  --sage:       #7d9180;
  --cream:      #f4efe4;
  --paper:      #fbf8f1;
  --sand:       #ebe2d1;
  --sand-2:     #e1d5bf;
  --gold:       #c2a06b;
  --gold-soft:  #d8bd92;
  --terra:      #a45b3f;
  --line:       rgba(20, 37, 28, .14);
  --line-light: rgba(244, 239, 228, .22);
  --muted:      #6c766b;

  /* типографика */
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans:  "Manrope", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* сетка */
  --container: 1280px;
  --gutter: clamp(18px, 5vw, 56px);
  --radius: 18px;
  --radius-lg: 26px;

  /* движение */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, iframe, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--forest); }

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

/* ---------- Сетка ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(64px, 9vw, 128px);
}

.section--sand { background: var(--sand); }
.section--ink  { background: var(--forest); color: var(--cream); }

/* ---------- Типографика ---------- */
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.05rem, 5.4vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -.015em;
}
.h2 em { font-style: italic; color: var(--green); }
.h2--light { color: var(--cream); }
.h2--light em { color: var(--gold-soft); }

.lead {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.66;
  color: #34423a;
  max-width: 58ch;
}
.lead--light { color: rgba(244, 239, 228, .78); }

.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: .715rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 22px;
}
.eyebrow__line {
  display: inline-block;
  width: clamp(24px, 4vw, 48px);
  height: 1px;
  background: var(--gold);
}
.eyebrow--light { color: rgba(244, 239, 228, .72); }

/* ---------- Секционные заголовки ---------- */
.section__head { margin-bottom: clamp(32px, 4.6vw, 60px); }

.section__head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
}

.section__aside {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 40ch;
  padding-bottom: 8px;
}
.section__aside--light { color: rgba(244, 239, 228, .66); }

/* ---------- Кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.2;
  text-align: center;
  border: 1px solid transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease), transform .35s var(--ease),
              box-shadow .35s var(--ease);
  will-change: transform;
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
}
.btn--primary:hover {
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 12px 30px -14px rgba(20, 37, 28, .55);
}

.btn--gold {
  background: var(--gold);
  color: var(--forest);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  box-shadow: 0 14px 34px -16px rgba(194, 160, 107, .8);
}

.btn--ghost {
  color: var(--cream);
  border-color: rgba(244, 239, 228, .36);
  background: rgba(244, 239, 228, .04);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  border-color: var(--cream);
  background: rgba(244, 239, 228, .12);
}

.btn--outline {
  color: var(--green);
  border-color: rgba(44, 74, 56, .35);
  background: transparent;
}
.btn--outline:hover { background: rgba(44, 74, 56, .07); border-color: var(--green); }

.btn--outline-light {
  color: var(--cream);
  border-color: rgba(244, 239, 228, .32);
  background: transparent;
}
.btn--outline-light:hover { background: rgba(244, 239, 228, .1); border-color: var(--cream); }

.btn--sm { padding: 11px 20px; font-size: .8rem; }
.btn--lg { padding: 17px 32px; font-size: .92rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--green);
  border-bottom: 1px solid rgba(44, 74, 56, .3);
  padding-bottom: 3px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--forest); border-color: var(--forest); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Медиа-блоки ---------- */
.media {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 10%, #40573f 0%, transparent 60%),
    linear-gradient(150deg, #2c4a38 0%, #14251c 100%);
  border-radius: var(--radius);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease-out), opacity .5s linear;
}
.media:hover img { transform: scale(1.035); }

.media--arch { border-radius: 999px 999px var(--radius) var(--radius); aspect-ratio: 4 / 5; }
.media--wide { aspect-ratio: 16 / 10; }

.media__caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(20, 37, 28, .58);
  backdrop-filter: blur(8px);
  color: var(--cream);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.media.is-missing::after {
  content: "фото загрузится на хостинге";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, .45);
}

/* ---------- Анимация появления ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Ссылка «к содержанию» ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--cream);
  color: var(--forest);
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* =========================================================
   Верхняя полоса
   ========================================================= */
.topbar {
  background: var(--forest);
  color: rgba(244, 239, 228, .72);
  font-size: .73rem;
  letter-spacing: .06em;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
}
.topbar__inner p { display: flex; align-items: center; gap: 8px; }
.topbar__note { text-transform: uppercase; font-weight: 500; letter-spacing: .12em; }
.topbar__geo { color: rgba(244, 239, 228, .5); }
.topbar__phone { color: var(--gold-soft); font-weight: 600; letter-spacing: .04em; }
.topbar__phone:hover { color: var(--cream); }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(194, 160, 107, .18);
  flex: none;
}

/* =========================================================
   Шапка
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.header.is-stuck::before { opacity: .97; }
.header.is-stuck { box-shadow: 0 1px 0 var(--line), 0 18px 40px -34px rgba(16, 26, 20, .5); }

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

/* бренд */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 30px; height: 30px;
  color: var(--gold);
  flex: none;
}
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--cream);
  transition: color .3s var(--ease);
}
.brand__sub {
  margin-top: 5px;
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, .55);
  transition: color .3s var(--ease);
}
.header.is-stuck .brand__name { color: var(--forest); }
.header.is-stuck .brand__sub { color: var(--muted); }

/* навигация */
.nav {
  display: none;
  align-items: center;
  gap: clamp(14px, 1.8vw, 30px);
}
.nav a {
  position: relative;
  font-size: .84rem;
  font-weight: 500;
  color: rgba(244, 239, 228, .82);
  padding-block: 6px;
  transition: color .3s var(--ease);
}
.header.is-stuck .nav a { color: #3a493f; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover { color: var(--cream); }
.header.is-stuck .nav a:hover { color: var(--forest); }
.nav a:hover::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 16px; }
.header__phone {
  display: none;
  font-size: .86rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: .01em;
  white-space: nowrap;
}
.header.is-stuck .header__phone { color: var(--forest); }
.header__actions .btn { display: none; }

/* кнопка звонка (только на телефоне) */
.header__call {
  display: none;
  width: 42px; height: 42px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 228, .3);
  color: var(--cream);
  transition: border-color .3s var(--ease), color .3s var(--ease), background-color .3s var(--ease);
}
.header__call svg { width: 17px; height: 17px; }
.header.is-stuck .header__call { border-color: rgba(20, 37, 28, .2); color: var(--forest); }
.header__call:hover { border-color: var(--gold); color: var(--gold); }

/* бургер */
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0 9px;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 228, .3);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.burger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--cream);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .25s var(--ease), background-color .3s var(--ease);
}
.header.is-stuck .burger { border-color: rgba(20, 37, 28, .22); }
.header.is-stuck .burger span { background: var(--forest); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   Мобильное меню
   ========================================================= */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  background: var(--forest);
  color: var(--cream);
  transform: translateY(-102%);
  visibility: hidden;
  transition: transform .55s var(--ease-out), visibility .55s;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer.is-open ~ * { pointer-events: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 6px 18px;
  border-bottom: 1px solid var(--line-light);
}
.brand__name--sm { font-family: var(--serif); font-size: 1.4rem; color: var(--cream); }
.drawer__close {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  color: var(--cream);
}

.drawer__nav { display: flex; flex-direction: column; padding-block: 10px; }
.drawer__nav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-block: 14px;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 8vw, 2.1rem);
  line-height: 1.15;
  border-bottom: 1px solid rgba(244, 239, 228, .1);
}
.drawer__nav a span {
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .16em;
  color: var(--gold);
  transform: translateY(-4px);
}

.drawer__foot {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer__label {
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, .5);
}
.drawer__phone {
  font-family: var(--serif);
  font-size: 1.7rem;
  color: var(--cream);
  margin-bottom: 8px;
}

/* =========================================================
   Подвал
   ========================================================= */
.footer {
  background: var(--ink);
  color: rgba(244, 239, 228, .68);
  padding-top: clamp(48px, 6vw, 80px);
}
.footer__inner {
  display: grid;
  gap: 34px;
  padding-bottom: clamp(34px, 4vw, 56px);
}
.brand--footer .brand__name { color: var(--cream); }
.brand--footer .brand__sub { color: rgba(244, 239, 228, .45); }
.footer__tagline {
  margin-top: 18px;
  max-width: 34ch;
  font-size: .9rem;
  line-height: 1.6;
  color: rgba(244, 239, 228, .5);
}
.footer__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  align-content: start;
  font-size: .88rem;
}
.footer__nav a { transition: color .3s var(--ease); }
.footer__nav a:hover { color: var(--gold-soft); }
.footer__contacts { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.footer__contacts a:first-child {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--cream);
}
.footer__contacts a:hover { color: var(--gold-soft); }
.footer__contacts p { color: rgba(244, 239, 228, .45); font-size: .82rem; margin-top: 4px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px;
  border-top: 1px solid rgba(244, 239, 228, .12);
  font-size: .74rem;
  color: rgba(244, 239, 228, .42);
}
.footer__bottom a:hover { color: var(--cream); }

/* =========================================================
   Мобильная панель действий
   ========================================================= */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 248, 241, .94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform .45s var(--ease-out);
}
.mobile-bar.is-visible { transform: none; }
.mobile-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
}
.mobile-bar__call { border: 1px solid rgba(20, 37, 28, .18); color: var(--forest); }
.mobile-bar__call svg { width: 16px; height: 16px; }
.mobile-bar__book { background: var(--green); color: var(--cream); }

/* =========================================================
   Доступность / медиа
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
