/* ============================================================
   «Старица 1297» — осенний путеводитель
   Дизайн по мотивам печатного гайда: персиковый фон, вермильон,
   золотой, арочные фото-маски, Montserrat
   ============================================================ */

/* ---------- Шрифты (self-hosted, без внешних запросов) ---------- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-latin-400.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/montserrat-cyrillic-500.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/montserrat-latin-500.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-latin-700.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/montserrat-cyrillic-800.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/montserrat-latin-800.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/montserrat-cyrillic-900.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/montserrat-latin-900.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Токены ---------- */
:root {
  --peach: #fbe4c8;        /* основной фон */
  --peach-deep: #f5d9b6;   /* затемненные секции */
  --card: #fff9ef;         /* карточки */
  --ink: #2e2519;          /* текст */
  --ink-soft: #7c6850;     /* вторичный текст */
  --vermilion: #e04e1b;    /* фирменный акцент */
  --vermilion-dark: #bf3f0f;
  --gold: #efa53c;         /* золотой */
  --white: #ffffff;
  --shadow: 0 14px 34px -18px rgba(94, 58, 20, 0.45);
  --radius: 20px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--peach);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--vermilion-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--vermilion); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); text-transform: uppercase; }
h3 { font-size: 1.15rem; margin-bottom: 0.45em; }
h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 0.9em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 1.08rem; font-weight: 500; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.icon { width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.12em; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--vermilion); color: var(--white); box-shadow: 0 12px 26px -14px rgba(224, 78, 27, 0.8); }
.btn-primary:hover { background: var(--vermilion-dark); color: var(--white); }
.btn-ghost { background: rgba(255, 255, 255, 0.1); color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.2); color: var(--white); }
.btn-light { background: var(--white); color: var(--vermilion-dark); }
.btn-light:hover { background: var(--gold); color: var(--ink); }
.btn-sm { padding: 0.6em 1.15em; font-size: 0.85rem; }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(251, 228, 200, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(94, 58, 20, 0.12);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(94, 58, 20, 0.5); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--vermilion);
  display: grid; place-items: center;
  box-shadow: 0 8px 18px -10px rgba(224, 78, 27, 0.9);
}
.brand-arch {
  width: 16px; height: 22px;
  border-radius: 999px 999px 3px 3px;
  border: 2.5px solid var(--white);
  border-bottom: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 900; font-size: 0.98rem; letter-spacing: 0.01em; white-space: nowrap; }
.brand-sub { font-size: 0.68rem; color: var(--ink-soft); white-space: nowrap; }

