:root {
  --color-primary: #011592;
  --color-primary-50: rgba(1, 21, 146, 0.5);
  --color-primary-darker: #010e5b;
  --color-night: #010010;
  --color-title: #111;
  --color-body-long: #2b2b2b;
  --color-body-short: #555;
  --color-keyline: #e1e1e1;
  --color-forms: #929292;
  --color-light-grey: #f4f4f4;
  --color-tag: #90dae4;
  --color-white: #fff;
  --color-white-38: rgba(255, 255, 255, 0.38);
  --color-focus: #3d7bff;

  --font-primary: "Guillon TQc", "Helvetica Neue", arial, sans-serif;
  --font-secondary: "IBM Plex Sans", "Helvetica Neue", arial, sans-serif;

  --shadow-strong:
    0 24px 80px rgba(1, 21, 146, 0.1), 0 16px 56px rgba(1, 21, 146, 0.1), 0 8px 20px rgba(17, 17, 26, 0.1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --gutter: 20px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: clamp(40px, 7.5vw, 120px);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
  height: auto;
}

/* Lenis does the smoothing. Native smooth scroll would also make ScrollTrigger measure positions at the wrong
   scroll offset on refresh, which shifts every scroll-linked effect (e.g. the programme parallax on a view switch). */
html.lenis,
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--color-night);
  color: var(--color-title);
  font-family: var(--font-primary);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--color-white);
  color: var(--color-primary);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 42px;
  padding: 4px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    transform 0.3s var(--ease-out);
}

.button img {
  flex: none;
  width: 24px;
  height: 24px;
}

.button--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.button--primary:hover {
  background: var(--color-primary-darker);
}

.button--outline {
  border: 2px solid var(--color-primary-50);
  padding-inline: 18px;
  color: var(--color-primary);
}

.button--outline:hover {
  border-color: var(--color-primary);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  transition:
    border-color 0.3s var(--ease-out),
    background-color 0.3s var(--ease-out);
}

.icon-button img {
  width: 24px;
  height: 24px;
}

.icon-button--ghost {
  border: 2px solid var(--color-white-38);
}

.icon-button--ghost:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.icon-button--outline {
  width: 48px;
  height: 48px;
  border: 2px solid var(--color-primary);
  border-radius: 12px;
}

.icon-button--outline:hover,
.icon-button--outline[aria-expanded="true"] {
  background: rgba(1, 21, 146, 0.06);
}

@media (min-width: 1024px) {
  .button {
    min-height: 48px;
    padding: 8px 16px;
    gap: 8px;
    border-radius: 12px;
    font-size: 18px;
    line-height: 22px;
  }

  .button--outline {
    padding-inline: 18px;
  }

  .icon-button {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
}

/* Hero */

.hero {
  position: relative;
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
  color: var(--color-white);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(194, 0, 100, 0.8) 0%, rgba(194, 0, 100, 0) 20%),
    url("./assets/hero-bg.webp") center / cover no-repeat,
    #d4364c;
}

.hero__stars {
  --su: calc(100vw / 375);

  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__star {
  position: absolute;
  width: calc(var(--size) * var(--su));
  height: auto;
  left: calc(var(--x) * var(--su));
  top: calc(var(--y) * var(--su));
  transform-origin: center;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 30px var(--gutter) 46px;
}

.hero__nav {
  align-self: flex-start;
  display: flex;
  align-items: center;
}

.hero__back {
  display: block;
  flex: none;
  width: 24px;
}

.hero__back img {
  width: 100%;
  height: auto;
}

.hero__brand {
  display: block;
  width: 144px;
}

.hero__brand img {
  width: 100%;
  height: auto;
}

.hero__art {
  --u: calc(100vw / 375 * 0.46);

  font-size: var(--u);
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 90em;
}

.hero__frame {
  position: relative;
  flex: none;
  width: 496em;
  height: 498em;
}

.hero__gift,
.hero__logo,
.hero__bow,
.hero__object {
  position: absolute;
  max-width: none;
}

.hero__gift {
  left: -1em;
  top: 0;
  width: 498em;
  height: 497.4em;
}

.hero__logo {
  left: -24.2em;
  top: 101.6em;
  width: 544.4em;
  height: 241em;
}

.hero__bow {
  left: 45.7em;
  top: -90em;
  width: 404.6em;
  height: 254.5em;
}

.hero__object {
  perspective: 600em;
}

.hero__object model-viewer {
  --poster-color: transparent;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  will-change: transform;
}

.hero__object model-viewer::part(default-progress-bar) {
  display: none;
}

/* Still image of the object, shown until the deferred 3D model is ready. */
.hero__object model-viewer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__object--ornament {
  left: 488.5em;
  top: -189em;
  width: 200em;
  height: 244em;
}

.hero__object--popcorn {
  left: -181.5em;
  top: 82em;
  width: 174em;
  height: 212em;
}

.hero__object--tree {
  left: 414em;
  top: 329em;
  width: 200em;
  height: 244em;
  rotate: 33.13deg;
}

.hero__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  text-align: center;
}

