@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/literata-italic-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/literata-italic-latin.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: 'Literata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/literata-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/literata-normal-latin.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: 'Literata';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/literata-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/literata-normal-latin.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: 'Sofia Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/sofia-sans-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Sofia Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/sofia-sans-normal-latin.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: 'Sofia Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/sofia-sans-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Sofia Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/sofia-sans-normal-latin.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: 'Sofia Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/sofia-sans-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Sofia Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/sofia-sans-normal-latin.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: 'Sofia Sans Extra Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/sofia-sans-extra-condensed-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/sofia-sans-extra-condensed-normal-latin.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: 'Sofia Sans Extra Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/sofia-sans-extra-condensed-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/sofia-sans-extra-condensed-normal-latin.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: 'Sofia Sans Extra Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/sofia-sans-extra-condensed-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Sofia Sans Extra Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/sofia-sans-extra-condensed-normal-latin.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;
}

/* alexanderpavlov.ru — дневник поездок */
:root {
  --bg: #F4F5F6;
  --paper: #FFFFFF;
  --ink: #171A1D;
  --muted: #6B7178;
  --line: #DCE0E4;
  --accent: #0E7A8A;
  --cond: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  --sans: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Literata', Georgia, serif;
  --pad: clamp(16px, 4vw, 40px);
  --stripH: 48px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* шапка */
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.me { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.me img { width: 36px; height: 36px; border-radius: 50%; }
.menu { display: flex; gap: 22px; font-weight: 500; }
.menu a, .social a, .back { transition: color .15s; }
.menu a:hover, .social a:hover, .back:hover { color: var(--accent); }

/* главная: вступление и годы */
.intro { padding-top: clamp(24px, 6vw, 72px); padding-bottom: 28px; }
.intro h1 { font-weight: 500; font-size: clamp(22px, 3.2vw, 34px); line-height: 1.2; max-width: 22em; letter-spacing: -.005em; }
.social { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 14px; color: var(--muted); font-weight: 500; }
.social a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; text-decoration-thickness: 1px; }

.years { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.years-in { display: flex; gap: 4px; height: var(--stripH); align-items: center; overflow-x: auto; scrollbar-width: none; }
.years-in::-webkit-scrollbar { display: none; }
.years a { flex: none; font: 700 20px/1 var(--cond); padding: 8px 10px; border-radius: 6px; color: var(--muted); }
.years a:hover { color: var(--ink); }
.years a.on { color: var(--paper); background: var(--ink); }

.trips { padding-top: 8px; }
#trips { scroll-margin-top: 0; }
.year { padding: 36px 0 20px; scroll-margin-top: var(--stripH); }
.year + .year { border-top: 1px solid var(--line); }
.yr {
  font: 800 clamp(84px, 24vw, 120px)/.78 var(--cond); letter-spacing: -.02em;
  margin: 0 0 20px -.04em; font-variant-numeric: tabular-nums;
}
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
.cards-one .card { grid-column: span 2; }

.card { display: block; }
.card-ph { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 6px; background: var(--line); }
.card-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-ph img { transform: scale(1.03); }
.card-city { display: block; margin-top: 9px; font: 700 23px/1.05 var(--cond); letter-spacing: .005em; transition: color .15s; }
.card:hover .card-city { color: var(--accent); }
.card-sub { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; font-size: 14px; color: var(--muted); }

@media (min-width: 900px) {
  :root { --yr: clamp(96px, 9vw, 128px); --yrCol: calc(var(--yr) * 1.8); }
  .year { display: grid; grid-template-columns: var(--yrCol) minmax(0, 1fr); gap: 40px; padding: 48px 0 32px; }
  .yr { position: sticky; top: calc(var(--stripH) + 28px); align-self: start; font-size: var(--yr); margin: 0 0 0 -.04em; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 32px 24px; }
  .cards-one .card { grid-column: auto; }
  .card-city { font-size: 27px; margin-top: 11px; }
  .card-sub { font-size: 15px; }
}

/* отзывы на главной */
.reviews { padding-top: 56px; padding-bottom: 48px; }
.sec { font: 800 clamp(52px, 13vw, 120px)/.85 var(--cond); letter-spacing: -.015em; margin-bottom: 24px; }
.rv li { border-top: 1px solid var(--line); }
.rv li:last-child { border-bottom: 1px solid var(--line); }
.rv a { display: grid; gap: 2px; padding: 16px 0; }
.rv time { font-size: 14px; color: var(--muted); }
.rv-t { font-weight: 600; font-size: 19px; line-height: 1.3; transition: color .15s; }
.rv a:hover .rv-t { color: var(--accent); }
.rv-x { color: var(--muted); font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) {
  .reviews { display: grid; grid-template-columns: var(--yrCol) minmax(0, 1fr); gap: 40px; padding-top: 80px; }
  .sec { font-size: 64px; position: sticky; top: 28px; align-self: start; margin: 0; }
  .rv a { grid-template-columns: 150px minmax(0, 1fr); column-gap: 24px; padding: 20px 0; }
  .rv time { grid-row: span 2; padding-top: 3px; font-size: 15px; }
  .rv-t { font-size: 20px; }
  .rv-x { max-width: 46em; }
}

/* страница поездки */
.head { padding-top: clamp(12px, 3vw, 32px); padding-bottom: clamp(20px, 4vw, 40px); }
.back { display: inline-block; color: var(--muted); font-weight: 500; padding: 6px 0; }
.title { font: 800 clamp(64px, 15vw, 176px)/.82 var(--cond); letter-spacing: -.02em; margin: 14px 0 0 -.04em; overflow-wrap: anywhere; }
.when { margin-top: 14px; color: var(--muted); font-size: 17px; }
.videos { max-width: 1180px; margin-bottom: clamp(12px, 2vw, 24px); display: grid; gap: 12px; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: 6px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.photos { display: grid; gap: clamp(8px, 2vw, 28px); padding: 0 clamp(6px, 2vw, 40px); justify-items: center; }
.ph { width: min(100%, 1140px, calc(88vh * var(--r))); width: min(100%, 1140px, calc(88svh * var(--r))); aspect-ratio: var(--r); }
.ph a { display: block; height: 100%; cursor: zoom-in; border-radius: 3px; overflow: hidden; background: var(--line); }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* соседние поездки и отзывы */
.nb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 56px; padding-bottom: 32px; }
.nb-next { grid-column: 2; }
.nb-l { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.nb-next .nb-l { text-align: right; }
@media (min-width: 900px) {
  .nb { max-width: 820px; gap: 24px; padding-top: 80px; }
}
.nb-text a { display: block; padding: 16px 0; border-top: 1px solid var(--line); }
.nb-text .nb-next { text-align: right; }
.nb-t { display: block; font: 700 23px/1.1 var(--cond); transition: color .15s; }
.nb-text a:hover .nb-t { color: var(--accent); }

/* отзыв */
.essay { max-width: calc(38em + 2 * var(--pad)); padding-top: clamp(12px, 3vw, 32px); }
.title-essay { font-size: clamp(48px, 11vw, 96px); line-height: .9; }
.text { margin-top: 32px; font: 400 18px/1.75 var(--serif); }
.text p + p { margin-top: 1em; }
.text a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.comments { margin-top: 48px; }
.essay-page .nb { max-width: calc(38em + 2 * var(--pad)); }
@media (min-width: 900px) { .text { font-size: 19px; } }

/* кнопка «Наверх» на странице поездки */
.up { position: fixed; z-index: 20; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); padding: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(23, 26, 29, .12);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s, transform .2s, visibility .2s, color .15s; }
.up.on { opacity: 1; visibility: visible; transform: none; }
.up:hover { color: var(--accent); }
.up svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 900px) { .up { right: 28px; bottom: 28px; width: 52px; height: 52px; } }

/* подвал */
.foot { margin-top: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-top: 24px; padding-bottom: 32px; }
.foot .social { margin: 0; }

/* просмотр фото */
.lb { position: fixed; inset: 0; z-index: 100; background: #0C0E10; color: #fff;
  display: flex; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.lb[hidden] { display: none; }
.lb-img { max-width: 100vw; max-height: 100vh; max-height: 100svh; width: auto; height: auto; object-fit: contain; transition: transform .25s ease, opacity .2s; }
@media (min-width: 900px) { .lb-img { max-width: calc(100vw - 160px); max-height: calc(100vh - 96px); } }
.lb button { position: absolute; border: 0; background: none; color: #fff; cursor: pointer; padding: 0;
  width: 56px; height: 56px; display: grid; place-items: center; opacity: .8; border-radius: 50%; }
.lb button:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.lb button svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-x { top: 8px; right: 8px; }
.lb-p { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-n { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-c { position: absolute; top: 22px; left: 20px; font-size: 15px; opacity: .75; font-variant-numeric: tabular-nums; }
@media (hover: none) and (max-width: 899px) { .lb-p, .lb-n { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
