/* =====================================================
   ICCC — общие стили сайта
   ===================================================== */

:root {
  --navy-900: #081322;
  --navy-800: #0d1d33;
  --navy-700: #15294a;
  --teal-700: #07625e;
  --teal-600: #0a7773;
  --teal-500: #0e9f9a;
  --teal-300: #5fd4cc;
  --teal-50: #e7f6f5;
  --logo-navy: #012262;
  --amber-400: #f5b53d;
  --amber-500: #e9a01e;

  --ink: #0f1b2d;
  --ink-soft: #46546a;
  --ink-faint: #5f6b82;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --line: #e2e7ee;
  --danger: #c0392b;
  --success: #1e9e5a;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Manrope", "Inter", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
  --shadow: 0 6px 24px -8px rgba(15, 27, 45, 0.14), 0 1px 2px rgba(15, 27, 45, 0.05);
  --shadow-lg: 0 24px 48px -16px rgba(8, 19, 34, 0.28);

  --container: 1160px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: inherit;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--teal-600);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-700);
}

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

/* Встроенные SVG-иконки: размер задаётся font-size родителя, цвет — color */
.icon {
  display: inline-block;
  flex: none;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
  overflow: visible;
}

:focus-visible {
  outline: 3px solid var(--amber-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--amber-400);
  color: var(--navy-900);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(10, 119, 115, 0.6);
}

.btn--primary:hover {
  background: var(--teal-700);
  color: #fff;
}

.btn--accent {
  background: var(--amber-400);
  color: var(--navy-900);
  box-shadow: 0 10px 24px -10px rgba(245, 181, 61, 0.7);
}

.btn--accent:hover {
  background: #ffc557;
  color: var(--navy-900);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover {
  border-color: #fff;
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--teal-600);
  border-color: var(--teal-600);
}

.btn--outline:hover {
  background: var(--teal-600);
  color: #fff;
}

.btn--sm {
  padding: 10px 18px;
  font-size: 0.95rem;
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

.link-arrow .icon {
  transition: transform 0.2s;
}

.link-arrow:hover .icon {
  transform: translateX(4px);
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

/* Эмблема ICCC (tools/icons/iccc-logo.svg): высота задаётся font-size, цвет — color */
.brand__mark {
  display: grid;
  place-items: center;
  font-size: 46px;
  line-height: 1;
  color: var(--logo-navy);
}

.brand__mark .icon {
  vertical-align: top;
  /* линии чуть толще, чем в исходнике, чтобы не терялись в маленьком размере */
  stroke-width: 34px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand__text small {
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* «of Central Asia» на узком экране — второй строкой, чтобы шапка не вылезала за край */
@media (max-width: 520px) {
  .brand__region {
    display: block;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav__link {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.site-nav__link:hover {
  color: var(--ink);
  background: var(--bg);
}

.site-nav__link[aria-current="page"] {
  color: var(--teal-600);
  background: var(--teal-50);
  font-weight: 600;
}

.site-nav .btn {
  margin-left: 10px;
}

.site-nav .btn[aria-current="page"] {
  background: var(--navy-800);
  box-shadow: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.15rem;
  cursor: pointer;
}

/* ---------- Главный баннер ---------- */

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(14, 159, 154, 0.45), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(245, 181, 61, 0.14), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-800) 55%, var(--navy-700));
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
  pointer-events: none;
}

.hero {
  padding: 110px 0;
}

/* Панель с цифрами заходит на низ баннера (SHOW_KEY_STATS в tools/build.py) */
.hero--with-stats {
  padding-bottom: 170px;
}

.hero__inner,
.page-hero .container {
  position: relative;
}

.hero__inner {
  max-width: 820px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-600);
  background: var(--teal-50);
}

/* Надпись-«таблетка» может быть и заголовком раздела */
h2.eyebrow {
  font-family: var(--font-body);
  line-height: inherit;
}

.eyebrow--light {
  color: var(--teal-300);
  background: rgba(95, 212, 204, 0.12);
  border: 1px solid rgba(95, 212, 204, 0.25);
}

.hero h1 {
  margin-bottom: 22px;
}

.hero h1 span {
  color: var(--teal-300);
}

.hero__lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Главная: текст слева, анонс мероприятия справа */
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 56px;
  align-items: center;
}

.hero-event {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-event__label {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-400);
}

.hero-event__title {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.hero-event__facts {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.hero-event__facts li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-event__facts .icon {
  width: 1.25em;
  color: var(--teal-300);
}

.hero-event__text {
  margin-bottom: 22px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
}

.page-hero {
  padding: 72px 0 80px;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-hero p:not(.eyebrow) {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 720px;
  margin: 0;
  text-wrap: pretty;   /* без одиноких слов на последней строке */
}

/* ---------- Секции ---------- */

.section {
  padding: 96px 0;
}

.section--tight {
  padding: 64px 0;
}

.section--white {
  background: var(--surface);
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 0;
}

.lead {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink);
}

.muted {
  color: var(--ink-soft);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card--hover {
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #cfd8e3;
}

.icon-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--teal-50);
  color: var(--teal-600);
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--ink-soft);
}

/* ---------- Статистика ---------- */

.stats {
  position: relative;
  margin-top: -100px;
  z-index: 2;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 34px 28px;
  text-align: left;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat__number {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  color: var(--teal-600);
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.stat__label {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.45;
}

/* Источник цифры — прижат к низу, чтобы в ряду источники стояли на одной линии */
.stat__source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-decoration: none;
}

.stat__source:hover {
  color: var(--teal-700);
}

.stat__source .icon {
  font-size: 0.7rem;
}

.stats__grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats__grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-hero + .stats {
  margin-top: -40px;
}

/* ---------- Миссия (главная) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.feature-list {
  display: grid;
  gap: 16px;
}

.feature {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px;
}

.feature .icon-badge {
  flex: none;
  margin: 0;
  width: 48px;
  height: 48px;
}

.feature h3 {
  margin-bottom: 4px;
  font-size: 1.08rem;
}

.feature p {
  margin: 0;
  font-size: 0.98rem;
}

/* ---------- Мероприятия ---------- */

.event-teaser {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 32px;
}

.date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--navy-800), var(--navy-700));
  color: #fff;
  text-align: center;
  line-height: 1.1;
}

