/* VolunTrack — дизайн-система: мотив компаса из логотипа, цвета из логотипа и волонтёрских футболок */

:root {
  /* Цвет: тёмный верх и низ, белая середина, один кобальтовый акцент */
  --night: #080D1C;
  --night-2: #111A33;
  --night-3: #1A2747;
  --on-night: #FFFFFF;
  --on-night-soft: #AEB8CE;
  --paper: #FFFFFF;
  --paper-2: #EEF2F9;
  --paper-3: #DFE6F3;
  --ink: #0B1530;
  --ink-soft: #4A5675;
  --accent: #1F5BC4;          /* кобальт логотипа — кнопки и мотив */
  --accent-deep: #17479C;
  --accent-bright: #5B91F2;   /* ссылки на тёмном фоне */
  --tint-1: #1F5BC4;
  --tint-2: #3A74D6;
  --tint-3: #7FA6E6;
  --tint-4: #C3D5F4;
  --red: #E2382F;             /* красный волонтёрских футболок — сторона организаций */
  --red-deep: #B92A22;

  /* Шрифт: Plus Jakarta Sans, пять ступеней */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.25rem, 1rem + 6.4vw, 6.25rem);

  /* Пространство */
  --margin: clamp(16px, 4vw, 56px);
  --gutter: clamp(16px, 2.4vw, 32px);
  --section: clamp(96px, 12vw, 200px);
  --max: 1440px;

  /* Движение */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; }
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea { caret-color: var(--accent); }
.tabular { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--margin); }
.on-night { background: var(--night); color: var(--on-night); }
.on-night ::selection { background: var(--accent-bright); color: var(--night); }

.display { font-weight: 700; font-size: var(--step-display); line-height: 0.92; letter-spacing: -0.03em; text-transform: uppercase; }
.head { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.lead { font-size: var(--step-lead); line-height: 1.4; }
/* В азербайджанском у заглавных есть точки и умлауты (İ, Ö, Ü) — им нужен воздух между строками */
:lang(az) :is(.display, .head, .step__text h3, .tile--main h2, .index__row, .auth h1, .modal h2, .footer-mark__word) { line-height: 1.08; }
.small { font-size: var(--step-small); line-height: 1.5; }
.soft { color: var(--ink-soft); }
.on-night .soft { color: var(--on-night-soft); }

/* ---------- Кнопки: круглые, как кольцо компаса ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 500; font-size: var(--step-body); text-decoration: none; cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; transition: transform var(--t-ui) var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--paper:hover { background: var(--paper-2); }
.btn--red { background: var(--red); }
.btn--red:hover { background: var(--red-deep); }
.btn--quiet { background: var(--paper-2); color: var(--ink); }
.btn--quiet:hover { background: var(--paper-3); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: var(--step-small); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--paper-3); color: var(--ink-soft); cursor: not-allowed; }
.link { color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color var(--t-hover) ease; }
.link:hover { text-decoration-color: currentColor; }
.on-night .link { color: var(--accent-bright); }

/* ---------- Мотив: компас ---------- */
.compass { display: block; overflow: visible; }
.compass .points, .compass .ring { fill: var(--accent); }
.compass .ring-stroke { fill: none; stroke: var(--accent); }
.compass .core { fill: var(--accent-deep); }
.star { width: 0.9em; height: 0.9em; flex: none; fill: var(--accent); }

/* ---------- Навигация ---------- */
.site-nav { position: relative; z-index: 30; background: var(--night); color: var(--on-night); }
.site-nav__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.375rem; letter-spacing: -0.02em; text-decoration: none; color: inherit; }
.wordmark img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; }
.wordmark .points, .wordmark .ring { fill: var(--accent-bright); }
.site-nav__links { display: flex; align-items: center; gap: 4px; }
.site-nav__links a { padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--on-night-soft); font-weight: 500; transition: color var(--t-hover) ease, background-color var(--t-hover) ease; }
.site-nav__links a:hover { color: var(--on-night); background: var(--night-2); }
.site-nav__links a[aria-current] { color: var(--on-night); }
.site-nav__actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; background: var(--night-2); border-radius: 999px; padding: 4px; font-size: var(--step-small); font-weight: 500; }
.lang a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--on-night-soft); transition: color var(--t-hover) ease; }
.lang a:hover { color: var(--on-night); }
.lang a[aria-current] { background: var(--paper); color: var(--ink); }
.nav-text { color: var(--on-night-soft); text-decoration: none; font-weight: 500; padding: 10px 8px; transition: color var(--t-hover) ease; }
.nav-text:hover { color: var(--on-night); }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--night-2); color: var(--on-night); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 20px; height: 20px; }
.mobile-menu { display: none; padding: 8px var(--margin) 24px; }
.mobile-menu a { display: block; padding: 14px 0; font-size: var(--step-lead); font-weight: 500; text-decoration: none; color: var(--on-night); }
.mobile-menu .mobile-menu__actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; }
.mobile-menu .mobile-menu__actions a { display: inline-flex; padding: 0 24px; font-size: var(--step-body); }
.mobile-menu .mobile-menu__actions .btn--paper { color: var(--ink); }
.mobile-menu.is-open { display: block; }
@media (max-width: 900px) {
  .site-nav__links, .site-nav__actions .hide-sm { display: none; }
  .menu-btn { display: inline-flex; }
}

