/* ==========================================================================
   布局层：顶部导航 / 搜索浮层 / Hero / 页脚 / 区块标题
   对标影视飓风 ysjf.com 的极简媒体站布局
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 顶部导航
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--c-line); box-shadow: 0 1px 0 rgba(15, 15, 18, .02); }
/* 首页透明态（覆盖在 Hero 视频上） */
.site-header.is-transparent {
  background: linear-gradient(to bottom, rgba(15, 15, 18, .55), rgba(15, 15, 18, 0));
  border-bottom-color: transparent;
  color: #fff;
}
.site-header.is-transparent .site-nav__link,
.site-header.is-transparent .header-action { color: rgba(255, 255, 255, .86); }
.site-header.is-transparent .site-nav__link:hover,
.site-header.is-transparent .header-action:hover { color: #fff; }
.site-header.is-transparent .brand__sub { color: rgba(255, 255, 255, .6); }
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__inner {
  width: 100%; max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: var(--sp-8);
}
.site-header__spacer { flex: 1; }

/* 品牌 */
.brand { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.brand__mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--c-ink-700);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  flex: none;
  transition: background var(--dur) var(--ease-out);
}
.site-header.is-transparent .brand__mark { background: rgba(255, 255, 255, .94); color: var(--c-ink-800); }
.brand:hover .brand__mark { background: var(--c-accent); color: #fff; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-serif); font-size: 17px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.brand__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 主导航 */
.site-nav { display: flex; align-items: center; gap: var(--sp-1); }
.site-nav__item { position: relative; }
.site-nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.site-nav__link:hover { color: var(--text-primary); background: var(--c-paper-100); }
.site-header.is-transparent .site-nav__link:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.site-nav__link.is-active { color: var(--text-primary); font-weight: 600; }
.site-nav__link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--c-accent); border-radius: var(--r-pill);
}
.site-nav__caret { width: 10px; height: 10px; opacity: .5; transition: transform var(--dur-fast) var(--ease-out); }
.site-nav__item:hover .site-nav__caret { transform: rotate(180deg); }

/* 大屏下拉面板 */
.mega {
  position: absolute; left: 50%; top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-8px);
  z-index: var(--z-drawer);
  width: min(760px, 88vw);
  padding: var(--sp-6);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  opacity: 0; visibility: hidden;
  transition: all var(--dur) var(--ease-out);
  color: var(--text-primary);
}
.site-nav__item:hover .mega, .site-nav__item:focus-within .mega { opacity: 1; visibility: visible; transform: translateX(-50%); }
.mega__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-6); }
.mega__link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease-out);
}
.mega__link:hover { background: var(--c-paper-100); }
.mega__ico {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--c-paper-100);
  color: var(--c-ink-600);
}
.mega__ico svg { width: 17px; height: 17px; }
.mega__name { font-size: var(--fs-sm); font-weight: 500; }
.mega__desc { font-size: var(--fs-micro); color: var(--text-muted); }
.mega__foot {
  margin-top: var(--sp-4); padding-top: var(--sp-4);
  border-top: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--text-muted);
}

/* 头部右侧动作区 */
.header-actions { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.header-action {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
}
.header-action:hover { background: var(--c-paper-100); color: var(--text-primary); }
.site-header.is-transparent .header-action:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.header-action svg { width: 19px; height: 19px; }
.header-action__badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  color: #fff; background: var(--c-accent);
  border-radius: var(--r-pill);
  border: 2px solid #fff;
}
.site-header.is-transparent .header-action__badge { border-color: transparent; }

.header-user { display: flex; align-items: center; gap: var(--sp-2); padding: 4px; border-radius: var(--r-pill); transition: background var(--dur-fast) var(--ease-out); }
.header-user:hover { background: var(--c-paper-100); }
.site-header.is-transparent .header-user:hover { background: rgba(255, 255, 255, .14); }
.header-user__name { font-size: var(--fs-xs); font-weight: 500; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 移动端汉堡 */
.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   2. 移动端抽屉导航
   -------------------------------------------------------------------------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  background: rgba(15, 15, 18, .5);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: all var(--dur) var(--ease-out);
}
.drawer-mask.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  z-index: calc(var(--z-drawer) + 1);
  width: min(360px, 86vw);
  display: flex; flex-direction: column;
  background: #fff;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease-out);
  overflow-y: auto;
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--border-color); }
.drawer__body { padding: var(--sp-4) var(--sp-4) var(--sp-10); }
.drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-3);
  font-size: var(--fs-h4);
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
  transition: color var(--dur-fast) var(--ease-out);
}
.drawer__link:hover, .drawer__link.is-active { color: var(--c-accent); }
.drawer__group-title {
  padding: var(--sp-6) var(--sp-3) var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.drawer__sub { display: block; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); color: var(--text-secondary); border-radius: var(--r-md); }