.date-tile__day {
  font-family: var(--font-head);
  font-size: 2.3rem;
  font-weight: 800;
}

.date-tile__month {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-300);
  margin-top: 4px;
}

.date-tile__year {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Точная дата ещё не известна — показываем месяц */
.date-tile--month .date-tile__day {
  font-size: 1.6rem;
  text-transform: uppercase;
}

.event-teaser h3 {
  font-size: 1.4rem;
}

.section-more {
  margin: 28px 0 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.meta .icon {
  color: var(--teal-600);
  width: 1.25em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--done {
  background: #e8f5ee;
  color: #17774a;
}

.event-full {
  padding: 0;
  overflow: hidden;
}

.event-full__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  padding: 36px;
  border-bottom: 1px solid var(--line);
}

.event-full__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.event-full__title-row h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.event-full__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 40px;
  padding: 36px;
}

.event-full__body h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.agenda {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: agenda;
  display: grid;
  gap: 14px;
}

.agenda li {
  counter-increment: agenda;
  position: relative;
  padding: 16px 18px 16px 62px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.agenda li::before {
  content: counter(agenda, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 16px;
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--teal-600);
}

.agenda strong {
  display: block;
  margin-bottom: 2px;
}

.agenda span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Спикеры и руководство ---------- */

.person {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  background: linear-gradient(140deg, var(--teal-500), var(--navy-700));
  margin-bottom: 16px;
}

.person h3 {
  margin: 0;
}

.person__role {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 4px 0 14px;
}

/* Вторая должность — сразу под первой, с небольшим отступом */
.person__role + .person__role {
  margin-top: -10px;
}

/* Невидимый SVG со спрайтом иконок */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Заявка ---------- */

.apply-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.apply-aside {
  display: grid;
  gap: 24px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

.steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
}

.steps__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-600);
  font-family: var(--font-head);
  font-weight: 800;
}

.steps h4 {
  margin: 6px 0 2px;
}

.steps p {
  margin: 0;
  font-size: 0.95rem;
}

.checklist {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.checklist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.5;
}

.checklist .icon {
  color: var(--teal-600);
  margin-top: 4px;
}

.form-card {
  padding: 40px;
}

