/* Сайт профкома студентов ННГУ. Макет «Соты». */

@font-face {
  font-family: "Dela Gothic One";
  src: url("fonts/dela-gothic-one-cyrillic.a4ff932ce482.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: "Dela Gothic One";
  src: url("fonts/dela-gothic-one-latin.55ebe3ecc537.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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-cyrillic.c23f669d14e4.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin.46a6615df0d8.woff2") format("woff2");
  font-weight: 100 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 {
  --blue: #1736FF;
  --blue-tint: #EEF1FF;
  --blue-tint-2: #E1E6FF;
  --blue-soft: #DDE2FF;
  --ink: #0B1440;
  --ink-2: #2A3366;
  --muted: #59608A;
  --line: #E3E7F5;
  --red: #E8112D;        /* под белым текстом, контраст 4,6 */
  --red-bright: #FF213C; /* только декор */
  --white: #FFFFFF;
  --display: "Dela Gothic One", "Arial Black", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Место под полосу прокрутки — всегда, даже на короткой странице. Иначе при постоянной
   полосе (macOS с мышью, Windows) страница сдвигается вбок при переходе
   между длинной и короткой страницей */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.disp { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
.h2 { font-size: clamp(32px, 3.6vw, 48px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; font-family: inherit;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: #102BD6; color: var(--white); }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: #C90E26; color: var(--white); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: #1B2766; color: var(--white); }
.btn--white { background: var(--white); color: var(--blue); }
.btn--white:hover { background: var(--blue-tint); color: var(--blue); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--outline-blue { border-color: var(--blue); color: var(--blue); }
.btn--outline-blue:hover { background: var(--blue); color: var(--white); }

/* Шапка */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.site-header__logo { display: flex; }
.site-header__logo img { display: block; height: 48px; width: auto; }
.site-nav { display: flex; gap: 28px; font-size: 16px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav a[aria-current="page"] { font-weight: 700; }
.site-header__tools { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; border: 0; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.burger { display: none; background: var(--blue); color: var(--white); }

/* Мобильное меню */
.mnav { position: fixed; inset: 0; z-index: 50; background: var(--blue); color: var(--white); overflow: hidden auto; display: flex; flex-direction: column; padding: 14px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); }
.mnav[hidden] { display: none; }
.mnav__emblem { position: absolute; right: -150px; top: 360px; width: 300px; pointer-events: none; }
.mnav__head { display: flex; align-items: center; justify-content: space-between; position: relative; }
.mnav__head img { height: 38px; width: auto; }
.mnav__close { background: var(--white); color: var(--blue); }
.mnav__list { display: flex; flex-direction: column; padding-top: 8px; position: relative; }
.mnav__list a { display: flex; align-items: center; min-height: 54px; color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.22); font-family: var(--display); font-size: 26px; }
.mnav__foot { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.mnav__links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mnav__links .btn { justify-content: center; }
.mnav__foot p { margin: 0; color: var(--blue-soft); font-size: 14px; }
.mnav :focus-visible { outline-color: var(--white); }
body.mnav-open { overflow: hidden; }

/* Первый экран */
.hero { padding-top: 56px; padding-bottom: 72px; }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero__text { display: flex; flex-direction: column; gap: 28px; }
.pill { display: inline-flex; align-self: flex-start; border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: 15px; margin: 0; }
.pill--red { background: var(--red); color: var(--white); }
.hero h1 { font-size: clamp(44px, 6.4vw, 92px); color: var(--blue); }
.hero__lead { margin: 0; font-size: 21px; line-height: 1.5; max-width: 30em; color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.honey { position: relative; width: 100%; aspect-ratio: 100 / 93; max-width: 600px; justify-self: end; }
.hex { position: absolute; width: 31%; height: 38.5%; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hex img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hex::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hex--light::after { background: var(--white); opacity: .18; }
.hex--blue::after { background: var(--blue); mix-blend-mode: color; opacity: .4; }
.hex--red::after { background: var(--red-bright); mix-blend-mode: color; opacity: .35; }
.hex:nth-child(1) { left: 17.5%; top: 0; }
.hex:nth-child(2) { left: 50.5%; top: 0; }
.hex:nth-child(3) { left: 1%; top: 30.75%; }
.hex:nth-child(4) { left: 34%; top: 30.75%; }
.hex:nth-child(5) { left: 67%; top: 30.75%; }
.hex:nth-child(6) { left: 17.5%; top: 61.5%; }
.hex:nth-child(7) { left: 50.5%; top: 61.5%; }

/* Секции */
.section { padding-bottom: 96px; }
.section__in { display: flex; flex-direction: column; gap: 28px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* Важные события */
.events { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.events__side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
/* Меньше трёх действующих событий: одна карточка во всю ширину или одна малая справа */
.events--single { grid-template-columns: minmax(0, 1fr); }
.events--single .ev--main { min-height: 0; }
.events__side--single { grid-template-rows: 1fr; }
.ev { display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: var(--ink); border-radius: 28px; padding: 40px; min-height: 200px; }
.ev h3 { font-size: 28px; }
.ev p { margin: 0; }
.ev--main { background: var(--blue); color: var(--white); padding: 40px 48px; gap: 40px; min-height: 460px; }
/* Большая карточка — одна ссылка: при наведении темнеет только кнопка, фон не меняется
   (раньше менялись и фон, и кнопка — два эффекта сразу) */
.ev--main:hover { color: var(--white); }
.ev--main:hover .btn--red, .ev--main:focus-visible .btn--red { background: #C90E26; }
.ev--main h3 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.2; max-width: 13em; }
.ev--main p { color: var(--blue-soft); max-width: 30em; line-height: 1.6; }
.ev--red { background: var(--red); color: var(--white); }
.ev--red:hover { color: var(--white); background: #C90E26; }
.ev--line { background: var(--white); border: 2px solid var(--ink); padding: 38px; }
.ev--line:hover { color: var(--ink); background: var(--blue-tint); }
.ev--line p { color: var(--ink-2); }
.ev__when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ev__date { background: var(--white); color: var(--blue); border-radius: 999px; padding: 8px 20px; font-size: 24px; line-height: 1.2; }
.ev__time { border: 2px solid rgba(255,255,255,.6); border-radius: 999px; padding: 8px 18px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.ev__body { display: flex; flex-direction: column; gap: 24px; }
.ev__body--s { gap: 8px; }
.tag { align-self: flex-start; border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: 14px; }
.tag--white { background: var(--white); color: var(--ink); }
.tag--blue { background: var(--blue); color: var(--white); }
.ev .btn { align-self: flex-start; margin-top: 8px; }

/* С чем помогаем */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { text-decoration: none; color: var(--ink); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 168px; background: var(--blue-tint); }
.tile:hover { background: var(--blue-tint-2); color: var(--ink); }
.tile__title { font-size: 30px; }
.tile__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.tile__foot svg { width: 28px; height: 28px; flex: none; color: var(--blue); }
.tile--red { background: var(--red); color: var(--white); }
.tile--red:hover { background: #C90E26; color: var(--white); }
.tile--red .tile__foot svg { color: var(--white); }

/* Новости */
.news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 12px; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; display: block; }
.card__date { font-size: 15px; color: var(--muted); }
.card h3 { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 700; }
.card:hover h3 { color: var(--blue); }

/* Команда */
.team { background: var(--blue); color: var(--white); padding-top: 80px; padding-bottom: 80px; }
.team__in { display: flex; flex-direction: column; gap: 40px; }
.team__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-end; }
.team__head h2 { font-size: clamp(36px, 4.4vw, 64px); max-width: 12em; }
.team__text { display: flex; flex-direction: column; gap: 20px; max-width: 26em; }
.team__text p { margin: 0; color: var(--blue-soft); font-size: 19px; }
.team__text .btn { align-self: flex-start; }
.team__photos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.team__photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; display: block; }
.team__photos img:nth-child(even) { margin-top: 36px; }

/* Контакты */
.contacts { padding-top: 88px; padding-bottom: 88px; }
.contacts__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.contacts__info { display: flex; flex-direction: column; gap: 22px; }
.contacts__list { display: flex; flex-direction: column; gap: 14px; font-size: 19px; }
.contacts__list p { margin: 0; }
.consult { background: var(--blue-tint); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.consult h3 { font-size: 28px; }
.consult p { margin: 0; }
.consult ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.bot-note { background: var(--white); border-radius: 18px; padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.bot-note svg { width: 28px; height: 28px; flex: none; margin-top: 2px; color: var(--blue); }
.consult__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* Подвал */
.site-footer { background: var(--ink); color: #C3CAEA; padding-top: 40px; padding-bottom: 24px; font-size: 15px; }
.site-footer__in { display: flex; flex-direction: column; gap: 24px; }
.site-footer__cols { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start; }
.site-footer__cols > img { height: 56px; width: auto; }
.site-footer__col { display: flex; flex-direction: column; gap: 8px; }
.site-footer__col b { color: var(--white); }
.site-footer a { color: #C3CAEA; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid #2A3570; padding-top: 16px; }
.site-footer :focus-visible { outline-color: var(--white); }

/* Текстовые страницы */
.page-head { padding-top: 40px; padding-bottom: 40px; }
.page-head__in { display: flex; flex-direction: column; gap: 22px; }
.crumbs { font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-head h1 { font-size: clamp(40px, 5.4vw, 76px); color: var(--blue); }
.rich { max-width: 46em; font-size: 18px; line-height: 1.65; padding-bottom: 96px; }
.rich h2 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 1.8em 0 .6em; }
.rich h3 { font-size: 21px; margin: 1.6em 0 .5em; }
.rich ul, .rich ol { padding-left: 1.4em; }
.rich hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
/* Фото в тексте страницы (website/image_formats.py): во всю ширину, слева или справа */
.rich .rt-img { display: block; max-width: 100%; height: auto; border-radius: 18px; }
.rich .rt-img--full { width: 100%; margin: 1.6em 0; }
.rich .rt-img--left { float: left; width: 45%; margin: .3em 1.6em 1em 0; }
.rich .rt-img--right { float: right; width: 45%; margin: .3em 0 1em 1.6em; }
.rich h2, .rich h3, .rich hr { clear: both; }
.rich::after { content: ""; display: table; clear: both; }
/* Оглавление длинной страницы (подзаголовки h2) */
.toc { background: var(--blue-tint); border-radius: 20px; padding: 20px 24px; margin: 0 0 40px; max-width: 760px; }
.toc__title { margin: 0 0 8px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 280px; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--blue); }
.rich h2[id] { scroll-margin-top: 96px; }
.rich--lead { padding-bottom: 0; margin-bottom: 24px; }
.doc-download { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 32px; }
.doc-download__meta { color: var(--ink-2); }
.notfound { padding-top: 96px; padding-bottom: 120px; }
.notfound__in { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.notfound h1 { font-size: clamp(40px, 5.4vw, 76px); color: var(--blue); }
.notfound p { margin: 0; font-size: 19px; color: var(--ink-2); }

@media (max-width: 1000px) {
  .hero__in, .events, .contacts__in { grid-template-columns: minmax(0, 1fr); }
  .honey { justify-self: center; max-width: 520px; }
  .tiles, .news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Фото команды — лентой, листается пальцем: в сетке 3+2 или 2+2+1 последнее фото
     оставалось одно, а на телефоне блок занимал три экрана */
  .team__photos {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-left: -24px; margin-right: -24px; padding: 0 24px 8px; scroll-padding: 0 24px;
    scrollbar-width: none;
  }
  .team__photos::-webkit-scrollbar { display: none; }
  .team__photos img { flex: none; width: 32%; scroll-snap-align: start; }
  .team__photos img:nth-child(even) { margin-top: 0; }
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav, .site-header__vk { display: none; }
  .burger { display: grid; }
}
@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .site-header__in { min-height: 72px; }
  .site-header__logo img { height: 38px; }
  .hero { padding-top: 28px; padding-bottom: 56px; }
  .hero__lead { font-size: 18px; }
  .section { padding-bottom: 72px; }
  .events__side { grid-template-rows: auto; }
  .ev, .ev--main { padding: 28px; min-height: 0; }
  .ev--line { padding: 26px; }
  .tiles, .news, .site-footer__cols { grid-template-columns: minmax(0, 1fr); }
  .tile__title { font-size: 26px; }
  .rich .rt-img--left, .rich .rt-img--right { float: none; width: 100%; margin: 1.2em 0; }
  .team__photos { margin-left: -16px; margin-right: -16px; padding: 0 16px 8px; scroll-padding: 0 16px; }
  .team__photos img { width: 62%; }
  .contacts { padding-top: 64px; padding-bottom: 64px; }
  .consult { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
