/* =====================================================================
   The Violinist — site styles
   Homepage = layout B (title + laurels left, dock along the bottom).
   Sub-pages (US / Spain / Singapore / Festivals) share the same dock.
   ===================================================================== */

:root {
  --ink: #f3ece2;              /* cream text */
  --ink-2: rgba(243,236,226,.82);
  --ink-3: rgba(243,236,226,.72);
  --ground: #0b0806;           /* page background */
  --scrim: 10,6,3;             /* rgb for dark overlays */
  --gold: #e9b872;
  --pad-x: clamp(28px, 5vw, 96px);

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);     /* soft landing, used for entrances */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);  /* used for page fades */
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);/* tiny overshoot on hover lifts */
  --t-fast: .2s;
  --t-med: .45s;
  --t-slow: .9s;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--ground); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ================= Page enter / leave ================= */
/* Content only starts hidden when JS is running (html.js), so the site never goes blank without it. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}
.js.is-loaded [data-reveal] {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--t-slow) var(--ease-out) var(--d, 0s),
    transform 1.1s var(--ease-out) var(--d, 0s);
}
/* Painting settles in: fades up from black with a slow push-in */
.js .bg-media { opacity: 0; transform: scale(1.05); }
.js.is-loaded .bg-media {
  opacity: 1;
  transform: scale(1);
  transition: opacity 1.4s var(--ease-out), transform 2.6s var(--ease-out);
}
/* Leaving: everything fades to the page colour before the next page loads */
body { transition: opacity .35s var(--ease-in-out); }
.is-leaving body { opacity: 0; }

/* ================= Shared: Where to watch + Watch Trailer dock ================= */
.dock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 36px;
}
.dock > .trailer-row { order: 1; }
.dock::after {                         /* thin divider between trailer and countries */
  content: "";
  order: 2;
  width: 1px;
  height: 40px;
  background: rgba(243,236,226,.25);
}
.dock > .where { order: 3; }

