/* 金三角 孤軍淚 — 水墨、叢林綠、血紅雨 */
:root {
  --ink: #12140f;
  --ink-2: #1b1f17;
  --jungle: #3c4a33;
  --jungle-2: #5d6d4c;
  --moss: #8d9a74;
  --blood: #a23a2f;
  --blood-bright: #c8443a;
  --paper: #ebe5d5;
  --paper-2: #ddd5c0;
  --text-dark: #2a2a22;
  --text-light: #e7e2d4;
  --muted-light: #b3ae9c;

  --f-brush: "LXGW WenKai TC", "Noto Serif TC", "DFKai-SB", "BiauKai", "標楷體", serif;
  --f-serif: "Noto Serif TC", "PMingLiU", "新細明體", serif;
  --f-sans: "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", "PingFang TC", sans-serif;

  --measure: 38em;
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-light);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 頁首 ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(18,20,15,.85), rgba(18,20,15,0));
  transition: background .3s;
}
.site-header.is-solid { background: rgba(18,20,15,.94); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.brand {
  font-family: var(--f-brush); font-weight: 700; font-size: 1.25rem;
  text-decoration: none; letter-spacing: .12em;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 2.4vw, 36px); }
.site-nav a {
  text-decoration: none; font-size: .95rem; letter-spacing: .15em;
  padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s;
}
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; border-color: var(--blood-bright); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: block; position: relative; width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer; color: var(--text-light);
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    position: absolute; left: 11px; width: 22px; height: 2px; background: currentColor;
    content: ""; transition: transform .25s, opacity .25s;
  }
  .nav-toggle-bar { top: 21px; }
  .nav-toggle-bar::before { left: 0; top: -7px; }
  .nav-toggle-bar::after { left: 0; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(18,20,15,.97);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .site-nav.is-open { max-height: 440px; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 16px 20px; }
  .site-nav a { display: block; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* ---------- 紅雨裝飾（取自海報） ---------- */
.rain {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(to bottom, transparent 0 40%, rgba(200,68,58,.55) 40% 52%, transparent 52%),
    linear-gradient(to bottom, transparent 0 15%, rgba(200,68,58,.4) 15% 24%, transparent 24%),
    linear-gradient(to bottom, transparent 0 66%, rgba(162,58,47,.5) 66% 80%, transparent 80%);
  background-size: 3px 260px, 2px 340px, 3px 300px;
  background-position: 7% 0, 63% 40px, 88% 120px;
  background-repeat: repeat-y;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 75%, transparent);
  opacity: .7;
}
.rain::before, .rain::after {
  content: ""; position: absolute; inset: 0; background: inherit;
}
.rain::before { background-position: 22% 80px, 41% 0, 74% 200px; opacity: .6; }
.rain::after  { background-position: 31% 160px, 52% 60px, 95% 10px; opacity: .45; }
.rain-soft { opacity: .3; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: flex-end;
  padding: calc(var(--header-h) + 32px) clamp(16px, 6vw, 96px) 64px;
  overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; filter: saturate(.75) contrast(1.05); }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(162,58,47,.55), transparent 70%),
    linear-gradient(90deg, rgba(18,20,15,.25) 0%, rgba(18,20,15,.55) 45%, rgba(18,20,15,.9) 75%),
    linear-gradient(to top, var(--ink) 0%, transparent 30%);
}
.hero-inner { position: relative; z-index: 2; max-width: 620px; text-align: right; }
.hero-kicker {
  display: inline-block; margin: 0 0 28px;
  font-size: clamp(.92rem, 1.6vw, 1.05rem); letter-spacing: .14em; line-height: 1.7;
  padding: 6px 14px; background: var(--blood); color: #fff;
}
.hero-title { margin: 0; font-weight: 400; line-height: 1; }
.hero-title-sub {
  display: inline-grid; place-items: center;
  font-family: var(--f-brush); font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: .2em; text-indent: .2em;
  width: auto; padding: .35em .5em; border-radius: 50% / 40%;
  background: var(--jungle-2); color: var(--paper);
}
.hero-title-main {
  position: relative; display: block; margin-top: 12px;
  font-family: var(--f-serif); font-weight: 900;
  font-size: clamp(4.4rem, 13vw, 10rem); letter-spacing: .04em;
  color: #f5f1e6;
  text-shadow: 0 6px 40px rgba(0,0,0,.55);
}
.blood-drop {
  position: absolute; right: -.08em; top: .22em;
  width: .13em; height: .19em; background: var(--blood-bright);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  transform: rotate(0deg);
  clip-path: polygon(50% 0, 100% 62%, 92% 85%, 70% 100%, 30% 100%, 8% 85%, 0 62%);
}
.hero-title-en {
  display: block; margin-top: 18px;
  font-family: var(--f-serif); font-weight: 500;
  font-size: clamp(.82rem, 1.5vw, 1rem); letter-spacing: .3em; text-transform: uppercase;
  color: var(--moss);
}
.hero-quote {
  margin: 36px 0 0; padding: 0;
  font-family: var(--f-brush); font-size: clamp(1.1rem, 2.2vw, 1.45rem); line-height: 1.9;
  color: var(--text-light);
}
.hero-quote p { margin: 0; }
.hero-date {
  margin: 36px 0 0; display: inline-flex; align-items: baseline; gap: 14px;
  border-top: 1px solid rgba(200,68,58,.7); padding-top: 14px;
}
.hero-date-num { font-family: var(--f-serif); font-weight: 900; font-size: clamp(2.6rem, 6vw, 4rem); color: var(--blood-bright); line-height: 1; letter-spacing: .02em; }
.hero-date-txt { font-family: var(--f-brush); font-size: clamp(1.3rem, 2.6vw, 1.8rem); letter-spacing: .3em; }

