/* ============================================================
   JIANZHEN STUDIO · DEPARTURES — concourse hub
   world: matte black flap cells · gilded letters · letterbox
   ============================================================ */

/* ---------- fonts ---------- */
@font-face { font-family:"Cinzel"; font-style:normal; font-weight:400; src:url("fonts/cinzel-400.woff2") format("woff2"); font-display:swap; }
@font-face { font-family:"Cinzel"; font-style:normal; font-weight:600; src:url("fonts/cinzel-600.woff2") format("woff2"); font-display:swap; }
@font-face { font-family:"Jost"; font-style:normal; font-weight:200; src:url("fonts/jost-200.woff2") format("woff2"); font-display:swap; }
@font-face { font-family:"Jost"; font-style:normal; font-weight:300; src:url("fonts/jost-300.woff2") format("woff2"); font-display:swap; }
@font-face { font-family:"Jost"; font-style:normal; font-weight:400; src:url("fonts/jost-400.woff2") format("woff2"); font-display:swap; }
@font-face { font-family:"Jost"; font-style:normal; font-weight:500; src:url("fonts/jost-500.woff2") format("woff2"); font-display:swap; }

/* ---------- tokens ---------- */
:root {
  --bg: #050506;
  --cell: #0a0a0f;
  --cell-lift: #101018;
  --gold: #c9a86a;
  --gold-hi: #ecd9a8;
  --gold-dim: rgba(201,168,106,.42);
  --ink: #e9e2d2;
  --ink-dim: #8d8574;
  --hairline: rgba(201,168,106,.26);
  --bar: clamp(24px, 4.5vh, 54px);
  --serif: "Cinzel", serif;
  --sans: "Jost", sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scrollbar-color: var(--gold-dim) var(--bg); }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 300;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
  position: relative; overflow-x: hidden;
}
/* 纵深底层：星尘 canvas + 环境光晕 + 四角渐晕 */
#dust { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58% 42% at 50% -6%, rgba(201,168,106,.10), transparent 70%),
    radial-gradient(46% 38% at 88% 108%, rgba(201,168,106,.06), transparent 70%),
    radial-gradient(120% 90% at 50% 50%, transparent 58%, rgba(0,0,0,.5) 100%);
}
header, .tabs, main, footer { position: relative; z-index: 2; }
::selection { background: rgba(201,168,106,.32); color: #fff; }
a { color: var(--gold-hi); text-decoration: none; }
:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 3px; }

/* ---------- letterbox bars ---------- */
.bar {
  position: fixed; left: 0; width: 100%; height: var(--bar);
  background: #000; z-index: 50; pointer-events: none;
}
.bar::after {
  content:""; position:absolute; left:0; right:0; height:1px;
  background: linear-gradient(90deg, transparent, var(--hairline) 18%, var(--hairline) 82%, transparent);
}
.bar-top { top: 0; } .bar-top::after { bottom: 0; }
.bar-bot { bottom: 0; } .bar-bot::after { top: 0; }

/* ---------- masthead ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--bar) + clamp(18px, 3.4vh, 40px)) clamp(20px, 4.5vw, 72px) 0;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: clamp(30px, 4.6vh, 46px); width: auto; display: block; opacity:.96; }
.mast-mid {
  font-family: var(--serif); font-weight: 400; letter-spacing: .6em; padding-left:.6em;
  font-size: clamp(12px, 1.4vw, 17px); color: var(--gold-hi);
  text-align:center; flex: 1;
}
.mast-clock {
  font-family: var(--sans); font-weight: 300; font-variant-numeric: tabular-nums;
  font-size: clamp(12px, 1.3vw, 16px); letter-spacing: .22em; color: var(--ink-dim);
  min-width: 9.5ch; text-align: right;
}
.mast-right { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); }
#sndBtn, #langBtn {
  background: none; border: 1px solid rgba(201,168,106,.32); color: var(--gold);
  font-family: var(--sans); font-weight: 300; font-size: 9px; letter-spacing: .34em;
  padding: 7px 12px 7px calc(12px + .34em); cursor: pointer;
  transition: border-color .45s ease, color .45s ease, background .45s ease;
}
#sndBtn:hover, #langBtn:hover { border-color: var(--gold-hi); color: var(--gold-hi); background: rgba(201,168,106,.08); }
#sndBtn.muted { color: var(--ink-dim); border-color: rgba(141,133,116,.3); }

/* ---------- tab rail ---------- */
.tabs {
  display: flex; gap: clamp(18px, 3vw, 44px);
  padding: clamp(20px, 3.6vh, 44px) clamp(20px, 4.5vw, 72px) 0;
}
.tab {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-weight: 300; color: var(--ink-dim);
  font-size: clamp(10px, 1vw, 12px); letter-spacing: .42em; padding: 10px 2px;
  position: relative; transition: color .5s ease;
}
.tab::after {
  content:""; position:absolute; left:0; right:100%; bottom:0; height:1px;
  background: var(--gold-hi); transition: right .55s cubic-bezier(.22,1,.36,1);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--gold-hi); }
