/* Beauharnois Drive-In Theater Vault: plain CSS, system fonts, nothing loaded from other sites. */
:root {
  --bg: #000;
  --panel: #0c0a09;
  --panel-2: #1c1917;
  --line: #292524;
  --text: #e7e5e4;
  --muted: #a8a29e;
  --dim: #78716c;
  --amber: #f59e0b;
  --amber-deep: #78350f;
  --amber-mid: #b45309;
  --green: #10b981;
  --red: #ef4444;
  --red-deep: #450a0a;
  --marquee: Impact, Haettenschweiler, "Arial Narrow Bold", "Franklin Gothic Bold", "Arial Black", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--serif); font-size: 18px; line-height: 1.55;
}
::selection { background: var(--amber-deep); color: #fde68a; }
img { display: block; max-width: 100%; }

.vault { min-height: 100vh; padding: 16px; }
@media (min-width: 768px) { .vault { padding: 32px; } }

/* Intro */
.intro {
  max-width: 1152px; margin: 0 auto 40px;
  background: rgba(12,10,9,.6); border: 1px solid var(--line); border-radius: 8px;
  padding: 24px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.8);
}
.intro-tags {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between;
  border-bottom: 1px dashed var(--line); padding-bottom: 12px; margin-bottom: 18px;
  font-family: var(--mono); font-size: 14px;
}
.tag-red { color: var(--red); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.tag-dim { color: var(--dim); }
h1 {
  font-family: var(--marquee); font-weight: 400; text-transform: uppercase; letter-spacing: .02em;
  color: var(--amber); font-size: clamp(30px, 5vw, 52px); line-height: 1.05; margin: 0 0 14px;
  text-shadow: 3px 3px 0 var(--amber-deep);
}
.intro-copy { color: var(--muted); margin: 0 0 20px; font-size: 19px; }
.pillars {
  display: grid; gap: 14px; grid-template-columns: 1fr;
  background: rgba(28,25,23,.6); border: 1px solid var(--line); border-radius: 6px; padding: 16px;
  font-family: var(--mono); font-size: 15px; line-height: 1.5;
}
@media (min-width: 768px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
.ok { color: var(--green); font-weight: 700; }

/* Layout */
.theater { max-width: 1152px; margin: 0 auto; display: grid; gap: 28px; align-items: start; }
@media (min-width: 1024px) { .theater { grid-template-columns: 7fr 5fr; } }

.screen {
  background: var(--panel); border: 2px solid var(--line); border-radius: 6px; padding: 12px;
  display: flex; justify-content: center; scroll-margin-top: 12px;
}
.screen img {
  width: auto; max-width: 100%; height: auto; max-height: 78vh; object-fit: contain;
  border-radius: 4px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.9);
}

.label {
  font-family: var(--mono); font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--dim); margin: 0 0 10px;
}
.label.amber { color: var(--amber-mid); }
.label.green { color: var(--green); }
.label.red { color: var(--red); }

.reels { margin-top: 4px; border-top: 1px dashed var(--line); padding-top: 18px; }
/* Phones: one swipeable row of reels (about 3½ visible). Tablets and up: all 8 in one row. */
.reel-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 28%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 10px; margin: 0 -4px;
  scrollbar-width: thin; scrollbar-color: var(--amber-deep) transparent;
}
.reel-grid > * { scroll-snap-align: start; }
@media (min-width: 640px) {
  .reel-grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(8, 1fr); overflow: visible; gap: 10px; }
}
.vault-poster-thumbnail {
  padding: 0; background: var(--panel); cursor: pointer; border: 3px solid var(--line); border-radius: 6px;
  overflow: hidden; aspect-ratio: 3 / 4; transition: transform .2s, border-color .2s;
}
.vault-poster-thumbnail img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.vault-poster-thumbnail:hover { border-color: var(--amber-mid); }
.vault-poster-thumbnail:focus-visible { outline: 3px solid #fde68a; outline-offset: 2px; }
.vault-poster-thumbnail.is-active { border-color: var(--amber); transform: scale(1.06); }

/* Billing panel */
.billing {
  background: var(--panel-2); border: 4px solid var(--amber-deep); border-radius: 10px; padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.9);
}
/* Panel grows with its content (no inner scrollbar), so longer billings like Job-o-Matic show in full. */
.marquee { text-align: center; border-bottom: 2px dashed var(--amber-deep); padding-bottom: 16px; margin-bottom: 22px; }
#vault-film-title {
  font-family: var(--marquee); font-weight: 400; text-transform: uppercase; letter-spacing: .03em;
  color: var(--amber); font-size: clamp(26px, 3vw, 34px); line-height: 1.1; margin: 0;
}
.sub { font-style: italic; color: var(--text); margin: 8px 0 0; font-size: 18px; }
.year { font-family: var(--mono); font-size: 14px; color: var(--dim); text-transform: uppercase; margin: 8px 0 0; }