.hero-cta { margin: 28px 0 0; }
.btn-trailer {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 26px 12px 20px;
  font-family: var(--f-serif); font-weight: 700; font-size: 1.05rem; letter-spacing: .25em;
  text-decoration: none; color: #fff;
  background: var(--blood); border: 1px solid var(--blood-bright);
  transition: background .25s, box-shadow .25s;
}
.btn-trailer:hover, .btn-trailer:focus-visible {
  background: var(--blood-bright); box-shadow: 0 8px 28px -8px rgba(200,68,58,.7);
}
.btn-trailer:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn-trailer-icon {
  width: 0; height: 0;
  border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent currentColor;
}

@media (max-width: 760px) {
  .hero { justify-content: center; align-items: flex-end; }
  .hero-inner { text-align: center; }
  .hero-bg img { object-position: 38% 50%; }
  .hero-bg::after {
    background:
      radial-gradient(ellipse 90% 50% at 50% 10%, rgba(162,58,47,.45), transparent 70%),
      linear-gradient(to top, rgba(18,20,15,.97) 10%, rgba(18,20,15,.6) 55%, rgba(18,20,15,.35));
  }
  .blood-drop { right: -.1em; }
}

/* ---------- 製作團隊 ---------- */
.credits { background: var(--ink); padding: 48px 16px 40px; }
.credits-inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 48px;
  border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 28px 0;
}
.credits p { margin: 0; }
.credits-main { font-family: var(--f-serif); font-size: clamp(1.1rem, 2.2vw, 1.4rem); letter-spacing: .14em; line-height: 1.8; }
.credits-main .sep { color: var(--blood-bright); margin: 0 .3em; }
.credits-song { color: var(--muted-light); font-size: .95rem; line-height: 1.8; letter-spacing: .06em; }
.credits-song-title { color: var(--text-light); font-family: var(--f-brush); font-size: 1.15rem; }

