/* ───────────────────────────────────────────────────────────────
   intro.css — 三機展示頁(延伸自 F1 hero 模板)
   ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #0a0e1c;
  --gold: #EDB40B;
  --red: #E10600;
  --red-dark: #8B0000;
  --red-black: #1a0000;
  --card-red: #c8102e;
  --glass: rgba(20,20,30,.8);
  --hair: rgba(255,255,255,.1);
  --ease: cubic-bezier(.16,1,.3,1);
  /* Albert Sans 沒有中文字形;中文落到系統字,不然會掉成新細明體 */
  --font: "Albert Sans", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: #fff; }
body { font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── 頁面 ───────── */
.hero { position: relative; width: 100%; min-height: 100vh; min-height: 100svh; overflow: hidden; }

/* 模板用一張照片當底再壓 70% 黑。這裡不用別人的圖 ——
   改成牌桌絨布的綠光 + 一點紅心的暖色,壓暗之後的觀感一樣是「深色、有光源」。 */
.hero-bg, .scr-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 50% 38%, rgba(31,107,74,.55), transparent 70%),
    radial-gradient(40% 35% at 85% 90%, rgba(225,6,0,.22), transparent 70%),
    radial-gradient(45% 40% at 10% 85%, rgba(237,180,11,.12), transparent 70%),
    #0a0e1c;
}
.hero-bg::after, .scr-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.scr-bg::after { background: rgba(0,0,0,.35); }

.stage {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 50px; padding: 20px 20px 110px;
}
@media (min-width: 768px) {
  .stage {
    flex-direction: row; align-items: flex-end; justify-content: center;
    gap: 2vw; height: 100vh; height: 100svh; padding: 24px 0 102px;
  }
  .phone-wrap.mid { margin-bottom: -24px; }
}

/* ───────── 手機外框 ───────── */
.phone {
  position: relative;
  aspect-ratio: 390 / 844;
  width: clamp(200px, 75vw, 340px);
  border-radius: clamp(30px, 4vw, 54px);
  background: #000;
  padding: clamp(6px, 1vw, 12px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.6);
}
/* 模板寫的是 min(28vw, 48vh, 430px)。但外框比例是 390:844,
   48vh 寬換算成高度是 104vh —— 比視窗還高,手機頂端會被切掉。
   改成從「可用高度」反推寬度:扣掉上下留白、中間那支往下沉的 24px、
   以及底部 CTA 的位置,剩下的高度 × 390/844。 */
@media (min-width: 768px) {
  .phone { --fit: calc((100svh - 150px) * 0.462); width: min(25vw, var(--fit)); }
}
@media (min-width: 1280px) {
  .phone { width: min(28vw, var(--fit), 430px); }
}

.phone::before { /* 內圈細線 */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); pointer-events: none; z-index: 60;
}
.phone-content {
  position: relative; width: 100%; height: 100%;
  border-radius: clamp(24px, 3.2vw, 44px);
  overflow: hidden; background: var(--bg);
  /* 選單的 position:fixed 要以這裡為準,不能跑到整個視窗 */
  transform: translateZ(0);
}
.phone-content::after { /* 動態島 */
  content: ""; position: absolute; top: 3%; left: 50%; transform: translateX(-50%);
  width: 30%; height: 4%; background: #000; border-radius: 999px; z-index: 55;
}
/* 側鍵 */
.phone-wrap { position: relative; }
.phone-wrap::before, .phone-wrap::after {
  content: ""; position: absolute; width: 3px; background: #404040; border-radius: 2px;
}
.phone-wrap::before { /* 左:靜音 + 音量兩顆,用陰影畫出三段 */
  left: -3px; top: 19%; height: 4.5%;
  box-shadow: 0 calc(var(--pw, 300px) * 0.155) 0 0 #404040;
}
.phone-wrap::after { right: -3px; top: 30.8%; height: 11.4%; }

/* 390×844 的設計座標,JS 依螢幕寬度算 scale */
.scr {
  position: absolute; left: 0; top: 0;
  width: 390px; height: 844px;
  transform-origin: 0 0;
  transform: scale(var(--s, .8));
  overflow: hidden;
}