.form-card h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.form-card > p {
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.req {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field ::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #c7d1dd;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(14, 159, 154, 0.15);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}

.field__error {
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 500;
}

.form-actions {
  margin-top: 28px;
}

.form-note {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--ink-faint);
  text-align: center;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Диалоги ---------- */

.dialog {
  width: min(480px, calc(100% - 32px));
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.dialog::backdrop {
  background: rgba(8, 19, 34, 0.55);
  backdrop-filter: blur(3px);
}

.dialog[open] {
  animation: pop 0.25s ease;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.dialog__body {
  padding: 40px 36px 32px;
  text-align: center;
}

.dialog__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  font-size: 2rem;
}

.dialog__icon--success {
  background: #e8f5ee;
  color: var(--success);
}

.dialog__icon--error {
  background: #fbeceb;
  color: var(--danger);
}

.dialog h2 {
  font-size: 1.5rem;
}

.dialog p {
  color: var(--ink-soft);
}

.dialog__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- Призыв к действию ---------- */

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 56px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(14, 159, 154, 0.5), transparent 60%),
    linear-gradient(140deg, var(--navy-800), var(--navy-700));
  box-shadow: var(--shadow-lg);
}

.cta-band h2 {
  margin-bottom: 8px;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.08rem;
  max-width: 560px;
}

/* ---------- Подвал ---------- */

.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 28px;
  font-size: 0.97rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .brand,
.site-footer .brand:hover {
  color: #fff;
  margin-bottom: 16px;
}

.site-footer .brand__text small {
  color: rgba(255, 255, 255, 0.55);
}

.site-footer .brand__mark {
  color: #fff;
}

.site-footer h2 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal-300);
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  word-break: break-all;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Адаптивность ---------- */

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats__grid .stat:nth-child(3) { border-left: none; }
  .stats__grid .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stats__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats__grid--3 .stat:nth-child(3) { border-left: 1px solid var(--line); border-top: none; }
  .split { gap: 40px; }
  .apply-layout { grid-template-columns: 1fr; }
  .apply-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-full__body { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    /* На телефоне в горизонтальной ориентации меню выше экрана — даём ему прокрутку */
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__link {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .site-nav .btn {
    margin: 8px 0 0;
  }

  .split { grid-template-columns: 1fr; }

  .event-teaser {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .event-teaser > .link-arrow,
  .event-teaser > .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-event {
    max-width: 520px;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 32px;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .section--tight { padding: 48px 0; }
  .hero { padding: 72px 0; }
  .hero--with-stats { padding-bottom: 150px; }
  .page-hero { padding: 52px 0 56px; }
  .hero__actions .btn { flex: 1 1 100%; }
  /* Длинные подписи кнопок переносятся, а не вылезают за экран шириной 320px */
  .btn { white-space: normal; text-align: center; }

  .grid--4,
  .stats__grid,
  .stats__grid--3,
  .apply-aside { grid-template-columns: 1fr; }

  .stats__grid .stat + .stat,
  .stats__grid .stat:nth-child(3) { border-left: none; border-top: 1px solid var(--line); }
  .stat { padding: 24px 20px; }

  .card { padding: 22px; }
  .form-card { padding: 26px 20px; }
  .form-grid { grid-template-columns: 1fr; }

  .event-teaser { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .event-teaser > .btn { justify-self: stretch; }
  .hero-event { padding: 22px 20px; }
  .hero-event .btn { padding-left: 16px; padding-right: 16px; }
  .event-full__top { grid-template-columns: 1fr; padding: 24px; gap: 20px; }
  .event-full__body { padding: 24px; }
  .date-tile { width: 88px; height: 88px; }
  .date-tile__day { font-size: 1.9rem; }

  .cta-band { padding: 32px 22px; }
  .cta-band .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Дополнения ---------- */

.mission {
  max-width: 900px;
  margin-bottom: 72px;
  padding-left: 28px;
  border-left: 4px solid var(--teal-500);
}

.mission__text {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin: 0;
}

.goals {
  margin-top: 28px;
}

@media (max-width: 640px) {
  .mission { padding-left: 18px; margin-bottom: 48px; }
}

/* ---------- Форма: согласие и защита от спама ---------- */

.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-weight: 400 !important;
  font-size: 0.95rem !important;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.5;
}

.field .check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--teal-600);
  cursor: pointer;
}

.field--check.has-error .check {
  color: var(--danger);
}

.form-note.is-warning {
  color: var(--danger);
  font-weight: 500;
}

/* ---------- Текстовые страницы ---------- */

.prose {
  max-width: 820px;
  padding: 48px 56px;
}

.prose h2 {
  font-size: 1.3rem;
  margin: 40px 0 14px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 22px;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 6px;
}

/* ---------- Подвал: соцсети и ссылки ---------- */

.social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.site-footer .social-link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.15rem;
  transition: background-color 0.2s, color 0.2s;
}

.site-footer .social-link:hover {
  background: var(--teal-600);
  color: #fff;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Страница мероприятия ---------- */

.event-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 26px 0 32px;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.event-facts li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.event-facts .icon {
  color: var(--teal-300);
}

/* Место — ссылка на карту: на тёмном фоне светлая, с приглушённым подчёркиванием */
.event-facts a {
  color: inherit;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.event-facts a:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

/* Длинное название площадки переносится на несколько строк — иконка остаётся у первой строки */
.hero-event__facts li,
.meta li,
.event-facts li {
  align-items: flex-start;
}

.hero-event__facts .icon,
.meta .icon,
.event-facts .icon {
  margin-top: 0.325em;
}

/* Спикеры и руководство: одинаковые карточки по три в ряд — все ряды одной высоты */
.people-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
}

/* Руководство: два человека на всю ширину */
.people-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Карточка, оставшаяся в последнем ряду одна, — по центру, а не у левого края */
.people-grid > :last-child:nth-child(3n + 1):not(:first-child) {
  grid-column: 2;
}

@media (max-width: 900px) {
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .people-grid > :last-child:nth-child(3n + 1):not(:first-child) {
    grid-column: auto;
  }

  .people-grid > :last-child:nth-child(2n + 1):not(:first-child) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 24px) / 2);
  }
}

