/* Shared by every page: colours, type, the menu, and the empty inner pages. */
:root {
  --olive-deep: #46462e;
  --ink: #f6efe6;
  --cream: #f3e3d3;
  --muted: #d6d0bb;
  --serif: "EB Garamond", Garamond, Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Going from page to page (the menu too): a short cross-fade, where browsers can. */
@view-transition { navigation: auto; }

/* One solid colour, no gradient: iPhone Safari fills the bands around its address bar
   (top and bottom) with the page's colour, so they match it. (Home: style.css.) */
html { background: var(--olive-deep); color: var(--ink); }
/* The menu page, and the trailer while it covers a page: their
   own colour, for Safari's bands. */
html.menu-page, .menu-page body { background: #2c2c1c; } /* the menu, a page of its own (menu.js) */
html.trailer-open, .trailer-open body { background-color: #0c0c08; }
body { background: var(--olive-deep); color: var(--ink); }

body {
  font-family: var(--serif);
  font-size: 1.125rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* cuts off only sideways, so the locks below (on html) leave the page's length alone */
}
html { overflow-x: hidden; } /* no sideways scrolling */
/* no pulling down to refresh (nor the bounce at the ends that comes with it) */
html, body { overscroll-behavior-y: none; }

a { color: inherit; }

/* Small all-caps labels. */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ---------- Menu ---------- */

/* A pill: the three lines, then MENU to their right. */
.menu-button {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top, 0px)); /* clear of the iPhone status bar, the page drawing under it */
  right: 20px;
  z-index: 30;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px 0 24px;
  border-radius: 999px;
  border: 1px solid rgba(246, 239, 230, 0.45);
  background: transparent; /* no tint: only the page behind, blurred */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-family: var(--serif);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.menu-button:hover { transform: scale(1.05); }
.menu-button:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }

.menu-icon { position: relative; flex: none; width: 26px; height: 16px; }
.menu-icon span {
  position: absolute;
  left: 0;
  width: 26px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
}
.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 7px; }
.menu-icon span:nth-child(3) { top: 14px; }
.menu-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  margin-right: -0.22em; /* the spacing after the last letter */
  text-transform: uppercase;
  line-height: 1;
}

/* On the menu page: an X from the start (no turning from the lines). */
.menu-page .menu-button { border-color: rgba(246, 239, 230, 0.7); }
.menu-page .menu-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-page .menu-icon span:nth-child(2) { opacity: 0; }
.menu-page .menu-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
  /* centred on the title at the left, as on larger screens */
  .menu-button { top: calc(28px + env(safe-area-inset-top, 0px)); height: 52px; gap: 10px; padding: 0 18px 0 16px; right: 16px; }
  .menu-icon, .menu-icon span { width: 22px; }
  .menu-label { font-size: 0.75rem; letter-spacing: 0.18em; margin-right: -0.18em; }
}
@media (max-width: 370px) { .home-link { font-size: 0.78rem; } } /* narrow phones: room for both */

/* The panel fades in: a solid olive, darker than the pages', that covers the whole page. */
.menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 96px 16px 48px clamp(16px, 9vw, 160px);
  background: #2c2c1c;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s 0.5s;
  overflow-y: auto;
}
.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0s;
}

.menu ul { list-style: none; }
.menu li {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.3s, transform 0.3s;
}
.menu-open .menu li {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s calc(0.25s + var(--i) * 0.08s), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.25s + var(--i) * 0.08s);
}
.menu a {
  display: inline-block;
  padding: 0.12em 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  line-height: 1.1;
  text-decoration: none;
  color: rgba(246, 239, 230, 0.72);
  transition: color 0.25s;
}
/* Hover: the same weight, just lighter. The page you are on: italic, at full light. */
.menu a:hover, .menu a:focus-visible { color: #fff; outline: none; }
.menu a[aria-current="page"] { font-style: italic; color: var(--ink); }
@media (max-width: 767px) { .menu li + li { margin-top: 0.9rem; } } /* phones: more room between items */

/* Scrolls away with the page (only the menu button stays put), so text never runs under it. */
.home-link {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 20px;
  height: 68px;
  display: flex;
  align-items: center;
  z-index: 30;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap; /* one line */
}

/* ---------- Inner pages (empty for now) ---------- */

.page-main {
  min-height: 100vh;
  padding: 140px 16px 80px;
  max-width: 60rem;
  margin: 0 auto;
}
.page-main h1 {
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  color: var(--cream);
}

/* ---------- Footer (menu.js) ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 20px clamp(16px, 4vw, 40px) 24px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}
.site-footer p { max-width: 48rem; }
.site-footer a.plain { color: inherit; text-decoration: none; } /* a link, without looking like one */
.socials { display: flex; align-items: center; gap: 14px; list-style: none; flex-shrink: 0; }
.socials a { display: block; color: var(--muted); opacity: 0.85; transition: color 0.25s, opacity 0.25s; }
.socials a:hover, .socials a:focus-visible { color: #fff; opacity: 1; }
.socials svg { display: block; height: 20px; width: auto; }

/* On the homepage: at the bottom of the synopsis screen. */
.film-story .site-footer { position: absolute; left: 0; right: 0; bottom: 0; }


@media (max-width: 767px) {
  .site-footer { flex-direction: column-reverse; align-items: flex-start; gap: 12px; padding: 16px; font-size: 0.72rem; }
}

/* ---------- Trailer (trailer.js) ---------- */

.trailer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 72px 16px 32px;
  background: rgba(12, 12, 8, 0.94);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.trailer.open { opacity: 1; }
.trailer-open { overflow: hidden; } /* the page stays where it was */
.trailer-frame {
  /* As large as the screen allows: YouTube picks higher quality for bigger players. */
  width: min(100%, 1600px, calc((100vh - 104px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.97);
  transition: transform 0.4s ease;
}
.trailer.open .trailer-frame { transform: none; }
.trailer-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.trailer-close {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top, 0px));
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(246, 239, 230, 0.6);
  background: transparent;
  cursor: pointer;
}
.trailer-close span {
  position: absolute;
  left: 14px;
  top: 25px;
  width: 22px;
  height: 2px;
  background: var(--ink);
}
.trailer-close span:first-child { transform: rotate(45deg); }
.trailer-close span:last-child { transform: rotate(-45deg); }
.trailer-close:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }
