/* =========================================================
   作品集网站 — 深色电影感主题
   设计参考：joelsantos.net
   变量集中在 :root，方便统一换色 / 换字体
   ========================================================= */

:root {
  --bg:        #0c0c0e;   /* 主背景（近黑） */
  --bg-soft:   #141416;   /* 次级背景 */
  --fg:        #f2f0ec;   /* 主文字（暖白） */
  --fg-muted:  #9a978f;   /* 次要文字 */
  --accent:    #c9a35b;   /* 点缀色（金） */
  --line:      rgba(242,240,236,0.12);

  --font-head: "Cormorant Garamond", Georgia, "Songti SC", serif;
  --font-body: "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;

  --maxw: 1200px;
  --pad:  clamp(20px, 5vw, 64px);
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #000; }

/* ---------- 通用容器 / 区块 ---------- */
.section { padding: clamp(70px, 12vw, 140px) var(--pad); max-width: var(--maxw); margin: 0 auto; }
/* 首屏(100vh)与第一个内容板块(01 Showreel)之间留出下移空间，使 01 及后续板块整体下沉到灰黑背景中 */
#showreel { margin-top: 60vh; }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 70px); }
.section__index {
  display: inline-block; font-size: 13px; letter-spacing: .3em;
  color: var(--accent); margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(34px, 6vw, 64px); line-height: 1.05; margin-bottom: 18px;
}
.section__lead { color: var(--fg-muted); font-size: clamp(15px, 2vw, 18px); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 14px 30px; font-size: 14px;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  border: 1px solid transparent; transition: .3s ease;
}
.btn--solid { background: var(--accent); color: #000; }
.btn--solid:hover { background: #e0b96e; transform: translateY(-2px); }
.btn--ghost { border-color: var(--line); color: var(--fg); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============ 导航 ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 22px var(--pad); transition: .4s ease;
  background: transparent;
}
.nav.scrolled {
  background: rgba(12,12,14,.85); backdrop-filter: blur(12px);
  padding: 14px var(--pad); border-bottom: 1px solid var(--line);
}
.nav__inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: .05em; }
.nav__logo span { color: var(--accent); }
.nav__menu { display: flex; gap: 34px; }
.nav__menu a {
  font-size: 14px; letter-spacing: .06em; color: var(--fg-muted);
  position: relative; transition: color .3s;
}
.nav__menu a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--accent); transition: width .3s;
}
.nav__menu a:hover { color: var(--fg); }
.nav__menu a:hover::after { width: 100%; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; }
.nav__toggle span { width: 26px; height: 2px; background: var(--fg); transition: .3s; }

/* ============ Hero ============ */
.hero { position: relative; height: 100vh; min-height: 600px; display: flex; align-items: center; }
.hero__media {
  position: absolute; top: -10%; left: 0; right:0; height: 120%; z-index: -1;
  /* 兜底背景：视频/海报未加载（如离线）时显示深色渐变，避免白/灰屏 */
  background: radial-gradient(120% 120% at 50% 0%, #1b1b1f 0%, #0c0c0e 60%);
  will-change: transform;
}
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,12,14,.55) 0%, rgba(12,12,14,.25) 40%, rgba(12,12,14,.85) 100%);
}
.hero__content { max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 0 var(--pad); transform: translate(-20px, 7vh); }
.hero__eyebrow { color: var(--accent); letter-spacing: .35em; text-transform: uppercase; font-size: 13px; margin-bottom: 18px; }
/* 两行 eyebrow 之间收紧行距（仅第一行到第二行），到标题的 18px 间距保持不变 */
.hero__eyebrow:has(+ .hero__eyebrow) { margin-bottom: 4px; }
.hero__title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(52px, 12vw, 150px); line-height: .95; letter-spacing: .01em;
}
.hero__sub { color: var(--fg-muted); font-size: clamp(16px, 2.4vw, 22px); margin: 22px 0 36px; max-width: 520px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__scroll { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); }
.hero__scroll-line { display: block; width: 1px; height: 56px; background: var(--fg-muted); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; top: -56px; left: 0; width: 100%; height: 56px;
  background: var(--accent); animation: scroll 2s infinite;
}
@keyframes scroll { to { top: 56px; } }

/* ============ Showreel ============ */
.showreel__frame {
  position: relative; aspect-ratio: 16 / 9; background: var(--bg-soft);
  border: 1px solid var(--line); overflow: hidden;
}
.showreel__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ============ Work 网格 ============ */
.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { position: relative; display: block; cursor: pointer; }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; opacity: 0; background: rgba(0,0,0,.35);
  transition: opacity .4s;
}
.card:hover .card__play { opacity: 1; }
.card__body { padding: 16px 4px 0; }
.card__cat { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.card__title { font-family: var(--font-head); font-weight: 500; font-size: 24px; margin-top: 4px; }
.card__role { font-size: 13px; color: var(--fg-muted); margin-top: 6px; letter-spacing: .05em; }

/* ============ About ============ */
.about__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.about__portrait img { width: 100%; aspect-ratio: 7 / 9; object-fit: cover; }
.about__text p { color: var(--fg-muted); margin-bottom: 18px; }
.about__text .section__title { margin: 8px 0 24px; }
.about__stats { list-style: none; display: flex; gap: 40px; margin: 30px 0; flex-wrap: wrap; }
.about__stats li { display: flex; flex-direction: column; }
.about__stats strong { font-family: var(--font-head); font-size: 40px; color: var(--fg); font-weight: 600; }
.about__stats span { font-size: 13px; color: var(--fg-muted); letter-spacing: .05em; }
.about__clients { font-size: 14px; }
.about__clients strong { color: var(--fg); }

/* ============ Contact ============ */
.contact { text-align: center; }
.contact__inner { max-width: 720px; margin: 0 auto; }
.contact .section__title { margin: 12px 0 30px; }
.contact__mail {
  display: inline-block; font-family: var(--font-head); font-size: clamp(26px, 5vw, 44px);
  color: var(--accent); margin: 38px 0 44px; transition: opacity .3s;
}
.contact__mail:hover { opacity: .7; }

.contact__social { display: flex; justify-content: center; gap: 28px; margin-top: 50px; flex-wrap: wrap; }
.contact__social a, .contact__social span { font-size: 14px; letter-spacing: .08em; color: var(--fg-muted); transition: color .3s; }
.contact__social a:hover { color: var(--accent); }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 40px var(--pad); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer__logo { font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.footer__logo span { color: var(--accent); }
.footer__copy { color: var(--fg-muted); font-size: 13px; }
.footer__top { font-size: 13px; color: var(--fg-muted); transition: color .3s; }
.footer__top:hover { color: var(--accent); }

/* ============ 滚动渐显动画 ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 880px) {
  .nav__menu {
    position: fixed; inset: 0 0 0 auto; width: 70%; max-width: 320px;
    background: var(--bg-soft); flex-direction: column; justify-content: center;
    gap: 28px; padding: 40px; transform: translateX(100%); transition: transform .4s ease;
    border-left: 1px solid var(--line);
  }
  .nav__menu.open { transform: translateX(0); }
  .nav__toggle { display: flex; z-index: 101; }
  .nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.active span:nth-child(2) { opacity: 0; }
  .nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 360px; }
}

@media (max-width: 520px) {
  .work__grid { grid-template-columns: 1fr; }
  .about__stats { gap: 24px; }
}

/* 尊重"减少动画"偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll-line::after { animation: none; }
}

/* ============ 作品灯箱 Lightbox ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(8,8,10,.92);
  opacity: 0; visibility: hidden; transition: opacity .35s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__frame {
  position: relative; width: min(1100px, 92vw); aspect-ratio: 16 / 9;
  background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.lightbox__close {
  position: absolute; top: 18px; right: 22px; z-index: 1;
  width: 46px; height: 46px; font-size: 30px; line-height: 1;
  color: #fff; background: rgba(255,255,255,.12); border: 0;
  border-radius: 50%; cursor: pointer; transition: background .3s;
}
.lightbox__close:hover { background: rgba(255,255,255,.28); }
body.lb-lock { overflow: hidden; }
