/* The trailer is a little cinema built from the same warm wood and brass as the game. */
html.trailer-open { overflow: hidden; overscroll-behavior: none; scrollbar-gutter: stable; }
html.trailer-open body { overflow: hidden; }
.hero-trailer {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  padding: 7px;
  border: 1px solid #a4834d;
  border-radius: 20px;
  background: repeating-linear-gradient(177deg, #0000 0 7px, #10080440 8px 9px), linear-gradient(100deg, #3d2c1a, #665035 48%, #312518);
  box-shadow: inset 0 1px #eac99155, 0 12px 0 #090d0bb8, 0 35px 65px #0009;
}
.hero-trailer-screen { position: relative; overflow: hidden; border: 1px solid #120e09; border-radius: 13px; background: #020706; aspect-ratio: 16/9; }
.hero-trailer-screen::after { content: ''; position: absolute; inset: 42% 0 0; pointer-events: none; background: linear-gradient(transparent, #010906bf); }
.hero-trailer-screen video { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero-trailer-play { position: absolute; z-index: 1; left: 50%; bottom: clamp(18px, 3vw, 40px); transform: translateX(-50%); display: flex; align-items: center; gap: 20px; width: max-content; max-width: calc(100% - 32px); padding: 0; background: none; border: 0; color: #fff0c7; text-align: left; }
.trailer-play-disc { flex: none; display: grid; place-items: center; width: clamp(72px, 7vw, 112px); height: clamp(72px, 7vw, 112px); border: 3px solid #f6dc94; border-radius: 50%; color: #392609; background: linear-gradient(#ffe9a8 3%, #dfad43 65%, #ad7426); box-shadow: inset 0 2px 2px #fff3c0, inset 0 -5px #9c641b, 0 6px 0 #402b15, 0 12px 30px #0009; transition: transform .2s, box-shadow .2s; }
.trailer-play-disc svg { width: 48%; height: 48%; margin-left: 4%; }
.hero-trailer-play:hover .trailer-play-disc, .trailer-center-play:hover .trailer-play-disc { transform: translateY(-3px) scale(1.04); box-shadow: inset 0 2px 2px #fff3c0, inset 0 -5px #9c641b, 0 8px 0 #402b15, 0 16px 35px #000a; }
.hero-trailer-play:active .trailer-play-disc, .trailer-center-play:active .trailer-play-disc { transform: translateY(3px); }
.hero-trailer-play-copy { display: grid; gap: 8px; text-shadow: 0 2px 12px #000; }
.hero-trailer-play-copy strong { font: clamp(21px, 2.1vw, 32px)/1.1 'Oceanfoot Display', Impact, sans-serif; letter-spacing: .025em; }
.hero-trailer-play-copy > span { font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.hero-trailer-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 14px 12px; color: #ead9b6; }
.hero-trailer-caption > div { display: grid; gap: 6px; }
.hero-trailer-caption strong { font-size: 13px; letter-spacing: .1em; }
.hero-trailer-sound-note { font-size: 10px; letter-spacing: .045em; color: #c8b58e; }
.trailer-preview-toggle { flex: none; padding: 10px 12px; min-height: 38px; font-size: 11px; font-weight: 700; letter-spacing: .045em; border: 1px solid #bb95584a; border-radius: 7px; color: #f0dca9; background: #21190fd9; }
.trailer-preview-toggle:hover { border-color: #ecd399; background: #382916; }
.trailer-dialog {
  width: min(1480px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 14px;
  border: 2px solid #ae8950;
  border-radius: 18px;
  color: #f7e8c8;
  background: repeating-linear-gradient(177deg, #0000 0 7px, #10080436 8px 9px), linear-gradient(100deg, #342419, #654a2f 44%, #38291b);
  box-shadow: inset 0 2px #e8c88680, inset 0 -3px #140e09, 0 30px 110px #000;
  overflow: auto;
  overscroll-behavior: contain;
}
.trailer-dialog:not([open]) { display: none; }
.trailer-dialog[open] { display: flex; flex-direction: column; }
.trailer-shell { display: flex; flex-direction: column; min-width: 0; min-height: 0; width: 100%; }
.trailer-dialog::backdrop { background: rgb(0 0 0 / 92%); backdrop-filter: blur(10px); }
.trailer-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 3px 7px 16px; }
.trailer-eyebrow { display: block; margin-bottom: 5px; font-size: 11px; letter-spacing: .12em; color: #d7bb80; }
.trailer-header h2 { margin: 0; font: clamp(25px, 2.5vw, 37px)/1.05 'Oceanfoot Display', Impact, sans-serif; text-transform: uppercase; }
.trailer-close, .trailer-control { display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 9px; min-height: 42px; padding: 10px 14px; border: 1px solid #a8814766; border-radius: 8px; background: #1b160ff2; color: #f6dfac; font-size: 12px; font-weight: 700; letter-spacing: .055em; box-shadow: 0 3px #140e08; }
.trailer-close { padding: 10px; width: 44px; height: 44px; }
.trailer-close svg, .trailer-control svg { display: block; width: 22px; height: 22px; flex: none; }
.trailer-close:hover, .trailer-control:hover { border-color: #e6c584; background: #45321c; }
.trailer-close:active, .trailer-control:active { transform: translateY(2px); box-shadow: 0 1px #140e08; }
.trailer-dialog button:focus-visible, .trailer-dialog input:focus-visible, .hero-trailer button:focus-visible { outline: 3px solid #b6f0d1; outline-offset: 4px; }
.trailer-player { position: relative; min-height: 0; aspect-ratio: 16/9; background: #000; border: 1px solid #1b1007; border-radius: 7px; overflow: hidden; }
.trailer-player > video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.trailer-center-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; width: 100%; border: 0; color: #ffedbb; background: #02060666; font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.trailer-dialog[data-state='playing'] .trailer-center-play, .trailer-dialog[data-state='loading'] .trailer-center-play { display: none; }
.trailer-status { position: absolute; left: 16px; right: 16px; bottom: 12px; width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 10px 16px; color: #f9e9c5; font-size: 14px; line-height: 1.4; text-align: center; border-radius: 8px; background: #050706e8; }
.trailer-status:empty { display: none; }
.trailer-controls { padding: 13px 5px 3px; }
.trailer-seek { display: block; margin-bottom: 9px; }
.trailer-controls input[type='range'] { display: block; width: 100%; margin: 0; min-width: 0; height: 20px; cursor: pointer; accent-color: #e5be69; }
.trailer-seek input[type='range'] { appearance: none; background: transparent; }
.trailer-seek input::-webkit-slider-runnable-track { height: 7px; border: 1px solid #9d7b494d; border-radius: 4px; background: linear-gradient(90deg, #eac675 var(--played, 0%), #1b160f var(--played, 0%)); box-shadow: inset 0 1px 2px #0009; }
.trailer-seek input::-webkit-slider-thumb { appearance: none; width: 17px; height: 17px; margin-top: -6px; border: 1px solid #ffe6a1; border-radius: 50%; background: linear-gradient(#ffebb3, #d0a146); box-shadow: 0 2px 4px #0008; }
.trailer-seek input::-moz-range-track { height: 5px; border: 1px solid #9d7b494d; border-radius: 4px; background: #1b160f; box-shadow: inset 0 1px 2px #0009; }
.trailer-seek input::-moz-range-progress { height: 5px; border-radius: 4px; background: #eac675; }
.trailer-seek input::-moz-range-thumb { width: 15px; height: 15px; border: 1px solid #ffe6a1; border-radius: 50%; background: linear-gradient(#ffebb3, #d0a146); box-shadow: 0 2px 4px #0008; }
.trailer-control-row { display: flex; align-items: center; gap: 16px; }
.trailer-time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #eadbc2; white-space: nowrap; }
.trailer-sound-controls { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.trailer-sound-controls input[type='range'] { width: clamp(65px, 9vw, 130px); }
.trailer-dialog .trailer-pause-icon, .trailer-dialog .trailer-muted-icon { display: none; }
.trailer-dialog[data-state='playing'] .trailer-play-icon, .trailer-dialog[data-muted='true'] .trailer-sound-icon { display: none; }
.trailer-dialog[data-state='playing'] .trailer-pause-icon, .trailer-dialog[data-muted='true'] .trailer-muted-icon { display: block; }
.trailer-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.trailer-shell:fullscreen { width: 100%; height: 100%; padding: 14px; border-radius: 0; justify-content: center; background: repeating-linear-gradient(177deg, #0000 0 7px, #10080436 8px 9px), linear-gradient(100deg, #342419, #654a2f 44%, #38291b); }
.trailer-shell:fullscreen .trailer-player { flex: 1; display: grid; place-items: center; }
.trailer-shell:fullscreen .trailer-player > video { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 761px) and (max-width: 1100px) {
  .hero-trailer-play { gap: 12px; bottom: 20px; }
  .trailer-play-disc { width: 74px; height: 74px; }
  .hero-trailer-play-copy strong { font-size: 22px; }
  .hero-trailer-play-copy > span { font-size: 9px; }
  .hero-trailer-caption { padding: 13px 8px 8px; }
  .hero-trailer-caption strong { font-size: 11px; }
  .hero-trailer-sound-note { display: none; }
}
@media (max-width: 760px) {
  .hero-trailer { max-width: 600px; padding: 5px; border-radius: 14px; }
  .hero-trailer-screen { border-radius: 9px; }
  .hero-trailer-play { gap: 12px; bottom: 20px; }
  .trailer-play-disc { width: 64px; height: 64px; border-width: 2px; }
  .hero-trailer-play-copy strong { font-size: 22px; }
  .hero-trailer-play-copy > span { display: none; }
  .hero-trailer-caption { padding: 13px 7px 8px; gap: 8px; }
  .hero-trailer-caption strong { font-size: 11px; }
  .hero-trailer-sound-note { display: none; }
  .trailer-preview-toggle { padding: 8px; font-size: 10px; min-height: 34px; }
  .trailer-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 9px; border-radius: 12px; }
  .trailer-header { padding: 3px 2px 12px; gap: 10px; }
  .trailer-header h2 { font-size: 25px; }
  .trailer-eyebrow { font-size: 9px; }
  .trailer-close { width: 40px; height: 40px; min-height: 40px; }
  .trailer-controls { padding: 9px 0 0; }
  .trailer-control-row { flex-wrap: wrap; gap: 9px; }
  .trailer-control { min-height: 38px; padding: 8px 10px; gap: 6px; font-size: 10px; }
  .trailer-control svg { width: 19px; height: 19px; }
  .trailer-time { font-size: 12px; }
  .trailer-sound-controls { margin-left: auto; gap: 8px; }
  .trailer-sound-controls input[type='range'] { width: 72px; }
  .trailer-control [data-control-label] { display: none; }
  .trailer-status { font-size: 12px; left: 10px; right: 10px; bottom: 8px; padding: 8px 10px; }
}
@media (max-width: 360px) {
  .trailer-play-disc { width: 55px; height: 55px; }
  .hero-trailer-play-copy strong { font-size: 20px; }
  .trailer-sound-controls input[type='range'] { width: 53px; }
  .trailer-control-row { gap: 6px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .trailer-dialog { padding: 8px; width: calc(100vw - 24px); max-height: calc(100dvh - 16px); }
  .trailer-header { padding-bottom: 8px; }
  .trailer-header h2 { font-size: 23px; }
  .trailer-eyebrow { display: none; }
  .trailer-close { height: 36px; width: 36px; min-height: 36px; }
  .trailer-controls { padding-top: 5px; }
  .trailer-seek { margin-bottom: 4px; }
  .trailer-control { min-height: 34px; padding-block: 6px; }
}
@media (prefers-reduced-motion: reduce) { .trailer-play-disc { transition: none; } }