/* ---------- 得獎與入圍 ---------- */
.honors { background: var(--ink); padding: 8px 16px 72px; }
.honors-list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 820px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.honor {
  position: relative; text-align: center; padding: 26px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid rgba(141,154,116,.35);
  outline: 1px solid rgba(141,154,116,.15); outline-offset: 5px;
}
/* 四角朱紅角飾 */
.honor::before, .honor::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border-color: var(--blood-bright); border-style: solid;
}
.honor::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.honor::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.honor-year { font-family: var(--f-serif); font-size: .85rem; letter-spacing: .3em; color: var(--moss); }
.honor-fest { font-family: var(--f-serif); font-weight: 700; font-size: 1.12rem; letter-spacing: .08em; line-height: 1.5; }
.honor-prize { font-family: var(--f-brush); font-size: 1.35rem; color: var(--blood-bright); letter-spacing: .15em; }

@media (max-width: 600px) {
  .honors-list { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- 共用區塊 ---------- */
.section { position: relative; padding: clamp(72px, 10vw, 128px) clamp(16px, 5vw, 64px); overflow: hidden; isolation: isolate; }
.section-paper {
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(93,109,76,.16), transparent 70%),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(162,58,47,.1), transparent 70%),
    var(--paper);
  color: var(--text-dark);
}
.section-ink { background: var(--ink-2); color: var(--text-light); }
.section-green {
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(162,58,47,.22), transparent 70%),
    linear-gradient(160deg, #2c3726, #1d2419);
  color: var(--text-light);
}
.section > * { position: relative; z-index: 2; }
.section > .rain { position: absolute; z-index: 0; }

.section-head { max-width: var(--measure); margin: 0 auto 56px; text-align: center; }
.section-title {
  margin: 0; font-family: var(--f-brush); font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 2.9rem); letter-spacing: .3em; text-indent: .3em; line-height: 1.3;
}
.section-title::after {
  content: ""; display: block; width: 46px; height: 3px; margin: 18px auto 0;
  background: var(--blood-bright);
  border-radius: 2px;
}
.section-sub {
  margin: 22px auto 0; font-family: var(--f-serif); font-weight: 700;
  font-size: clamp(1.08rem, 2.2vw, 1.35rem); line-height: 1.7; letter-spacing: .04em;
}
.section-paper .section-sub { color: var(--jungle); }
.section-ink .section-sub, .section-green .section-sub { color: var(--paper-2); }

.prose { max-width: var(--measure); margin: 0 auto; }
.prose p { margin: 0 0 1.4em; text-align: justify; }
.prose p:last-child { margin-bottom: 0; }
.section-paper .prose { color: #33332b; }

.bleed { max-width: 1200px; margin: 64px auto; }
.bleed img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: 0 24px 60px -20px rgba(18,20,15,.5); }

/* ---------- 劇情大綱 ---------- */
.story-grid {
  max-width: 1200px; margin: 0 auto 56px;
  display: grid; grid-template-columns: minmax(0, 38em) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.story-grid .prose { margin: 0; }
.story-fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 42% 50%; }
@media (max-width: 960px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-grid .prose { margin: 0 auto; }
  .story-fig img { aspect-ratio: 16 / 9; }
}

/* ---------- 預告片 ---------- */
.trailer {
  background:
    radial-gradient(ellipse 60% 45% at 50% 55%, rgba(162,58,47,.28), transparent 70%),
    var(--ink);
  color: var(--text-light);
}
.trailer-frame {
  max-width: 1100px; margin: 0 auto;
  position: relative; aspect-ratio: 16 / 9; background: #000;
  box-shadow: 0 30px 80px -24px rgba(0,0,0,.85);
  outline: 1px solid rgba(141,154,116,.3); outline-offset: 10px;
}
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-poster { position: absolute; inset: 0; display: block; overflow: hidden; }
.trailer-poster img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); filter: saturate(.8) brightness(.8); transition: filter .4s, transform .8s ease; }
.trailer-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(64px, 9vw, 92px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(162,58,47,.88); border: 2px solid rgba(255,255,255,.75);
  transition: background .25s, transform .25s;
}
.trailer-play::before {
  content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 14px 0 14px 23px;
  border-color: transparent transparent transparent #fff;
}
.trailer-poster:hover img, .trailer-poster:focus-visible img { filter: saturate(1) brightness(.9); transform: scale(1.07); }
.trailer-poster:hover .trailer-play, .trailer-poster:focus-visible .trailer-play { background: var(--blood-bright); transform: translate(-50%, -50%) scale(1.08); }
.trailer-poster:focus-visible { outline: 2px solid var(--blood-bright); outline-offset: 3px; }

