/* ==========================================================================
   uamo — Full-Bleed Cinema Showcase, Hover-Expanding Header & Film Pages
   ========================================================================== */

@font-face {
  font-family: "Junicode";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/junicode-400.woff2") format("woff2");
}

@font-face {
  font-family: "Junicode";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/junicode-700.woff2") format("woff2");
}

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-spring: linear(
    0 0%, 0.0059 1%, 0.0225 2%, 0.0479 3%, 0.0806 4%, 0.1191 5%, 0.1621 6%,
    0.2085 7%, 0.2573 8%, 0.3075 9%, 0.3583 10%, 0.4092 11%, 0.4593 12%,
    0.5084 13%, 0.556 14%, 0.6018 15%, 0.6454 16%, 0.6867 17%, 0.7256 18%,
    0.762 19%, 0.7958 20%, 0.827 21%, 0.8557 22%, 0.8818 23%, 0.9054 24%,
    0.9267 25%, 0.9457 26%, 0.9626 27%, 0.9774 28%, 0.9903 29%, 1.0014 30%,
    1.0109 31%, 1.0189 32%, 1.0254 33%, 1.0306 34%, 1.0347 35%, 1.0377 36%,
    1.0398 37%, 1.0411 38%, 1.0416 39%, 1.0415 40%, 1.0408 41%, 1.0396 42%,
    1.038 43%, 1.0361 44%, 1.034 45%, 1.0317 46%, 1.0293 47%, 1.0268 48%,
    1.0243 49%, 1.0218 50%, 1.0193 51%, 1.017 52%, 1.0147 53%, 1.0126 54%,
    1.0106 55%, 1.0087 56%, 1.007 57%, 1.0055 58%, 1.0041 59%, 1.0029 60%,
    1.0018 61%, 1.0008 62%, 1 63%, 0.9993 64%, 0.9987 65%, 0.9982 66%,
    0.9979 67%, 0.9976 68%, 0.9974 69%, 0.9973 70%, 0.9973 71%, 0.9973 72%,
    0.9974 73%, 0.9975 74%, 0.9977 75%, 0.9979 76%, 0.9981 77%, 0.9983 78%,
    0.9985 79%, 0.9987 80%, 0.9989 81%, 0.9991 82%, 0.9993 83%, 0.9994 84%,
    0.9996 85%, 0.9997 86%, 0.9998 87%, 0.9999 88%, 1 89%, 1.0001 90%, 1 100%
  );

  --film-color: #ACA391;
  --gutter: clamp(0.9rem, 2vw, 1.75rem);
  --font-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Oswald", "Instrument Sans", sans-serif;
  --font-serif: "Junicode", Georgia, serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.page-home {
  background-color: #000000;
  color: #ffffff;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.page-white {
  background-color: #ffffff;
  color: #131410;
}

body.page-white.no-scroll {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

::selection {
  background: var(--film-color);
  color: #000000;
}

body.page-white ::selection {
  background: #131410;
  color: #ffffff;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.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;
}

/* ==========================================================================
   Custom Dot Cursor
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor * {
    cursor: none !important;
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: var(--film-color);
  border: 1px solid rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-100px, -100px, 0) scale(1);
  opacity: 0;
  transition:
    background-color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    transform 0.22s var(--ease-out),
    opacity 0.2s ease;
  will-change: transform;
}

body.page-white .custom-cursor,
.custom-cursor.is-on-header {
  background-color: #131410;
  border-color: rgba(255, 255, 255, 0.35);
}

.custom-cursor.is-visible {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
}

/* ==========================================================================
   Compact Top Header: Centered uamo Box -> Expands Horizontally on Hover
   ========================================================================== */
.top-header-wrap {
  position: fixed;
  top: clamp(0.5rem, 1vw, 0.8rem);
  left: var(--gutter);
  right: var(--gutter);
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.top-header {
  pointer-events: auto;
  width: 112px;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0.36rem 0.9rem;
  border-radius: 3px;
  background-color: var(--film-color);
  color: #000000;
  border: 1px solid transparent;
  transition:
    width 0.62s var(--ease-out),
    padding 0.62s var(--ease-out),
    background-color 0.55s var(--ease-out),
    border-color 0.4s ease;
}

body.page-white .top-header {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #3c3c3c;
}

/* Expand horizontally on cursor hover, keyboard focus, or touch toggle */
.top-header:hover,
.top-header:focus-within,
.top-header.is-expanded {
  width: 100%;
  padding: 0.36rem clamp(0.9rem, 2vw, 1.5rem);
}

.header-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(2px);
  transition:
    opacity 0.25s ease,
    transform 0.45s var(--ease-out),
    visibility 0s linear 0.25s;
}

.top-header:hover .header-group,
.top-header:focus-within .header-group,
.top-header.is-expanded .header-group {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 0.28s ease 0.14s,
    transform 0.45s var(--ease-out) 0.14s,
    visibility 0s linear 0s;
}

.header-link {
  font-size: clamp(0.68rem, 0.84vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000000;
  padding: 0.15rem 0.25rem;
  position: relative;
  transition: opacity 0.25s ease;
}

.header-link:hover {
  opacity: 0.55;
}

.header-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  bottom: 0;
  height: 1.5px;
  background-color: #000000;
}

.header-logo {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.3rem, 1.7vw, 1.55rem);
  line-height: 0.85;
  letter-spacing: -0.025em;
  color: #000000;
  text-transform: lowercase;
  padding-inline: 0.75rem;
  user-select: none;
  justify-self: center;
}