.drawer__sub:hover { background: var(--c-paper-100); color: var(--text-primary); }

/* --------------------------------------------------------------------------
   3. 搜索浮层
   -------------------------------------------------------------------------- */
.search-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden;
  transition: all var(--dur) var(--ease-out);
  overflow-y: auto;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-overlay__inner { width: min(760px, 92vw); margin: 0 auto; padding: 14vh 0 var(--sp-16); }
.search-overlay__form { display: flex; align-items: center; gap: var(--sp-4); border-bottom: 2px solid var(--c-ink-700); padding-bottom: var(--sp-4); }
.search-overlay__input {
  flex: 1; border: 0; background: transparent;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -.01em;
}
.search-overlay__input:focus { outline: none; }
.search-overlay__input::placeholder { color: var(--c-ink-200); }
.search-overlay__close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); color: var(--c-ink-400); }
.search-overlay__close:hover { background: var(--c-paper-100); color: var(--c-ink-700); }
.search-overlay__label { margin-top: var(--sp-10); font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); }
.search-overlay__hot { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.search-results { margin-top: var(--sp-8); display: flex; flex-direction: column; }
.search-result {
  display: flex; align-items: center; gap: var(--sp-5);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-color);
  transition: padding-left var(--dur-fast) var(--ease-out);
}
.search-result:hover { padding-left: var(--sp-3); }
.search-result__thumb { width: 92px; height: 58px; object-fit: cover; border-radius: var(--r-md); flex: none; background: var(--c-paper-200); }
.search-result__title { font-size: var(--fs-h4); font-weight: 500; }
.search-result__meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 4px; }

/* --------------------------------------------------------------------------
   4. Hero（全屏视频首屏）
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  background: var(--c-ink-900);
  color: #fff;
  isolation: isolate;
}
.hero--short { min-height: 72svh; }
.hero--medium { min-height: 84svh; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__video, .hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__img { position: absolute; inset: 0; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(15, 15, 18, .88) 0%, rgba(15, 15, 18, .35) 45%, rgba(15, 15, 18, .5) 100%),
    radial-gradient(120% 80% at 20% 100%, rgba(15, 15, 18, .6), transparent 60%);
}
.hero__inner {
  width: 100%; max-width: var(--w-wide);
  margin-inline: auto;
  /* 底部留出空间，避免内容与「SCROLL」滚动指示重叠 */
  padding: 0 var(--gutter) var(--sp-32);
}
.hero__eyebrow { color: rgba(255, 255, 255, .7); margin-bottom: var(--sp-5); }
.hero__title {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.03em;
  max-width: 16ch;
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--c-accent); }
.hero__sub {
  margin-top: var(--sp-6);
  max-width: 56ch;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: var(--lh-relaxed);
  color: rgba(255, 255, 255, .74);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-10); }
.hero__meta {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, .16);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-6);
}
.hero__stat-value { font-family: var(--font-mono); font-size: clamp(1.5rem, 2.4vw, 2.25rem); font-weight: 600; line-height: 1; }
.hero__stat-label { margin-top: var(--sp-2); font-size: var(--fs-xs); color: rgba(255, 255, 255, .55); letter-spacing: .06em; }

.hero__scroll {
  position: absolute; left: 50%; bottom: var(--sp-8);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}
