/* 프로젝트 상세 — 프로젝트마다 다른 테마.
   색은 app.js가 body에 --bg / --text / --accent / --display 로 넣어 줍니다. */

body.themed { background: var(--bg); color: var(--text); }
body.themed .site-header { position: fixed; left: 0; right: 0; }
body.themed .site-header.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); }
body.themed .site-footer { margin-top: 0; }

.t-label {
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 28px;
}
.t-upper { text-transform: uppercase; }

/* ── 배경 아트 (키 아트가 없을 때의 임시 배경 포함) ── */
.t-art { position: absolute; inset: 0; background-size: cover; background-position: center; overflow: hidden; }
video.t-art { width: 100%; height: 100%; object-fit: cover; }
.t-art::before { content: ""; position: absolute; inset: 0; }
.t-particles {
  position: absolute; inset: -10% 0; opacity: .7; --pc: rgba(255, 255, 255, .55);
  background-image:
    radial-gradient(circle, var(--pc) 1px, transparent 1.7px),
    radial-gradient(circle, var(--pc) .8px, transparent 1.4px);
  background-size: 140px 140px, 80px 80px;
  background-position: 0 0, 40px 60px;
  animation: t-rise 40s linear infinite;
}
@keyframes t-rise { to { background-position: 0 -1400px, 40px -800px; } }

/* 깊은 바다 — 위에서 내려오는 빛줄기와 떠오르는 기포 */
.art-deep-sea {
  background:
    radial-gradient(ellipse 60% 45% at 50% -5%, rgba(140, 225, 255, .5), transparent 70%),
    linear-gradient(180deg, #0b3a57 0%, #04182a 45%, #010810 100%);
}
.art-deep-sea::before {
  inset: -20% -20% 0;
  background: repeating-conic-gradient(from 165deg at 50% -15%, rgba(170, 235, 255, .11) 0deg 2.2deg, transparent 2.2deg 7deg);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
  animation: t-sway 14s ease-in-out infinite alternate;
}
.art-deep-sea .t-particles { --pc: rgba(190, 240, 255, .6); }
@keyframes t-sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }

/* 우주 — 지구 곡면이 빛나는 지평선과 별 */
.art-space {
  background:
    radial-gradient(ellipse 130% 55% at 50% 118%, rgba(90, 180, 255, .65) 0%, rgba(30, 70, 160, .35) 28%, transparent 46%),
    radial-gradient(circle at 75% 18%, rgba(160, 120, 255, .22), transparent 38%),
    #03040c;
}
.art-space .t-particles { animation: t-twinkle 4s ease-in-out infinite alternate; background-size: 110px 110px, 57px 57px; }
@keyframes t-twinkle { from { opacity: .35; } to { opacity: .9; } }

/* 불씨 — 아래에서 올라오는 불빛과 불티 */
.art-ember {
  background:
    radial-gradient(ellipse 75% 50% at 50% 108%, rgba(255, 110, 30, .75), transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 100%, rgba(255, 60, 20, .4), transparent 70%),
    linear-gradient(0deg, #3a0c03 0%, #140504 55%, #060202 100%);
}
.art-ember .t-particles { --pc: rgba(255, 170, 80, .9); animation-duration: 18s; }

/* 꿈 — 흐릿하게 섞이는 파스텔 빛 */
.art-dream {
  background:
    radial-gradient(circle at 22% 30%, rgba(247, 178, 217, .75) 0, transparent 42%),
    radial-gradient(circle at 78% 22%, rgba(185, 166, 255, .7) 0, transparent 45%),
    radial-gradient(circle at 60% 82%, rgba(255, 214, 168, .55) 0, transparent 45%),
    #2a2140;
  background-size: 140% 140%;
  animation: t-drift 18s ease-in-out infinite alternate;
}
.art-dream .t-particles { --pc: rgba(255, 255, 255, .8); animation-duration: 60s; }
@keyframes t-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

/* 노을 — 필름 느낌의 따뜻한 지평선 */
.art-dusk {
  background:
    radial-gradient(ellipse 60% 25% at 50% 68%, rgba(255, 200, 120, .7), transparent 70%),
    linear-gradient(180deg, #24152f 0%, #6e2f48 42%, #d9814f 66%, #2a1410 82%, #120a10 100%);
}
.art-dusk .t-particles { --pc: rgba(255, 230, 200, .35); background-size: 6px 6px, 9px 9px; animation: none; opacity: .25; }

/* 오로라 — 기본값 */
.art-aurora {
  background:
    radial-gradient(ellipse 80% 30% at 30% 22%, rgba(80, 255, 190, .38), transparent 70%),
    radial-gradient(ellipse 60% 25% at 72% 36%, rgba(120, 140, 255, .32), transparent 70%),
    linear-gradient(#031210, #000);
  background-size: 160% 100%;
  animation: t-drift 20s ease-in-out infinite alternate;
}

.t-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 60%, transparent) 0%, transparent 28%, transparent 50%,
    color-mix(in srgb, var(--bg) 85%, transparent) 82%, var(--bg) 100%);
}