@media (max-width: 640px) {
  .people-grid { grid-template-columns: 1fr; }

  .people-grid > :last-child:nth-child(2n + 1):not(:first-child) {
    width: auto;
    justify-self: stretch;
  }
}

.badge--role {
  align-self: flex-start;
  margin-bottom: 12px;
  background: var(--teal-50);
  color: var(--teal-700);
}

.meta--stack {
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 16px;
}

.event-organizers {
  font-size: 0.92rem;
}

/* «Добавить в календарь» — рядом с формой регистрации и в окне после неё */
.calendar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.dialog__calendar {
  margin: 14px 0 0;
  font-size: 0.95rem;
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.timeline__time {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--teal-600);
  white-space: nowrap;
}

.timeline__item h3 {
  margin: 0;
  font-size: 1.08rem;
}

.timeline__item p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Регистрация, перерывы и обед — без карточки, чтобы не спорить с докладами */
.timeline__item--break {
  background: transparent;
  border-style: dashed;
}

.timeline__item--break h3 {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .timeline__item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 16px 18px;
  }
}

/* Вопросы и ответы: раскрывающиеся <details>, работают без JavaScript */
.faq {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: calc(var(--radius) - 1px);
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary:hover {
  color: var(--teal-700);
}

.faq__item summary .icon {
  color: var(--teal-600);
  transition: transform 0.2s;
}

.faq__item[open] summary .icon {
  transform: rotate(180deg);
}

.faq__answer {
  margin: 0;
  padding: 0 24px 22px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.faq__more {
  margin: 28px 0 0;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .faq__item summary {
    padding: 16px 18px;
    font-size: 1rem;
  }

  .faq__answer {
    padding: 0 18px 18px;
  }
}

/* ---------- Фотографии ---------- */

/* Портреты спикеров и руководства (tools/make_photos.py); без фото — кружок с инициалами */
.avatar--photo {
  object-fit: cover;
  background: var(--navy-800);
}

/* Карточки спикеров: крупное фото по центру, имя и должность под ним */
.person {
  align-items: center;
  text-align: center;
}

.person__about {
  margin: -6px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* Заголовок раздела из одной «таблетки» (Руководство, Фотографии) — без подзаголовка, поэтому отступ меньше */
.section-label {
  margin-bottom: 28px;
}

.person .avatar {
  width: 160px;
  height: 160px;
  margin-bottom: 18px;
  font-size: 2.6rem;
}

/* Шапка страницы прошедшего мероприятия: фото с затемнением, чтобы текст читался */
.event-hero--photo {
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(14, 159, 154, 0.35), transparent 60%),
    linear-gradient(160deg, rgba(8, 19, 34, 0.94), rgba(13, 29, 51, 0.86) 55%, rgba(21, 41, 74, 0.82)),
    url("/img/cyber-day-2025/hero.webp") center 40% / cover no-repeat,
    var(--navy-900);
}

/* Фотографии: ровная сетка превью; вертикальные фото кадрируются по лицам */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--line);
}

.gallery__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__item--tall img {
  object-position: 50% 22%;
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__item:focus-visible {
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .gallery { gap: 6px; }
}

/* Полоса фото в карточке мероприятия на странице «Мероприятия» */
.event-full__more {
  margin-top: 8px;
}

.event-full__photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  border-top: 1px solid var(--line);
}

.event-full__photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity 0.2s;
}

.event-full__photos:hover img {
  opacity: 0.88;
}