.block { margin-bottom: 22px; }
.crew, .cast { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); font-size: 17px; }
.crew li { margin-bottom: 6px; }
.k { font-weight: 700; color: var(--muted); }
.cast li {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px;
  border-bottom: 1px dotted #44403c; padding-bottom: 8px; margin-bottom: 10px;
}
.actor { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.role { font-style: italic; color: var(--amber); text-align: right; flex: 1 1 14em; font-size: 16px; }

.hazard { background: rgba(12,10,9,.7); border: 1px solid var(--red-deep); border-radius: 6px; padding: 16px; }
.hazard p { margin: 0; padding-left: 14px; border-left: 2px solid #7f1d1d; }
.rudy-name { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--red); letter-spacing: .08em; }
.rudy-char { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-top: 4px; }
.rudy-incident { color: var(--muted); font-size: 17px; padding-top: 6px; }

.endorse {
  border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; text-align: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); line-height: 1.5;
}

.exit { max-width: 1152px; margin: 36px auto 8px; text-align: center; font-family: var(--mono); font-size: 15px; }
.exit a { color: var(--amber); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Optional per-film extras */
.lead-note { margin: 4px 0 0; padding-left: 14px; font-style: italic; color: var(--text); font-size: 17px; }
.rudy-supporting { font-style: italic; color: var(--amber); font-size: 16px; padding-top: 4px; }
.prod-note { margin-top: 22px; background: rgba(120,53,15,.18); border: 1px dashed var(--amber-deep); border-radius: 6px; padding: 14px 16px; }
.prod-note p { margin: 0; font-size: 17px; color: var(--text); }

/* Phones */
@media (max-width: 639px) {
  .intro { padding: 18px; margin-bottom: 28px; }
  .intro-copy { font-size: 17px; }
  .billing { padding: 18px; }
  .screen { padding: 8px; }
  .screen img { max-height: none; width: 100%; }
  .cast li { flex-direction: column; gap: 2px; }
  .role { text-align: left; flex: none; }
}
/* Tablets (portrait, and landscape under 1024): poster beside nothing, so cap its height and centre it */
@media (min-width: 640px) and (max-width: 1023px) {
  .screen img { max-height: 72vh; }
  .billing { padding: 26px 30px; }
}
/* Big screens */
@media (min-width: 1400px) {
  .intro, .theater, .exit { max-width: 1320px; }
}
/* Desktop: poster + reels stay in view while a long billing panel scrolls past */
@media (min-width: 1024px) {
  .screen-col { position: sticky; top: 16px; }
  .screen img { max-height: calc(100vh - 110px); }
}

/* ---------- 3D poster card (adapted from the AIDA trading cards) ---------- */
@property --pc-rx { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@property --pc-ry { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.screen { perspective: 1200px; padding: 28px 16px 40px; overflow: hidden; }
.poster-card {
  display: block; position: relative; line-height: 0; border-radius: 8px;
  -webkit-tap-highlight-color: transparent; transform-style: preserve-3d;
}
.poster-stage {
  display: block; position: relative; transform-style: preserve-3d;
  transform: rotateX(var(--pc-rx)) rotateY(var(--pc-ry));
  animation: pc-idle 7s ease-in-out infinite;
  transition: scale .25s ease;
}
.poster-card.pc-live .poster-stage { animation: none; }
@keyframes pc-idle { 0%, 100% { --pc-rx: 4deg; --pc-ry: -7deg; } 50% { --pc-rx: -3deg; --pc-ry: 7deg; } }
.poster-stage img {
  border-radius: 6px;
  box-shadow: 0 30px 45px -18px rgba(0,0,0,.95), 0 0 0 1px rgba(255,236,179,.15), 0 0 40px -6px rgba(245,158,11,.25);
}
.poster-glare {
  position: absolute; inset: 0; border-radius: 6px; pointer-events: none; transform: translateZ(2px); mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--pc-gx, 30%) var(--pc-gy, 20%), rgba(255,255,255,.75), rgba(255,255,255,0) 58%);
}
.poster-floor {
  position: absolute; left: 16%; right: 16%; bottom: -26px; height: 20px; border-radius: 50%;
  background: rgba(245,158,11,.22); filter: blur(14px); pointer-events: none;
}
.poster-card:hover .poster-stage { scale: 1.02; }
.poster-card:active .poster-stage { scale: 1.03; }
.poster-card:focus-visible { outline: 3px solid #fde68a; outline-offset: 10px; }
.poster-hint { text-align: center; font-family: var(--mono); font-size: 14px; color: var(--muted); margin: 12px 0 0; letter-spacing: .06em; }
@media (prefers-reduced-motion: reduce) { .poster-stage { animation: none; } }
@media (max-width: 639px) { .screen { padding: 20px 10px 34px; } }
@media (max-width: 639px) { .poster-card { width: 100%; } }

/* Reels now live in the intro box: a little more room between them on wide screens */
@media (min-width: 1024px) { .reel-grid { gap: 16px; } }

/* "Now Playing" lobby marquee above the reels */
.reels-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 12px; }
.reels-head .label { margin: 0; }
.now-playing {
  margin: 0; position: relative; display: inline-block; padding: 9px 22px;
  background: #1a0f05; border: 2px solid var(--amber); border-radius: 6px;
  box-shadow: 0 0 18px -4px rgba(245,158,11,.6), inset 0 0 12px rgba(245,158,11,.25);
}
.now-playing span {
  font-family: var(--marquee); font-size: 22px; line-height: 1; letter-spacing: .12em; text-transform: uppercase;
  color: #fde68a; text-shadow: 0 0 6px rgba(253,230,138,.9), 0 0 14px rgba(245,158,11,.8);
}
/* bulbs: dotted lights around the sign, gently chasing */
.now-playing::before {
  content: ""; position: absolute; inset: 3px; border-radius: 4px; pointer-events: none;
  border: 3px dotted #fcd34d; opacity: .9; animation: np-chase 1.2s steps(2) infinite;
}
@keyframes np-chase { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .now-playing::before { animation: none; } }
@media (max-width: 639px) { .now-playing span { font-size: 20px; } }

/* ---------- Poster back (flip card) ---------- */
.poster-card { cursor: pointer; }
.poster-flipper { display: block; position: relative; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,.7,.2,1); }
.poster-card.is-flipped .poster-flipper { transform: rotateY(180deg); }
.poster-face { display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.poster-front { position: relative; }
.poster-back {
  position: absolute; inset: 0; transform: rotateY(180deg); border-radius: 6px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, rgba(245,158,11,.16), transparent 60%), linear-gradient(180deg, #1f160c, #0f0a06);
  border: 3px solid var(--amber-deep); line-height: 1.38; text-align: left;
  box-shadow: 0 30px 45px -18px rgba(0,0,0,.95), inset 0 0 0 6px #1a0f05, inset 0 0 0 7px rgba(245,158,11,.35);
}
.poster-back-scroll {
  position: absolute; inset: 0; overflow-y: auto; padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: var(--amber-deep) transparent; overscroll-behavior: contain;
}
.back-kicker { font-family: var(--mono); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber-mid); font-weight: 700; }
.back-title { font-family: var(--marquee); font-size: var(--bt, 24px); line-height: 1.08; text-transform: uppercase; letter-spacing: .03em; color: var(--amber); text-shadow: 2px 2px 0 var(--amber-deep); }
.back-year { font-family: var(--mono); font-size: 14px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-top: -4px; }
.back-synopsis { font-size: var(--bf, 16px); color: var(--text); border-top: 1px dashed var(--amber-deep); padding-top: 8px; }
.back-synopsis.is-tagline { font-style: italic; font-size: 20px; color: #fde68a; }
.back-pending { font-family: var(--mono); font-size: 14px; color: var(--muted); }
/* demise + director's note: 16px (12pt), as agreed */
.back-demise { background: rgba(69,10,10,.45); border-left: 3px solid var(--red); border-radius: 4px; padding: 7px 11px; font-size: var(--bf2, 16px); color: var(--text); }
.back-note { background: rgba(120,53,15,.22); border-left: 3px solid var(--amber); border-radius: 4px; padding: 7px 11px; font-style: italic; font-size: var(--bf2, 16px); color: var(--text); }
.back-label { display: block; font-family: var(--mono); font-style: normal; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); font-weight: 700; margin-bottom: 3px; }
.back-label.red { color: #f87171; }
.back-cta {
  margin-top: auto; align-self: center; text-align: center; text-decoration: none;
  font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  color: #1a0f05; background: var(--amber); padding: 12px 20px; border-radius: 6px;
  box-shadow: 0 0 18px -4px rgba(245,158,11,.7), 3px 3px 0 var(--amber-deep);
}
.back-cta:hover, .back-cta:focus-visible { background: #fbbf24; outline: none; box-shadow: 0 0 0 3px #fde68a, 3px 3px 0 var(--amber-deep); }
@media (max-width: 639px) { .poster-back-scroll { padding: 16px 14px 14px; } }
@media (prefers-reduced-motion: reduce) { .poster-flipper { transition: none; } }
/* When the back has more than fits (laptops, iPad landscape, phones): fade + "scroll" cue at the bottom */
.poster-back::after {
  content: "▼ scroll for more"; position: absolute; left: 3px; right: 3px; bottom: 3px; height: 64px; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  font-family: var(--mono); font-size: 14px; letter-spacing: .08em; color: var(--amber);
  background: linear-gradient(transparent, #0f0a06 70%); opacity: 0; transition: opacity .25s;
}
.poster-back.has-more::after { opacity: 1; }
.back-demise > span:not(.back-label) { display: block; }
.back-incident2 { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(248,113,113,.4); }

/* ---------- Phones + tablets: lobby layout (banner, Now Playing card, Also Showing) ---------- */
.lobby-only, .lobby-only-block { display: none !important; }
@media (max-width: 1023px), (hover: none) and (pointer: coarse) and (max-width: 1366px) {
  .theater { grid-template-columns: 1fr; }
  .screen-col { position: static; }
  .intro { margin-bottom: 22px; }
  .intro h1 { margin-bottom: 0; }
  .intro-copy, .billing { display: none !important; }
  .lobby-only { display: table !important; margin: 0 auto 14px; }
  .screen-col { scroll-margin-top: 12px; }
  .reels.is-also {
    margin-top: 28px; border: 1px solid var(--line); border-radius: 8px; padding: 18px;
    background: rgba(12,10,9,.6); box-shadow: 0 25px 50px -12px rgba(0,0,0,.8);
  }
  .reels.is-also .reels-head { justify-content: center; margin-bottom: 16px; }
  .reels.is-also .reels-head .label { display: none; }
  .reels.is-also .vault-poster-thumbnail.is-active { display: none; }
  .reels.is-also .reel-grid {
    grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(7, 1fr);
    overflow: visible; padding: 0; margin: 0; gap: 12px;
  }
}
@media (max-width: 639px) {
  .reels.is-also { padding: 14px; }
  .reels.is-also .reel-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}
/* Credits roll on the back of the card (phones + tablets only) */
@media (max-width: 1023px), (hover: none) and (pointer: coarse) and (max-width: 1366px) {
  .lobby-only-block { display: block !important; }
  .back-credits { text-align: center; padding: 6px 0 4px; }
  .back-credits > span { display: block; }
  .credits-rule { color: var(--amber-deep); letter-spacing: .6em; margin: 4px 0 10px; font-size: 14px; }
  .credits-head { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin: 16px 0 8px; }
  .credit { margin-bottom: 10px; }
  .credit-role { display: block; font-family: var(--mono); font-size: 14px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
  .credit-name { display: block; font-size: 17px; color: var(--text); font-weight: 700; }
  .credits-note { font-style: italic; font-size: 16px; color: var(--text); }
  .credits-endorse { margin-top: 18px; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); line-height: 1.5; }
}
/* Tablet landscape lobby: keep the Now Playing sign and the whole poster on one screen */
@media (hover: none) and (pointer: coarse) and (min-width: 1024px) and (max-width: 1366px) {
  .screen img { max-height: calc(100vh - 170px); }
}
/* Rudy's name links to his RMDb page */
.rudy-link { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: rgba(245,158,11,.7); text-underline-offset: 3px; }
.rudy-link:hover, .rudy-link:focus-visible { color: #fde68a; text-decoration-style: solid; outline: none; }
.rudy-row .role { color: #fca5a5; }