/* ==========================================================================
   HOME STAGE — Full-Bleed Stills (Zero Dimming) + Huge Title + Progress Bar
   ========================================================================== */
.stage {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #000000;
}

.slides-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
  pointer-events: none;
}

.slide.is-active {
  z-index: 2;
  pointer-events: auto;
}

.slide.is-leaving {
  z-index: 1;
}

.slide-inset {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  transition: transform 9s var(--ease-out);
}

.slide.is-active .slide-img {
  transform: scale(1);
}

/* Big Film Title Block */
.hero-title-layer {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  top: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  padding-top: 2rem;
}

.film-title-block {
  max-width: min(58vw, 780px);
  color: var(--film-color);
  pointer-events: auto;
  width: fit-content;
  transition: color 0.55s var(--ease-out);
}

.film-title-link {
  display: inline-block;
}

.film-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9.4vw, 8.8rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--film-color);
  transition:
    color 0.55s var(--ease-out),
    transform 0.7s var(--ease-out),
    opacity 0.45s ease;
  text-wrap: balance;
}

.film-year {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--film-color);
  transition: color 0.55s var(--ease-out), opacity 0.45s ease;
}

.film-title-block.is-swapping .film-title,
.film-title-block.is-swapping .film-year {
  opacity: 0;
  transform: translateY(14px);
}

/* Bottom Pagination Circles */
.pagination-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: clamp(1rem, 2.4vh, 1.75rem);
  z-index: 25;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.pagination-dots {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem;
}

.page-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 1.5px solid var(--film-color);
  background: transparent;
  transition:
    width 0.6s var(--ease-spring),
    border-color 0.55s var(--ease-out),
    background-color 0.25s ease,
    transform 0.3s var(--ease-out);
}

.page-dot:hover {
  background-color: color-mix(in srgb, var(--film-color) 30%, transparent);
  transform: scale(1.1);
}

.page-dot.is-active {
  width: 38px;
}

/* Bottom Film Timer Progress Bar */
.cycle-progress-track {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.cycle-progress-fill {
  width: 100%;
  height: 100%;
  background-color: var(--film-color);
  transform-origin: left center;
  transform: scaleX(0);
  transition: background-color 0.55s var(--ease-out);
}

/* ==========================================================================
   REGULAR WHITE PAGES: ABOUT & SHOP (No Pictures, White Background)
   ========================================================================== */
.white-stage {
  min-height: 100dvh;
  padding: calc(var(--gutter) + 4.25rem) var(--gutter) var(--gutter);
  display: flex;
  align-items: center;
  background-color: #ffffff;
  color: #131410;
}

.white-content {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.white-statement {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #131410;
  text-wrap: balance;
}

.white-statement em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.white-subrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(19, 20, 16, 0.72);
}

.white-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.95rem;
  border-radius: 3px;
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #3c3c3c;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.white-pill-btn:hover {
  background-color: #131410;
  color: #ffffff;
}

