/* Горизонталь — стили */

@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/pt-serif-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/pt-serif-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "PT Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/pt-serif-cyrillic-400-italic.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "PT Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/pt-serif-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/pt-serif-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/pt-serif-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "PT Sans Narrow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/pt-sans-narrow-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "PT Sans Narrow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/pt-sans-narrow-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "PT Sans Narrow"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/pt-sans-narrow-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "PT Sans Narrow"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/pt-sans-narrow-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --paper: #eef1ea;
  --paper-2: #e2e8dc;
  --ink: #1d2a2e;
  --ink-soft: #4d5b5f;
  --rule: #c9d1c3;
  --contour: #a06d3e;
  --contour-soft: #c79a70;
  --water: #2c6d93;
  --water-fill: #b9d3df;
  --route: #c2302a;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --narrow: "PT Sans Narrow", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #182225;
    --paper-2: #1f2c30;
    --ink: #e4e8e0;
    --ink-soft: #a7b3ae;
    --rule: #33434a;
    --contour: #b98556;
    --contour-soft: #7d5e43;
    --water: #7fb6d3;
    --water-fill: #274a5c;
    --route: #ef6a5c;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: var(--water); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--route);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }

/* Шапка */
.site-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-block: 1.1rem;
  font-family: var(--narrow);
  font-size: 1.15rem;
}
.site-head .logo {
  font-weight: 700; font-size: 1.45rem; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: .5rem;
}
.site-head .logo svg { width: 1.6rem; height: 1.6rem; }
.site-head nav { display: flex; gap: 1.4rem; }
.site-head nav a { color: var(--ink); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--route); }

