/* ============================== TOKENS ============================== */
:root {
  --black: #0b0b0c;
  --card: #141416;
  --white: #ffffff;
  --pink: #d51181;
  --hairline: rgba(255, 255, 255, .12);

  --font: 'Gilroy', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 22px;
  --gutter: clamp(20px, 5vw, 56px);
  --bar-pad: clamp(18px, 3vw, 30px);

  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  background: var(--black);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.page {
  max-width: 1180px;
  margin-inline: auto;
  padding: calc(clamp(24px, 4vw, 48px) + env(safe-area-inset-top, 0px))
           var(--gutter)
           calc(clamp(28px, 4vw, 48px) + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: clamp(30px, 5vw, 64px);
}

/* ============================== HEADER ============================== */
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 4vw, 48px);
}

.head__name { margin: 0; flex: 0 0 auto; line-height: 0; }

.mark {
  width: clamp(124px, 32vw, 196px);
  height: auto;
  aspect-ratio: 600 / 287;
}

.head__sub {
  margin: 0;
  min-width: 0;
  font-size: clamp(15px, 4vw, 25px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--white);
  text-align: right;
}

/* ============================== TILE ================================ */
/* Афіша вже несе власний лок-ап, тому поверх неї нічого не кладемо:
   дати й охоплення живуть у смузі під нею, всередині тієї самої картки. */
.tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  transition: box-shadow .5s var(--ease-out);
  animation: rise .8s var(--ease-out) both;
  animation-delay: 120ms;
}

.tile:hover { box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .85); }
.tile:focus-visible { outline-offset: 6px; }

.tile__img {
  width: 100%;
  height: auto;
  aspect-ratio: 1357 / 1920;
  object-fit: cover;
  transform: translateZ(0);
  transition: transform .9s var(--ease-out);
}

.tile:hover .tile__img { transform: scale(1.035); }

.tile__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: var(--bar-pad);
  border-top: 1px solid var(--hairline);
}

.tile__meta { display: grid; gap: 4px; min-width: 0; }

.tile__dates {
  font-size: clamp(22px, 5.6vw, 34px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.tile__place {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(14px, 3.4vw, 17px);
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
}

.tile__pin { width: 15px; height: 15px; flex: none; }

.tile__go {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  transition: transform .5s var(--ease-out);
}

.tile__go svg { width: 21px; height: 21px; transition: transform .5s var(--ease-out); }

.tile:hover .tile__go { transform: scale(1.08); }
.tile:hover .tile__go svg { transform: translate(2px, -2px); }

/* ============================== FOOTER ============================== */
.foot {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 26px);
  animation: rise .8s var(--ease-out) both;
  animation-delay: 300ms;
}

.foot__icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--white);
  transition: transform .4s var(--ease-out);
}

.foot__icon svg { width: 44px; height: 44px; }
.foot__icon:hover { transform: translateY(-3px); }

.foot__text {
  margin: 0;
  min-width: 0;
  font-size: clamp(15px, 4vw, 22px);
  line-height: 1.32;
  font-weight: 500;
  text-wrap: balance;
}

.foot__text a {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .28);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color .25s ease;
}
.foot__text a:hover { text-decoration-color: var(--white); }

/* ============================== ENTRANCE ============================ */
.head { animation: rise .8s var(--ease-out) both; }

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: none; }
}

/* ============================== DESKTOP ============================= */
@media (min-width: 900px) {
  .head { justify-content: flex-start; gap: clamp(24px, 3.4vw, 48px); }
  .head__sub { text-align: left; }

  /* Та сама одна плитка, лише горизонтальний кадр афіші. Афішу не ріжемо:
     замість цього ширину картки виводимо з вільної висоти вікна — так смуга
     з датами й кнопкою лишається у кадрі й на ноутбуці. */
  .tile {
    max-width: min(100%, max(620px, calc((100svh - 400px) * 16 / 9)));
    margin-inline: auto;
  }
  .tile__img { aspect-ratio: 16 / 9; }

  .tile__go { width: 56px; height: 56px; }
  .tile__go svg { width: 24px; height: 24px; }
}

/* ============================== NARROW (≤359px) ===================== */
@media (max-width: 359px) {
  .head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .head__sub { text-align: left; }
}

/* ============================== MOTION OFF ========================== */
@media (prefers-reduced-motion: reduce) {
  .head, .tile, .foot { animation: none; }
  .tile__img, .tile__go, .tile__go svg, .foot__icon { transition: none; }
  .tile:hover .tile__img { transform: none; }
}