.where { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.where__label { margin: 0 8px 0 0; color: var(--ink); line-height: 0; }
.where__label svg { display: block; width: 64px; height: auto; overflow: visible; }
.where__label text { fill: currentColor; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.where__label .wl-small { font-size: 9.6px; font-weight: 500; letter-spacing: .02em; fill-opacity: .8; }
.where__label .wl-big { font-size: 17px; font-weight: 800; }   /* "WATCH": bold, both lines fitted to the same 64px width */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.where__item {
  width: 176px;                       /* every country box the same length */
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .04em;
  white-space: nowrap;
  background: rgba(var(--scrim), .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(243,236,226,.16);
  transition:
    background var(--t-fast) ease,
    box-shadow var(--t-fast) ease,
    transform var(--t-med) var(--ease-spring);
}
.where__item img { width: 28px; height: 28px; flex: none; transition: transform var(--t-med) var(--ease-spring); }
.where__item img.where__icon--mono { width: 37px; height: 37px; margin: -4.5px; }   /* festival icon, +10% */
.where__item:hover, .where__item:focus-visible {
  background: rgba(var(--scrim), .8);
  box-shadow: inset 0 0 0 1px rgba(243,236,226,.5), 0 6px 20px rgba(0,0,0,.35);
  transform: translateY(-2px);
}
.where__item:hover img { transform: scale(1.08) rotate(-4deg); }
.where__item:active { transform: translateY(0) scale(.98); transition-duration: .08s; }
.where__item[aria-current="page"] { background: rgba(243,236,226,.94); color: #1a120b; box-shadow: none; }
.where__item[aria-current="page"] img.where__icon--mono { filter: invert(.85); }

/* Watch Trailer pill: 8s loop inside, 50% black, white label */
.trailer-row { display: flex; }
.btn-trailer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-width: 280px;
  height: 68px;
  padding: 0 40px;
  border: 0;
  border-radius: 999px;
  background: #000;
  cursor: pointer;
  font: inherit;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 6px 24px rgba(0,0,0,.4);
  transition: box-shadow var(--t-med) ease, transform var(--t-med) var(--ease-spring);
}
.btn-trailer__video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  transition: transform .8s var(--ease-out);
}
.btn-trailer::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(0,0,0,.5);
  transition: background var(--t-med) ease;
}
.btn-trailer__label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  transition: text-shadow var(--t-med) ease, letter-spacing var(--t-med) var(--ease-out);
}
.btn-trailer__label::before {
  content: ""; border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  transition: transform var(--t-med) var(--ease-spring);
}
.btn-trailer:hover, .btn-trailer:focus-visible {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255,236,200,.85), 0 0 18px rgba(255,214,150,.55), 0 0 44px rgba(255,190,110,.35);
}
.btn-trailer:hover::before, .btn-trailer:focus-visible::before { background: rgba(0,0,0,.35); }
.btn-trailer:hover .btn-trailer__video { transform: scale(1.06); }
.btn-trailer:hover .btn-trailer__label, .btn-trailer:focus-visible .btn-trailer__label {
  text-shadow: 0 0 8px rgba(255,236,200,.95), 0 0 22px rgba(255,200,120,.7);
  letter-spacing: .24em;
}
.btn-trailer:hover .btn-trailer__label::before { transform: scale(1.2); }
.btn-trailer:active { transform: scale(.98); transition-duration: .08s; }
.btn-trailer:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* Plain buttons on sub-pages */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 26px;
  border-radius: 999px;
  background: var(--ink); color: #1a120b;
  text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: .04em;
  transition: background var(--t-fast) ease, transform var(--t-med) var(--ease-spring), box-shadow var(--t-med) ease;
}
.btn:hover, .btn:focus-visible { background: #fff; transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255,214,150,.28); }
.btn:active { transform: scale(.98); transition-duration: .08s; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(243,236,226,.45); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: rgba(243,236,226,.1); box-shadow: inset 0 0 0 1px var(--ink); }
.btn svg { transition: transform var(--t-med) var(--ease-spring); }
.btn:hover svg { transform: translate(2px, -2px); }

/* ================= Floating trailer player ================= */
.player {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.7);
  opacity: 0;
  transition: opacity .4s var(--ease-in-out);
}
.player.is-open { opacity: 1; }
.player[hidden] { display: none; }
.player__frame {
  width: min(95vw, calc(95vh * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transform: scale(.94) translateY(10px);
  transition: transform .55s var(--ease-out);
}
.player.is-open .player__frame { transform: none; }
.player__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player__close {
  position: absolute; top: 14px; right: 16px; z-index: 1;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 28px; line-height: 44px; cursor: pointer;
  transition: background var(--t-fast) ease, transform var(--t-med) var(--ease-spring);
}
.player__close:hover { background: rgba(255,255,255,.28); transform: rotate(90deg); }
.is-playing, .is-playing body { overflow: hidden; }

/* ================= Footer ================= */
.site-footer {
  display: flex; gap: 10px; align-items: baseline;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(243,236,226,.75);
}
.site-footer .value { color: var(--ink); font-weight: 700; }

/* =====================================================================
   HOMEPAGE
   ===================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg .bg-media {
  position: absolute; inset: 0;
  background: url("../img/bg-landscape.jpg?v=2") 78% 50% / cover no-repeat;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--scrim),.62) 0%, rgba(var(--scrim),.35) 30%, rgba(var(--scrim),0) 52%),
    linear-gradient(0deg, rgba(var(--scrim),.92) 0%, rgba(var(--scrim),.6) 14%, rgba(var(--scrim),0) 34%);
}
.hero__content {
  position: relative; z-index: 1;
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: calc(min(46vw, 820px) - var(--pad-x)) 1fr;
  grid-template-rows: 1fr auto auto 1fr auto;
  row-gap: clamp(20px, 4vh, 44px);
  padding: 4vh var(--pad-x) 0;
}
.hero__content > .title   { grid-column: 1; grid-row: 2; }
.hero__content > .laurels { grid-column: 1; grid-row: 3; }
.hero__content > .dock    { grid-column: 1 / -1; grid-row: 5; padding-bottom: 18px; }
.title img { width: 90%; filter: drop-shadow(0 2px 12px rgba(0,0,0,.35)); }

/* Laurels: one row height (--h), each scaled by --k so they look the same size (optical, not measured) */
.laurels {
  --h: min(clamp(49px, 7.6vh, 94px), calc((min(46vw, 820px) - var(--pad-x)) / 9.4));
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: calc(var(--h) * .5);
  margin: calc(var(--h) * -.2) 0;          /* cancels the outer half of the row spacing below */
}
.laurel { margin: calc(var(--h) * .2) 0; }   /* row spacing = .4 × row height */
.laurels__break { flex-basis: 100%; height: 0; }   /* forces the 3 / 3 / 2 arrangement */
.laurel img {
  height: calc(var(--h) * var(--k, 1));
  width: auto; max-width: none;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,.45));
  transition: transform var(--t-med) var(--ease-out), filter var(--t-med) ease;
}
.laurel:hover img { transform: translateY(-2px); filter: drop-shadow(0 1px 6px rgba(0,0,0,.45)) drop-shadow(0 0 10px rgba(255,220,170,.35)); }
.hero__footer { position: relative; z-index: 1; padding: 0 var(--pad-x) 22px; }