/* Главный экран с картой */
.hero {
  position: relative;
  min-height: min(78vh, 46rem);
  display: grid;
  align-items: start;
  overflow: hidden;
  border-block: 1px solid var(--rule);
  background: var(--paper);
}
.hero .map {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-text {
  position: relative;
  padding-block: clamp(2.5rem, 7vh, 4.5rem) 3rem;
}
.hero h1 {
  margin: 0;
  font-family: var(--narrow);
  font-weight: 700;
  font-size: clamp(3.6rem, 11vw, 9rem);
  line-height: .86;
  letter-spacing: -0.015em;
  color: var(--ink);
  /* ореол как у подписей на топокарте */
  text-shadow:
    0 0 .06em var(--paper), 0 0 .06em var(--paper), 0 0 .12em var(--paper),
    .03em .03em 0 var(--paper), -.03em -.03em 0 var(--paper), .03em -.03em 0 var(--paper), -.03em .03em 0 var(--paper);
}
.hero p {
  margin: 1.2rem 0 0;
  max-width: 30rem;
  font-size: 1.2rem;
  line-height: 1.5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  padding: .35rem .6rem .45rem;
  margin-left: -.6rem;
  border-radius: 3px;
}

/* SVG карты */
.c { fill: none; stroke: var(--contour-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.c-idx { fill: none; stroke: var(--contour); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.lake { fill: var(--water-fill); stroke: var(--water); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.stream { fill: none; stroke: var(--water); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.route { fill: none; stroke: var(--route); stroke-width: 3.2; stroke-dasharray: 10 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.route-mask { fill: none; stroke: #fff; stroke-width: 30; stroke-linecap: round; }
.camp { fill: var(--route); stroke: var(--paper); stroke-width: 2; }
.peak { fill: var(--ink); }
.map-label {
  font-family: var(--serif); font-style: italic; font-size: 17px; fill: var(--ink);
  paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round;
}
.map-label.h { font-style: normal; font-family: var(--narrow); font-size: 16px; }
.map-label.w { fill: var(--water); }

@media (prefers-reduced-motion: no-preference) {
  .route-mask {
    stroke-dasharray: var(--len);
    stroke-dashoffset: var(--len);
    animation: draw 2.6s .4s cubic-bezier(.45,.05,.3,1) forwards;
  }
  .camp, .route-labels { opacity: 0; animation: appear .5s 2.7s ease-out forwards; }
}
@media (prefers-reduced-motion: reduce) {
  .route-mask { stroke-dasharray: none; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* Список отчётов */
.section { padding-block: 3.5rem; }
.section h2 {
  font-family: var(--narrow); font-weight: 700;
  font-size: 2.2rem; line-height: 1.1; margin: 0 0 1.5rem;
}
.log { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.log li {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) 15rem;
  gap: .5rem 2rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.log .when { font-family: var(--narrow); font-size: 1.05rem; line-height: 1.35; color: var(--ink-soft); }
.log .when strong { display: block; color: var(--ink); font-weight: 700; }
.log h3 { margin: 0 0 .35rem; font-family: var(--narrow); font-weight: 700; font-size: 1.7rem; line-height: 1.12; }
.log h3 a { color: var(--ink); text-decoration: none; }
.log h3 a:hover { color: var(--water); text-decoration: underline; text-decoration-thickness: 2px; }
.log p { margin: 0; color: var(--ink-soft); max-width: 36rem; }
.log .figs { font-family: var(--narrow); font-size: 1.05rem; color: var(--ink-soft); }
.log .figs svg { display: block; width: 100%; height: auto; margin-bottom: .4rem; }

.spark-line { fill: none; stroke: var(--contour); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark-fill { fill: var(--paper-2); }

.aside {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 2rem;
}
.aside p { margin: 0 0 1rem; max-width: var(--measure); }

/* Статья */
.post-head { padding-block: 2.5rem 1rem; }
.post-head .where { font-family: var(--narrow); font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 .6rem; }
.post-head h1 {
  font-family: var(--narrow); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.01em;
  margin: 0 0 1.2rem; max-width: 18ch;
}
.lead { font-size: 1.3rem; line-height: 1.55; max-width: var(--measure); margin: 0; }

.facts {
  display: flex; flex-wrap: wrap; gap: 1rem 2.8rem;
  margin: 2rem 0 0; padding: 1.1rem 0 0; border-top: 2px solid var(--ink);
  font-family: var(--narrow);
}
.facts div { min-width: 7rem; }
.facts dt { font-size: 1rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-size: 1.7rem; font-weight: 700; line-height: 1.15; }

.profile-box { margin: 2rem 0 0; }
.profile-box figcaption { font-family: var(--narrow); font-size: 1rem; color: var(--ink-soft); margin-top: .3rem; }
.profile-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.profile { width: 100%; min-width: 40rem; height: auto; display: block; overflow: visible; }
.p-grid { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.p-fill { fill: var(--paper-2); }
.p-line { fill: none; stroke: var(--contour); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.p-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.p-tick { font-family: var(--narrow); font-size: 14px; fill: var(--ink-soft); }
.p-lbl {
  font-family: var(--narrow); font-size: 16px; font-weight: 700; fill: var(--ink);
  paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round;
}
.p-night { stroke: var(--route); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.p-night-lbl { font-family: var(--narrow); font-size: 14px; fill: var(--route); }

.prose { max-width: var(--measure); padding-bottom: 2rem; }
.prose h2 {
  font-family: var(--narrow); font-weight: 700; font-size: 1.9rem; line-height: 1.15;
  margin: 2.6rem 0 .8rem;
}
.prose h3 { font-family: var(--narrow); font-weight: 700; font-size: 1.4rem; margin: 1.8rem 0 .4rem; }
.prose p { margin: 0 0 1.1rem; hyphens: auto; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--contour); }
.prose ol.days { list-style: none; padding: 0; counter-reset: day; }
.prose ol.days > li {
  counter-increment: day;
  position: relative; padding-left: 4.2rem; margin-bottom: 1.4rem;
}
.prose ol.days > li::before {
  content: "День " counter(day);
  position: absolute; left: 0; top: .15rem;
  font-family: var(--narrow); font-weight: 700; font-size: 1rem; line-height: 1.2;
  width: 3.4rem; color: var(--route);
}
.prose ol.days strong { font-family: var(--narrow); font-size: 1.2rem; }
.note {
  border-left: 3px solid var(--water);
  background: var(--paper-2);
  padding: .9rem 1.1rem; margin: 1.6rem 0;
}
.note p:last-child { margin-bottom: 0; }

.post-foot {
  border-top: 1px solid var(--rule); padding-block: 1.6rem 3rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-family: var(--narrow); font-size: 1.15rem;
}

/* Подвал */
.site-foot {
  border-top: 2px solid var(--ink);
  padding-block: 1.6rem 2.4rem;
  font-family: var(--narrow); font-size: 1.05rem; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem;
}
.site-foot a { color: var(--ink-soft); }

/* 404 */
.lost { position: relative; min-height: 70vh; display: grid; align-items: center; overflow: hidden; border-block: 1px solid var(--rule); }
.lost .map { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.lost .wrap { position: relative; }
.lost h1 { font-family: var(--narrow); font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; margin: 0 0 1rem;
  text-shadow: 0 0 .1em var(--paper), 0 0 .1em var(--paper), 0 0 .2em var(--paper); }
.lost p { max-width: 28rem; background: color-mix(in srgb, var(--paper) 90%, transparent); padding: .4rem .6rem; margin: 0 0 1.2rem -.6rem; }
.btn {
  display: inline-block; font-family: var(--narrow); font-weight: 700; font-size: 1.2rem;
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: .55rem 1.2rem .6rem; border-radius: 3px;
}
.btn:hover { background: var(--water); color: #fff; }

@media (max-width: 52rem) {
  .log li { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .log .when strong { display: inline; margin-right: .5rem; }
  .log .figs { max-width: 18rem; }
  .aside { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
}
@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  .site-head { flex-wrap: wrap; }
  .hero { min-height: 72vh; align-items: end; }
  .hero p { font-size: 1.08rem; }
  .prose ol.days > li { padding-left: 0; padding-top: 1.5rem; }
  .prose ol.days > li::before { width: auto; }
}