.hero__scroll-line { width: 1px; height: 42px; background: linear-gradient(to bottom, rgba(255, 255, 255, .5), transparent); animation: scrollPulse 2.2s var(--ease-in-out) infinite; }
@keyframes scrollPulse { 0%, 100% { opacity: .3; transform: scaleY(.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* 首页轮播（公告/推荐位） */
.hero-carousel { position: absolute; inset: 0; z-index: -2; }
.hero-carousel__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s var(--ease-out); }
.hero-carousel__slide.is-active { opacity: 1; }
.hero-carousel__slide img, .hero-carousel__slide video { width: 100%; height: 100%; object-fit: cover; }
.hero__dots { position: absolute; right: var(--gutter); bottom: var(--sp-20); z-index: 3; display: flex; flex-direction: column; gap: var(--sp-3); }
.hero__dot {
  width: 26px; height: 2px;
  background: rgba(255, 255, 255, .3);
  transition: all var(--dur) var(--ease-out);
}
.hero__dot.is-active { background: #fff; width: 40px; }

/* 视频控制按钮 */
.video-toggle {
  position: absolute; z-index: 3;
  right: var(--gutter); top: calc(var(--header-h) + var(--sp-6));
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
  transition: all var(--dur-fast) var(--ease-out);
}
.video-toggle:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.video-toggle svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   5. 页面头（内页）
   -------------------------------------------------------------------------- */
.page-head { padding-top: calc(var(--header-h) + var(--sp-16)); padding-bottom: var(--sp-12); }
.page-head--subtle { background: var(--bg-subtle); }
.page-head--dark { background: var(--c-ink-800); color: #fff; }
.page-head__title { font-family: var(--font-serif); font-size: var(--fs-h1); font-weight: 700; letter-spacing: -.02em; }
.page-head__desc { margin-top: var(--sp-5); max-width: 62ch; font-size: var(--fs-body); line-height: var(--lh-relaxed); color: var(--text-secondary); }

/* 详情页大图头 */
.detail-hero { position: relative; padding-top: calc(var(--header-h) + var(--sp-20)); padding-bottom: var(--sp-20); color: #fff; overflow: hidden; }
.detail-hero__bg { position: absolute; inset: 0; z-index: -2; }
.detail-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 15, 18, .92), rgba(15, 15, 18, .5));
}

/* --------------------------------------------------------------------------
   6. 区块标题（编辑式）
   -------------------------------------------------------------------------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-8); margin-bottom: var(--sp-12); flex-wrap: wrap; }
.section-head__left { max-width: 62ch; }
.section-head__title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-top: var(--sp-3);
}
.section-head__desc { margin-top: var(--sp-4); font-size: var(--fs-sm); line-height: var(--lh-relaxed); color: var(--text-secondary); }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head--center .section-head__left { max-width: 68ch; }

/* 滚动文字带（影视飓风常见的动感区块） */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border-color);
  padding: var(--sp-5) 0;
  user-select: none;
}
.marquee__track { display: flex; gap: var(--sp-10); width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: flex; align-items: center; gap: var(--sp-6);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  color: var(--c-ink-300);
  white-space: nowrap;
}
.marquee__item::after { content: "◆"; font-size: .5em; color: var(--c-accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   7. 页脚
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-ink-800); color: rgba(255, 255, 255, .7); padding-top: var(--sp-24); }
.site-footer__top { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(140px, 1fr)); gap: var(--sp-12); padding-bottom: var(--sp-16); }
.site-footer__brand-name { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: .04em; }
.site-footer__desc { margin-top: var(--sp-5); font-size: var(--fs-sm); line-height: var(--lh-relaxed); max-width: 40ch; color: rgba(255, 255, 255, .55); }
.site-footer__col-title { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin-bottom: var(--sp-5); }
.site-footer__links { display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer__link { font-size: var(--fs-sm); color: rgba(255, 255, 255, .7); transition: color var(--dur-fast) var(--ease-out), padding-left var(--dur-fast) var(--ease-out); }
.site-footer__link:hover { color: #fff; padding-left: 4px; }
.site-footer__wordmark {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 15vw, 13rem);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, .06);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  padding-bottom: var(--sp-4);
}
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: var(--sp-6) 0 var(--sp-8);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, .4);
}
.site-footer__bottom-links { display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.site-footer__bottom-links a:hover { color: #fff; }

/* 回到顶部 */
.to-top {
  position: fixed; right: var(--sp-6); bottom: var(--sp-8);
  z-index: var(--z-sticky);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--c-ink-700); color: #fff;
  border-radius: var(--r-pill);
  box-shadow: var(--sh-lg);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all var(--dur) var(--ease-out);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-accent); }
.to-top svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   8. 主体内容偏移（有固定头部时）
   -------------------------------------------------------------------------- */
.main { padding-top: var(--header-h); }
.main--flush { padding-top: 0; }

/* 侧边栏布局（用户中心 / 商家中心 / 后台） */
.layout-sidebar { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: var(--sp-10); align-items: start; }
.side-nav { position: sticky; top: calc(var(--header-h) + var(--sp-6)); display: flex; flex-direction: column; gap: var(--sp-1); }
.side-nav__group { margin-top: var(--sp-6); padding: 0 var(--sp-3) var(--sp-2); font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.side-nav__group:first-child { margin-top: 0; }
.side-nav__link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease-out);
}
.side-nav__link:hover { background: var(--c-paper-100); color: var(--text-primary); }
.side-nav__link.is-active { background: var(--c-ink-700); color: #fff; font-weight: 500; }
.side-nav__link svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.side-nav__badge { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-micro); padding: 1px 6px; background: var(--c-accent); color: #fff; border-radius: var(--r-pill); }