.tab.is-active::after { right: 0; }

/* ---------- hall layout ---------- */
.hall {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 52px); align-items: center;
  padding: clamp(18px, 3vh, 40px) clamp(20px, 4.5vw, 72px);
}

/* ---------- board ---------- */
.board-wrap {
  position: relative; overflow: hidden;
  border: 1px solid var(--hairline); background: #07070a;
  background-image: linear-gradient(180deg, rgba(255,255,255,.022), transparent 18%, transparent 82%, rgba(0,0,0,.32));
  box-shadow:
    0 42px 90px rgba(0,0,0,.6),
    0 6px 18px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(236,217,168,.08);
}
/* 周期性光扫：极缓一道金辉掠过棋盘 */
.board-wrap::after {
  content:""; position:absolute; top:0; bottom:0; width:34%; left:-40%;
  background:linear-gradient(100deg, transparent 12%, rgba(236,217,168,.05) 46%, rgba(236,217,168,.09) 50%, rgba(236,217,168,.05) 54%, transparent 88%);
  pointer-events:none; animation:sweep 16s ease-in-out infinite;
}
@keyframes sweep {
  0%, 58% { left:-40%; }
  82%, 100% { left:112%; }
}
.board-head, .row {
  display: grid;
  grid-template-columns: minmax(0, 2.7fr) minmax(0, 1.5fr) .9fr 1.5fr;
  gap: 0 clamp(10px, 1.6vw, 26px);
  padding: 0 clamp(14px, 1.8vw, 28px);
}
.board-head {
  border-bottom: 1px solid var(--hairline);
  padding-top: 13px; padding-bottom: 13px;
}
.bh-cell {
  font-family: var(--sans); font-weight: 400; font-size: 9px;
  letter-spacing: .46em; color: var(--gold-dim);
}
.board { padding: 6px 0 10px; }

/* row */
.row {
  display: grid; align-items: center; position: relative;
  padding-top: clamp(13px, 2vh, 20px); padding-bottom: clamp(13px, 2vh, 20px);
  color: var(--ink); cursor: pointer; text-decoration: none;
  transition: background .45s ease, box-shadow .45s ease;
  animation: rowIn .9s cubic-bezier(.22,1,.36,1) backwards;
  animation-delay: calc(.35s + var(--i) * .14s);
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.row + .row { border-top: 1px solid rgba(201,168,106,.1); }
.row:hover, .row:focus-visible {
  background: var(--cell-lift);
  box-shadow: inset 3px 0 0 var(--gold), 0 10px 30px rgba(0,0,0,.35);
}
.row.is-soon { cursor: default; opacity: .52; }
.row.is-soon:hover { background: none; }

/* flap cells */
.flaps { display: inline-flex; }
.flap {
  display: inline-block; position: relative;
  background: var(--cell); border-radius: 2px;
  padding: .16em .055em; margin-right: 1px;
  text-align: center; min-width: .78em;
  background-image: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 47%, rgba(0,0,0,.44) 50%, rgba(0,0,0,.14) 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.c-work .flap {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(17px, 2.35vw, 29px); letter-spacing: .05em;
  color: var(--gold-hi);
}
.c-line .flap, .c-gate .flap {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(10px, 1.15vw, 13.5px); letter-spacing: .14em;
  color: var(--ink-dim);
}
.c-gate .flap { color: var(--gold); }
.c-status .flap {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(10px, 1.1vw, 13px); letter-spacing: .2em;
  color: var(--gold-hi);
}
.row.is-soon .c-status .flap { color: var(--ink-dim); }
.subline {
  display: block; margin-top: 6px;
  font-size: 9px; letter-spacing: .4em; color: var(--ink-dim); font-weight: 300;
}
.subline-zh {
  display: block; margin-top: 4px;
  font-family: var(--sans); font-size: 10px; letter-spacing: .3em;
  color: rgba(236,217,168,.62); font-weight: 300;
}

/* gate lamp */
.lamp {
  position: absolute; left: 6px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px;
  background: var(--gold); border-radius: 50%; opacity: 0;
  transition: opacity .5s ease;
}
.row:hover .lamp, .row:focus-visible .lamp { opacity: 1; animation: lampBreath 4.5s ease-in-out infinite; }
@keyframes lampBreath { 0%,100% { box-shadow: 0 0 6px rgba(236,217,168,.7); } 50% { box-shadow: 0 0 14px rgba(236,217,168,.95); } }

/* boarding dot */
.dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-hi); margin-right: 9px; vertical-align: 1px;
  animation: dotBreath 5.5s ease-in-out infinite;
}
@keyframes dotBreath { 0%,100% { opacity:.55; } 50% { opacity:1; } }