.main-nav { display: none; gap: 0.15rem; }
.main-nav a {
  padding: 0.5em 0.7em;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.main-nav a:hover { color: var(--vermilion-dark); background: rgba(224, 78, 27, 0.09); }
.main-nav a.active { color: var(--vermilion-dark); background: rgba(224, 78, 27, 0.13); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.header-actions .btn { display: none; }

.burger {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1.5px solid rgba(94, 58, 20, 0.25);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.burger .icon { width: 22px; height: 22px; }
.burger .icon-close { display: none; }
body.nav-open .burger .icon-menu { display: none; }
body.nav-open .burger .icon-close { display: block; }

.mobile-nav {
  position: fixed;
  inset: 72px 0 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.2rem 1.4rem 2rem;
  background: var(--peach);
  border-top: 1px solid rgba(94, 58, 20, 0.12);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
body.nav-open .mobile-nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav a {
  padding: 0.8em 0.6em;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(94, 58, 20, 0.08);
}
.mobile-nav a:last-child { color: var(--vermilion-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(94svh, 900px);
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  padding: 120px 0 64px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('../img/hero.jpg') center 30% / cover no-repeat;
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(38, 24, 8, 0.55) 0%, rgba(38, 24, 8, 0.12) 34%, rgba(33, 20, 6, 0.42) 68%, rgba(28, 16, 4, 0.88) 100%);
}
.hero-inner { position: relative; }
.hero-kicker {
  margin: 0 0 1.1em;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
}
.hero-title {
  font-size: clamp(3rem, 9.5vw, 6.4rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 0 0 0.35em;
  text-shadow: 0 4px 30px rgba(20, 10, 0, 0.45);
}
.hero-title .accent { color: var(--gold); }
.hero-tags {
  margin: 0 0 1.4em;
  font-weight: 700;
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
}
.hero-lead {
  max-width: 560px;
  margin: 0 0 1.8em;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.85);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ---------- Секции ---------- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--peach-deep); }

.section-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section-num {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--vermilion);
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 10px 22px -12px rgba(224, 78, 27, 0.9);
  flex: none;
}
.section-head h2 { margin: 0; }
.section-lead { max-width: 640px; font-size: 1.05rem; font-weight: 500; margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.subhead { margin: clamp(2.2rem, 5vw, 3.4rem) 0 1.4rem; }
.subhead h3 { font-size: 1.35rem; text-transform: uppercase; }

/* ---------- О Старице ---------- */
.about-grid { display: grid; gap: 2.2rem; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.about-media { display: grid; grid-template-columns: 150px 1fr; gap: 0.9rem; align-items: end; }
.about-media .arch {
  border-radius: 999px 999px 16px 16px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  width: 100%;
}
.about-media .rounded { border-radius: var(--radius); aspect-ratio: 21 / 10; object-fit: cover; }

.facts-head { margin-bottom: 1.4rem; }
.facts-head h3 { font-size: 1.35rem; text-transform: uppercase; margin: 0; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.fact {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow);
}
.fact-body { display: flex; gap: 1.1rem; align-items: flex-start; flex: 1; }
.fact-num {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--vermilion);
  opacity: 0.9;
  min-width: 1.05em;
  flex: none;
}
.fact p { margin: 0; }
.fact-portrait {
  border-radius: 999px 999px 12px 12px;
  width: 86px;
  flex: none;
  align-self: center;
}

/* ---------- Разделители с аркой ---------- */
.divider { padding: clamp(28px, 5vw, 56px) 0; overflow: hidden; }
.divider img {
  width: min(300px, 60vw);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 999px 999px 20px 20px;
  margin-inline: auto;
  box-shadow: var(--shadow);
}
.divider-right img { margin-inline: auto; }

/* ---------- Карточки ---------- */
.card-grid { display: grid; gap: 1.1rem; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -20px rgba(94, 58, 20, 0.55); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 1.15rem 1.3rem 1.35rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; color: var(--ink); }
.card-plain .card-body { gap: 0.55rem; }

.meta { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.meta li { display: flex; gap: 0.5em; align-items: baseline; font-size: 0.86rem; font-weight: 500; color: var(--ink-soft); }
.meta .icon { color: var(--vermilion); }
.meta a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(224, 78, 27, 0.35); }
.meta a:hover { color: var(--vermilion-dark); }

.note {
  display: flex;
  gap: 0.55em;
  margin-top: 0.7rem;
  padding: 0.7em 0.9em;
  border-radius: 12px;
  background: rgba(239, 165, 60, 0.16);
  font-size: 0.84rem;
  color: var(--ink);
}
.note .icon { color: var(--gold); margin-top: 0.15em; }

.callout {
  display: flex;
  gap: 0.8em;
  align-items: flex-start;
  margin-top: 1.6rem;
  padding: 1.05rem 1.3rem;
  border-radius: var(--radius);
  background: var(--vermilion);
  color: var(--white);
  box-shadow: var(--shadow);
}
.callout .icon { width: 1.3em; height: 1.3em; margin-top: 0.15em; color: var(--gold); }
.callout p { margin: 0; font-weight: 500; }
.callout a { color: var(--white); font-weight: 800; }

/* ---------- Избранная карточка (монастырь) ---------- */
.featured {
  display: grid;
  gap: 1.4rem;
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.4rem;
}
.featured-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.featured-body { padding: 0.4rem 1.6rem 1.8rem; }
.featured-body h3 { font-size: 1.5rem; text-transform: uppercase; }
.featured blockquote {
  margin: 0 0 1em;
  padding: 0 0 0 1.1em;
  border-left: 4px solid var(--gold);
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
}

/* ---------- Отели ---------- */
.hotel-list { display: grid; gap: 1.1rem; }
.hotel {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hotel:hover { transform: translateY(-3px); }
.hotel-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.hotel-body { padding: 1.3rem 1.5rem; }
.hotel-body h3 { margin-bottom: 0.4em; }

/* ---------- События ---------- */
.event-list { display: grid; gap: 1.4rem; }
.event {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.event-media img { width: 100%; height: 100%; object-fit: cover; }
.event-body { padding: 1.6rem 1.8rem; align-self: center; }
.event-date {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.45em 1em;
  border-radius: 999px;
  background: var(--vermilion);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.9em;
}
.event-body h3 { font-size: 1.35rem; text-transform: uppercase; }
.event-place { font-weight: 600; color: var(--ink-soft); font-size: 0.9rem; }
.event .btn { margin-top: 0.6em; }

/* ---------- Аудиогид ---------- */
.audio { background: #3a2414; color: #f7ead6; }
.audio-grid { display: grid; gap: 2rem; align-items: center; }
.audio-media .arch {
  border-radius: 999px 999px 24px 24px;
  width: min(360px, 78vw);
  margin-inline: auto;
  aspect-ratio: 10 / 13;
  object-fit: cover;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7);
}
.section-head-light h2 { color: var(--white); }
.audio .lead { color: #f7ead6; }
.audio p { color: rgba(247, 234, 214, 0.78); }
.audio .btn { margin-top: 0.6em; }

/* ---------- Подвал ---------- */
.site-footer { background: #241608; color: rgba(247, 234, 214, 0.82); padding: clamp(48px, 7vw, 80px) 0 32px; }
.footer-welcome {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--white);
  max-width: 18ch;
  margin: 0 0 2.4rem;
}
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2.6rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-col a { color: var(--gold); }
.footer-copy { margin: 0; padding-top: 1.4rem; border-top: 1px solid rgba(247, 234, 214, 0.16); font-size: 0.82rem; color: rgba(247, 234, 214, 0.55); }

/* ---------- Наверх ---------- */
.to-top {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 40;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: var(--vermilion);
  color: var(--white);
  box-shadow: 0 12px 26px -12px rgba(224, 78, 27, 0.9);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top .icon { width: 20px; height: 20px; }

/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .hotel:hover { transform: none; }
}

/* ---------- Адаптив ---------- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > .fact:last-child { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .main-nav { display: flex; }
  .header-actions .btn { display: inline-flex; }
  .burger, .mobile-nav { display: none; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-museums, .grid-cafes { grid-template-columns: repeat(3, 1fr); }
  .grid-food { grid-template-columns: repeat(4, 1fr); }
  .about-grid { grid-template-columns: 1.05fr 1fr; align-items: center; }
  .featured { grid-template-columns: 1.15fr 1fr; }
  .featured-media img { aspect-ratio: auto; height: 100%; min-height: 420px; }
  .featured-body { padding: 1.8rem 1.9rem 1.8rem 0; }
  .audio-grid { grid-template-columns: 360px 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1.2fr; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts > .fact:last-child { grid-column: auto; }
  .facts > .fact { grid-column: span 1; }
}
@media (min-width: 1100px) {
  .grid-activities { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 899px) {
  .hotel { grid-template-columns: 1fr; }
  .hotel-media img { aspect-ratio: 16 / 9; }
  .event { grid-template-columns: 1fr; }
  .event-media img { aspect-ratio: 16 / 9; }
  .featured { grid-template-columns: 1fr; }
}