/* ---------- Уведомления ---------- */
.flash-stack { display: grid; gap: 8px; padding-block: 20px 0; }
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; font-weight: 500; background: var(--paper-2); color: var(--ink); border-radius: 18px; }
.flash svg { width: 22px; height: 22px; flex: none; }
.flash--error { background: #FCE8E7; color: #8E1F19; }
.flash--success { background: #E3EEFD; color: var(--accent-deep); }

/* ---------- Главная: первый экран ---------- */
.hero { position: relative; overflow: hidden; min-height: min(calc(100svh - 76px), 900px); display: flex; align-items: center; }
.hero__copy { position: relative; z-index: 2; width: 100%; padding-block: clamp(56px, 9vw, 120px); }
.hero__copy > * { max-width: min(640px, 48vw); }
.hero__copy .display { max-width: none; font-size: clamp(2.5rem, 0.6rem + 4.4vw, 5rem); }
.hero .line { white-space: nowrap; }
.hero__lead { margin-top: 36px; color: var(--on-night-soft); font-size: var(--step-lead); line-height: 1.4; max-width: 34ch; }
.hero__actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero__art { position: absolute; z-index: 1; width: min(78vh, 44vw, 680px); aspect-ratio: 1; left: auto; right: var(--margin); top: 50%; transform: translateY(-50%); }
.hero__art .compass { width: 100%; height: 100%; }
.hero__photo { position: absolute; inset: 0; }
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; min-height: auto; }
  .hero__copy { padding-block: 64px 0; }
  .hero__copy > *, .hero__copy .display { max-width: none; }
  .hero__copy .display { font-size: 10.4vw; }
  .hero__art { position: relative; left: auto; right: auto; top: auto; transform: none; width: min(88vw, 520px); margin: 40px auto 56px; }
}

/* ---------- Разделы ---------- */
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(72px, 8vw, 128px); }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head h2 { grid-column: 1 / span 6; }
.section-head p { grid-column: 7 / span 5; }
@media (max-width: 900px) { .section-head h2, .section-head p { grid-column: 1 / -1; } }

