/* ==========================================================================
   Капитаны культуры — оформление формы регистрации
   Палитра и геометрия взяты из логотипа сообщества.
   ========================================================================== */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/montserrat-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/montserrat-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/montserrat-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/montserrat-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/montserrat-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/montserrat-latin-400-normal.woff2") format("woff2"); 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: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2"); 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: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); 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: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); 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: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/montserrat-latin-800-normal.woff2") format("woff2"); 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 {
  /* Цвета логотипа */
  --navy: #162a42;
  --navy-hover: #233d5e;
  --terra: #c36f49;          /* декор: круг, треугольник */
  --terra-ink: #a3532f;      /* терракота для текста на светлом фоне (контраст ≥ 4.5:1) */
  --sand: #c3b8af;
  --sage: #7b9ea3;
  --sage-ink: #4b6f74;

  /* Производные */
  --paper: #f6f3ef;          /* тёплый светлый фон, близкий к бежевому из логотипа */
  --field: #ffffff;
  --sand-soft: #ebe5df;
  --sage-soft: #e2ebec;
  --terra-soft: #f6e6de;
  --ink: #162a42;
  --muted: #5b6676;
  --line: #d4ccc4;
  --error: #b3261e;
  --error-soft: #fbeae8;
  --ok: #2f6b4a;

  --font: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 2px;             /* логотип собран из чётких геометрических форм — без скруглений */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

/* --------------------------------------------------------------------------
   Публичные страницы: две колонки — тёмная панель с логотипом и форма
   -------------------------------------------------------------------------- */

.split { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 40%) 1fr; }

.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}
.hero__inner {
  position: sticky; top: 0;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 36px;
  padding: 56px 40px;
}
.hero__logo { width: min(340px, 100%); margin-inline: auto; }

.hero__event {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
.hero__kicker {
  font-size: 13px; font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
  padding-left: .32em;      /* компенсация разрядки последней буквы */
}
.hero__date {
  font-size: 28px; font-weight: 700; letter-spacing: .06em;
  color: #fff;
}
.hero__date::before, .hero__date::after {
  content: ""; display: inline-block; vertical-align: middle;
  width: 36px; height: 1.5px; background: rgba(255, 255, 255, .45);
  margin: 0 14px;
}

/* Геометрический акцент в углу панели — как сегмент круга из логотипа */
.deco--corner {
  position: absolute; right: -70px; bottom: -70px;
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--sage); opacity: .9;
}

.pane { min-width: 0; }
.pane__inner { max-width: 680px; padding: 64px 56px 32px; }