@media (max-width: 640px) {
  .event-full__photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Просмотр фото на весь экран (gallery.js) */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  overflow: hidden;
  background: transparent;
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(8, 19, 34, 0.94);
}

.lightbox__figure {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 56px 80px 24px;
}

.lightbox__img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox__caption {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  text-align: center;
}

.lightbox__counter {
  margin-right: 8px;
  color: #fff;
  font-weight: 600;
}

.lightbox__btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__btn--prev {
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
}

.lightbox__btn--next {
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}

.lightbox__btn--close {
  top: 16px;
  right: 16px;
}

/* На телефоне стрелки внизу, под фото, — чтобы не закрывали его */
@media (max-width: 640px) {
  .lightbox__figure {
    padding: 72px 12px 96px;
  }

  .lightbox__img {
    max-height: calc(100vh - 200px);
  }

  .lightbox__btn--prev,
  .lightbox__btn--next {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .lightbox__btn--prev { left: calc(50% - 64px); }
  .lightbox__btn--next { right: calc(50% - 64px); }
}

/* ---------- 404 ---------- */

.not-found {
  padding: 120px 0 140px;
}

.not-found .hero__actions {
  margin-top: 32px;
}

@media (max-width: 640px) {
  .prose { padding: 28px 20px; }
  .not-found { padding: 72px 0 88px; }
}

/* ---------- Карта площадки рядом с карточкой мероприятия ---------- */

/* С картой колонка выше экрана — не «прилипает» при прокрутке формы, иначе низ карты не увидеть */
.apply-aside--map {
  position: static;
}

.card.map-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

/* Пропорции картинки фиксированы — карта не обрезается, логотип 2ГИС в углу остаётся виден */
.map-card__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 620;
  object-fit: cover;
}

.map-card__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.map-card__address,
.map-card__open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.map-card__address {
  color: var(--ink-soft);
}

.map-card__address .icon,
.map-card__open {
  color: var(--teal-600);
}

.map-card__open {
  font-weight: 600;
}

.map-card:hover .map-card__open {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Анимации ----------
   Появление блоков при прокрутке и отсчёт цифр делает main.js. Всё движение — только для тех,
   у кого в системе не включено «Уменьшить движение»; без JavaScript всё видно сразу. */

/* Блок ниже экрана ждёт, пока до него докрутят (класс ставит и снимает main.js) */
.reveal-pending {
  opacity: 0;
}

/* Текст только для скринридеров: пока цифра отсчитывается, они читают итоговое значение */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Цифры одной ширины — число не дёргается во время отсчёта */
.stat__number {
  font-variant-numeric: tabular-nums;
}

/* Блоки, въезжающие сбоку, не дают горизонтальной прокрутки */
main {
  overflow-x: clip;
}

/* Точка у анонса мероприятия: при загрузке пульсирует, потом просто горит */
.hero-event__label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

@media (prefers-reduced-motion: no-preference) {
  /* Баннер: строки поднимаются по очереди, анонс мероприятия въезжает справа */
  .hero__inner > *,
  .page-hero .container > * {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }

  .hero__inner > :nth-child(2),
  .page-hero .container > :nth-child(2) { animation-delay: 0.08s; }

  .hero__inner > :nth-child(3),
  .page-hero .container > :nth-child(3) { animation-delay: 0.16s; }

  .hero__inner > :nth-child(4),
  .page-hero .container > :nth-child(4) { animation-delay: 0.24s; }

  .page-hero .container > :nth-child(5) { animation-delay: 0.32s; }

  .hero-event {
    animation: slide-in-right 0.9s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }

  .hero-event__label::before {
    animation: pulse 2s 1.2s ease-out 2;
  }

  /* Ответы в «Частых вопросах» раскрываются плавно (Chrome, Edge; в других браузерах — сразу) */
  @supports (interpolate-size: allow-keywords) {
    .faq {
      interpolate-size: allow-keywords;
    }

    .faq__item::details-content {
      block-size: 0;
      overflow: hidden;
      transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
    }

    .faq__item[open]::details-content {
      block-size: auto;
    }
  }
}

/* На узком экране анонс стоит под текстом — поднимается, а не въезжает сбоку */
@media (prefers-reduced-motion: no-preference) and (max-width: 1000px) {
  .hero-event {
    animation-name: rise;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(56px); }
}

@keyframes pulse {
  from { box-shadow: 0 0 0 0 rgba(245, 181, 61, 0.6); }
  70%, to { box-shadow: 0 0 0 9px rgba(245, 181, 61, 0); }
}

@media print {
  .reveal-pending {
    opacity: 1 !important;
  }
}