/* ---------- Список ролей (меню в две колонки, пули-компасы) ---------- */
.finder { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px var(--gutter); margin-bottom: clamp(48px, 6vw, 88px); }
.finder__age { grid-column: 1 / span 5; background: var(--accent); color: #fff; border-radius: 28px; padding: clamp(24px, 3vw, 40px); display: grid; gap: 18px; align-content: start; }
.finder__age label { font-size: var(--step-lead); font-weight: 500; line-height: 1.25; }
.age-input { display: flex; align-items: center; gap: 14px; }
.age-input input { width: 4.2ch; font-size: var(--step-head); font-weight: 700; line-height: 1; padding: 6px 0 6px 18px; border: 0; border-radius: 999px; background: var(--paper); color: var(--ink); -moz-appearance: textfield; }
.age-input input::-webkit-outer-spin-button, .age-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.age-input input::placeholder { color: #9AA6C2; }
.age-input span { font-size: var(--step-lead); }
.finder__result { font-size: var(--step-lead); line-height: 1.3; font-weight: 500; min-height: 1.3em; }
.finder__filters { grid-column: 7 / span 6; display: grid; gap: 24px; align-content: start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips__label { width: 100%; font-weight: 500; margin-bottom: 4px; }
.chip { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: var(--step-small); font-weight: 500; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.chip:hover { background: var(--paper-3); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (max-width: 900px) { .finder__age, .finder__filters { grid-column: 1 / -1; } }

.role-group + .role-group { margin-top: clamp(80px, 8vw, 120px); }
.role-group__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.role-group__head h3 { font-size: var(--step-lead); line-height: 1.1; letter-spacing: -0.03em; text-transform: uppercase; }
.role-group__count { font-weight: 500; color: var(--ink-soft); }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
@media (max-width: 760px) { .role-list { grid-template-columns: 1fr; gap: 32px; } }
.role { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; text-decoration: none; color: inherit; border-radius: 20px; }
.role__mark { width: 56px; height: 56px; border-radius: 999px; background: var(--paper-2); display: grid; place-items: center; transition: background-color var(--t-ui) var(--ease-out); }
.role__mark .star { width: 26px; height: 26px; transition: transform 600ms var(--ease-expo); }
.role:hover .role__mark { background: var(--accent); }
.role:hover .role__mark .star { fill: #fff; transform: rotate(90deg); }
.role__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.role__title { font-size: var(--step-body); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.role:hover .role__title { text-decoration: underline; text-decoration-thickness: 2px; }
.role__deadline { flex: none; font-weight: 500; white-space: nowrap; }
.role__org { margin-top: 2px; font-weight: 500; }
.role__desc { margin-top: 6px; color: var(--ink-soft); max-width: 46ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.role__note { margin-top: 8px; color: var(--accent); font-weight: 500; font-size: var(--step-small); }
.role[hidden], .role-item[hidden], .role-group[hidden], .empty[hidden] { display: none; }
.empty { padding: clamp(40px, 5vw, 72px); background: var(--paper-2); border-radius: 28px; display: grid; gap: 16px; justify-items: start; }
.empty p { font-size: var(--step-lead); font-weight: 500; }

/* ---------- Как это работает: гармошка тонированных панелей ---------- */
.steps { display: flex; height: 540px; border-radius: 28px; overflow: hidden; }
.step { position: relative; flex: 1 1 0; min-width: 0; color: #fff; transition: flex-grow 450ms var(--ease-in-out); overflow: hidden; }
.step:nth-child(1) { background: var(--night-3); }
.step:nth-child(2) { background: var(--tint-1); }
.step:nth-child(3) { background: var(--tint-2); }
.step:nth-child(4) { background: var(--tint-3); color: var(--ink); }
.step.is-open { flex-grow: 5; }
.step__toggle { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; padding: 0; }
.step__name { position: absolute; left: 28px; bottom: 28px; font-size: var(--step-body); font-weight: 700; white-space: nowrap; transform-origin: left bottom; transform: rotate(-90deg) translate(0, 100%); transition: opacity var(--t-ui) ease; }
.step.is-open .step__name { opacity: 0; }
.step__body { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; padding: clamp(28px, 3vw, 44px); opacity: 0; visibility: hidden; transition: opacity 300ms ease 0ms, visibility 0s linear 300ms; }
.step.is-open .step__body { opacity: 1; visibility: visible; transition: opacity 400ms var(--ease-out) 200ms, visibility 0s; }
.step__text { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.step__text h3 { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.step__text p { max-width: 36ch; font-size: var(--step-lead); line-height: 1.35; }
.step__photo { width: clamp(200px, 24vw, 360px); aspect-ratio: 1; border-radius: 999px; overflow: hidden; align-self: center; }
.step__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .steps { flex-direction: column; height: auto; }
  .step { flex: none; }
  .step__toggle { position: relative; height: 64px; }
  .step__name { position: static; display: block; transform: none; padding: 0 24px; line-height: 64px; font-size: 1.125rem; }
  .step.is-open .step__name { opacity: 1; }
  .step__body { position: static; display: none; grid-template-columns: 1fr; padding: 0 24px 28px; opacity: 1; visibility: visible; }
  .step.is-open .step__body { display: grid; }
  .step__photo { width: 60vw; justify-self: start; }
  .step__text h3 { display: none; }
}

/* ---------- Призыв: ряд плиток ---------- */
.tiles { display: grid; grid-template-columns: 1fr 4fr 1fr; gap: 12px; height: 380px; margin-inline: calc(-1 * var(--margin)); }
.tile { border-radius: 28px; overflow: hidden; }
.tile--photo img { width: 100%; height: 100%; object-fit: cover; }
.tile--red { background: var(--red); }
.tile--main { background: var(--accent); color: #fff; padding: clamp(28px, 3.5vw, 52px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.tile--main h2 { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.tile--main p { max-width: 46ch; color: #E3ECFB; }
.tile--main .btn { align-self: flex-start; margin-top: 6px; }
.tile:first-child { border-radius: 0 28px 28px 0; }
.tile:last-child { border-radius: 28px 0 0 28px; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr 1fr; height: auto; margin-inline: 0; }
  .tile--main { grid-column: 1 / -1; grid-row: 1; min-height: 300px; }
  .tile--photo, .tile--red { height: 120px; }
  .tile:first-child, .tile:last-child { border-radius: 28px; }
}

/* ---------- Подвал: знак, построенный крупно ---------- */
.site-footer { background: var(--night); color: var(--on-night); padding-top: clamp(64px, 8vw, 120px); }
.site-footer--flush { margin-top: 0; }
.footer-mark { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: clamp(16px, 3vw, 40px); }
.footer-mark__logo { width: clamp(64px, 9.6vw, 150px); height: auto; aspect-ratio: 1; max-width: none; border-radius: 22%; object-fit: cover; }
.footer-mark .points, .footer-mark .ring { fill: var(--accent); }
.footer-mark__word { font-size: clamp(2.75rem, 10.6vw, 10.25rem); line-height: 0.8; letter-spacing: -0.01em; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.footer-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gutter); padding-block: 56px 72px; }
.footer-cols > div { grid-column: span 3; display: grid; gap: 8px; align-content: start; }
.footer-cols h3 { font-size: var(--step-body); font-weight: 700; color: var(--on-night); margin-bottom: 4px; }
.footer-cols a { color: var(--on-night-soft); text-decoration: none; overflow-wrap: anywhere; transition: color var(--t-hover) ease; }
.footer-cols a:hover { color: var(--on-night); }
.footer-cols p { color: var(--on-night-soft); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 24px 32px; background: var(--night-2); margin-inline: calc(-1 * var(--margin)); padding-inline: var(--margin); color: var(--on-night-soft); }
.footer-base a { color: var(--on-night-soft); }
@media (max-width: 900px) {
  .footer-mark { grid-template-columns: 1fr; }
  .footer-mark { grid-template-columns: auto 1fr; }
  .footer-mark__word { font-size: 10.4vw; }
  .footer-mark__logo { width: 10.4vw; }
  .footer-cols > div { grid-column: span 6; }
  .footer-cols > div:first-child, .footer-cols > div:last-child { grid-column: 1 / -1; }
}

/* ---------- Внутренние страницы: заголовок на тёмном, компас справа ---------- */
.page-head { position: relative; overflow: hidden; padding-block: clamp(64px, 9vw, 136px) clamp(64px, 8vw, 120px); min-height: clamp(420px, 56vh, 620px); display: flex; align-items: center; }
.page-head__grid { display: grid; gap: 28px; position: relative; z-index: 2; width: 100%; }
.page-head__grid > * { max-width: min(680px, 54vw); }
.page-head p { color: var(--on-night-soft); }
.page-head .display { font-size: clamp(2.5rem, 0.8rem + 4.2vw, 5rem); overflow-wrap: anywhere; }
.page-head .lead { max-width: 38ch; font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem); }
.page-head__mark { position: absolute; z-index: 1; right: var(--margin); top: 50%; width: min(66vh, 560px, 40vw); aspect-ratio: 1; transform: translateY(-50%); }
.page-head__mark .compass { width: 100%; height: 100%; }
.page-head__mark--logo { right: var(--margin); width: min(48vh, 400px, 30vw); }
.page-head__mark--logo img { width: 100%; height: 100%; border-radius: 22%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .js .page-head__mark { animation: mark-in 1400ms var(--ease-expo) 100ms both; }
}
@keyframes mark-in { from { opacity: 0; transform: translateY(-50%) rotate(-24deg) scale(0.94); } to { opacity: 1; transform: translateY(-50%); } }
@media (max-width: 900px) {
  .page-head { flex-direction: column; align-items: stretch; min-height: 0; padding-bottom: 48px; }
  .page-head__grid > * { max-width: none; }
  .page-head__mark { order: 2; position: relative; right: auto; top: auto; transform: none; width: min(78vw, 380px); margin: 32px auto 0; animation: none !important; }
  .page-head__mark--logo { width: 36vw; margin: 32px var(--margin) 0 auto; }
}

/* Детальная страница роли */
.detail { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px var(--gutter); padding-block: clamp(56px, 7vw, 104px); }
.detail__body { grid-column: 1 / span 7; }
.detail__body h2 { font-size: var(--step-lead); margin-bottom: 16px; }
.detail__body .prose { white-space: pre-line; overflow-wrap: anywhere; max-width: 65ch; }
.detail__aside { grid-column: 9 / span 4; align-self: start; position: sticky; top: 24px; background: var(--paper-2); border-radius: 28px; padding: 32px; display: grid; gap: 24px; }
.facts { display: grid; gap: 18px; margin: 0; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 700; font-size: var(--step-lead); line-height: 1.25; }
.detail__aside .btn { width: 100%; }
@media (max-width: 900px) { .detail__body, .detail__aside { grid-column: 1 / -1; } .detail__aside { position: static; } }

/* Указатель с превью (сигнатурный ход на странице «О нас») */
.index { position: relative; }
.index__list { list-style: none; margin: 0; padding: 0; }
.index__row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 0.36em; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; font-weight: 700; text-transform: uppercase; color: inherit; text-decoration: none; transition: opacity var(--t-hover) ease; }
.index__meta { font-size: var(--step-body); letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ink-soft); }
.index__thumb { order: -1; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; margin-bottom: 0.3em; }
.index__frame { display: none; }
@media (hover: hover) and (pointer: fine) {
  .index__list { max-width: 60%; }
  .index__thumb { display: none; }
  .index__list:has(.index__row:hover, .index__row:focus-visible) .index__row:not(:hover, :focus-visible) { opacity: 0.4; }
  .index__frame { display: block; position: absolute; top: 0; right: 0; width: 34%; aspect-ratio: 1; border-radius: 999px; overflow: hidden; z-index: 1; pointer-events: none; clip-path: circle(0% at 50% 50%); transition: clip-path 420ms var(--ease-out), transform 360ms var(--ease-out); }
  .index__frame.is-open { clip-path: circle(50% at 50% 50%); }
  .index__frame img { width: 100%; height: 100%; object-fit: cover; }
}

/* Двухколоночная история */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px var(--gutter); align-items: center; }
.split__text { grid-column: 1 / span 6; display: grid; gap: 24px; }
.split__text p { max-width: 60ch; }
.split__media { grid-column: 8 / span 5; }
.circle-photo { aspect-ratio: 1; border-radius: 999px; overflow: hidden; background: var(--paper-2); }
.circle-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-drift] .circle-photo { clip-path: circle(14% at 50% 50%); transition: clip-path 1300ms var(--ease-expo); }
  .js [data-drift].is-in .circle-photo { clip-path: circle(50% at 50% 50%); }
}
@media (max-width: 900px) { .split__text, .split__media { grid-column: 1 / -1; } .split__media { max-width: 520px; } }

/* Контакты: крупные строки */
.contact-rows { display: grid; gap: 8px; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: clamp(24px, 3vw, 40px); background: var(--paper-2); border-radius: 28px; text-decoration: none; color: inherit; border: 0; width: 100%; text-align: left; cursor: pointer; transition: background-color var(--t-hover) ease; }
.contact-row:hover { background: var(--paper-3); }
.contact-row__label { color: var(--ink-soft); font-weight: 500; }
.contact-row__value { font-size: clamp(1.5rem, 1rem + 2.4vw, 3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.contact-row__go { width: 56px; height: 56px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; transition: transform var(--t-ui) var(--ease-out); }
.contact-row:hover .contact-row__go { transform: rotate(-45deg); }
.contact-row__go svg { width: 22px; height: 22px; }
.wide-photo { border-radius: 28px; overflow: hidden; aspect-ratio: 21 / 9; }
.wide-photo img { width: 100%; height: 100%; object-fit: cover; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.note { display: grid; gap: 10px; align-content: start; }
.note h3 { display: flex; gap: 10px; align-items: center; font-size: 1.25rem; }
.note p { color: var(--ink-soft); }
@media (max-width: 900px) { .notes { grid-template-columns: 1fr; gap: 32px; } .wide-photo { aspect-ratio: 4 / 3; } }

/* FAQ и правовые тексты */
.reading { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); padding-block: clamp(56px, 7vw, 104px); }
.reading__body { grid-column: 3 / span 8; }
@media (max-width: 900px) { .reading__body { grid-column: 1 / -1; } }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--paper-2); border-radius: 24px; transition: background-color var(--t-hover) ease; }
.faq details[open] { background: var(--paper-3); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 28px; font-size: 1.25rem; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .star { width: 22px; height: 22px; transition: transform 500ms var(--ease-expo); }
.faq details[open] summary .star { transform: rotate(45deg); }
.faq details p { padding: 0 28px 28px; max-width: 64ch; }
.legal { max-width: 68ch; }
.legal h2 { font-size: 1.375rem; margin: 48px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 12px; }
.legal a { color: var(--accent); }
.legal .meta { color: var(--ink-soft); margin-bottom: 40px; }

/* ---------- Диалог «Добавить роль» ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 13, 28, 0.72); }
.modal.is-open { display: flex; }
.modal__panel { position: relative; width: 100%; max-width: 640px; max-height: 92vh; display: flex; flex-direction: column; background: var(--paper); border-radius: 28px; padding: clamp(24px, 3vw, 40px); box-shadow: 0 24px 64px -16px rgba(8, 13, 28, 0.5); } /* taste-skill-ignore: диалог над страницей */
.modal__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--paper-2); cursor: pointer; display: grid; place-items: center; transition: background-color var(--t-hover) ease; }
.modal__close:hover { background: var(--paper-3); }
.modal__close svg { width: 20px; height: 20px; }
.modal h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1; text-transform: uppercase; letter-spacing: -0.02em; padding-right: 56px; }
.modal__intro { margin-top: 10px; color: var(--ink-soft); }
.modal form { overflow-y: auto; margin-top: 24px; margin-inline: -4px; padding-inline: 4px; display: grid; gap: 18px; }
.modal__foot { position: sticky; bottom: 0; background: var(--paper); display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--paper-3); background: var(--paper); transition: border-color var(--t-hover) ease; }
.field textarea { min-height: 112px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6B7590; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #C3CDE2; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field .hint { color: var(--ink-soft); font-size: var(--step-small); }
.req { color: var(--red); }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .fields-2 { grid-template-columns: 1fr; } }
.form-error { padding: 14px 18px; border-radius: 16px; background: #FCE8E7; color: #8E1F19; font-weight: 500; margin-top: 18px; }

/* ---------- Куки: полоса над навигацией ---------- */
.cookie { display: none; background: var(--night-2); color: var(--on-night); }
.cookie.is-open { display: block; }
.cookie__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 12px; }
.cookie p { color: var(--on-night-soft); font-size: var(--step-small); max-width: 80ch; }
.cookie a { color: var(--accent-bright); }
.cookie__actions { display: flex; gap: 8px; }
.cookie .btn--quiet { background: var(--night-3); color: var(--on-night); }
.cookie .btn--quiet:hover { background: #24345C; }

/* ---------- Вход и регистрация ---------- */
.auth { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__side { position: relative; overflow: hidden; padding: clamp(24px, 3vw, 48px); display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(48px, 12vh, 140px); }
.auth__art { position: absolute; z-index: 0; width: 104%; aspect-ratio: 1; left: 34%; bottom: -46%; }
.auth__side .display { position: relative; z-index: 1; font-size: min(var(--step-display), 5.4vw); }
@media (max-width: 900px) { .auth__side .display { font-size: var(--step-head); } }
.auth__side .line { white-space: nowrap; }
.auth__bar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.auth__main { padding: clamp(24px, 3vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.auth__card { width: 100%; max-width: 560px; margin-inline: auto; display: grid; gap: 22px; }
@media (min-width: 901px) { .auth__main { align-items: flex-end; } .auth__card { margin-inline: 0; } }
.auth__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.auth__top .lang { background: var(--paper-2); }
.auth__top .lang a { color: var(--ink-soft); }
.auth__top .lang a[aria-current] { background: var(--ink); color: #fff; }
.auth h1 { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 999px; }
.segmented button { min-height: 46px; border: 0; border-radius: 999px; background: transparent; font-weight: 500; cursor: pointer; color: var(--ink-soft); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.callout { padding: 16px 20px; border-radius: 20px; background: var(--paper-2); }
.callout strong { display: block; }
.callout--red { background: #FCE8E7; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__side { min-height: 260px; }
  .auth__art { width: 90vw; left: 45%; bottom: -60%; }
}

/* ---------- Движение ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-line] { display: block; transform: translateY(105%); animation: load-line 900ms var(--ease-expo) forwards; animation-delay: calc(120ms + var(--i, 0) * 90ms); }
  .js [data-load] { opacity: 0; transform: translateY(14px); animation: load-rise 600ms var(--ease-out) forwards; animation-delay: var(--d, 400ms); }
  .js [data-spin] { animation: spin-in 1400ms var(--ease-expo) 100ms both; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-drift] img { transform: scale(1.06); transition: transform 2400ms var(--ease-soft); }
  .js [data-drift].is-in img { transform: scale(1); }
}
.line { display: block; clip-path: inset(-0.5em -100vw 0 -100vw); padding-bottom: 0.08em; margin-bottom: -0.08em; }
@keyframes load-line { to { transform: none; } }
@keyframes load-rise { to { opacity: 1; transform: none; } }
@keyframes spin-in { from { opacity: 0; transform: translateY(-50%) rotate(-30deg) scale(0.92); } to { opacity: 1; transform: translateY(-50%); } }
@media (max-width: 900px) {
  @keyframes spin-in { from { opacity: 0; transform: rotate(-30deg) scale(0.92); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Фото внутри компаса медленно «садится» при загрузке — единственная движущаяся картинка первого экрана */
@media (prefers-reduced-motion: no-preference) {

}
@keyframes photo-settle { from { transform: scale(1.14); } to { transform: none; } }
.section-gap { height: var(--section); }

/* ---------- Профиль ---------- */
.profile-id { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); min-width: 0; }
.profile-id__avatar { flex: none; width: clamp(72px, 9vw, 120px); aspect-ratio: 1; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: var(--step-head); font-weight: 700; }
.profile-id > div { min-width: 0; display: grid; gap: 8px; }
.profile-stats { display: flex; gap: 40px; margin: 0; }
.profile-stats dt { color: var(--on-night-soft); font-size: var(--step-small); }
.profile-stats dd { margin: 0; font-size: var(--step-lead); font-weight: 700; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 20px 24px; background: var(--paper-2); border-radius: 24px; }
.row__title { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.row__title:hover { text-decoration: underline; }
.row__main { min-width: 0; display: grid; gap: 4px; }
.row__end { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.row .role__mark { background: var(--paper); }
@media (max-width: 640px) { .row { grid-template-columns: 44px minmax(0, 1fr); } .row .role__mark { width: 44px; height: 44px; } .row > .status, .row__end { grid-column: 2; justify-content: flex-start; justify-self: start; } }
.status { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; font-size: var(--step-small); font-weight: 500; white-space: nowrap; }
.status--approved { background: #DDEBFF; color: var(--accent-deep); }
.status--pending { background: #FFF1D6; color: #7A4A00; }
.status--rejected { background: #FCE8E7; color: #8E1F19; }
.status--archived { background: var(--paper-3); color: var(--ink-soft); }

/* Фото внутри кольца компаса */
.cphoto { position: relative; width: 100%; height: 100%; }
.cphoto__img { position: absolute; left: 22.6%; top: 22.6%; width: 54.8%; height: 54.8%; border-radius: 50%; object-fit: cover; background: var(--night-3); }
.cphoto .compass { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero__art .cphoto__img { animation: photo-settle 2200ms var(--ease-soft) 100ms both; }
}

/* ---------- Дашборд волонтёра ---------- */
.dash-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gutter); align-items: start; }
.dash-age { grid-column: 1 / span 4; background: var(--accent); color: #fff; border-radius: 28px; padding: clamp(24px, 3vw, 36px); display: grid; gap: 18px; justify-items: start; }
.dash-age label { font-size: var(--step-lead); font-weight: 500; line-height: 1.25; }
.dash-soon { grid-column: 6 / span 7; }
.profile-stats { flex-wrap: wrap; row-gap: 16px; }
@media (max-width: 900px) { .dash-age, .dash-soon { grid-column: 1 / -1; } }
.dash-age__title { font-size: var(--step-lead); font-weight: 500; line-height: 1.25; }
.row__count { font-weight: 700; white-space: nowrap; }
.row__count span { font-weight: 400; color: var(--ink-soft); }
.account { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px var(--gutter); margin: 40px 0; }
.account dt { color: var(--ink-soft); }
.account dd { margin: 4px 0 0; font-size: var(--step-lead); font-weight: 700; line-height: 1.25; }
.account__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .dash-top > .dash-age, .dash-top > .dash-soon { grid-column: 1 / -1 !important; } }
@media (max-width: 560px) { .account { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.not-found { min-height: calc(100svh - 76px); }
.page-head .not-found__code { font-size: clamp(7rem, 3rem + 16vw, 17rem); line-height: 0.8; font-weight: 700; letter-spacing: -0.05em; color: var(--accent-bright); }

/* Формы-кнопки (выход POST-ом) выглядят как обычные ссылки/кнопки */
.inline-form { display: inline-flex; margin: 0; }
button.nav-text { background: none; border: 0; cursor: pointer; font: inherit; }

/* Утилиты вместо inline style="" в шаблонах */
.pt-0 { padding-top: 0; }
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-xs { margin-top: 6px; }
.mt-md { margin-top: 40px; }
.mt-lg { margin: clamp(32px, 4vw, 56px) 0 0; }
.mb-lg { margin-bottom: clamp(32px, 4vw, 56px); }
.d-block { display: block; }
.d-grid { display: grid; }
.stack-sm { display: grid; gap: 10px; }
.form-stack { display: grid; gap: 18px; }
.w-full { width: 100%; }
.break-anywhere { overflow-wrap: anywhere; }
.soft-on-accent { color: #E3ECFB; }
.dash-main { grid-column: 1 / span 7; }
.dash-side { grid-column: 9 / span 4; }

/* Комментарии на странице объявления */
.comments { padding-bottom: clamp(56px, 7vw, 104px); }
.comments__inner { max-width: 760px; display: grid; gap: 20px; }
.comments__title { display: flex; align-items: center; gap: 12px; font-size: var(--step-lead); }
.comments__count { min-width: 32px; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-soft); font-size: var(--step-small); font-weight: 700; text-align: center; }
.comments .form-error { margin-top: 0; }

.comment-form { display: grid; gap: 10px; padding: 16px; border-radius: 24px; background: var(--paper-2); }
.comment-form textarea { width: 100%; min-height: 96px; padding: 14px 16px; border-radius: 16px; border: 2px solid transparent; background: var(--paper); color: var(--ink); font: inherit; line-height: 1.5; resize: vertical; transition: border-color var(--t-hover) ease; }
.comment-form textarea::placeholder { color: #6B7590; }
.comment-form textarea:hover { border-color: var(--paper-3); }
.comment-form textarea:focus { border-color: var(--accent); outline: none; }
.comment-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-form__count { color: var(--ink-soft); font-size: var(--step-small); }
.comment-form__count.is-near { color: #8E1F19; font-weight: 700; }

.comments__login { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 20px; border-radius: 24px; background: var(--paper-2); }
.comments__login p { font-weight: 500; }
.comments__empty { padding: 4px 2px; color: var(--ink-soft); }

.comment-list { list-style: none; margin: 0; padding: 0; display: grid; }
.comment { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding-block: 20px; border-top: 1px solid var(--paper-3); scroll-margin-top: 24px; }
.comment:first-child { border-top: 0; padding-top: 4px; }
.comment:target .comment__body { background: #E3EEFD; box-shadow: 0 0 0 8px #E3EEFD; border-radius: 4px; }
.comment__avatar { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink); font-weight: 700; }
.comment__avatar--org { background: var(--accent); color: #fff; }
.comment__main { display: grid; gap: 6px; justify-items: start; }
.comment__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.comment__name { font-weight: 700; overflow-wrap: anywhere; }
.comment__badge { padding: 2px 10px; border-radius: 999px; background: #E3EEFD; color: var(--accent-deep); font-size: 0.8125rem; font-weight: 700; }
.comment__badge--admin { background: var(--ink); color: #fff; }
.comment__time { color: var(--ink-soft); font-size: var(--step-small); }
.comment__body { white-space: pre-line; overflow-wrap: anywhere; max-width: 65ch; transition: background-color 1200ms ease, box-shadow 1200ms ease; }
.comment__delete { margin: 0; }
.comment__delete button { padding: 4px 0; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: var(--step-small); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.comment__delete button:hover { color: #8E1F19; }

@media (max-width: 560px) {
  .comment { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
  .comment__avatar { width: 36px; height: 36px; font-size: 0.875rem; }
  .comment-form { padding: 12px; border-radius: 20px; }
}
