@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-cyrillic.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  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: "Yeseva One";
  src: url("fonts/yeseva-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Yeseva One";
  src: url("fonts/yeseva-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  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: #f1f2ee;
  --ink: #1e2422;
  --ink-soft: #4d5753;
  --pine: #2e4a3f;
  --cornflower: #3e5da6;
  --mist: #c8cec9;
  --mat: #ffffff;
  --display: "Yeseva One", Georgia, serif;
  --text: "Golos Text", system-ui, sans-serif;
  --measure: 38rem;
  --wide: 70rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

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

.wrap { width: min(100% - 2rem, var(--wide)); margin-inline: auto; }

/* Шапка */
.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--mist);
}
.site-name {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--pine);
  text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--pine); text-decoration: underline; text-decoration-thickness: 2px; }

main { padding-block: 3rem 4rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; color: var(--pine); margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }

.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: var(--measure); margin: 1rem 0 0; }
.meta { color: var(--ink-soft); font-size: 0.95rem; margin: 0.35rem 0 0; }

/* Отпечаток: фото с белым полем */
.print {
  margin: 0;
  background: var(--mat);
  padding: 0.75rem 0.75rem 0;
  box-shadow: 0 1px 2px rgba(30, 36, 34, 0.12), 0 8px 24px -12px rgba(30, 36, 34, 0.35);
}
.print img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--mist); }
.print figcaption { padding: 0.6rem 0.15rem 0.8rem; font-size: 0.95rem; color: var(--ink-soft); }

/* Главная: герой */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: 1rem 3.5rem;
}
.hero .print { transform: rotate(1.6deg); padding: 1rem 1rem 0; }
.hero .print img { aspect-ratio: 5 / 4; }
.hero .print figcaption { padding: 0.8rem 0.25rem 1.1rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero .print { animation: settle 900ms cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes settle {
    from { opacity: 0; transform: rotate(-3deg) translateY(12px); }
    to { opacity: 1; transform: rotate(1.6deg); }
  }
}

.section { padding-block: 2.5rem; border-top: 1px solid var(--mist); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1.75rem; }

/* Сетка альбомов */
.albums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 2rem; }
@media (max-width: 900px) { .albums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .albums { grid-template-columns: 1fr; } }
.album-link { display: block; color: inherit; text-decoration: none; }
.album-link .print { transition: transform 200ms ease; }
.album-link:hover .print { transform: translateY(-3px); }
.album-link h3 { margin-top: 0.9rem; }
.album-link:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* Заметки */
.notes { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.notes li { padding-block: 1.1rem; border-bottom: 1px solid var(--mist); }
.notes li:first-child { padding-top: 0; }
.notes a { font-family: var(--display); font-size: 1.35rem; color: var(--pine); text-decoration: none; line-height: 1.25; }
.notes a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.notes p { margin: 0.4rem 0 0; color: var(--ink-soft); }

/* Страница альбома: свободная раскладка фото */
.album-head { max-width: var(--measure); margin-bottom: 2.5rem; }
.album-text { max-width: var(--measure); margin: 1.25rem 0 0; }
.gallery { columns: 3 17rem; column-gap: 1.75rem; }
.gallery .print { break-inside: avoid; margin-bottom: 1.75rem; }
.gallery .print img { aspect-ratio: auto; }
.gallery button {
  all: unset;
  cursor: zoom-in;
  display: block;
  width: 100%;
}
.gallery button:focus-visible { outline: 2px solid var(--cornflower); outline-offset: 4px; }

/* Текст заметки */
.article { max-width: var(--measure); }
.article p { margin: 0 0 1.1rem; }
.article .print { margin: 2rem 0; }
.back { display: inline-block; margin-top: 2rem; }

/* Просмотр фото */
.viewer { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.viewer::backdrop { background: rgba(20, 26, 24, 0.97); }
.viewer[open] { display: grid; place-items: center; width: 100vw; height: 100vh; }
.viewer figure { margin: 0; display: grid; gap: 0.75rem; justify-items: center; }
.viewer img { max-width: min(92vw, 1600px); max-height: 82vh; width: auto; background: var(--mat); padding: 0.6rem; }
.viewer figcaption { color: #e6e9e6; font-size: 0.95rem; text-align: center; max-width: 40rem; padding-inline: 1rem; }
.viewer .ctrl {
  position: fixed;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(20, 26, 24, 0.6);
  color: #fff;
  font: 500 1rem var(--text);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}
.viewer .ctrl:hover { background: rgba(20, 26, 24, 0.9); }
.viewer .close { top: 1rem; right: 1rem; }
.viewer .prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.viewer .next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Подвал */
.site-foot { border-top: 1px solid var(--mist); padding-block: 1.5rem 2.5rem; color: var(--ink-soft); font-size: 0.95rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 0; }
  .hero .print { order: -1; transform: rotate(1deg); }
  main { padding-block: 2rem 3rem; }
  .viewer .prev, .viewer .next { top: auto; bottom: 1rem; transform: none; }
}

.article h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.article h1 + .meta { margin-top: 0.6rem; }