/* ── 히어로 ─────────────────────────────────── */
.t-hero { position: relative; min-height: 100svh; display: flex; overflow: hidden; isolation: isolate; }
.t-hero-in {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: 120px; padding-bottom: 14vh;
}
.t-hero .back { position: absolute; top: 84px; color: color-mix(in srgb, var(--text) 75%, transparent); }
.t-eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 80%, transparent); }
.t-title {
  font-family: var(--display); font-weight: 700; color: var(--accent);
  font-size: clamp(64px, 13vw, 210px); line-height: .92; letter-spacing: -0.01em; margin-top: 14px;
  text-shadow: 0 6px 40px color-mix(in srgb, var(--bg) 70%, transparent);
  word-break: keep-all;
}
.t-title small {
  display: block; font-size: .28em; line-height: 1.2; margin-top: .35em; letter-spacing: 0;
  color: var(--text); text-transform: none;
}
.t-hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 36px; }
.t-quote {
  margin: 0; max-width: 520px; font-size: clamp(17px, 1.8vw, 22px); line-height: 1.5; font-weight: 600;
  padding-left: 18px; border-left: 2px solid var(--accent);
}
.t-hero-hint { position: absolute; z-index: 3; right: 20px; top: 84px; max-width: 320px; }
.t-down {
  position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 70%, transparent);
}

/* 월계관 */
.t-laurel { margin: 0; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); }
.t-laurel svg { width: 116px; height: auto; fill: currentColor; }
.t-laurel .ly { font: 600 10px/1 var(--font, sans-serif); letter-spacing: .12em; text-anchor: middle; fill: currentColor; opacity: .8; }
.t-laurel .lr { font: 800 17px/1 var(--font, sans-serif); text-anchor: middle; fill: var(--accent); }
.t-laurel figcaption { font-size: 11px; letter-spacing: .04em; max-width: 200px; text-align: center; line-height: 1.35; opacity: .85; }
.t-laurel figcaption strong { display: block; font-size: 12px; font-weight: 700; opacity: 1; margin-bottom: 2px; }

