/* pasportamira.ru — оформление. Один шрифт (Golos Text), светлый «бумажный» фон, бордовый акцент — цвет паспорта. */
@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 400 900; 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-text-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5f3ee;
  --paper: #fff;
  --ink: #17181c;
  --muted: #6d6b66;
  --line: #e3dfd6;
  --accent: #8e1b2e;
  --accent-soft: #f3e6e8;
  --radius: 14px;
  --gutter: 16px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 132px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.short { display: none; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* шапка */
.header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.logo__mark { width: 24px; height: 31px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; }
.logo__mark rect { fill: var(--accent-soft); }
.nav { display: flex; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* заголовок страницы */
.hero { padding-top: 44px; padding-bottom: 28px; }
.hero h1 { font-size: clamp(30px, 5.2vw, 56px); font-weight: 800; max-width: 16ch; }
.hero__lead { margin: 14px 0 0; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 52ch; }

/* поиск и алфавит — прилипают к верху при прокрутке */
.toolbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.toolbar__in { display: flex; align-items: center; gap: 10px 20px; padding-top: 10px; padding-bottom: 10px; }
.search { display: flex; align-items: center; gap: 8px; flex: 0 0 260px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--muted); }
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--ink); height: 44px; outline: none; }
.abc { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.abc::-webkit-scrollbar { display: none; }
.abc a { flex: none; display: grid; place-items: center; min-width: 31px; height: 40px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.abc a:hover, .abc a.is-active { background: var(--ink); color: #fff; }
.abc a.is-off { opacity: .25; pointer-events: none; }

/* буквы и сетка обложек */
.letter { padding-top: 36px; }
.letter__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.letter__char { font-size: 34px; font-weight: 800; color: var(--accent); }
.letter__count { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.card__img { aspect-ratio: 7 / 10; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; transition: transform .2s, box-shadow .2s; }
.card__img img { max-height: 100%; width: auto; object-fit: contain; border-radius: 3px; box-shadow: 0 6px 14px rgba(23, 24, 28, .16); }
.card:hover .card__img { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23, 24, 28, .08); }
.card__name { font-weight: 600; font-size: 15px; line-height: 1.3; text-align: center; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.card:hover .card__name { color: var(--accent); }
.empty { padding: 48px 0; color: var(--muted); font-size: 18px; text-align: center; }

/* страница-список */
.cols { columns: 4 230px; column-gap: 32px; padding-top: 12px; }
.col { break-inside: avoid; padding-top: 28px; }
.col .letter__head { margin-bottom: 8px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: inline-block; padding: 6px 0; color: var(--ink); text-decoration: none; font-size: 17px; }
.row:hover { color: var(--accent); text-decoration: underline; }

/* прислать обложку */
.send { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 24px; }
.form, .thanks { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input:not([type=file]), .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; min-height: 48px; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--paper); }
.field input[type=file] { font: inherit; font-size: 15px; width: 100%; }
.field input[type=file]::file-selector-button { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 14px; margin-right: 12px; cursor: pointer; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.field.is-error input, .field.is-error textarea { border-color: #c4253c; }
.hp { position: absolute; left: -9999px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: #6f1423; color: #fff; }
.btn:disabled { opacity: .6; cursor: default; }
.btn--ghost { background: var(--accent-soft); color: var(--accent); }
.btn--ghost:hover { background: var(--accent); }
.form__status { margin: 14px 0 0; min-height: 1.5em; font-weight: 500; }
.form__status.is-ok { color: #1f7a3d; }
.form__status.is-err { color: #c4253c; }
.form.is-sent .field, .form.is-sent .btn { display: none; }
.thanks h2 { font-size: 24px; margin-bottom: 8px; }
.thanks p { margin: 0 0 18px; color: var(--muted); }
.thanks__btn { gap: 8px; }
.thanks__btn .ico { width: 20px; height: 20px; }
.thanks__btn.is-done { background: var(--accent); color: #fff; cursor: default; }
.thanks__btn.is-done .ico { fill: currentColor; }
.thanks__btn.is-pop .ico { animation: pop .5s ease; }
@keyframes pop { 40% { transform: scale(1.45); } }
.thanks .thanks__count { margin: 14px 0 0; color: var(--ink); }
.thanks__count b { font-weight: 800; color: var(--accent); }
.thanks .thanks__mail { margin: 18px 0 0; font-size: 15px; }

/* подвал */
.footer { margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer__in { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 32px; }
.footer a { color: var(--ink); }
.share a { margin-left: 10px; }

/* обложка крупно */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(15, 15, 18, .94); color: #fff; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 16px 24px; max-height: 100dvh; }
.lightbox__fig img { max-height: calc(100dvh - 150px); max-width: min(92vw, 640px); width: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox__fig figcaption { font-size: 18px; font-weight: 600; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font: 400 32px/1 var(--font); cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* планшет */
@media (max-width: 900px) {
  .send { grid-template-columns: 1fr; }
  .search { flex-basis: 240px; }
}
/* телефон */
@media (max-width: 640px) {
  html { scroll-padding-top: 120px; }
  .header__in { justify-content: center; }
  .nav { width: 100%; }
  .nav a { flex: 1; justify-content: center; padding: 0 8px; font-size: 15px; }
  .nav .long { display: none; }
  .nav .short { display: inline; }
  .hero { padding-top: 28px; padding-bottom: 20px; }
  .toolbar__in { flex-direction: column; align-items: stretch; gap: 6px; }
  .search { flex: none; }
  .abc { margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
  .card { gap: 6px; }
  .card__img { padding: 7px; border-radius: 10px; }
  .card__img img { box-shadow: 0 3px 8px rgba(23, 24, 28, .16); }
  .card__name { font-size: 13px; }
  .letter { padding-top: 28px; }
  .cols { columns: 2; column-gap: 16px; }
  .row { font-size: 16px; padding: 7px 0; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
  .lightbox__fig { padding-bottom: 84px; }
  .lightbox__fig img { max-height: calc(100dvh - 200px); }
  .footer__in { flex-direction: column; }
  .share a { margin: 0 10px 0 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
