/* Visual polish v2 — phase 1: hierarchy, motion and controls */

:root {
  --surface-page: #090d18;
  --surface-card: rgba(16, 23, 41, .96);
  --surface-control: rgba(23, 31, 52, .78);
  --surface-control-hover: rgba(31, 42, 68, .92);
  --radius-control: 12px;
  --radius-card: 18px;
  --radius-feature: 24px;
  --shadow-card: 0 26px 72px rgba(0, 0, 0, .38);
  --shadow-control: 0 18px 46px rgba(0, 0, 0, .34);
  --motion-fast: .22s;
  --motion-ui: .42s;
  --motion-slide: .92s;
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
}

/* Keep the cinema brand primary and the portfolio disclosure secondary. */
.demo-notice {
  position: relative;
  min-height: 30px;
  padding: .42rem 1rem .42rem 2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 13, 24, .97);
  color: #aeb7c8;
  font-size: .66rem;
  font-weight: 720;
  letter-spacing: .025em;
  line-height: 1.35;
  text-transform: none;
}

.demo-notice::before {
  content: "";
  position: absolute;
  left: max(1rem, calc(50% - 405px));
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 95, 70, .1), 0 0 18px rgba(255, 95, 70, .38);
  transform: translateY(-50%);
}

/* Carousel motion: responsive, calm and quicker than the previous cinematic delay. */
.hero-carousel__track {
  transition: transform var(--motion-slide) var(--motion-ease);
}

.hero-preview-card {
  transition:
    transform .68s var(--motion-ease),
    opacity .48s ease,
    border-color .36s ease,
    box-shadow .52s ease,
    filter .48s ease;
}

.hero-preview-card img {
  transition: transform .9s var(--motion-ease), filter .52s ease;
}

.hero-preview-card:not(.is-active):hover,
.hero-preview-card:not(.is-active):focus-visible {
  border-color: rgba(255, 209, 102, .48);
  opacity: .72;
  transform: scale(.94);
}

/* The active-film information is a flat continuation of the current slide. */
.hero {
  min-height: 0;
}

.hero__content {
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
}

.hero__copy {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(.9rem, 2vw, 2rem);
  width: min(82vw, 1480px);
  max-width: none;
  margin: clamp(-3.6rem, -3.2vw, -2.6rem) auto 0;
  padding: clamp(1rem, 1.6vw, 1.45rem) clamp(1.15rem, 2vw, 2rem);
  border: 1px solid rgba(255, 255, 255, .16);
  border-top-color: rgba(255, 209, 102, .34);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.hero__copy > p {
  min-width: 0;
  margin: 0;
  color: #d8deea;
  font-size: clamp(.9rem, 1vw, 1.05rem);
  line-height: 1.55;
}

.hero__copy .hero__meta {
  flex-wrap: nowrap;
  margin: 0;
}

.hero__copy .hero__meta span {
  white-space: nowrap;
}

.hero__copy .hero__actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.hero__copy .button {
  min-height: 46px;
  white-space: nowrap;
}

/* Remove the redundant giant decorative counter; slide number remains on the card. */
.hero__number {
  display: none;
}

/* Keep long translated titles readable instead of forcing ellipsis. */
.hero-preview-card__caption strong {
  max-width: 13ch;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  text-wrap: balance;
}

:lang(ru) .hero-preview-card__caption strong {
  letter-spacing: -.02em;
}

/* Accessible carousel indicators: 44px hit areas with thin visual bars. */
.hero-carousel__dots {
  gap: .15rem;
}

.hero-carousel__dot,
.hero-carousel__dot.is-active {
  position: relative;
  width: 58px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
}

.hero-carousel__dot::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  transform: translateY(-50%);
  transition: background var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.hero-carousel__dot:hover::before,
.hero-carousel__dot:focus-visible::before {
  background: rgba(255, 255, 255, .58);
  transform: translateY(-50%) scaleY(1.45);
}

.hero-carousel__dot.is-active::before {
  background: var(--accent);
}

/* Compact dark date rail aligned with the active carousel slide. */
.date-strip {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(5, minmax(126px, 1fr));
  gap: .35rem;
  width: min(82vw, 1480px);
  margin: 1.15rem auto clamp(2rem, 4vw, 3.5rem);
  padding: .42rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(16, 23, 41, .94);
  box-shadow: var(--shadow-control), inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}

.date-strip::-webkit-scrollbar {
  display: none;
}

.date-strip button {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 58px;
  padding: .65rem .85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.date-strip button:not(.is-active):hover,
.date-strip button:not(.is-active):focus-visible {
  border-color: rgba(255, 209, 102, .22);
  background: var(--surface-control-hover);
  transform: translateY(-1px);
  outline: none;
}

.date-strip button span {
  color: var(--muted);
  font-size: .66rem;
  letter-spacing: .08em;
}

.date-strip button strong {
  font-size: .86rem;
}

.date-strip button.is-active {
  border-color: rgba(255, 95, 70, .68);
  background: var(--accent);
  color: #1b0907;
  box-shadow: 0 10px 28px rgba(255, 95, 70, .2);
}

.date-strip button.is-active span {
  color: #6a1d15;
}

/* Repertoire heading stays expressive without overpowering the film grid. */
.repertoire .section-heading h2 {
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  line-height: .94;
}

/* Toast follows the same dark control language as cinema and locale menus. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 120;
  overflow: hidden;
  width: max-content;
  max-width: min(560px, calc(100vw - 2rem));
  padding: .9rem 1.1rem .9rem 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(16, 23, 41, .97);
  color: var(--text);
  box-shadow: var(--shadow-control), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(16px);
  font-size: .86rem;
  font-weight: 760;
  line-height: 1.35;
  text-align: left;
}

.toast::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 5px rgba(255, 209, 102, .11), 0 0 22px rgba(255, 209, 102, .42);
  transform: translateY(-50%);
}

.toast.is-visible {
  color: var(--text);
}

@media (max-width: 1250px) {
  .hero__copy {
    width: min(86vw, 1480px);
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero__copy .hero__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .date-strip {
    width: min(86vw, 1480px);
  }
}

@media (max-width: 980px) {
  .hero__copy {
    width: 88vw;
    margin-top: -2.8rem;
  }

  .date-strip {
    width: 88vw;
  }
}

@media (max-width: 700px) {
  .demo-notice {
    padding-left: 1.75rem;
    font-size: .58rem;
  }

  .demo-notice::before {
    left: .85rem;
  }

  .hero__copy {
    grid-template-columns: 1fr;
    width: 91vw;
    margin-top: -2.2rem;
    padding: 1rem;
    border-radius: 0 0 16px 16px;
  }

  .hero__copy .hero__meta {
    flex-wrap: wrap;
  }

  .hero__copy .hero__actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .hero__copy .button {
    width: 100%;
  }

  .date-strip {
    grid-template-columns: repeat(5, minmax(112px, 1fr));
    width: calc(100vw - 2rem);
    margin-top: .85rem;
    padding: .35rem;
    border-radius: 16px;
  }

  .date-strip button {
    grid-template-columns: 1fr;
    gap: .2rem;
    min-height: 56px;
  }

  .repertoire .section-heading h2 {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  .toast {
    width: calc(100vw - 2rem);
    padding-right: 1rem;
  }
}

@media (max-width: 520px) {
  .hero__copy {
    width: 92vw;
  }

  .hero__copy .hero__actions {
    grid-template-columns: 1fr;
  }

  .date-strip {
    width: calc(100vw - 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__track,
  .hero-preview-card,
  .hero-preview-card img,
  .date-strip button,
  .hero-carousel__dot::before {
    transition: none !important;
  }
}
