/* =========================================================================
   Версты — travel-magazine baseline (заход 1).
   Палитра: хвоя + терракот на айвори. Заголовки — serif (цель: Lora,
   заход 1 — системный serif-стек, woff2 — заход 3). Ноль внешних запросов.
   ========================================================================= */

:root {
  --bg: #faf7f0;          /* айвори / слоновая кость */
  --surface: #ffffff;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --accent: #2f5d50;      /* хвоя / тёмно-зелёный */
  --accent-2: #b5562f;    /* терракот */
  --line: #e7e0d3;        /* тёплый hairline */
  --shadow: 0 6px 20px rgba(43, 43, 43, .08);

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --maxw: 1120px;
  --prose: 70ch;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .5rem 1rem;
  z-index: 10;
}
.skip:focus { left: .5rem; top: .5rem; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / masthead (центр) ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.masthead {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem 1.25rem 1.1rem;
  text-align: center;
}
.brand {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.9rem);
  letter-spacing: .14em;
  color: var(--ink);
  text-transform: uppercase;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-tagline {
  margin: .25rem 0 0;
  font-size: .82rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav {
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .15rem .5rem;
}
.nav-item {
  color: var(--ink);
  font-size: .92rem;
  letter-spacing: .04em;
  padding: .15rem .25rem;
}
.nav-item:hover { color: var(--accent); text-decoration: none; }
.nav-item.is-active {
  color: var(--accent-2);
  border-bottom: 2px solid var(--accent-2);
}
.nav-sep { color: var(--line); user-select: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-bottom: 2.5rem;
}
.hero-photo {
  height: clamp(260px, 42vw, 460px);
  background:
    linear-gradient(135deg, rgba(47, 93, 80, .82), rgba(181, 86, 47, .72)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 14px, transparent 14px 28px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo .ph-label { color: rgba(255, 255, 255, .85); border-color: rgba(255,255,255,.5); }
.hero-text {
  max-width: var(--maxw);
  margin: -3.5rem auto 0;
  padding: 1.75rem 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  width: calc(100% - 2.5rem);
}
.hero-text h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
}
.hero-text .lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 60ch;
}

/* ---------- Sections / titles ---------- */
section { margin: 2.5rem 0; }
.section-title {
  font-size: 1.5rem;
  margin: 0 0 1.1rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--line);
}
.page-title { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 2rem 0 .5rem; }
.page-intro { color: var(--muted); margin: 0 0 2rem; max-width: 65ch; }
.empty, .region-blurb { color: var(--muted); }

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(43, 43, 43, .13);
}
.card-photo {
  aspect-ratio: 3 / 2;
  background:
    linear-gradient(135deg, #eee7d6, #e3d8c2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.card-meta {
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.card-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.card-blurb { color: var(--muted); font-size: .92rem; }

/* Real <img> variants (заход 2): same box as the placeholder, cropped cover. */
img.card-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  background: linear-gradient(135deg, #eee7d6, #e3d8c2); /* shows while loading */
}
img.hero-photo {
  display: block;
  width: 100%;
  height: clamp(260px, 42vw, 460px);
  object-fit: cover;
}
img.post-cover {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1.5;
  height: auto;
  object-fit: cover;
}

/* Photo placeholder label (frame look until real images, заход 2) */
.ph-label {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed currentColor;
  border-radius: 4px;
  padding: .35rem .7rem;
  background: rgba(255, 255, 255, .35);
}

/* ---------- Region sections ---------- */
.region { margin: 2.5rem 0; }
.region-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: .4rem;
  margin-bottom: .6rem;
}
.region-head h2 { margin: 0; font-size: 1.45rem; }
.region-count { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.region-blurb { margin: 0 0 1.2rem; max-width: 65ch; }

/* ---------- Post ---------- */
.post { margin: 1.5rem 0 0; }
.back { margin: 1.5rem 0 .75rem; font-size: .9rem; }
.post-cover {
  aspect-ratio: 3 / 1.5;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(47,93,80,.6), rgba(181,86,47,.55));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.post-cover .ph-label { color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.55); background: rgba(0,0,0,.05); }
.post-head { max-width: var(--prose); margin: 0 auto 1.5rem; }
.post-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.6rem); margin: 0 0 .5rem; }
.post-meta { color: var(--muted); font-size: .92rem; margin: 0; }
.badge {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 4px;
  padding: .05rem .4rem;
}

/* ---------- Prose ---------- */
.prose { max-width: var(--prose); margin: 0 auto; }
.prose > * { margin-left: auto; margin-right: auto; }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.prose h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); }

.related { max-width: var(--maxw); margin: 3rem auto 0; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 0 2.5rem;
  text-align: center;
}
.footer-brand {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 .25rem;
}
.footer-note { color: var(--muted); margin: 0 0 .5rem; font-size: .92rem; }
.footer-links { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero-text { margin-top: -2rem; padding: 1.25rem; }
  .nav { gap: .1rem .35rem; }
  .nav-item { font-size: .85rem; }
}