.hero__title {
  font-weight: 900;
  font-size: 36px;
  line-height: 42px;
  letter-spacing: 0;
}

.hero__details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero__dates {
  display: block;
  font-weight: 400;
}

.hero__description {
  max-width: 559px;
  font-size: 18px;
  line-height: 24px;
}

.hero__ctas {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Share menu, mirrors the platform's product share popover. */
.share {
  position: relative;
}

.share__menu {
  position: absolute;
  top: 0;
  left: calc(100% + 14px);
  z-index: 20;
  width: max-content;
  padding: 8px;
  border-radius: 6px;
  background: var(--color-primary-darker);
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
  animation: share-menu-in 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.share__menu--up {
  top: auto;
  bottom: 0;
}

.share__menu[hidden] {
  display: none;
}

.share__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.share__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-white);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease-out);
}

.share__item:hover {
  background: var(--color-white-38);
}

@keyframes share-menu-in {
  from {
    opacity: 0;
    transform: translateX(5px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* No room on the right on narrow screens: open below, aligned on the button. */
@media (max-width: 767px) {
  .share__menu {
    top: calc(100% + 8px);
    right: 0;
    left: auto;
  }

  .share__menu--up {
    top: auto;
    bottom: calc(100% + 8px);
  }
}

.hero__pdf {
  font-size: 16px;
  line-height: 20px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__pdf[aria-busy="true"],
.button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.6;
}

.hero__pdf:hover {
  text-decoration-thickness: 2px;
}

@media (min-width: 768px) {
  .hero__stars {
    --su: calc(100vw / 768);
  }

  .hero__inner {
    align-items: flex-start;
    padding: 48px var(--gutter);
  }

  .hero__back {
    width: 22px;
  }

  .hero__brand {
    width: 173px;
  }

  .hero__art {
    --u: calc(100vw / 768 * 0.7117);

    padding-top: 90em;
  }

  .hero__info,
  .hero__details {
    align-items: flex-start;
    text-align: left;
  }

  .hero__info {
    gap: 24px;
  }

  .hero__details {
    gap: 16px;
  }

  .hero__description {
    max-width: 476px;
  }

  .hero__title {
    font-size: 40px;
  }

  .hero__dates {
    margin-top: 8px;
  }

  .hero__dates-break {
    display: none;
  }
}

@media (min-width: 1024px) {
  .hero {
    min-height: clamp(640px, 56.25vw, 900px);
    border-radius: 0 0 24px 24px;
  }

  .hero__bg {
    background:
      linear-gradient(180deg, rgba(194, 0, 100, 0.8) 0%, rgba(164, 39, 17, 0.3) 78%),
      url("./assets/hero-bg.webp") center / cover no-repeat,
      #d4364c;
  }

  .hero__stars {
    --su: min(1px, 0.0625vw);
  }

  .hero__star {
    left: calc(50% + var(--x) * var(--su));
    top: calc(28px + 50% + var(--y) * var(--su));
    translate: -50% -50%;
  }

  .hero__inner {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    min-height: inherit;
    padding: 88px var(--gutter) 40px;
  }

  /* The chevron sits in the side margin so the logo lines up with the content. */
  .hero__nav {
    position: absolute;
    top: 56px;
    left: calc(var(--gutter) - 22px);
  }

  /* Text on the left, gift box on the right. */
  .hero__art {
    --u: min(1px, 0.0625vw);

    flex: 1 0 0;
    justify-content: flex-start;
    min-width: 0;
    padding-top: 0;
  }

  .hero__frame {
    margin-left: 115em;
  }

  .hero__object--ornament {
    left: -197.3em;
    top: -198.2em;
  }

  .hero__object--popcorn {
    left: 513em;
    top: 59em;
  }

  .hero__object--tree {
    left: -123.7em;
    top: 328.8em;
    rotate: -33.13deg;
  }

  .hero__info {
    flex: 1 0 0;
    order: -1;
    gap: 24px;
    min-width: 0;
  }

  .hero__title {
    font-size: clamp(36px, 3.125vw, 50px);
    line-height: 1.08;
  }

  .hero__dates {
    margin-top: 10px;
    font-weight: 300;
    font-size: clamp(34px, 3vw, 48px);
    line-height: 1.125;
  }

  .hero__details {
    max-width: 560px;
    gap: 16px;
    padding-left: 4px;
  }

  .hero__description {
    font-size: 20px;
    line-height: 26px;
  }

  .hero__ctas {
    gap: 16px;
  }
}

/* Promos */

.promos {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--color-white);
}

.promo {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
}

.promo__media {
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.promo__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 32px;
  text-align: center;
}

.promo__title {
  font-weight: 700;
  font-size: 24px;
  line-height: 28px;
  color: var(--color-title);
}

.promo__text {
  flex: 1;
  margin-top: -8px;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-body-long);
}

@media (min-width: 768px) {
  .promos {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .promos {
    gap: 16px;
    margin-top: -60px;
    padding: 180px var(--gutter) 120px;
    background: #1e7470 url("./assets/bg-dots-green.webp") center top / cover no-repeat;
  }

  .promo {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-strong);
  }

  .promo__title {
    font-size: 30px;
    line-height: 34px;
  }

  .promo__text {
    font-size: 18px;
    line-height: 24px;
  }
}

/* Programme */

.programme {
  position: relative;
  isolation: isolate;
  padding-top: 60px;
  background: var(--color-night);
  outline: none;
}

.programme__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Extends above the section by the full parallax travel; the pattern stays anchored to the section top so a new
   travel (after a view switch) never shifts it. */
.programme__bg-layer {
  --parallax-range: 0px;
  position: absolute;
  inset: calc(-1 * var(--parallax-range)) 0 0;
  background: url("./assets/bg-swirls-blue.webp") center var(--parallax-range) / 100% auto repeat-y;
  will-change: transform;
}

.programme__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter) 32px;
  text-align: center;
}

