/* ==========================================================================
   木瓜影视 · 基础样式层 (toolkit)
   DNA：蓝白影院 / Cinema Blueprint —— 冷蓝排片表、票根硬边、格子化信息
   图层：令牌 → 复位 → 工具类 → 共享组件（工具条/页头/页脚）→ 响应式
   ========================================================================== */

/* --- 1. 设计令牌 --------------------------------------------------------- */
:root {
  --blue: #2f63d6;
  --blue-2: #5e97f0;
  --sky: #9fc4ff;
  --ice: #eaf2ff;
  --ice-2: #f5f9ff;
  --orange: #ff8a5b;
  --sand: #ffe7c2;
  --navy: #12224a;
  --ink: #16233c;
  --ink-2: #58698c;
  --ink-3: #8b9ab8;
  --paper: #fbfcfe;
  --cream: #fffdf8;
  --line: #dce5f5;
  --line-2: #c3d2ec;
  --r-s: 4px;
  --r-m: 6px;
  --r-l: 10px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: "DIN Alternate", "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
}

/* --- 2. 复位 ------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.75 var(--font-sans); overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.28; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* --- 3. 工具类 ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.num { font-family: var(--font-num); }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }
.tag {
  display: inline-block; padding: 1px 8px; border: 1px solid var(--line-2);
  border-radius: 3px; background: #fff; font-size: 11.5px; color: var(--ink-2);
}
.tag--blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.tag--orange { background: var(--sand); border-color: #f5d3a0; color: #a35a20; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 1px solid var(--blue); border-radius: var(--r-m);
  background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.btn:hover { background: #2554bd; }
.btn--ghost { background: #fff; color: var(--blue); }
.btn--ghost:hover { background: var(--ice); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.stub {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-m); position: relative;
}
.stub::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  border-bottom: 1px dashed var(--line-2);
}
.grid { display: grid; gap: 18px; }

/* --- 4. 共享组件：工具条 / 页头 / 页脚 ---------------------------------- */
.topbar { background: var(--navy); color: rgba(255, 255, 255, .82); font-size: 12.5px; }
.topbar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; height: 36px; }
.topbar b { color: #fff; font-weight: 600; }
.topbar__date { margin-left: auto; display: flex; gap: 14px; }
.topbar a { color: var(--sky); }

.site-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-head__bar { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand__logo { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  padding: 8px 13px; border-radius: var(--r-s); font-size: 14.5px; color: var(--ink-2);
  border: 1px solid transparent;
}
.nav a:hover { background: var(--ice); color: var(--blue); }
.nav a[aria-current="page"] { background: var(--ice); border-color: var(--line-2); color: var(--blue); font-weight: 600; }
.ticket-btn { flex: 0 0 auto; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: var(--r-m);
  background: #fff; cursor: pointer; align-items: center; justify-content: center; margin-left: auto;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); content: "";
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.site-foot { background: var(--navy); color: rgba(255, 255, 255, .76); margin-top: 6px; padding: 44px 0 24px; }
.site-foot__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 26px; }
.site-foot h3 { color: #fff; font-size: 14.5px; margin-bottom: 12px; }
.site-foot a { display: block; padding: 4px 0; font-size: 13.5px; color: rgba(255, 255, 255, .7); }
.site-foot a:hover { color: var(--sky); }
.site-foot__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.site-foot__brand img { height: 38px; width: auto; background: #fff; border-radius: var(--r-m); padding: 4px 8px; }
.site-foot__note { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, .6); }
.site-foot__bar {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: 12.5px; color: rgba(255, 255, 255, .48);
}
.totop {
  position: fixed; right: 20px; bottom: 24px; width: 42px; height: 42px;
  border: 1px solid var(--line-2); border-radius: var(--r-m); background: #fff;
  color: var(--blue); cursor: pointer; font-size: 16px;
}

/* --- 5. 响应式栅格 ------------------------------------------------------ */
@media (max-width: 1080px) {
  .site-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .nav { display: none; }
  .nav.is-open {
    display: grid; position: absolute; left: 16px; right: 16px; top: 72px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
    padding: 8px; gap: 2px; box-shadow: 0 12px 28px rgba(18, 34, 74, .12);
  }
  .nav-toggle { display: inline-flex; }
  .site-head__bar { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .ticket-btn { flex: 1 1 100%; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 15px; }
  .topbar__in { height: auto; padding: 8px 0; gap: 10px; }
  .topbar__date { margin-left: 0; }
  .grid { gap: 14px; }
}
@media (max-width: 430px) {
  .site-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .totop { right: 12px; bottom: 14px; }
}
