/* ============================================================
   russianpraga.ru — путеводитель по Праге
   Единый файл стилей на весь сайт.

   Инлайновые стили не используются намеренно: страницы
   отдаются с политикой Content-Security-Policy
   style-src 'self', которая блокирует и тег style,
   и одноимённый атрибут.
   ============================================================ */

/* ---------- 1. Переменные ---------- */
:root {
  --cream:      #FAF6EF;
  --cream-deep: #F1E9DC;
  --graphite:   #1E1B16;
  --graphite-8: rgba(30, 27, 22, .08);
  --graphite-6: rgba(30, 27, 22, .60);
  --terracotta: #C4552D;
  --terracotta-dark: #A84420;
  --gold:       #C9A227;
  --blue:       #2E5E73;

  --font-display: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-text:    "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --wrap: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --radius: 4px;
  --shadow: 0 1px 2px rgba(30, 27, 22, .05), 0 12px 32px rgba(30, 27, 22, .07);
  --shadow-lift: 0 2px 6px rgba(30, 27, 22, .08), 0 22px 48px rgba(30, 27, 22, .13);
  --header-h: 74px;
}

/* ---------- 2. Сброс и базовая типографика ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--graphite);
  font-family: var(--font-text);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 4.2vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.5rem); }
h4 { font-size: 1.0625rem; font-family: var(--font-text); font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--terracotta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terracotta-dark); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.35em; }
li { margin-bottom: .45em; }
li:last-child { margin-bottom: 0; }

strong { font-weight: 700; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- 3. Каркас ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }

.section { padding: clamp(3.25rem, 7vw, 6.5rem) 0; }
.section--tight { padding: clamp(2.25rem, 4vw, 3.75rem) 0; }
.section--alt { background: var(--cream-deep); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: .9rem;
}

.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--graphite-6); }

/* ---------- 4. Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-solid {
  background: rgba(250, 246, 239, .94);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--graphite-8);
  box-shadow: 0 1px 20px rgba(30, 27, 22, .06);
}

/* На внутренних страницах шапка плотная с самого начала. */
.site-header--opaque {
  background: rgba(250, 246, 239, .94);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--graphite-8);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--graphite);
  text-decoration: none;
  line-height: 1.1;
  white-space: nowrap;
}
.logo span { color: var(--terracotta); }
.logo small {
  display: block;
  font-family: var(--font-text);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--graphite-6);
  margin-top: 2px;
}

/* Пока страница не проскроллена, поверх тёмного героя шапка светлая. */
.site-header:not(.is-solid):not(.site-header--opaque) .logo { color: #fff; }
.site-header:not(.is-solid):not(.site-header--opaque) .logo small { color: rgba(255, 255, 255, .72); }
.site-header:not(.is-solid):not(.site-header--opaque) .nav__link { color: rgba(255, 255, 255, .9); }
.site-header:not(.is-solid):not(.site-header--opaque) .nav__toggle { color: #fff; border-color: rgba(255, 255, 255, .45); }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  color: var(--graphite);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  padding: .35rem 0;
  position: relative;
  white-space: nowrap;
  transition: color .2s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--terracotta); }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--graphite-8);
  border-radius: var(--radius);
  color: var(--graphite);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  padding: .5rem .85rem;
  cursor: pointer;
}

/* ---------- 5. Герой ---------- */
.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  min-height: min(100svh, 900px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-color: var(--graphite);
  background-position: center 42%;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero--home { background-image: url(../images/hero-prague.jpg); }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 18, 14, .62) 0%,
    rgba(20, 18, 14, .28) 34%,
    rgba(20, 18, 14, .58) 72%,
    rgba(20, 18, 14, .86) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.hero__content { max-width: 40rem; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero .eyebrow { color: var(--gold); }
.hero__sub {
  font-size: clamp(1.05rem, 1rem + .45vw, 1.32rem);
  color: rgba(255, 255, 255, .88);
  margin-bottom: 2rem;
  max-width: 34rem;
}

.hero__scroll {
  position: absolute;
  z-index: 1;
  left: 50%; bottom: 1.6rem;
  transform: translateX(-50%);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
}

/* Компактная шапка внутренних страниц */
.pagehead {
  background: var(--cream-deep);
  border-bottom: 1px solid var(--graphite-8);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3.25rem);
}
.pagehead h1 { margin-bottom: .3em; }
.pagehead .lead { max-width: 44rem; }

/* ---------- 6. Кнопки ---------- */
.btn {
  display: inline-block;
  padding: .95rem 2rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--terracotta);
  color: #fff;
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover {
  background: var(--terracotta-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(168, 68, 32, .28);
}
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: none; }
.btn--outline { background: transparent; border-color: var(--terracotta); color: var(--terracotta); }
.btn--outline:hover { background: var(--terracotta); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---------- 7. Сетки и карточки ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--graphite-8);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.card__media { margin: 0; overflow: hidden; background: var(--cream-deep); }
.card__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}
.card:hover .card__media img { transform: scale(1.045); }

.card__body { padding: 1.5rem 1.5rem 1.65rem; display: flex; flex-direction: column; flex: 1; }
.card__num {
  font-family: var(--font-display);
  font-size: .95rem;
  color: var(--gold);
  margin-bottom: .35rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .96rem; color: var(--graphite-6); }

