/* ===== Илья Аксельрод — афиша ===========================================
   Дизайн: страница как печатное табло вылетов. Светлый бумажный фон,
   жирный гротеск, нулевые скругления, красный акцент и табличные цифры.
   ======================================================================= */

:root {
  /* Палитра из handoff «Афиша 1» */
  --bg: #f4f1ec;
  --surface: #eceae4;
  --ink: #111111;
  --accent: #e42b16;          /* заливки и крупный текст: белый на нём даёт 4.51 */
  --accent-text: #d22a16;     /* тот же красный для МЕЛКОГО текста: 4.57 на холсте */
  --divider: #b8b5b0;
  --hairline: #d6d3ce;

  --n-100: #eceae4;
  --n-200: #e2dfd9;
  --n-300: #b8b5b0;
  --n-700: #706d6a;           /* вторичный текст: 4.56, у исходного #77736e было 4.18 */
  --n-800: #3d3a37;

  --a-100: #fbe9e5;
  --a-700: #a81f0f;
  --a-800: #7c1405;

  --font: "Archivo", "Heebo", system-ui, -apple-system, sans-serif;
  --font-display: "Roboto Condensed", "Heebo", "Archivo", system-ui, sans-serif;
  --pad: clamp(1rem, 3vw, 3rem);
  --page-max: 90rem;
}

/* Высокий контраст: чистая типографика без полутонов */
html.a11y-contrast {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --accent: #b21000;
  --divider: #000000;
  --hairline: #000000;
  --n-100: #ffffff;
  --n-200: #ffffff;
  --n-300: #000000;
  --n-700: #000000;
  --n-800: #000000;
  --a-100: #ffffff;
  --a-700: #8a0c00;
  --a-800: #6b0900;
}

html.a11y-underline a { text-decoration: underline !important; }

html.a11y-nomotion *,
html.a11y-nomotion *::before,
html.a11y-nomotion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

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

/* Элементы сетки и флекса по умолчанию не сжимаются ýже своего содержимого,
   из-за чего на узких экранах страница получала горизонтальную прокрутку. */

::placeholder { color: var(--n-700); opacity: 1; }

:root {
  caret-color: var(--accent);
  accent-color: var(--accent);
  scrollbar-color: var(--n-300) transparent;
}

a { text-underline-offset: 0.18em; text-decoration-thickness: from-font; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 900; margin: 0; }

.brand .name, .nav-link, .seg-opt, .btn, .cols, .row .date, .row .city,
.row .country, .tag, .site-footer, .board-note, 
img { max-width: 100%; display: block; }

a { color: var(--a-700); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  padding: 12px 20px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 12px;
}
.skip-link:focus { inset-inline-start: 0; }

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: var(--page-max);
  margin-inline: auto;
  width: 100%;
}

/* Место под плавающую кнопку доступности, чтобы она не легла на подвал */
.site-footer { padding-inline-start: calc(var(--pad) + 62px); }

/* ===== Шапка ===== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--pad);
  height: 72px;
  border-bottom: 1px solid var(--divider);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .mark { width: 12px; height: 12px; background: var(--accent); display: block; flex: none; }
.brand .name {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .18em;
  white-space: nowrap;
}

.header-side { display: flex; align-items: center; gap: 20px; }

.nav-link {
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink);
}

/* Сегментированный переключатель (языки, фильтр стран) */

.seg { display: inline-flex; gap: 8px; }

.seg-opt {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--divider);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  padding: 10px 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  border-radius: 0;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

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

.btn-secondary { border-color: var(--divider); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }

.btn-invert { background: #fff; color: var(--a-700); }
.btn-invert:hover { background: var(--ink); color: #fff; }

.btn:disabled, .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ===== Хиро ===== */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(420px, 46vw, 620px);
  padding: 30px var(--pad) 0;
  overflow: hidden;
  border-bottom: 1px solid var(--divider);
}



/* Сцена — фоном отдельным слоем: на иврите раскладку зеркалит, и фон надо
   отразить вместе с ней, а фигуру при этом оставить как есть. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('hero/stage.webp?v=a9cffec2') center bottom / cover no-repeat;
  z-index: 0;
}
[dir="rtl"] .hero::before { transform: scaleX(-1); }

.hero-text { position: relative; z-index: 2; padding-bottom: 26px; }

.hero-figure {
  position: absolute;
  inset-inline-end: 3%;
  bottom: 0;
  height: 92%;
  width: auto;
  max-width: 44%;
  object-fit: contain;
  object-position: bottom;
  z-index: 1;
  pointer-events: none;
}

.hero-text h1 { line-height: .84; overflow-wrap: anywhere; }




.kicker {
  display: table;
  background: var(--accent);
  color: #fff;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 800;
  
}
@keyframes blip { 0%, 45% { opacity: 1 } 50%, 95% { opacity: .15 } 100% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

h1 {
  font-size: clamp(2.8rem, 8.6vw, 7.6rem);
  /* Имя лежит прямо на сцене. Белая обводка держит его читаемым и на
     красном занавесе, и на светлом полу — без плашек вокруг букв. */
  color: var(--ink);
  -webkit-text-stroke: .085em #fff;
  paint-order: stroke fill;
  line-height: .82;
  letter-spacing: -.04em;
  margin: 10px 0 0;
  text-transform: uppercase;
  /* Имя в две строки: так оно набирает вес и доезжает до фигуры */
}




