/* ============ Базовые стили ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background-color: var(--bg);
}

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

h1,
h2,
h3,
h4 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
  font-weight: 400;
}

p,
li,
figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: rgba(181, 68, 44, 0.22);
  color: var(--ink);
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============ Дизайн-токены ============ */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.6rem, 1rem + 6vw, 6.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --bg: #f7f5ef;
  --surface: #fffdf8;
  --ink: #232733;
  --ink-deep: #1a1e29;
  --muted: #5d6470;
  --faint: #9aa0aa;
  --line: #e3ded1;
  --accent: #b5442c;
  --accent-soft: #f0ddd6;
  --paper-on-dark: #f4f1e8;

  --font-display: 'Prata', 'Georgia', serif;
  --font-body: 'Golos Text', 'Segoe UI', sans-serif;

  --shadow-sm: 0 1px 2px rgba(35, 39, 51, 0.06);
  --shadow-md: 0 4px 14px rgba(35, 39, 51, 0.08);
  --shadow-lg: 0 16px 40px rgba(26, 30, 41, 0.14);

  --radius-md: 10px;
  --radius-lg: 16px;

  --content: 1100px;
}

/* ============ Шапка ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 239, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--content);
  margin-inline: auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  color: var(--ink);
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  align-self: center;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  gap: var(--space-6);
}

.nav a {
  font-size: var(--text-sm);
  color: var(--muted);
  letter-spacing: 0.01em;
}

.nav a:hover {
  color: var(--accent);
}

.nav a[aria-current='page'] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* ============ Герой ============ */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  color: var(--paper-on-dark);
  isolation: isolate;
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(20, 24, 34, 0.72) 0%,
    rgba(20, 24, 34, 0.25) 45%,
    rgba(20, 24, 34, 0.18) 100%
  );
}

.hero-content {
  max-width: var(--content);
  margin-inline: auto;
  padding: var(--space-24) var(--space-6) var(--space-16);
  width: 100%;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: var(--space-4);
}

.hero-kicker::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  font-size: var(--text-hero);
  line-height: 1.05;
  max-width: 12ch;
}

.hero-sub {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  line-height: 1.5;
  max-width: 46ch;
  color: rgba(244, 241, 232, 0.88);
}

.hero-small {
  min-height: 46vh;
}

/* ============ Общие блоки ============ */
.section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}

.container {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section-head {
  margin-bottom: var(--space-10);
  max-width: 720px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.kicker::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.section-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.lead {
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.55;
  font-weight: 400;
}

/* ============ Факты ============ */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.fact {
  background: var(--bg);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.fact-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--accent);
}

.fact-label {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ============ Карточки-ссылки ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body {
  padding: var(--space-5) var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.card-num {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}

.card-title {
  font-size: var(--text-lg);
}

.card-text {
  font-size: var(--text-sm);
  color: var(--muted);
  flex: 1;
}

.card-more {
  font-size: var(--text-sm);
  color: var(--accent);
}

/* ============ Фото-галерея ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}

.figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.figure:hover img {
  transform: scale(1.03);
}

.figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-8) var(--space-4) var(--space-3);
  color: var(--paper-on-dark);
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
  background: linear-gradient(to top, rgba(20, 24, 34, 0.75), transparent);
}

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-8 { grid-column: span 8; }

.tall { aspect-ratio: 4 / 3; }

/* ============ Редакционные секции ============ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.split > *,
.spot > * {
  min-width: 0;
}

.split-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.split-img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.split h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.split p + p {
  margin-top: var(--space-4);
}

/* ============ Места для фото ============ */
.spot {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: start;
  padding-block: var(--space-12);
}

.spot:nth-child(even) .spot-img {
  order: -1;
}

.spot-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.spot-img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.spot h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.spot-jp {
  font-size: var(--text-xs);
  color: var(--faint);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.spot p + p {
  margin-top: var(--space-3);
}

.spot-tips {
  margin-top: var(--space-5);
  border-left: 3px solid var(--accent);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.spot-tips strong {
  color: var(--accent);
  font-weight: 600;
}

/* ============ Таблица ============ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
}

th,
td {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-base);
  background: var(--bg);
}

tr:last-child td {
  border-bottom: none;
}

td:first-child {
  color: var(--ink);
}

.reco {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

/* ============ Карта ============ */
.map-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

#map {
  height: 520px;
  background: #e8e4da;
}

.map-note {
  font-size: var(--text-xs);
  color: var(--faint);
  margin-top: var(--space-3);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--muted);
}

.legend-swatch {
  width: 18px;
  height: 3px;
  border-radius: 2px;
}

/* ============ Заметки-советы ============ */
.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.note h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.note ul {
  list-style: none;
}

.note li {
  padding-left: var(--space-6);
  position: relative;
  color: var(--muted);
}

.note li + li {
  margin-top: var(--space-3);
}

.note li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============ Цитата ============ */
.pullquote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.45;
  max-width: 34ch;
  padding-left: var(--space-6);
  border-left: 3px solid var(--accent);
  color: var(--ink);
}

/* ============ Подвал ============ */
.footer {
  background: var(--ink-deep);
  color: rgba(244, 241, 232, 0.75);
  padding-block: var(--space-16);
  margin-top: var(--space-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-10);
}

.footer h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-lg);
  color: var(--paper-on-dark);
  margin-bottom: var(--space-4);
}

.footer p,
.footer li {
  font-size: var(--text-sm);
  color: rgba(244, 241, 232, 0.65);
}

.footer a {
  color: rgba(244, 241, 232, 0.85);
  text-decoration: underline;
  text-decoration-color: rgba(181, 68, 44, 0.7);
  text-underline-offset: 3px;
}

.footer a:hover {
  color: #fff;
}

.footer-credits {
  max-width: 62ch;
}

.footer-credits li + li {
  margin-top: var(--space-2);
}

.footer-nav {
  list-style: none;
}

.footer-nav li + li {
  margin-top: var(--space-3);
}

.footer-bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(244, 241, 232, 0.12);
  font-size: var(--text-xs);
  color: rgba(244, 241, 232, 0.45);
}

/* ============ Адаптив ============ */
@media (max-width: 900px) {
  .cards,
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .split,
  .spot {
    grid-template-columns: 1fr;
  }
  .spot:nth-child(even) .spot-img {
    order: 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .span-7,
  .span-5,
  .span-6,
  .span-4,
  .span-8 {
    grid-column: span 12;
  }
  .tall {
    aspect-ratio: auto;
  }
}

@media (max-width: 620px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .brand-sub {
    display: none;
  }
  .nav {
    gap: var(--space-4);
  }
  .nav a {
    font-size: var(--text-xs);
  }
  #map {
    height: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