/* Заголовки */
.eyebrow {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--terra-ink);
}
.title {
  margin: 0 0 12px;
  font-size: 30px; line-height: 1.22; font-weight: 800;
  letter-spacing: -.005em;
  color: var(--navy);
}
.title--sm { font-size: 24px; margin: 0; }
.lead { margin: 0; color: var(--muted); }
.subtitle { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.intro { margin-bottom: 36px; }

/* Группы полей с фигурами из логотипа */
.group { margin: 0 0 12px; }
.group__title {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 20px; padding-bottom: 12px;
  border-bottom: 1.5px solid var(--navy);
  font-size: 13px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
}
.shape { flex: none; display: inline-block; width: 16px; height: 16px; }
.shape--circle { border-radius: 50%; background: var(--terra); }
.shape--half { width: 9px; height: 18px; border-radius: 0 18px 18px 0; background: var(--sand); margin-right: 7px; }
.shape--triangle { background: var(--sage); clip-path: polygon(0 100%, 100% 100%, 0 0); }

/* Поля */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.field > label, legend {
  display: block; margin-bottom: 8px; padding: 0;
  font-size: 14px; font-weight: 600; color: var(--navy);
}
.req { color: var(--terra-ink); font-weight: 700; }

input[type="text"], input[type="tel"], input[type="password"], textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  font: inherit; font-size: 16px;   /* 16px — iOS не увеличивает страницу при фокусе */
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #8a93a0; }
input:hover, textarea:hover { border-color: #b9aea4; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(22, 42, 66, .14);
}
textarea { resize: vertical; min-height: 120px; }

.field__hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); text-align: right; }
.field__error { margin: 6px 0 0; font-size: 13px; font-weight: 500; color: var(--error); }
.field--error input, .field--error textarea { border-color: var(--error); background: #fffafa; }

/* Формат участия — плитки */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--field);
  cursor: pointer; font-weight: 600;
  transition: border-color .15s, background .15s, color .15s;
}
.choice:hover { border-color: var(--navy); }
.choice input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 18px; height: 18px; margin: 0;
  border: 1.5px solid var(--navy); border-radius: 50%;
  display: grid; place-items: center;
}
.choice input::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--terra); transform: scale(0); transition: transform .12s;
}
.choice input:checked::before { transform: scale(1); }
.choice:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice:has(input:checked) input { border-color: #fff; }
.choice input:focus-visible { outline: 3px solid rgba(195, 111, 73, .55); outline-offset: 3px; }
.field--error .choice { border-color: var(--error); }

/* Согласие */
.field--consent { margin-top: 8px; padding: 18px; background: var(--sand-soft); }
.field > .consent { display: flex; margin: 0; font-weight: 400; }
.consent { display: flex; gap: 14px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: #3d4757; cursor: pointer; }
.consent input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 20px; height: 20px; margin: 1px 0 0;
  border: 1.5px solid var(--navy); border-radius: var(--radius);
  background: #fff; display: grid; place-items: center; cursor: pointer;
}
.consent input::before {
  content: ""; width: 10px; height: 6px; margin-top: -3px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .12s;
}
.consent input:checked { background: var(--navy); }
.consent input:checked::before { transform: rotate(-45deg) scale(1); }
.consent input:focus-visible { outline: 3px solid rgba(195, 111, 73, .55); outline-offset: 2px; }
.consent a { color: var(--terra-ink); font-weight: 600; }
.field--consent.field--error { background: var(--error-soft); }
.field--consent.field--error .consent input { border-color: var(--error); }

/* Ловушка для ботов: невидима для людей, но не display:none */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Кнопки */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 32px;
  border: 0; border-radius: var(--radius);
  background: var(--navy); color: #fff;
  font: 700 14px/1 var(--font);
  letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer;
  transition: background .15s;
}
.btn::after {           /* терракотовый треугольник — как в логотипе */
  content: ""; width: 10px; height: 10px; flex: none;
  background: var(--terra);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transition: transform .15s;
}
.btn:hover { background: var(--navy-hover); }
.btn:hover::after { transform: translate(2px, -2px); }
.btn:focus-visible { outline: 3px solid rgba(195, 111, 73, .6); outline-offset: 3px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); padding: 11px 20px; }
.btn--ghost::after, .btn--danger::after { display: none; }
.btn--ghost:hover { background: var(--sand-soft); }
.btn--danger { background: var(--error); }
.btn--danger:hover { background: #8f1d17; }

#reg-form .btn { margin-top: 28px; }

.alert {
  margin: 0 0 28px; padding: 14px 18px;
  border-left: 4px solid var(--error);
  background: var(--error-soft); color: var(--error);
  font-size: 14px; font-weight: 500;
}
.notice {
  margin: 0 0 20px; padding: 14px 18px;
  border-left: 4px solid var(--sage);
  background: var(--sage-soft); color: var(--ok); font-weight: 500;
}

/* Сообщения: успех, закрыто, ошибка */
.message { padding-top: 12vh; }
.message .lead { max-width: 460px; }
.badge { position: relative; width: 72px; height: 72px; margin-bottom: 28px; display: grid; place-items: center; color: #fff; }
.badge__circle { position: absolute; inset: 0; border-radius: 50%; background: var(--navy); }
.badge__circle::after {
  content: ""; position: absolute; right: -10px; top: -10px;
  width: 26px; height: 26px; background: var(--terra);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.badge__tick { position: relative; }
.code { margin: 0 0 8px; font-size: 64px; font-weight: 800; line-height: 1; color: var(--terra); }
.link { color: var(--terra-ink); font-weight: 600; }
.muted { color: var(--muted); }

.login { padding-top: 10vh; max-width: 400px; }
.login .title { margin-bottom: 28px; }

.foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 48px; padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.foot__lock {
  flex: none; width: 10px; height: 12px; position: relative; margin-top: 2px;
  background: var(--sage); border-radius: 1px;
}
.foot__lock::before {
  content: ""; position: absolute; left: 1.5px; top: -6px;
  width: 7px; height: 7px; border: 1.5px solid var(--sage); border-bottom: 0;
  border-radius: 4px 4px 0 0; box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Административный раздел
   -------------------------------------------------------------------------- */

.topbar { background: var(--navy); color: #fff; }
.topbar__inner {
  max-width: 1280px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 14px;
}
.topbar__mark { width: 34px; height: 40px; }
.topbar__name { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; }
.topbar__sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .35); }
.topbar__sub { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }

.admin-main { max-width: 1280px; margin: 0 auto; padding: 32px 24px 48px; }
.panel { background: #fff; padding: 28px; margin-bottom: 24px; border-top: 3px solid var(--navy); }
.panel--danger { border-top-color: var(--error); }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; margin-bottom: 24px; }
.stat { padding: 14px 22px 14px 18px; min-width: 130px; display: flex; flex-direction: column; border-left: 4px solid; background: var(--paper); }
.stat--navy { border-color: var(--navy); }
.stat--terra { border-color: var(--terra); }
.stat--sage { border-color: var(--sage); }
.stat__num { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat__label { color: var(--muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.export { margin-left: auto; display: flex; align-items: center; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th {
  background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap;
}
tbody tr:nth-child(even) td { background: #faf8f6; }
tr:last-child td { border-bottom: 0; }
.table--compact td, .table--compact th { padding: 7px 12px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; min-width: 220px; }
code { font-size: 12px; color: var(--muted); }

.tag { display: inline-block; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag--offline { background: var(--terra-soft); color: var(--terra-ink); }
.tag--online { background: var(--sage-soft); color: var(--sage-ink); }

.inline-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.inline-form label { font-weight: 600; font-size: 14px; }
.inline-form input { max-width: 200px; }

/* --------------------------------------------------------------------------
   Планшеты и телефоны
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .hero__inner { position: static; min-height: 0; padding: 28px 16px 26px; gap: 18px; flex-direction: row; justify-content: center; }
  .hero__logo { width: 132px; }
  .hero__event { align-items: flex-start; text-align: left; }
  .hero__kicker { font-size: 11px; padding-left: 0; }
  .hero__date { font-size: 22px; }
  .hero__date::before { display: none; }
  .hero__date::after { width: 28px; margin-right: 0; }
  .deco--corner { width: 90px; height: 90px; right: -45px; bottom: -45px; }
  .pane__inner { margin: 0 auto; padding: 36px 24px 24px; }
}

@media (max-width: 560px) {
  .pane__inner { padding: 28px 16px 20px; }
  .title { font-size: 22px; }
  .intro { margin-bottom: 28px; }
  .row { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn--ghost { width: auto; }
  .field--consent { padding: 14px; }
  .message { padding-top: 4vh; }
  .admin-main { padding: 16px 12px 32px; }
  .panel { padding: 18px 14px; }
  .topbar__sub, .topbar__sep { display: none; }
  .export { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
