/* ============================================================
   逐帧叙事 · 影视后期工作室 模板样式
   主题：暗色电影质感，琥珀金点缀
   修改 --accent / --bg 可快速换色
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-alt: #111114;
  --surface: #16161a;
  --surface-2: #1d1d22;
  --text: #f3f1ec;
  --text-dim: #9b9aa3;
  --accent: #e8b04b;      /* 琥珀金 */
  --accent-soft: rgba(232, 176, 75, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --maxw: 1180px;
  --radius: 14px;
  --ease: cubic-bezier(.22,.61,.36,1);   /* Apple 式平滑缓动 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* 必须是 clip 而不是 hidden：hidden 会破坏 sticky 首屏与 #about 的覆盖层叠 */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 导航 ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.is-scrolled { background: rgba(10, 10, 12, 0.92); border-bottom-color: var(--border); }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo { font-family: "Oswald", "Noto Sans SC", sans-serif; font-weight: 600; font-size: 20px; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.nav__logo-mark { color: var(--accent); }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--text-dim); font-size: 15px; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ===== Hero ===== */
/* scrub 滚动容器：比首屏高一倍，多出的一段就是 scrub 的行程 */
.hero-scroll { position: relative; height: 200vh; }
.hero {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(232,176,75,0.09), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(80,120,200,0.07), transparent 50%),
    linear-gradient(180deg, #0a0a0c 0%, #0e0e12 60%, #0a0a0c 100%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 70%);
}
.hero__content { position: relative; z-index: 1; max-width: 820px; }
.hero__eyebrow { font-family: "Oswald", sans-serif; letter-spacing: 6px; color: var(--accent); font-size: 14px; margin-bottom: 20px; }
.hero__title {
  font-family: "Oswald", "Noto Sans SC", sans-serif;
  font-weight: 700; font-size: clamp(40px, 8vw, 86px); line-height: 1.05;
  letter-spacing: 1px; margin-bottom: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
/* 引子句：小一号、弱化，与主句形成层级，避免两行等大造成的锯齿感 */
.hero__title-lead {
  font-size: .52em; font-weight: 500; letter-spacing: 4px;
  color: var(--text-dim); text-indent: 4px;
}
.hero__title-main { font-size: 1em; }
/* 主标语落点强调：与 --accent 呼应 */
.hero__accent { color: var(--accent); }
.hero__sub { color: var(--text-dim); font-size: clamp(15px, 2.4vw, 19px); max-width: 760px; margin: 0 auto 40px; white-space: nowrap; }
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__scroll { position: absolute; bottom: 64px; z-index: 1; color: var(--text-dim); font-size: 13px; letter-spacing: 2px; animation: float 2.4s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(8px);} }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 14px 30px; border-radius: 999px;
  font-size: 15px; font-weight: 500; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
  border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: #1a1408; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232,176,75,0.3); }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 通用 Section ===== */
/* 定位 + 层级：确保各区块绘制在 sticky 首屏之上，避免被首屏盖住 */
.section { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 100px 24px; }
.section--alt { max-width: none; background: var(--bg-alt); }
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { margin-bottom: 56px; }
.section__tag { font-family: "Oswald", sans-serif; letter-spacing: 5px; color: var(--accent); font-size: 13px; }
.section__title { font-family: "Oswald", "Noto Sans SC", sans-serif; font-size: clamp(30px, 5vw, 46px); font-weight: 600; margin-top: 10px; }
.section__desc { color: var(--text-dim); margin-top: 14px; }

/* ===== 关于 ===== */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.about__text p { color: var(--text-dim); margin-bottom: 18px; }
.about__text strong { color: var(--text); }
.about__stats { display: flex; gap: 36px; margin-top: 36px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: "Oswald", sans-serif; font-size: 34px; color: var(--accent); font-weight: 600; }
.stat__label { color: var(--text-dim); font-size: 14px; }
.about__visual { display: flex; justify-content: center; }
.about__card {
  width: 100%; max-width: 360px; aspect-ratio: 16/10; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-2), #0c0c0f);
  border: 1px solid var(--border); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.about__card-label { font-family: "Oswald", sans-serif; letter-spacing: 4px; color: var(--text-dim); font-size: 13px; }
.about__play { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #1a1408; display: flex; align-items: center; justify-content: center; font-size: 22px; padding-left: 4px; }
.about__card-note { color: var(--text-dim); font-size: 13px; }

/* ===== 服务 ===== */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; transition: transform .5s var(--ease), border-color .5s var(--ease), background .5s var(--ease), box-shadow .5s var(--ease);
}
.service:hover { transform: translateY(-6px); border-color: var(--accent); background: var(--surface-2); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.service__icon { font-size: 30px; color: var(--accent); margin-bottom: 16px; }
.service h3 { font-size: 19px; margin-bottom: 10px; }
.service p { color: var(--text-dim); font-size: 14.5px; }

/* ===== 作品 ===== */
.works-wrap { display: flex; flex-direction: column; gap: 56px; }
.works { display: grid; gap: 18px; align-items: start; }

/* 分组小标题 */
.works__label {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.works__label-tag {
  font-family: "Oswald", sans-serif; font-size: 13px; letter-spacing: 3px;
  color: var(--accent);
}
.works__label-sub { color: var(--text-dim); font-size: 14px; }

/* 横屏组：2 列大卡（16:9） */
.works--wide { grid-template-columns: repeat(2, 1fr); }
/* 竖屏组：3 列大卡（9:16） */
.works--tall { grid-template-columns: repeat(3, 1fr); }
.work { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease); }
.work:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.work__thumb {
  aspect-ratio: 16/9; position: relative;
  overflow: hidden; background: var(--surface-2);
  transition: transform .8s var(--ease);
}
/* 分组排版：横屏组 16:9 大卡，竖屏组 9:16 竖卡，各组内部比例统一 */
.work--tall .work__thumb { aspect-ratio: 9/16; }
.work--wide .work__thumb { aspect-ratio: 16/9; }
/* 超宽条幅：横跨整行，32:9 */
.work--ultra { grid-column: 1 / -1; }
.work--ultra .work__thumb { aspect-ratio: 32/9; }
.work__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work:hover .work__thumb { transform: scale(1.06); }
.work__thumb--1 { background: linear-gradient(135deg, #2a2113, #0c0c0f); }
.work__thumb--2 { background: linear-gradient(135deg, #14202e, #0c0c0f); }
.work__thumb--3 { background: linear-gradient(135deg, #2a1620, #0c0c0f); }
.work__thumb--4 { background: linear-gradient(135deg, #1c2a1a, #0c0c0f); }
.work__thumb--5 { background: linear-gradient(135deg, #2a2413, #0c0c0f); }
.work__thumb--6 { background: linear-gradient(135deg, #201a2a, #0c0c0f); }
.work__meta { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.work__cat { color: var(--accent); font-size: 12px; letter-spacing: 1px; font-family: "Oswald", sans-serif; }
.work__name { color: var(--text); font-size: 15.5px; }

/* ===== 流程 ===== */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 22px; position: relative; }
.step__num { font-family: "Oswald", sans-serif; font-size: 30px; color: var(--accent-soft); color: rgba(232,176,75,0.4); font-weight: 700; }
.step h3 { font-size: 17px; margin: 8px 0 8px; }
.step p { color: var(--text-dim); font-size: 14px; }

/* ===== 联系 ===== */
.contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.contact__form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; color: var(--text-dim); }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 15px; color: var(--text); font-family: inherit; font-size: 15px; resize: vertical;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.contact__form .btn { align-self: flex-start; }
.contact__hint { color: var(--text-dim); font-size: 13px; }
.contact__hint a { color: var(--accent); }
.contact__info { display: flex; flex-direction: column; gap: 22px; }
.info-block { border-left: 2px solid var(--accent); padding-left: 16px; display: flex; flex-direction: column; }
.info-block__label { font-size: 12px; letter-spacing: 2px; color: var(--text-dim); font-family: "Oswald", sans-serif; }
.info-block a, .info-block span:last-child { font-size: 16px; }

/* ===== 页脚 ===== */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 48px 24px; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.footer__logo { font-family: "Oswald", "Noto Sans SC", sans-serif; font-size: 18px; letter-spacing: 1px; }
.footer__logo { color: var(--text); }
.footer__copy { color: var(--text-dim); font-size: 14px; }

/* ===== 滚动出现动画 ===== */
.reveal {
  opacity: 0; transform: translateY(32px) scale(.985);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== 顶部滚动进度条 ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--accent), #ffd98a);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .1s linear; box-shadow: 0 0 10px rgba(232,176,75,.6);
}

/* scrub 衔接：下一屏向上滑入覆盖首屏（Apple 式同屏交接），首屏本身不做擦除 */
#about {
  position: relative; z-index: 2;
  margin-top: -100vh;                    /* 上移一屏，与钉住的首屏重叠 */
  min-height: 100vh;                     /* 必须满一屏：否则盖不住首屏，残留部分会压到下面的服务区 */
  min-height: 100svh;
  max-width: none;                       /* 整幅覆盖，避免两侧露出首屏 */
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
}
/* 顶边向上渐隐 160px：把硬边化成柔和过渡，避免明显的分界线 */
#about::before {
  content: ""; position: absolute; left: 0; right: 0;
  top: -160px; height: 160px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,10,12,0), var(--bg));
}
#about > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

/* ===== 首屏文字逐行入场 ===== */
.hero__eyebrow, .hero__title, .hero__sub, .hero__cta {
  opacity: 0; animation: heroIn .9s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero__eyebrow { animation-delay: .15s; }
.hero__title   { animation-delay: .30s; }
.hero__sub     { animation-delay: .50s; }
.hero__cta     { animation-delay: .66s; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ===== 胶片颗粒叠层 ===== */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%;
  pointer-events: none; z-index: 199; opacity: 0.10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.7s steps(3) infinite;
}
@keyframes grain {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-3%,2%); }
  50%  { transform: translate(2%,-3%); }
  75%  { transform: translate(-2%,-2%); }
  100% { transform: translate(0,0); }
}

/* ===== 服务图标 hover 辉光脉冲 ===== */
.service:hover .service__icon {
  animation: iconPulse 1.3s ease-in-out infinite;
}
@keyframes iconPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(232,176,75,0)); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 10px rgba(232,176,75,.55)); transform: scale(1.08); }
}

/* ===== 作品卡 hover 扫光 ===== */
.work__thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.14) 50%, transparent 65%);
  transform: translateX(-130%); transition: transform .7s ease;
}
.work:hover .work__thumb::after { transform: translateX(130%); }

/* ===== 无障碍：减少动态偏好时关闭动画 ===== */
@media (prefers-reduced-motion: reduce) {
  .hero__eyebrow, .hero__title, .hero__sub, .hero__cta { opacity: 1; animation: none; }
  .grain, .hero__scroll, .service:hover .service__icon { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .works--wide { grid-template-columns: repeat(2, 1fr); }
  .works--tall { grid-template-columns: repeat(3, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav__links {
    position: absolute; top: 64px; right: 16px; left: 16px;
    flex-direction: column; gap: 4px; padding: 14px;
    background: rgba(17,17,20,0.97); border: 1px solid var(--border); border-radius: 12px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 10px 8px; }
  .nav__toggle { display: block; }
  .services, .process { grid-template-columns: 1fr; }
  .works--wide { grid-template-columns: 1fr; }
  .work--ultra .work__thumb { aspect-ratio: 21/9; }
  .works--tall { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .work__name { font-size: 14.5px; }
  .section { padding: 72px 20px; }
  .about__stats { gap: 24px; }
  .hero__sub { white-space: normal; font-size: 14px; }
}