.programme__title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 1360px;
  font-weight: 700;
  font-size: 26px;
  line-height: 28px;
  color: var(--color-white);
  text-shadow: 0 0 50px #11111a;
}

.programme__title-sub {
  font-weight: 400;
  line-height: 24px;
}

.toggle {
  position: relative;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 2px solid var(--color-white-38);
  border-radius: 14px;
  background: var(--color-white);
}

/* The pill is an SVG path so its edges can bend like a liquid front while it moves (see initTabs). */
.toggle__liquid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--color-primary);
  opacity: 0;
  pointer-events: none;
}

.toggle.is-ready .toggle__liquid {
  opacity: 1;
}

.toggle__option {
  position: relative;
  z-index: 1;
  min-height: 42px;
  padding: 4px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-primary);
  white-space: nowrap;
  /* Label colors follow the liquid pill: turn blue once its trailing edge has left… */
  transition:
    background-color 0.35s var(--ease-out),
    color 0.2s var(--ease-out) 0.32s;
}

/* …and white once its leading edge has arrived. */
.toggle__option[aria-selected="true"] {
  color: var(--color-white);
  transition-delay: 0s, 0.2s;
}

.toggle:not(.is-ready) .toggle__option[aria-selected="true"] {
  background: var(--color-primary);
}

.toggle__option:not([aria-selected="true"]):hover {
  background: rgba(1, 21, 146, 0.06);
}

.board {
  border-radius: 24px 24px 0 0;
  background: var(--color-white);
  padding: 24px 0 40px;
}

.board__toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--gutter);
}

.board__loading {
  padding: 40px var(--gutter);
  color: var(--color-body-short);
}

@media (min-width: 768px) {
  .programme__title {
    font-size: 30px;
    line-height: 34px;
  }

  .programme__title-sub {
    line-height: inherit;
  }
}

@media (min-width: 1024px) {
  .programme {
    padding: 120px 0 120px;
  }

  .programme__intro {
    gap: 40px;
    padding-bottom: 80px;
  }

  .programme__title {
    font-size: clamp(32px, 2.5vw, 40px);
    line-height: 1.15;
  }

  .toggle__option {
    min-height: 48px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 18px;
    line-height: 22px;
  }

  .board {
    width: calc(100% - 2 * clamp(24px, 5vw, 80px));
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 24px;
  }

  .board__toolbar {
    padding: 0;
  }
}

/* Schedule – mobile / tablet */

.schedule {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 24px;
}

.month__header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 0 var(--gutter) 24px;
}

.month__title {
  font-weight: 700;
  font-size: 24px;
  line-height: 26px;
  color: var(--color-title);
}