/* empty row */
.empty-note {
  padding: clamp(22px, 4vh, 40px) clamp(14px, 1.8vw, 28px);
  font-size: 11px; letter-spacing: .4em; color: var(--ink-dim);
}

/* ---------- gate preview screen ---------- */
.gs-frame {
  position: relative; aspect-ratio: 2.35 / 1; overflow: hidden;
  border: 1px solid var(--hairline); background: #060609;
  box-shadow:
    0 42px 90px rgba(0,0,0,.6),
    0 6px 18px rgba(0,0,0,.5),
    inset 0 0 60px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(236,217,168,.08);
}
.gs-cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease, transform 8s ease;
  transform: scale(1.04);
}
.gs-cover.show { opacity: .92; transform: scale(1); }
.gs-idle {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity .8s ease;
}
.gs-idle.hide { opacity: 0; }
.gs-mark { width: min(180px, 34%); opacity: .28; }
.gs-hint { font-size: 9px; letter-spacing: .52em; padding-left:.52em; color: var(--ink-dim); }
.gs-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  background: linear-gradient(180deg, transparent, rgba(3,3,5,.82));
  opacity: 0; transition: opacity .8s ease;
}
.gs-cap.show { opacity: 1; }
.gs-cap b {
  font-family: var(--serif); font-weight: 600; letter-spacing: .12em;
  font-size: clamp(13px, 1.4vw, 17px); color: var(--gold-hi);
}
.gs-cap span { font-size: 9px; letter-spacing: .38em; color: var(--ink-dim); white-space: nowrap; }

/* ---------- manifesto footer ---------- */
.manifesto {
  padding: 0 clamp(20px, 4.5vw, 72px) calc(var(--bar) + clamp(16px, 3vh, 34px));
}
.manifesto-line {
  font-family: var(--serif); font-weight: 400; text-align: center;
  font-size: clamp(11px, 1.35vw, 15px); letter-spacing: .3em; padding-left:.3em;
  color: rgba(233,226,210,.66); margin-bottom: clamp(18px, 3vh, 34px);
}
.footer-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(201,168,106,.14); padding-top: 16px;
}
.copy-line { font-size: 9px; letter-spacing: .4em; color: var(--ink-dim); }
.socials { display: flex; gap: clamp(12px, 1.8vw, 26px); flex-wrap: wrap; }
.socials a {
  font-size: 9px; letter-spacing: .34em; color: var(--ink-dim);
  transition: color .45s ease;
}
.socials a:hover { color: var(--gold-hi); }

/* ---------- entrance ---------- */
.masthead, .tabs, .board-wrap, .gate-screen, .manifesto { opacity: 0; transform: translateY(14px); }
body.ready .masthead, body.ready .tabs, body.ready .board-wrap,
body.ready .gate-screen, body.ready .manifesto {
  opacity: 1; transform: none;
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.22,1,.36,1);
}
body.ready .tabs { transition-delay: .12s; }
body.ready .board-wrap { transition-delay: .22s; }
body.ready .gate-screen { transition-delay: .34s; }
body.ready .manifesto { transition-delay: .46s; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hall { grid-template-columns: 1fr; gap: 22px; }
  .gate-screen { max-width: 640px; width: 100%; margin: 0 auto; }
  .mast-mid { display: none; }
}
@media (max-width: 640px) {
  .board-head, .row { grid-template-columns: minmax(0, 2.4fr) 1fr 1.3fr; }
  .bh-line, .c-line { display: none; }
  .c-work .flap { font-size: 15px; }
  .tabs { gap: 18px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .mast-right { gap: 10px; }
  #sndBtn, #langBtn { letter-spacing: .2em; padding: 6px 9px; }
  .board-wrap::after { display: none; }
}

/* reduced motion: everything lands at rest */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .masthead, .tabs, .board-wrap, .gate-screen, .manifesto { opacity: 1; transform: none; }
}