/* ── 섹션 ───────────────────────────────────── */
.t-sec { padding: 96px 0 0; }
.t-syn { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.t-statement { font-family: var(--display); font-size: clamp(26px, 3.2vw, 42px); line-height: 1.25; color: var(--text); }
.t-synopsis .prose { color: color-mix(in srgb, var(--text) 78%, var(--bg)); }
.t-meta {
  display: flex; flex-wrap: wrap; margin: 56px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.t-meta div { flex: 1 1 160px; padding: 18px 20px 18px 0; }
.t-meta dt { font-size: 12px; color: var(--muted); }
.t-meta dd { margin: 4px 0 0; font-weight: 600; }

.t-video { aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface); }
.t-video iframe { width: 100%; height: 100%; border: 0; }

.t-bigquote { margin: 0; max-width: 860px; font-family: var(--display); font-size: clamp(19px, 2.1vw, 27px); line-height: 1.55; }
.t-bigquote p + p { margin-top: .9em; color: color-mix(in srgb, var(--text) 78%, var(--bg)); }
.t-bigquote::before { content: "“"; display: block; color: var(--accent); font-size: 2.4em; line-height: .6; margin-bottom: 10px; }

.t-chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.t-chapters li { border-top: 2px solid var(--accent); padding-top: 16px; }
.t-chapters span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.t-chapters p { margin-top: 8px; color: color-mix(in srgb, var(--text) 85%, var(--bg)); }

/* 장면 캐러셀 — 가운데 장면이 크고 양옆이 살짝 보임 */
.t-scenes-head { display: flex; justify-content: space-between; align-items: flex-start; }
.t-arrows { display: flex; gap: 8px; }
.t-arrows button {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 16px;
  background: transparent; color: var(--text); border: 1px solid var(--line);
}
.t-arrows button:hover { border-color: var(--accent); color: var(--accent); }
.t-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 max(20px, calc((100vw - min(72vw, 960px)) / 2)) 8px;
}
.t-track::-webkit-scrollbar { display: none; }
.t-track figure {
  flex: 0 0 min(72vw, 960px); margin: 0; scroll-snap-align: center;
  opacity: .4; transform: scale(.94); transition: opacity .4s, transform .4s;
}
.t-track figure.on { opacity: 1; transform: none; }
.t-track img, .t-track video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.t-track figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

.t-features .feature { border-top-color: var(--line); }
.t-features .feature h3 { font-family: var(--display); font-size: 24px; }
.t-features .psr b { color: var(--accent); }

/* 크레딧 — 영화 엔딩 크레딧처럼 */
.t-credits .container { text-align: center; }
.t-roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 56px; }
.t-roles span { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.t-roles strong { display: block; margin-top: 6px; font-family: var(--display); font-size: 26px; font-weight: 700; }
.t-contrib { list-style: none; margin: 32px auto 0; padding: 0; color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
.t-contrib li + li { margin-top: 4px; }
.t-team { margin-top: 20px; font-size: 13px; color: var(--muted); letter-spacing: .06em; }

.t-laurels-row { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 28px; }
.t-results .results li { color: color-mix(in srgb, var(--text) 85%, var(--bg)); }

.t-prev-link { padding-top: 96px; font-size: 14px; }
.t-prev-link a { color: var(--muted); }
.t-prev-link a:hover { color: var(--text); }

/* 다음 작품 티저 */
.t-next { position: relative; display: block; height: 62svh; min-height: 360px; margin-top: 32px; overflow: hidden; isolation: isolate; }
.t-next .t-art { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.t-next:hover .t-art { transform: scale(1.05); }
.t-next .t-shade { background: linear-gradient(180deg, var(--page-bg, transparent), color-mix(in srgb, var(--bg) 35%, transparent) 40%, color-mix(in srgb, var(--bg) 70%, transparent)); }
.t-next-in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; }
.t-next-in .t-label { margin-bottom: 12px; color: #fff; opacity: .8; }
.t-next-in h2 { font-family: var(--display); font-size: clamp(48px, 9vw, 140px); line-height: .95; color: var(--accent); }
.t-go { margin-top: 18px; font-size: 28px; color: #fff; transition: transform .3s; }
.t-next:hover .t-go { transform: translateX(10px); }

@media (max-width: 760px) {
  .t-syn { grid-template-columns: 1fr; gap: 24px; }
  .t-hero-foot { flex-direction: column; align-items: flex-start; }
  .t-hero-hint { display: none; }
  .t-sec { padding-top: 72px; }
  .t-track figure { flex-basis: 84vw; }
  .t-track { padding: 0 8vw 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .t-particles, .t-art, .t-art::before { animation: none !important; }
}
