/* JACKZ.AI 公平驗證：驗證頁和接入文件共用。跟 jackz.ai 官網：Almarai 標題、Inter 正文、方角、深紅山脈片頭、淡紫卡片。 */
@font-face { font-family: Inter; font-weight: 100 900; font-display: swap; src: url(fonts/e4af272ccee01ff0-s.p.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url(fonts/bb3ef058b751a6ad-s.p.woff2) format("woff2"); }
:root {
  --red: #992626; --red-2: #BA4141; --red-deep: #210000; --pink: #DBA0A0;
  --ink: #000; --ink-70: rgba(0, 0, 0, .7); --ink-55: rgba(0, 0, 0, .55); --line: rgba(0, 0, 0, .09);
  --lav: #F0EFFA; --lav-2: #E4E2F4;
  --cjk: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --display: Almarai, Inter, var(--cjk);
  --body: Inter, var(--cjk);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, var(--cjk), monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.6 var(--body); -webkit-text-size-adjust: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* 按鈕：長方形，右邊一格黑／白方格箭咀 */
.btn { display: inline-flex; align-items: center; gap: 14px; min-height: 40px; padding: 6px 6px 6px 16px; border: 0; border-radius: 0; font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn .sq { width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; }
.btn .sq i { display: block; transition: transform .3s var(--ease); }
.btn:hover .sq i { transform: translate(2px, -2px); }
.btn.down:hover .sq i { transform: translateY(2px); }
.btn.down.open .sq i { transform: rotate(180deg); }
.btn.light { background: #fff; color: #000; }
.btn.light .sq { background: #000; color: #fff; }
.btn.dark { background: #000; color: #fff; }
.btn.dark .sq { background: #fff; color: #000; }
.btn.ghost { background: rgba(255, 255, 255, .06); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.btn.ghost .sq { background: rgba(255, 255, 255, .16); }

/* 首屏：官網同一段深紅山脈影片，載入前用漸層頂住 */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--red-deep); }
.hero-bg { position: absolute; inset: 0; z-index: -1; transition: filter .8s ease;
  background: radial-gradient(60% 55% at 72% 28%, #a32b2b, transparent 70%), radial-gradient(70% 60% at 25% 85%, #7d1515, transparent 70%), var(--red-deep); }
.hero-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-bg video.on { opacity: 1; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(33, 0, 0, .45), transparent 24%, transparent 48%, rgba(33, 0, 0, .62)); }

.nav { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; height: 80px; }
.logo { display: block; flex: none; width: 104px; height: 27px; background: currentColor;
  -webkit-mask: url(jackz-logo.svg) left center / contain no-repeat; mask: url(jackz-logo.svg) left center / contain no-repeat; }
.nav-tag { font-size: 14px; color: rgba(255, 255, 255, .85); padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .3); white-space: nowrap; }
.nav-links { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 24px; padding: 0 8px 12px; border-bottom: 2px solid rgba(255, 255, 255, .16); }
.nav-links a, .nav-links button { background: none; border: 0; padding: 0; color: #fff; font-size: 15px; text-decoration: none; white-space: nowrap; cursor: pointer; opacity: .88; transition: opacity .2s; }
.nav-links a:hover, .nav-links button:hover { opacity: 1; }
.nav .btn { margin-left: auto; }

/* 區塊標題：紅色方格 icon，右上角一格粉紅 */
.block { padding-top: 128px; }
.icon { position: relative; display: grid; place-items: center; width: 33px; height: 33px; margin-bottom: 22px; background: var(--red); color: #fff; font-size: 17px; }
.icon::after { content: ""; position: absolute; top: 0; right: 0; width: 8px; height: 8px; background: var(--pink); }
.sec-head { max-width: 560px; margin-bottom: 48px; }
.sec-head h2 { font: 400 clamp(30px, 3vw, 40px)/1.15 var(--display); letter-spacing: -.03em; margin: 0 0 14px; }
.sec-head p { margin: 0; color: var(--ink-70); }

/* 頁尾：白底紅線過渡到深紅，白色資料卡，再以條紋收尾 */
.foot { margin-top: 150px; }
.stripes { height: 84px; background: linear-gradient(180deg, #fff 0 30px, #7a0e0e 30px 32px, #fff 32px 56px, #520606 56px 61px, #fff 61px 76px, #2e0000 76px); }
.foot-dark { color: #fff; padding-top: 72px; background: radial-gradient(70% 85% at 50% 30%, #240000 0, transparent 72%), linear-gradient(90deg, #6e0f0f, #3b0202 24%, #240000 50%, #3b0202 76%, #6e0f0f); }
.foot-big { font: 400 clamp(40px, 5.4vw, 64px)/1.06 var(--display); letter-spacing: -.035em; margin: 0 0 18px; }
.foot-sub { max-width: 540px; margin: 0 0 120px; color: rgba(255, 255, 255, .74); }
.foot-card { display: grid; grid-template-columns: 1fr repeat(3, auto); gap: 40px 48px; align-items: start; padding: 56px 40px; background: #fff; color: #000; }
/* 中闊度：日文標題＋三欄連結一行放唔落會爆出白框；標題自成一行，三欄連結放下面 */
@media (max-width: 1100px) and (min-width: 761px) {
  .foot-card { grid-template-columns: repeat(3, auto); justify-content: start; gap: 32px 56px; }
  .foot-card > :first-child { grid-column: 1 / -1; }
}
.foot-card .logo { width: 84px; height: 22px; margin-bottom: 28px; color: #000; }
.foot-card h3 { font: 400 clamp(30px, 3.4vw, 46px)/1.1 var(--display); letter-spacing: -.035em; margin: 0 0 24px; max-width: 16em; text-wrap: balance; }
.foot-col h4 { font: 400 18px/1.3 var(--display); margin: 6px 0 16px; }
.foot-col ul { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0 0 0 14px; border-left: 4px solid var(--lav-2); }
.foot-col a, .foot-col button { background: none; border: 0; padding: 0; color: var(--ink-70); font-size: 15px; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.foot-col a:hover, .foot-col button:hover { color: #000; }
.foot-note { max-width: 440px; margin: 20px 0 0; color: var(--ink-55); font-size: 13px; }
.copy { margin: 0; padding: 40px 0 48px; color: rgba(255, 255, 255, .85); font-size: 14px; }
.foot-fade { height: 132px; background: repeating-linear-gradient(180deg, transparent 0 13px, rgba(255, 255, 255, .16) 13px 16px), linear-gradient(180deg, #4a0303, #d6a3a3); }

/* 捲到才淡入；只在有 JS 時生效 */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 900px) { .nav-links { display: none; } }
/* 英日文的頁名太長，手機上會把 Verifier 掣推到貼邊；首屏 kicker 已寫明頁名 */
@media (max-width: 480px) { :is(:lang(en), :lang(ja)) .nav-tag { display: none; } }
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav { height: 64px; gap: 10px; }
  .logo { width: 86px; height: 22px; }
  .nav .btn { padding-left: 12px; gap: 10px; font-size: 14px; }
  .block { padding-top: 88px; }
  .sec-head { margin-bottom: 32px; }
  .foot { margin-top: 100px; }
  .foot-sub { margin-bottom: 64px; }
  .foot-card { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; padding: 32px 22px; }
  .foot-col :is(a, button) { white-space: normal; } /* 英日文連結較長，手機上兩欄放不下就換行 */
  .foot-card > :first-child { grid-column: 1 / -1; }
}

/* 語言切換 */
.lang { position: relative; margin-left: auto; color: #fff; font-size: 14px; }
.lang summary { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; list-style: none; cursor: pointer; opacity: .88; transition: opacity .2s; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { opacity: 1; }
.lang summary i { font-size: 18px; }
.lang div { position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; min-width: 168px; padding: 6px; background: #fff; box-shadow: 0 18px 40px rgba(33, 0, 0, .28); }
.lang a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.lang a:hover { background: var(--lav); }
.lang a[aria-current] { color: var(--red); font-weight: 600; }
.nav .lang + .btn { margin-left: 0; }
@media (max-width: 760px) {
  .lang summary { padding: 0 4px; }
  .lang summary span { display: none; }
}
@media (max-width: 760px) { .nav .btn .long { display: none; } .nav .btn.light { background: rgba(255, 255, 255, .06); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); } .nav .btn.light .sq { background: rgba(255, 255, 255, .16); color: #fff; } }

/* 中日文標題：拉丁字的負字距會擠壓漢字；標題平均斷行，段落避免單字孤行 */
:is(:lang(zh), :lang(ja)) :is(.display, .sec-head h2, .foot-big, .foot-card h3, .vs blockquote, .chain h3, .mode h3, .how h3, .gamewall h3) { letter-spacing: -.005em; }
h1, h2, h3, .foot-big { text-wrap: balance; }
p, li, dd { text-wrap: pretty; line-break: strict; }
.lead { text-wrap: balance; }
:lang(zh) .lead { word-break: keep-all; overflow-wrap: anywhere; } /* 中文導語只在標點和空格換行，不拆詞 */
:lang(ja) :is(h1, h2, h3, .display, .lead, .foot-big, p, li, dd, summary) { word-break: auto-phrase; }
/* 一個詞組比手機還闊時（例：プラットフォームに。）才在詞組內換行，否則整段標題被裁走 */
:lang(ja) :is(h1, .display, .lead) { overflow-wrap: anywhere; }
/* 日文假名比中文闊，大標題縮小一級才排得成兩行 */
:lang(ja) .display { font-size: clamp(40px, 4.6vw, 60px); }
/* 中文短語不拆開；英日文譯句太長，照常換行，英文補回兩段之間的空格 */
:lang(zh) .nw { white-space: nowrap; }
:lang(en) .nw::before { content: " "; }
.pcard .hint, .how p, .gamewall p, .biz p { text-wrap: pretty; }
:lang(zh) :is(.display, .foot-big, .sec-head h2) { text-spacing-trim: trim-both; }