/* =====================================================================
   SUB-PAGES (US / Spain / Singapore / Festivals)
   ===================================================================== */
.sub {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sub__bg { position: absolute; left: 0; right: 0; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.sub__bg .bg-media { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; }
.sub__bg .bg-media > i {               /* inner layer carries the per-page crop zoom */
  position: absolute; inset: 0;
  background: inherit;
  transform: scale(var(--zoom, 1));
  transform-origin: var(--zoom-at, 50% 50%);
}
.sub__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--fade-dir, 90deg), rgba(var(--scrim),.92) 0%, rgba(var(--scrim),.78) 34%, rgba(var(--scrim),.2) 62%, rgba(var(--scrim),0) 80%),
    linear-gradient(0deg, var(--ground) 0%, rgba(var(--scrim),.6) 18%, rgba(var(--scrim),0) 36%);
}
.sub__home { position: relative; z-index: 2; display: inline-block; margin: 40px 0 0 var(--pad-x); width: 200px; }
.sub__home img { transition: opacity var(--t-fast) ease, transform var(--t-med) var(--ease-out); }
.sub__home:hover img { opacity: .85; transform: translateX(-3px); }

.sub__content {
  position: relative; z-index: 1;
  flex: 1;
  width: min(600px, 100%);
  padding: clamp(40px, 9vh, 110px) 0 48px var(--pad-x);
}
.sub__dock { position: relative; z-index: 1; padding: 0 var(--pad-x) 26px; }
.sub .site-footer { position: relative; z-index: 1; padding: 0 var(--pad-x) 22px; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: rgba(243,236,226,.85);
}
.eyebrow img { width: 22px; height: 22px; }
.eyebrow img.where__icon--mono { width: 28px; height: 28px; }
.sub h1 {
  margin-top: 16px;
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-weight: 400; font-size: clamp(40px, 4.4vw, 58px); line-height: 1.04;
}
.sub h1 em { font-style: italic; color: rgba(243,236,226,.8); }
.lede { margin-top: 18px; max-width: 480px; font-size: 16px; line-height: 1.6; color: rgba(243,236,226,.88); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.sub h2 {
  margin: 44px 0 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(243,236,226,.8);
}

/* Screening rows (US) */
.rows { border-top: 1px solid rgba(243,236,226,.2); }
.rows li {
  display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 16px;
  padding: 14px 8px; margin: 0 -8px;
  border-bottom: 1px solid rgba(243,236,226,.2);
  border-radius: 6px;
  transition: background var(--t-fast) ease;
}
.rows li:hover { background: rgba(243,236,226,.05); }
.rows .when { font-size: 13px; color: rgba(243,236,226,.75); }
.rows .what { font-size: 16px; }
.rows .what small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.rows .go { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.rows .go::after { content: " →"; display: inline-block; transition: transform var(--t-med) var(--ease-spring); }
.rows .go:hover::after { transform: translateX(4px); }
.tbc { opacity: .75; }   /* placeholder rows: still ≥4.5:1 contrast */

/* Singapore: picture's subject is on the left, so text sits on the right */
.page--singapore .sub__bg { --scrim: 8,8,20; }

/* Festivals */
.page--festivals .sub__content { width: 100%; padding-right: var(--pad-x); }
.page--festivals .upcoming { width: min(500px, 100%); display: flex; flex-direction: column; gap: 10px; }
.card {
  padding: 16px 20px; border-radius: 14px;
  background: rgba(var(--scrim), .35);
  box-shadow: inset 0 0 0 1px rgba(243,236,226,.18);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-fast) ease, background var(--t-fast) ease;
}
.card:hover { transform: translateX(4px); box-shadow: inset 0 0 0 1px rgba(243,236,226,.4); }
.card--featured { background: rgba(243,236,226,.1); box-shadow: inset 0 0 0 1px rgba(243,236,226,.22); }
.card .meta { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(243,236,226,.75); }
.card--featured .meta { color: var(--gold); }
.card .name { margin-top: 4px; font-family: "DM Serif Display", Georgia, serif; font-size: 24px; line-height: 1.15; }
.card .detail { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.honours {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px;
  border-top: 1px solid rgba(243,236,226,.2);
}
.honours li {
  display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid rgba(243,236,226,.2);
}
.honours img { justify-self: center; width: auto; height: calc(44px * var(--k, 1)); transition: transform var(--t-med) var(--ease-out); }
.honours li:hover img { transform: scale(1.05); }
.honours .what { font-size: 15px; line-height: 1.4; }
.honours .what small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1340px) and (min-width: 900px) {
  .where__item { width: 162px; font-size: 13px; gap: 10px; }
  .btn-trailer { min-width: 240px; }
  .dock { gap: 14px 24px; }
}
@media (max-width: 1200px) and (min-width: 900px) {
  .hero__content { grid-template-columns: calc(48vw - var(--pad-x)) 1fr; }
  .laurels { --h: min(clamp(49px, 7.6vh, 94px), calc((48vw - var(--pad-x)) / 9.4)); }
  .hero__bg .bg-media { background-position: 85% 50%; }
  .dock::after { display: none; }
}

/* Phone / portrait */
@media (max-width: 899px), (orientation: portrait) and (max-width: 1100px) {
  .hero { min-height: auto; }
  .hero__bg { position: relative; inset: auto; width: 100%; aspect-ratio: 1080 / 1502; max-height: 92svh; }
  .hero__bg .bg-media { background-image: url("../img/bg-portrait.jpg"); background-position: 50% 30%; }
  .hero__bg::after { background: linear-gradient(0deg, var(--ground) 0%, rgba(11,8,6,.75) 18%, rgba(11,8,6,0) 42%); }
  .hero__content {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 28px; margin-top: -26vw; padding: 0 16px 32px;
  }
  .title img { width: min(79vw, 468px); margin: 0 auto; }
  .laurels { --h: min(clamp(36px, 9.9vw, 58px), calc((100vw - 32px) / 9.6)); justify-content: center; order: 9; }
  .hero__footer { justify-content: center; padding: 8px 16px 28px; font-size: 11px; }

  .dock { display: contents; }
  .dock::after { display: none; }
  .trailer-row { justify-content: center; }
  .btn-trailer { min-width: min(300px, 86vw); height: 60px; }
  .where { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(100%, 420px); margin: 0 auto; }
  .where__label { grid-column: 1 / -1; margin: 0 auto 4px; }
  .where__label svg { width: 58px; }
  .where__item { width: auto; height: 44px; font-size: 13px; }

  .sub__bg { height: 62svh; }
  .sub__bg::after { background: linear-gradient(0deg, var(--ground) 8%, rgba(var(--scrim),.55) 55%, rgba(var(--scrim),.25)); }
  .sub__home { margin: 20px auto 0; width: 150px; display: block; }
  .sub__content, .page--festivals .sub__content {
    align-self: stretch; width: 100%; padding: 30svh 16px 32px;
  }
  .sub__dock { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 20px; }
  .sub .site-footer { justify-content: center; padding: 0 16px 24px; font-size: 11px; }
  .rows li { grid-template-columns: 1fr auto; }
  .rows .when { grid-column: 1 / -1; }
  .honours { grid-template-columns: 1fr; }
  .honours li { grid-template-columns: 110px 1fr; gap: 14px; }
}

/* ================= Accessibility preferences ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js [data-reveal], .js .bg-media { opacity: 1; transform: none; }
  body { transition: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .where__item, .card { -webkit-backdrop-filter: none; backdrop-filter: none; background: #1a140f; }
  .btn-trailer::before { background: rgba(0,0,0,.7); }
}

/* ================= Per-page backgrounds ================= */
.page--us .sub__bg .bg-media        { background-image: url("../img/bg-landscape.jpg?v=2"); background-position: 78% 50%; --zoom: 1.35; --zoom-at: 72% 40%; }
.page--spain .sub__bg .bg-media     { background-image: url("../img/bg-landscape.jpg?v=2"); background-position: 78% 50%; --zoom: 1.5;  --zoom-at: 56% 30%; }
.page--singapore .sub__bg .bg-media { background-image: url("../img/still-singapore.jpg"); background-position: 30% 40%; }
.page--festivals .sub__bg .bg-media { background-image: url("../img/still-festivals.jpg"); background-position: 60% 50%; }
@media (max-width: 899px), (orientation: portrait) and (max-width: 1100px) {
  .page--us .sub__bg .bg-media    { --zoom-at: 68% 30%; }
  .page--singapore .sub__bg .bg-media { background-position: 32% 40%; }
  .page--festivals .sub__bg .bg-media { background-position: 66% 50%; }
}
button.btn { border: 0; cursor: pointer; font-family: inherit; }