/* ───────── 共用導覽 ───────── */
.pnav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; margin-top: 20px; padding: 0 20px;
}
.logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 20px; letter-spacing: -.04em; }
.logo-suit { color: var(--gold); font-size: 22px; }
.pnav-btns { display: flex; }
.nb {
  width: 56px; height: 56px; display: grid; place-items: center;
  border: 0; padding: 0; cursor: pointer; font: inherit;
}
.nb-white { background: #fff; }
.nb-glass {
  background: rgba(255,255,255,.15);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.bar { display: block; height: 2px; border-radius: 999px; background: #fff; }
.b1 { width: 21px; } .b2 { width: 10px; transform: translateX(-5.5px); }
.nb:focus-visible, .pmenu a:focus-visible, .pmenu-x:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* 選單 */
/* 選單打開時,底下那兩張超出螢幕的白牌會在左右邊緣滲出一條 1px 白線。
   原因:牌(有 transform 動畫)跟選單(有 opacity 轉場)是兩個獨立的合成層,
   對同一條裁切邊的像素對齊不一樣。把選單加大蓋不住 —— 試過了,
   兩者都被同一個 overflow 裁切。所以選單全開之後直接把牌藏起來。 */
.scr.menu-open .hand { visibility: hidden; transition: visibility 0s .4s; }
.pmenu {
  position: absolute; inset: 0; z-index: 50;
  background: linear-gradient(160deg, var(--red-black) 0%, var(--red-dark) 40%, var(--red) 100%);
  display: flex; flex-direction: column; padding: 110px 28px 36px;
  opacity: 0; transition: opacity .4s ease;
}
.pmenu[hidden] { display: none; }
.pmenu.open { opacity: 1; }
.pmenu-x { position: absolute; top: 32px; right: 22px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; }
.pmenu-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.pmenu-links a {
  display: inline-block; color: #fff; text-decoration: none;
  font-size: 30px; font-weight: 700; letter-spacing: -.025em;
  opacity: 0; transform: translateX(-20px);
  transition: color .2s ease;
}
.pmenu.open .pmenu-links a { animation: menuIn .6s var(--ease) both; }
.pmenu.open li:nth-child(1) a { animation-delay: .10s; }
.pmenu.open li:nth-child(2) a { animation-delay: .18s; }
.pmenu.open li:nth-child(3) a { animation-delay: .26s; }
.pmenu.open li:nth-child(4) a { animation-delay: .34s; }
.pmenu-links a:hover { color: var(--gold); }
.pmenu-signin {
  margin-top: auto; display: block; text-align: center; padding: 18px;
  background: #fff; color: #0a0e1c; text-decoration: none; font-weight: 700; font-size: 17px;
}
@keyframes menuIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }

/* ───────── 共用文字 ───────── */
.label { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.6); font-size: 16px; font-weight: 400; }
.suit-dot {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: var(--gold); font-size: 14px;
}
.loc { position: relative; z-index: 10; margin: 16px 0 8px; }
.loc-title { margin-top: 6px; font-size: 48px; font-weight: 400; line-height: .95; letter-spacing: -.05em; }

/* ───────── 畫面 1 ───────── */
.scr-1, .scr-2 { display: flex; flex-direction: column; padding: 76px 20px 0; }
.scr-2 { padding-bottom: 32px; }

.hand { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
/* 牌面規則跟遊戲本體一致:角落只有點數,花色只在正中央
   (角落再放一個花色,6 會被看成 9) */
.bigcard {
  position: absolute; bottom: 80px; width: 212px; height: 297px;
  border-radius: 20px; background: linear-gradient(160deg, #fffdf8, #efe7d8);
  color: #1a1420;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), inset 0 0 0 1px rgba(0,0,0,.06);
}
.bigcard.red { color: var(--card-red); }
.bigcard .rk { position: absolute; top: 16px; left: 22px; font-size: 64px; font-weight: 700; letter-spacing: -.06em; line-height: 1; }
.bigcard .st { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); font-size: 150px; line-height: 1; }
.c-left  { left: 34px;  transform: rotate(-10deg); transform-origin: bottom center; }
.c-right { left: 150px; transform: rotate(9deg);  transform-origin: bottom center; }
.c-left.anim, .c-right.anim { animation-name: cardIn; }
.c-right.anim { --r: 9deg; } .c-left.anim { --r: -10deg; }
@keyframes cardIn {
  from { opacity: 0; transform: rotate(var(--r)) scale(.92); }
  to   { opacity: 1; transform: rotate(var(--r)) scale(1); }
}
/* 模板的關鍵玻璃效果:下半部霧化,往上漸漸清楚 */
.hand-blur {
  position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask: linear-gradient(to bottom, transparent 0%, #000 50%);
          mask: linear-gradient(to bottom, transparent 0%, #000 50%);
  background: linear-gradient(to bottom, transparent, rgba(10,14,28,.55));
}
.scr1-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; padding: 0 20px 20px; }
.seats { display: flex; margin-bottom: 12px; }
.seats span {
  width: 48px; height: 48px; margin-right: -10px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px;
  background: #13182b; border: 2px solid #0a0e1c; color: #fff;
}
.seats span.r { color: #ff5a6a; }
.seats span.more { background: var(--gold); color: #1a1420; font-size: 15px; font-weight: 700; }
.bigname { font-size: 64px; font-weight: 600; line-height: .82; letter-spacing: -.05em; }

/* ───────── 畫面 2 ───────── */
.table-art {
  position: relative; z-index: 10; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center; margin: 0 -20px; padding: 0 8px;
}
.table-art svg { width: 100%; height: auto; max-height: 100%; }
.stats { position: relative; z-index: 10; margin-top: auto; padding-top: 16px; }
.stats .label { margin-bottom: 14px; }
.stat { display: flex; align-items: flex-end; justify-content: space-between; }
.num {
  font-size: 110px; line-height: .72; font-weight: 600; letter-spacing: -.06em;
  font-variant-numeric: tabular-nums; padding-bottom: 4px;
}
.fadegrad {
  background: linear-gradient(to bottom, #fff 0%, rgba(255,255,255,.4) 50%, transparent 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.num.gold { color: var(--gold); }
.stat-cap { font-size: 13px; line-height: 1.35; color: rgba(255,255,255,.5); text-align: right; padding-bottom: 10px; }

/* ───────── 畫面 3 ───────── */
.team  { position: absolute; top: 100px; left: 20px; z-index: 10; }
.team .label, .price .label { font-size: 15px; }
.team-title { margin-top: 8px; font-size: 52px; font-weight: 400; line-height: .83; letter-spacing: -.08em; }
.price { position: absolute; top: 245px; left: 20px; z-index: 10; }
.price-num { margin-top: 10px; font-size: 120px; font-weight: 600; line-height: .79; letter-spacing: -.08em; color: var(--gold); }

/* 模板這裡是一台賽車;換成一排籌碼疊 —— 高低錯落,讀起來是「越買越多」 */
.chips-art {
  position: absolute; top: 420px; left: 12px; right: 12px; z-index: 10;
  height: 150px; display: flex; align-items: flex-end; justify-content: center; gap: 10px;
}
.stack {
  width: 56px; border-radius: 28px / 10px;
  background:
    repeating-linear-gradient(to top, transparent 0 9px, rgba(0,0,0,.35) 9px 10px),
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 35%, rgba(255,255,255,.25) 60%, rgba(0,0,0,.3));
  position: relative;
}
.stack::before { /* 頂面 */
  content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9) 0 18%, transparent 19%), inherit;
  border: 3px dashed rgba(255,255,255,.75);
}
.s1 { height: 40px;  background-color: #e9e3d6; } .s1::before { background-color: #f5f0e6; }
.s2 { height: 70px;  background-color: #c8102e; } .s2::before { background-color: #e0263f; }
.s3 { height: 100px; background-color: #1f6b4a; } .s3::before { background-color: #2a8a60; }
.s4 { height: 125px; background-color: #1b1b2a; } .s4::before { background-color: #2c2c42; }
.s5 { height: 140px; background-color: #d9a50a; } .s5::before { background-color: var(--gold); }

.pack-cards { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; }
.pack {
  width: 50%; height: 200px; padding: 12px; border-radius: 16px 16px 0 0;
  background: var(--glass); border: 1px solid var(--hair); border-bottom: 0;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.pack-name { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: rgba(255,255,255,.6); }
.pack-price { color: #fff; font-weight: 600; font-size: 14px; }
.pack-num { font-size: 96px; font-weight: 600; line-height: .79; letter-spacing: -.08em; }

/* ───────── 行動呼籲 ───────── */
.cta {
  position: absolute; z-index: 3; left: 50%; bottom: 32px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 30px; border-radius: 999px;
  background: var(--gold); color: #1a1420; text-decoration: none;
  font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -8px rgba(237,180,11,.55);
  transition: filter .2s ease, transform .2s ease;
}
.cta:hover { filter: brightness(1.07); }
.cta.anim { animation-name: ctaUp; }
@keyframes ctaUp { from { opacity: 0; transform: translate(-50%, 30px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* 手機上三支手機是直排的,頁面有兩千多 px 高。
   CTA 跟著頁尾走的話要滑到底才看得到 —— 固定在螢幕底部。 */
@media (max-width: 767px) { .cta { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); } }
@media (min-width: 768px) { .cta { bottom: 18px; } }

/* ───────── 動畫(模板規格) ───────── */
.anim { animation-duration: .9s; animation-timing-function: var(--ease); animation-fill-mode: both; }
.fade-up   { animation-name: fadeSlideUp; }
.fade-left { animation-name: fadeSlideLeft; }
.scale-in  { animation-name: scaleIn; animation-duration: 1s; }
.speed     { animation-name: speedReveal; animation-duration: .8s; }
@keyframes fadeSlideUp   { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes fadeSlideLeft { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes scaleIn       { from { opacity: 0; transform: scale(.92); }       to { opacity: 1; transform: none; } }
@keyframes speedReveal {
  0%   { opacity: 0; transform: translateX(-100%) skewX(-8deg); filter: blur(8px); }
  60%  { opacity: 1; transform: translateX(4%) skewX(-2deg);    filter: blur(0); }
  100% { opacity: 1; transform: none;                            filter: blur(0); }
}
.d3 { animation-delay: .3s; } .d4 { animation-delay: .4s; } .d5 { animation-delay: .5s; }
.d6 { animation-delay: .6s; } .d7 { animation-delay: .7s; } .d8 { animation-delay: .8s; }
.d9 { animation-delay: .9s; } .d10 { animation-delay: 1s; }

@media (prefers-reduced-motion: reduce) {
  .anim, .pmenu.open .pmenu-links a { animation: none !important; opacity: 1 !important; }
  .pmenu-links a { opacity: 1; transform: none; }
  .cta { transform: translateX(-50%); }
    .c-left { transform: rotate(-10deg); } .c-right { transform: rotate(9deg); }
  .pmenu { transition: none; }
}