/* ==========================================================================
   ALL FILMS PAGE (Clean Grid Linking to Dedicated film.html Pages)
   ========================================================================== */
.films-stage {
  min-height: 100dvh;
  padding: calc(var(--gutter) + 5rem) var(--gutter) clamp(2.5rem, 5vh, 4rem);
  background-color: #ffffff;
  color: #131410;
}

.films-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.2vw, 2rem);
  max-width: 1400px;
  margin-inline: auto;
}

.film-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
  transition: transform 0.45s var(--ease-out);
}

.film-card:hover {
  transform: translateY(-3px);
}

.film-card-frame {
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: #eaeaea;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.film-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s var(--ease-out);
}

.film-card:hover .film-card-frame img {
  transform: scale(1.035);
}

.film-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.film-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.65vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #131410;
}

.film-card-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(19, 20, 16, 0.6);
}

/* ==========================================================================
   DEDICATED FILM PAGE (A24 Onslaught-Inspired Full Bleed + White Info Strip)
   ========================================================================== */
.film-hero {
  position: relative;
  width: 100%;
  height: 76dvh;
  min-height: 440px;
  overflow: hidden;
  background: #000000;
}

.film-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-hero-title-wrap {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(1.25rem, 3.2vh, 2.5rem);
  display: flex;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.film-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.film-info-band {
  background: #ffffff;
  color: #131410;
  padding: clamp(1.75rem, 3.5vw, 2.75rem) var(--gutter) clamp(2.5rem, 5vh, 4rem);
  border-bottom: 1px solid rgba(19, 20, 16, 0.12);
}

.film-info-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 0.85fr 0.85fr;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.film-info-title-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.film-info-display {
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: #131410;
}

.film-info-synopsis-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.film-info-synopsis {
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.48;
  color: #131410;
}

.film-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.film-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #131410;
  padding-right: 0.9rem;
  border-right: 1px solid rgba(19, 20, 16, 0.22);
  transition: opacity 0.25s ease;
}

.film-share-btn:last-child {
  border-right: 0;
  padding-right: 0;
}

.film-share-btn:hover {
  opacity: 0.55;
}

.film-meta-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 1px solid rgba(19, 20, 16, 0.14);
  padding-left: clamp(1rem, 2vw, 1.5rem);
}

.info-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(19, 20, 16, 0.6);
  margin-bottom: 0.2rem;
}

.info-val {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.38;
  color: #131410;
}

.info-cast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.42;
}

.film-stills-section {
  background: #ffffff;
  color: #131410;
  padding: clamp(2rem, 4vh, 3rem) var(--gutter) clamp(3rem, 6vh, 4.5rem);
}

.film-stills-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(19, 20, 16, 0.6);
  margin-bottom: 1rem;
}

.film-stills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.film-still-frame {
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background: #eaeaea;
}

.film-still-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Modal (Trailer / Updates) */
.uamo-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}

.uamo-modal.is-open {
  display: flex;
}

.uamo-modal-card {
  width: min(520px, 100%);
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #3c3c3c;
  border-radius: 6px;
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.uamo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  padding-bottom: 0.65rem;
}

.uamo-modal-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.uamo-modal-close {
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.2rem 0.45rem;
}

.uamo-modal-body {
  font-size: 0.94rem;
  line-height: 1.5;
}

.uamo-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding: 0.6rem 1rem;
  border: 1px solid #000000;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.uamo-modal-link:hover {
  background: #000000;
  color: #ffffff;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .films-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .film-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .film-info-title-col {
    grid-column: 1 / -1;
  }

  .film-info-synopsis-col {
    grid-column: 1 / -1;
  }

  .film-meta-col {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(19, 20, 16, 0.14);
    padding-top: 1rem;
  }
}

@media (max-width: 680px) {
  .top-header {
    width: 102px;
    padding: 0.34rem 0.75rem;
  }

  .top-header:hover,
  .top-header:focus-within,
  .top-header.is-expanded {
    padding: 0.34rem 0.6rem;
  }

  .header-link {
    font-size: 0.62rem;
    letter-spacing: 0.01em;
    padding: 0.15rem;
  }

  .header-logo {
    font-size: 1.25rem;
    padding-inline: 0.35rem;
  }

  .film-title-block {
    max-width: 100%;
  }

  .film-title {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .films-grid,
  .film-stills-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