/* ===== Табло ===== */

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--divider);
  flex-wrap: wrap;
}
.board-head h2 { font-size: 26px; text-transform: uppercase; letter-spacing: .02em; color: var(--accent); }

.cols {
  display: grid;
  grid-template-columns: 14% minmax(0, 30%) minmax(0, 18%) minmax(0, 1fr) auto;
  gap: 16px;
  padding: 8px var(--pad);
  border-bottom: 1px solid var(--divider);
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--n-700);
}

.rows { list-style: none; margin: 0; padding: 0; }

.row {
  display: grid;
  grid-template-columns: 14% minmax(0, 30%) minmax(0, 18%) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--hairline);
  transition: background .12s;
}
.row:hover { background: var(--a-100); }

.row .date { font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: -.02em; }
.row .date--text {
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--n-700);
}
.row .city { font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.1; }
.row .country { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--n-700); }

.row .act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row .act .btn { font-size: 13px; padding: 10px 14px; text-transform: uppercase; letter-spacing: .06em; }

/* Заблокированная кнопка билета: видно, что покупка была и закрылась */
.btn[aria-disabled='true'] {
  opacity: .45;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Лист ожидания — второстепенное действие, поэтому ссылка, а не кнопка */
.link-waitlist {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-text);
  background: none;
  border: 0;
  padding: 6px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.link-waitlist:hover { color: var(--ink); }
.link-waitlist:disabled { opacity: .5; cursor: not-allowed; }

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: .02em;
  padding: 3px 10px;
  white-space: nowrap;
}
.tag-few { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.tag-out { background: var(--n-100); color: var(--n-800); border: 1px solid var(--n-300); }
.tag-soon { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }

.board-note,
.board-note[hidden] { display: none; }

/* ===== Контакты ===== */

.contacts {
  background: var(--accent);
  color: #fff;
  padding: clamp(28px, 4vw, 48px) var(--pad);
  border-bottom: 1px solid var(--ink);
}
.contacts h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  text-transform: uppercase;
  letter-spacing: -.01em;
  margin: 0 0 12px;
  max-width: 20ch;
}
.contacts p { font-size: 16px; margin: 0 0 24px; max-width: 46ch; }
.contacts .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Белая кнопка на красном: тёмный текст даёт 18.9:1 */
.btn-onaccent { background: #fff; color: var(--ink); }
.btn-onaccent:hover { background: var(--ink); color: #fff; }

/* Фирменный зелёный WhatsApp. Белый текст на нём даёт всего 1.98:1,
   поэтому подпись тёмная — 9.5:1, и кнопка остаётся узнаваемо зелёной. */
.btn-whatsapp {
  background: #25d366;
  color: #111111;
  border-color: #25d366;
}
.btn-whatsapp:hover { background: #1eb955; color: #111111; }
.btn-whatsapp svg { fill: currentColor; flex: none; }




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

.site-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--pad);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  flex-wrap: wrap;
}
.site-footer .links { display: flex; gap: 20px; }
.site-footer a { color: var(--ink); }

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

.legal { padding: 32px var(--pad) 56px; max-width: 62ch; }
.legal h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1; margin-bottom: 24px; }
.legal h2 { font-size: 20px; text-transform: uppercase; letter-spacing: .02em; margin: 32px 0 8px; }
.legal h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; margin: 28px 0 8px; }
.legal p, .legal li { font-size: 15px; }
.legal p { margin: 10px 0; }
.legal ul { margin: 8px 0 8px 20px; }
.legal .back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
}
.legal .he { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--divider); }

/* ===== Модальное окно ===== */

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 72%, transparent); }

.modal-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg);
  border: 2px solid var(--ink);
  padding: 28px;
}
.modal-card h2 { font-size: 24px; text-transform: uppercase; letter-spacing: -.01em; padding-inline-end: 32px; }
.modal-sub { font-size: 14px; color: var(--n-700); margin: 8px 0 0; }

.modal-close {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--accent); color: #fff; }

.wl-form { margin-top: 20px; display: grid; gap: 14px; }
.wl-event {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 8px 10px;
  background: var(--accent);
  color: #fff;
  margin: 0;
}
.wl-form label { display: grid; gap: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--n-700); font-weight: 800; }
.wl-form input, .wl-form textarea {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--divider);
  padding: 10px;
  width: 100%;
  resize: vertical;
}
.wl-form input:focus, .wl-form textarea:focus { border-color: var(--accent); }

.wl-trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