.past-toggle {
  font-size: 13px;
  line-height: 16px;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.past-toggle:hover {
  text-decoration-thickness: 2px;
}

/* One scroller per month, so every day of the month scrolls sideways together. The dates stay pinned on the left. */
.month__scroller {
  --date-cell: calc(var(--gutter) + 49px + 16px);

  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-left: var(--date-cell);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.month__scroller::-webkit-scrollbar {
  display: none;
}

.days {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: max-content;
  min-width: 100%;
  padding-right: var(--gutter);
}

.day {
  display: flex;
  align-items: stretch;
}

.day__date-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  display: flex;
  flex: none;
  padding: 0 16px 0 var(--gutter);
  background: var(--color-white);
}

.day__date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  width: 49px;
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  background: var(--color-light-grey);
  font-weight: 400;
  white-space: nowrap;
}

.day__weekday {
  font-size: 12px;
  line-height: 15px;
  color: var(--color-body-short);
}

.day__num {
  font-weight: 700;
  font-size: 26px;
  line-height: 28px;
  color: var(--color-title);
}

.day__slots {
  display: flex;
  gap: 16px;
}

.slot {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 4px;
  width: 178px;
  scroll-snap-align: start;
}

.slot__time {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
  line-height: 16px;
  color: var(--color-body-short);
}

.slot__time::after {
  content: "";
  flex: 1;
  border-top: 1.5px dashed var(--color-keyline);
}

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

.slot__films > li {
  display: flex;
  flex: 1;
}

.tile {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--color-light-grey);
}

.cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 114 / 64;
  border-radius: 8px;
  background:
    url("./assets/star.png") center / 38% auto no-repeat,
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-darker) 100%);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile__time {
  font-size: 13px;
  line-height: 16px;
  color: var(--color-primary);
}

.tile__title {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-title);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tile__note {
  font-size: 12px;
  line-height: 15px;
  color: var(--color-body-short);
}

.days--empty {
  padding: 0 var(--gutter);
  color: var(--color-body-short);
}

@media (min-width: 768px) {
  .month__scroller {
    --date-cell: calc(var(--gutter) + 49px + 12px);
  }

  .days {
    gap: 24px;
  }

  .day__date-cell {
    padding-right: 12px;
  }

  .day__date {
    gap: 8px;
  }

  .day__weekday {
    font-size: 13px;
    line-height: 16px;
  }

  .day__num {
    font-weight: 900;
    font-size: 38px;
    line-height: 33px;
  }

  .day__slots {
    gap: 12px;
  }

  .slot {
    gap: 8px;
    width: 232px;
  }

  .tile__title {
    font-size: 17px;
    line-height: 21px;
    color: var(--color-body-long);
  }

  .past-toggle {
    font-size: 14px;
    line-height: 18px;
  }
}

/* Schedule – desktop */

@media (min-width: 1024px) {
  .schedule {
    gap: 40px;
    margin-top: 32px;
  }

  .month__header {
    padding: 0 0 16px;
  }

  .month__title {
    font-size: 30px;
    line-height: 34px;
  }

  .past-toggle {
    font-size: 16px;
    line-height: 20px;
  }

  .month__scroller {
    overflow: visible;
  }

  .days {
    gap: 2px;
    width: auto;
    min-width: 0;
    padding: 0;
  }

  .day {
    gap: 16px;
    padding: 16px 0;
  }

  .day__date-cell {
    position: static;
    padding: 0;
    background: none;
  }

  .day__date {
    width: 98px;
    padding: 16px;
  }

  .day__weekday {
    font-size: 14px;
    line-height: 18px;
  }

  .day__num {
    font-size: 50px;
    line-height: 44px;
  }

  .day__slots {
    flex: 1;
    gap: 16px;
    min-width: 0;
  }

  .slot {
    flex: 1 0 0;
    gap: 12px;
    width: auto;
    min-width: 0;
  }

  .slot__time {
    font-size: 14px;
    line-height: 18px;
  }

  .slot__films {
    gap: 24px;
  }

  .tile {
    gap: 12px;
    padding: 0 0 12px;
    border-radius: 0;
    background: none;
  }

  .tile .cover {
    aspect-ratio: 327 / 182;
    border-radius: 12px;
  }

  .tile__body {
    padding-left: 8px;
  }

  .tile__time {
    font-size: 14px;
    line-height: 18px;
  }

  .tile__title {
    font-size: 18px;
    line-height: 22px;
    color: var(--color-title);
    -webkit-line-clamp: 3;
  }
}

/* Finder (search + sort) */

.finder {
  display: flex;
  gap: 12px;
  padding: 8px var(--gutter) 0;
}

.search {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 24px;
  height: 24px;
  translate: 0 -50%;
  pointer-events: none;
}