/* ---------- 人物（製片／導演） ---------- */
.person {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 340px minmax(0, 38em); gap: clamp(32px, 5vw, 72px);
  justify-content: center; align-items: start;
}
.person-flip { grid-template-columns: minmax(0, 38em) 420px; }
.person-flip .person-photo { order: 2; }
.person .prose { margin: 0; }
.person-photo { position: sticky; top: calc(var(--header-h) + 24px); }
.person-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.person-photo-square img { aspect-ratio: 1; }
.person-photo figcaption {
  margin-top: 14px; font-family: var(--f-brush); font-size: 1.5rem; letter-spacing: .25em;
  display: flex; align-items: baseline; gap: 12px;
}
.person-role { font-family: var(--f-sans); font-size: .85rem; letter-spacing: .2em; color: var(--blood); }
.section-green .person-role { color: #e07a6f; }
.prose-wide { margin-top: 1.4em; }
#director .prose-wide { max-width: calc(38em + 420px + 72px); }
#director .prose-wide p { max-width: 38em; }

@media (max-width: 960px) {
  .person, .person-flip { grid-template-columns: 1fr; max-width: 38em; }
  .person-flip .person-photo { order: 0; }
  .person-photo { position: static; max-width: 420px; }
  .person-photo-square { max-width: 300px; }
  #director .prose-wide { max-width: 38em; }
}

/* ---------- 劇照 ---------- */
.gallery {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1280px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.gallery-item {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  overflow: hidden; position: relative;
}
.gallery-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s ease, filter .6s; filter: saturate(.85); }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.04); filter: saturate(1); }
.gallery-item:focus-visible { outline: 2px solid var(--blood-bright); outline-offset: 3px; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- 片尾 ---------- */
.finale {
  position: relative; padding: clamp(72px, 10vw, 120px) 16px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(162,58,47,.3), transparent 70%),
    var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 40px;
}
.finale-poster { width: min(380px, 80vw); }
.finale-poster img { width: 100%; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.finale-date { margin: 0; text-align: center; font-family: var(--f-brush); font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: .3em; }
.finale-date span { display: block; font-family: var(--f-serif); font-weight: 900; font-size: clamp(3.4rem, 9vw, 5.5rem); color: var(--blood-bright); letter-spacing: .02em; line-height: 1.1; }

/* ---------- 頁尾 ---------- */
.site-footer {
  background: #0c0d0a; color: var(--muted-light); text-align: center;
  padding: 48px 16px 56px; font-size: .9rem; line-height: 1.8;
  border-top: 3px solid var(--blood);
}
.site-footer p { margin: 0; }
.footer-date { font-family: var(--f-serif); font-weight: 700; font-size: 1.3rem; color: var(--text-light); letter-spacing: .2em; }
.footer-company { margin-top: 6px !important; font-family: var(--f-brush); font-size: 1.15rem; letter-spacing: .2em; }
.footer-title { margin-top: 18px !important; font-size: .8rem; letter-spacing: .1em; opacity: .7; }

/* ---------- 燈箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,9,7,.94);
  display: flex; align-items: center; justify-content: center; padding: 56px 16px;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: min(1600px, 100%); max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 2.4rem; line-height: 1; width: 52px; height: 52px; opacity: .8;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; color: var(--blood-bright); }
.lightbox-close { top: 8px; right: 8px; }
.lightbox-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- 進場淡入 ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .gallery-item img, .trailer-poster img, .trailer-play { transition: none; }
}
