/* 引力紀元資料庫 —— 美漫經典三原色：報紙米 #FFF6DC / 漫畫紅 #E8202A / 英雄藍 #1F4FD8 / 警示黃 #FFD400 / 墨黑 #111 */

@font-face { font-family: "Bang"; src: url(/fonts/bangers.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Mono"; src: url(/fonts/spacemono-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #fff6dc;
  --red: #e8202a;
  --blue: #1f4fd8;
  --yellow: #ffd400;
  --ink: #111;
  --night: #0e1a4a;
  --cjk: "PingFang TC", "PingFang SC", "Hiragino Sans CNS", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  --mono: "Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 3.4vw, 56px);
  --max: 1280px;
  --bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 20px); }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.75 var(--cjk); -webkit-font-smoothing: antialiased;
  background: var(--paper) radial-gradient(rgba(17, 17, 17, .12) 1.4px, transparent 1.7px) 0 0 / 10px 10px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; z-index: 100; background: var(--yellow); border: 3px solid var(--ink); padding: 8px 14px; }
.spec { font: 700 12px/1 var(--mono); letter-spacing: .06em; font-variant-numeric: tabular-nums; }

/* ---------- 頂欄 ---------- */
.bar {
  position: sticky; top: 0; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  background: var(--ink); color: var(--paper); border-bottom: 4px solid var(--yellow);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { overflow: visible; }
.brand-t { font: 400 26px/1 Bang; letter-spacing: .04em; color: var(--yellow); }
.brand-sub { font-weight: 900; font-size: 14px; letter-spacing: .12em; opacity: .85; }
.nav { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { font-weight: 900; font-size: 14px; padding: 6px 12px; border: 2px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a.on { background: var(--yellow); color: var(--ink); border-color: var(--ink); }

/* ---------- 首屏 ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.hero {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center;
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px; background: var(--red); color: var(--paper);
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 7px 12px; font-weight: 900; font-size: 14px; letter-spacing: .1em;
}
.hero h1 {
  margin-top: 22px; font-weight: 900; font-size: clamp(54px, 7.4vw, 104px); line-height: 1.06; letter-spacing: -.01em;
  color: #fff; -webkit-text-stroke: clamp(4px, .5vw, 6px) var(--ink); paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--red), 10px 10px 0 var(--ink);
}
.hero h1 em { font-style: normal; color: var(--yellow); }
.tagline {
  display: inline-block; margin-top: 26px; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: 10px 16px; font-weight: 900; font-size: clamp(17px, 1.9vw, 22px);
}
.intro { margin-top: 20px; max-width: 34em; font-size: 16px; }
.hero-cta {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 24px; background: var(--red); color: #fff;
  border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 11px 18px; font-weight: 900; font-size: 18px;
  line-height: 1.25; transition: transform .1s, box-shadow .1s, background .1s;
}
.hero-cta:hover { background: var(--blue); }
.hero-cta:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.updated { margin-top: 18px; color: var(--blue); }
.hero-art { border: 5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); overflow: hidden; aspect-ratio: 6 / 5; background: var(--night); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 40%; }

/* ---------- 欄目 ---------- */
.sec { padding: clamp(28px, 4vw, 48px) 0; border-top: 4px solid var(--ink); }
.sec-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 26px; }
.sec-head .no { font: 400 56px/.8 Bang; color: var(--red); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.sec-head h2 { font-weight: 900; font-size: clamp(26px, 3vw, 36px); line-height: 1; background: #fff; border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 10px 16px; }
.sec-head p { font-size: 15px; font-weight: 500; }

.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.grid-tall { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid-video { grid-template-columns: minmax(0, 1040px); }
.card.video .thumb { cursor: auto; aspect-ratio: 16 / 9; }
.card.video .thumb video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.card.video:hover { transform: none; box-shadow: 7px 7px 0 var(--ink); }
.grid-logo { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.card { background: #fff; border: 4px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--ink); }
.thumb { all: unset; display: block; cursor: zoom-in; border-bottom: 4px solid var(--ink); overflow: hidden; background: var(--night); }
.grid-tall .thumb { aspect-ratio: 3 / 4; }
.grid-wide .thumb, .grid-logo .thumb { aspect-ratio: 16 / 10; }
.grid-logo .thumb img { object-position: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.03); }
.thumb:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.body h3 { font-weight: 900; font-size: 19px; line-height: 1.35; }
.note { font: 700 12px/1.4 var(--mono); color: var(--blue); letter-spacing: .04em; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--red); color: #fff; border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink); padding: 8px 14px; font-weight: 900; font-size: 15px; transition: transform .1s, box-shadow .1s;
}
.btn:hover { background: var(--blue); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn .spec { opacity: .85; }
.i { width: 16px; height: 16px; flex: none; }

.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ch { display: flex; align-items: center; gap: 12px; background: #fff; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px; }
.ch:hover { background: var(--yellow); }
.ch-name { font-weight: 900; }
.ch-val { margin-left: auto; font: 700 12px/1.2 var(--mono); color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.disclaimer { border-top: 4px solid var(--ink); padding: 22px 0 36px; font-size: 13px; line-height: 1.7; opacity: .75; }
.foot { background: var(--blue); color: var(--paper); border-top: 4px solid var(--ink); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px var(--gutter); font-weight: 900; font-size: 14px; }
.foot a { color: var(--yellow); }

/* ---------- 燈箱 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14, 26, 74, .94); overflow-y: auto; padding: 56px 16px 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { margin: 0 auto; max-width: min(100%, 1100px); height: auto; border: 4px solid var(--ink); box-shadow: 8px 8px 0 #000; cursor: default; background: #fff; }
.lb-x { position: fixed; top: 12px; right: 16px; width: 44px; height: 44px; background: var(--yellow); border: 3px solid var(--ink); font: 900 26px/1 var(--cjk); cursor: pointer; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}
@media (max-width: 560px) {
  .bar { gap: 12px; }
  .brand-t { font-size: 22px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .grid-tall { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .grid-tall .body { padding: 12px; }
  .grid-tall .body h3 { font-size: 15px; }
  .btn { padding: 6px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