.search__input {
  width: 100%;
  height: 48px;
  padding: 12px 44px;
  border: 1.5px solid var(--color-forms);
  border-radius: 8px;
  background: var(--color-white);
  font-size: 16px;
  line-height: 22px;
  color: var(--color-title);
  appearance: none;
  transition: border-color 0.25s var(--ease-out);
}

.search__input::placeholder {
  color: var(--color-forms);
  opacity: 1;
}

.search__input::-webkit-search-cancel-button {
  display: none;
}

.search__input:hover,
.search__input:focus {
  border-color: var(--color-primary);
}

.search__input:focus-visible {
  outline-offset: 1px;
}

.search__clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--color-primary);
  translate: 0 -50%;
}

.search__clear:hover {
  background: rgba(1, 21, 146, 0.06);
}

.sort {
  position: relative;
}

.sort__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 168px;
  overflow: hidden;
  border: 1.5px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-white);
  box-shadow: var(--shadow-strong);
}

.sort__menu button {
  display: block;
  width: 100%;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  color: var(--color-primary);
  text-align: left;
  white-space: nowrap;
}

.sort__menu button:hover,
.sort__menu button[aria-pressed="true"] {
  background: var(--color-keyline);
}

@media (min-width: 1024px) {
  .finder {
    max-width: 904px;
    padding: 0;
  }
}

/* Films list */

.films {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px 16px;
  padding: 24px var(--gutter) 0;
}

.film {
  position: relative;
}

.film-card {
  display: flex;
  gap: 12px;
  align-items: center;
}

.film-card__media {
  flex: none;
  width: 130px;
}

.film-card__media .cover {
  aspect-ratio: 130 / 73;
}

.film-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

/* Two lines at most, then "…". */
.film-card__title {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-title);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--color-tag);
  font-weight: 600;
  font-size: 12px;
  line-height: 12px;
  color: var(--color-primary-darker);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .films {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 16px;
  }

  .film-card__title {
    font-size: 17px;
    line-height: 21px;
  }

  .tag {
    padding-inline: 8px;
  }
}

@media (min-width: 1024px) {
  .films {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 16px;
    padding: 40px 0 0;
  }

  .film-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .film-card__media {
    width: 100%;
  }

  .film-card__media .cover {
    aspect-ratio: 327 / 182;
    border-radius: 12px;
  }

  .film-card__body {
    padding-left: 8px;
  }

  .film-card__title {
    font-size: 18px;
    line-height: 22px;
    -webkit-line-clamp: 3;
  }
}

/* Empty state */

.empty {
  padding: 24px var(--gutter) 80px;
}

.empty__title {
  font-weight: 600;
  font-size: 22px;
  line-height: 28px;
  color: var(--color-primary-darker);
}

.empty__tips {
  margin-top: 32px;
  padding-left: 30px;
  list-style: disc;
  font-size: 18px;
  line-height: 26px;
  color: var(--color-body-short);
}

.empty__tips li::marker {
  font-size: 12px;
}

@media (min-width: 1024px) {
  .empty {
    padding: 32px 0 120px;
  }
}

/* Footer */

.footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 40px var(--gutter) 32px;
  background: var(--color-primary-darker);
  color: var(--color-white);
  text-align: center;
}

/* Left-aligned on mobile, as in the design system footer. */
.footer__links {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.footer__links a,
.footer__links button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
}

.footer__links a:hover,
.footer__links button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__links img {
  width: 16px;
  height: 16px;
}

.footer__copyright {
  font-size: 12px;
  line-height: 16px;
}

@media (min-width: 768px) {
  .footer {
    align-items: center;
  }

  .footer__links {
    flex-direction: row;
    align-items: center;
  }
}

/* Floating UI */

.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 16px;
  border-radius: 10px;
  background: var(--color-primary);
  box-shadow: var(--shadow-strong);
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-white);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition:
    opacity 0.35s var(--ease-out),
    transform 0.45s var(--ease-out),
    visibility 0s linear 0.45s,
    background-color 0.3s var(--ease-out);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.back-to-top:hover {
  background: var(--color-primary-darker);
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--color-title);
  font-size: 14px;
  line-height: 18px;
  color: var(--color-white);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 0.3s var(--ease-out),
    transform 0.3s var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Motion helpers */

.has-motion [data-reveal],
.has-motion [data-hero-title],
.has-motion [data-hero-details] > *,
.has-motion [data-hero-art],
.has-motion [data-hero-brand],
.has-motion [data-intro-rise] {
  visibility: hidden;
}

.split-word-mask {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  vertical-align: top;
}

.split-word {
  display: inline-block;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .share__menu {
    animation: none;
  }
}