.tip {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--graphite-8);
  font-size: .89rem;
  line-height: 1.6;
  color: var(--graphite);
}
.tip b { color: var(--terracotta); font-weight: 700; }

/* Карточка-факт без фотографии */
.fact {
  background: #fff;
  border: 1px solid var(--graphite-8);
  border-left: 3px solid var(--terracotta);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.fact h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.fact p { font-size: .95rem; color: var(--graphite-6); margin: 0; }

/* ---------- 8. Полоса цифр ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--graphite-8);
  border: 1px solid var(--graphite-8);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--cream); padding: 1.9rem 1.25rem; text-align: center; }
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem);
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  margin-bottom: .5rem;
}
.stat__label { font-size: .84rem; color: var(--graphite-6); line-height: 1.45; }

/* ---------- 9. Маршруты ---------- */
.route {
  background: #fff;
  border: 1px solid var(--graphite-8);
  border-radius: var(--radius);
  padding: 1.9rem 1.75rem 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.route__meta {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .7rem;
}
.route h3 { margin-bottom: .7rem; }
.route > p { font-size: .96rem; color: var(--graphite-6); }

.steps { list-style: none; margin: 1.25rem 0 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: .95rem;
  font-size: .95rem;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: .05rem;
  width: 1.65rem; height: 1.65rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--terracotta);
  border-radius: 50%;
  color: var(--terracotta);
  font-size: .78rem;
  font-weight: 700;
}
.steps li b { display: block; font-weight: 700; }
.steps li span { color: var(--graphite-6); font-size: .9rem; }

/* ---------- 10. Выноска ---------- */
.callout {
  background: #fff;
  border: 1px solid var(--graphite-8);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow);
}
.callout h3 { color: var(--blue); }
.callout--warn { border-top-color: var(--terracotta); }
.callout--warn h3 { color: var(--terracotta); }
.callout__note {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--graphite-8);
  font-size: .89rem;
  color: var(--graphite-6);
}

/* ---------- 11. Список блюд ---------- */
.dish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.dish-list li {
  display: grid;
  grid-template-columns: minmax(9.5rem, 13rem) 1fr;
  gap: .35rem 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--graphite-8);
  margin: 0;
}
.dish-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.dish-list b { font-family: var(--font-display); font-size: 1.12rem; }
.dish-list span { color: var(--graphite-6); font-size: .96rem; }

/* ---------- 12. Блок «текст и фотография» ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}
.split__media { margin: 0; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.split__media figcaption { font-size: .82rem; color: var(--graphite-6); margin-top: .6rem; }

/* ---------- 13. Вопросы и ответы ---------- */
.faq { max-width: 52rem; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--graphite-8);
  padding: .35rem 0;
}
.faq details[open] { padding-bottom: .4rem; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: .5rem; top: 50%;
  width: 11px; height: 11px;
  margin-top: -7px;
  border-right: 2px solid var(--terracotta);
  border-bottom: 2px solid var(--terracotta);
  transform: rotate(45deg);
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--terracotta); }
.faq__answer { padding: 0 2.5rem 1.15rem 0; color: var(--graphite-6); font-size: .98rem; }

/* ---------- 14. Подвал ---------- */
.site-footer {
  background: var(--graphite);
  color: rgba(255, 255, 255, .72);
  padding: clamp(3rem, 5vw, 4.5rem) 0 2rem;
  font-size: .92rem;
}
.site-footer h4 { color: #fff; margin-bottom: .9rem; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--gap);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
}
.footer__brand .logo { color: #fff; }
.footer__brand .logo small { color: rgba(255, 255, 255, .55); }
.footer__brand p { margin-top: 1rem; max-width: 26rem; font-size: .92rem; }

.footer__bottom { padding-top: 1.75rem; display: grid; gap: 1rem; font-size: .82rem; color: rgba(255, 255, 255, .5); }
.credits { line-height: 1.75; }
.credits b { color: rgba(255, 255, 255, .7); font-weight: 600; }

/* ---------- 15. Появление при прокрутке ----------
   Прячем блоки только если сценарий действительно
   выполнился и поставил класс js на корневой элемент.
   Без JavaScript содержимое видно сразу. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: .07s; }
.js .reveal:nth-child(3) { transition-delay: .14s; }
.js .reveal:nth-child(4) { transition-delay: .21s; }

/* ---------- 16. Адаптив ---------- */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .nav { position: static; }
  .nav__toggle { display: block; }
  .nav__list {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--graphite-8);
    box-shadow: 0 16px 32px rgba(30, 27, 22, .1);
    padding: .5rem clamp(1.1rem, 4vw, 2.5rem) 1rem;
  }
  .nav.is-open .nav__list { display: flex; }
  .nav__list .nav__link { color: var(--graphite); padding: .8rem 0; border-bottom: 1px solid var(--graphite-8); }
  .nav__list li:last-child .nav__link { border-bottom: 0; }
  .nav__link::after { display: none; }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .dish-list li { grid-template-columns: 1fr; gap: .2rem; }
  .hero { min-height: min(92svh, 720px); }
  .hero__scroll { display: none; }
}

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

@media print {
  .site-header, .hero__scroll, .site-footer { display: none; }
  body { background: #fff; }
}