.wl-error { color: var(--a-700); font-size: 14px; margin: 0; font-weight: 800; }
.wl-error[hidden] { display: none; }
.wl-submit { width: 100%; }
.wl-privacy { font-size: 11px; color: var(--n-700); line-height: 1.45; margin: 0; text-transform: none; letter-spacing: 0; }

.wl-done { margin: 20px 0 0; padding: 14px; border: 2px solid var(--accent); font-size: 15px; }
.wl-done[hidden] { display: none; }

/* ===== Панель доступности ===== */

.a11y-btn {
  position: fixed;
  inset-inline-start: 16px;
  bottom: 16px;
  z-index: 70;
  width: 46px;
  height: 46px;
  background: var(--ink);
  border: 0;
  color: var(--bg);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.a11y-btn:hover { background: var(--accent); color: #fff; }
.a11y-btn svg { width: 24px; height: 24px; fill: currentColor; }

.a11y-panel {
  position: fixed;
  inset-inline-start: 16px;
  bottom: 70px;
  z-index: 71;
  width: min(320px, calc(100vw - 32px));
  background: var(--bg);
  border: 2px solid var(--ink);
  padding: 18px;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .18em; margin-bottom: 12px; }

.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
}
.a11y-row .fs-controls { display: flex; gap: 6px; }
.a11y-row button.fs {
  font: inherit;
  font-weight: 800;
  width: 32px;
  height: 32px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.a11y-row button.fs:hover { background: var(--ink); color: var(--bg); }
.a11y-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

.a11y-reset {
  margin-top: 10px;
  width: 100%;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 9px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--n-700);
  cursor: pointer;
}
.a11y-reset:hover { background: var(--ink); color: var(--bg); }

/* ===== Адаптив =====================================================
   Переписано целиком: от прежних раскладок оставались правила вроде
   flex-direction: column у хиро, из-за которых «прижать к низу»
   превращалось в «прижать вправо», и имя уезжало под фигуру.
   ================================================================== */

/* Планшет: имя мельче, фигура уже, таблица остаётся таблицей */
@media (max-width: 1100px) {
  h1 { font-size: clamp(3.5rem, 9vw, 7rem); }
    .row { grid-template-columns: 14% minmax(0, 34%) minmax(0, 20%) minmax(0, 1fr) auto; }
}

/* Телефон и узкий планшет */
@media (max-width: 820px) {
    .site-header { height: auto; min-height: 64px; padding-block: 8px; gap: 12px; flex-wrap: wrap; }
  .site-header .nav-link { display: none; }

  .hero {
    min-height: 78vw;
    padding: 18px var(--pad) 0;
    align-items: flex-end;
  }
  /* Имя и шарж делят ширину: раньше буквы наезжали на карикатуру */
  .hero-text { max-width: 56%; padding-bottom: 18px; }
  h1 {
    font-size: clamp(1.9rem, 8.6vw, 3.2rem);
    letter-spacing: -.03em;
  }
  .hero-figure { inset-inline-end: -1%; height: 72%; max-width: 46%; }
  /* Текстовому блоку отдаём чуть больше половины ширины: имя само
     переносится на две строки и целиком остаётся слева от фигуры. */
    
  /* Табло становится плоским списком: сверху дата и город,
     снизу страна, пометка и кнопка. Карточек с тенями не делаем. */
  .cols { display: none; }
  .row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "date city city"
      "country status act";
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
    min-height: 92px;
    padding-block: 12px;
  }
  .row .date    { grid-area: date; font-size: 24px; }
  .row .city    { grid-area: city; font-size: 20px; }
  .row .country { grid-area: country; }
  .row .status  { grid-area: status; }
  .row .act     { grid-area: act; justify-self: end; }
  .row .date--text { font-size: 12px; max-width: 90px; }

  .contacts h2 { font-size: clamp(24px, 7vw, 34px); }
  .contacts .actions { flex-direction: column; align-items: stretch; }
  .contacts .actions .btn { justify-content: center; }

  .site-footer { padding-inline-start: calc(var(--pad) + 58px); }
}

/* Пальцем промахнуться легче, чем мышью: во всё, во что тычут, — от 44px */
@media (pointer: coarse), (max-width: 820px) {
  .seg-opt { min-height: 44px; }
  .btn { min-height: 44px; }
  .box-offices a, .site-footer a { display: inline-block; padding-block: 10px; }
  .brand { padding-block: 8px; }
}

/* Совсем узкие экраны */
@media (max-width: 380px) {
  :root { --pad: 14px; }
  .site-header { gap: 8px; padding-inline: 12px; }
  .brand .name { font-size: 11px; letter-spacing: .08em; }
  .brand .mark { width: 10px; height: 10px; }
  .seg-opt { padding-inline: 10px; font-size: 11px; }
  .row .city { font-size: 18px; overflow-wrap: anywhere; }
  .row .date { font-size: 22px; }
    .a11y-btn { width: 44px; height: 44px; inset-inline-start: 10px; }
  .site-footer { padding-inline-start: calc(var(--pad) + 54px); }
}
