/* ============================================================
   項目大廳 — 頁面專屬樣式
   延用 style.css 的設計代幣（深黑底、香檳金、虛線框、等寬標籤）
   ============================================================ */

:root {
  /* 賽道色標：低飽和度，與金色主調共存 */
  --track-ai: #D2A06E;
  --track-web3: #8CA9BF;
  --track-rwa: #9DB98C;

  /* 狀態色 */
  --st-warming: #B9A88F;
  --st-active: #D2A06E;
  --st-filled: #9DB98C;
  --st-ended: #6E665E;
}

/* 內頁導航固定為實心，避免深色內容透上來 */
.page-projects .nav {
  background: rgba(20, 16, 16, .9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line-on-dark);
}
.nav__link.is-current { color: var(--c-accent); opacity: 1; }
.nav__link.is-current::after { transform: scaleX(1); }
@media (max-width: 860px) {
  .nav__link.is-current::after { display: none; }
}

/* ============ 1. Page header ============ */
/* 本身是 <header>，不吃 style.css 的 section 內距，需自行指定 */
.hall-head {
  position: relative;
  padding: calc(var(--pad-lg) + 60px) var(--pad) var(--pad-lg);
  overflow: hidden;
  min-height: min(76svh, 680px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* 蓄力中的繭 */
.hall-head__canvas {
  position: absolute; inset: 0;
  z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* 文案側加一道暗幕，讓標題在繭的光暈旁仍讀得清楚 */
.hall-head::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(20, 16, 16, .92) 18%, rgba(20, 16, 16, .5) 48%, transparent 72%);
  pointer-events: none;
}
@media (max-width: 820px) {
  .hall-head { min-height: auto; }
  .hall-head::after {
    background: linear-gradient(185deg, rgba(20, 16, 16, .9) 38%, rgba(20, 16, 16, .55) 66%, transparent);
  }
}
.hall-head__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(210, 160, 110, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 160, 110, .06) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(120% 90% at 20% 0%, #000 10%, transparent 70%);
  mask-image: radial-gradient(120% 90% at 20% 0%, #000 10%, transparent 70%);
  pointer-events: none;
}
/* 疊層：網格與繭在底，暗幕居中，文案最上 */
.hall-head > *:not(.hall-head__grid):not(.hall-head__canvas) {
  position: relative;
  z-index: 2;
}

.crumbs { display: flex; gap: 10px; opacity: .6; margin-bottom: 22px; }
.crumbs a { transition: color .25s; }
.crumbs a:hover { color: var(--c-accent); }
.crumbs span[aria-current] { color: var(--c-accent); }

.hall-head__title {
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 300;
  line-height: 1.1;
}
.hall-head__desc {
  margin-top: 20px;
  max-width: 620px;
  opacity: .7;
  font-weight: 300;
}

.hall-stats {
  margin-top: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px dashed var(--line-on-dark);
  /* 寬螢幕時收窄，讓右側的繭有完整的留白 */
  max-width: 720px;
}
.hall-stat {
  /* 左內距讓文字離開分隔虛線；首項不縮排，與標題切齊 */
  padding: 22px 18px 4px 26px;
  border-right: 1px dashed var(--line-on-dark);
}
.hall-stat:first-child { padding-left: 0; }
.hall-stat:last-child { border-right: none; }
.hall-stat__label { font-size: 13px; opacity: .55; }
.hall-stat__value {
  margin-top: 6px;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 500;
  color: var(--c-accent);
  letter-spacing: 0;
  text-transform: none;
}
@media (max-width: 720px) {
  .hall-stats { grid-template-columns: repeat(2, 1fr); }
  .hall-stat:nth-child(2n) { border-right: none; }
  /* 兩欄時左欄的項目都不縮排 */
  .hall-stat:nth-child(2n+1) { padding-left: 0; }
}

/* ============ 2. 焦點推薦 ============ */
.featured { padding-top: clamp(30px, 4vw, 54px); }
.featured__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-on-dark);
  margin-bottom: 28px;
}
.featured__kicker { color: var(--c-accent); font-size: 12px; }
.featured__note { opacity: .45; }

.feat-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(22px, 3vw, 44px);
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px dashed var(--line-on-dark);
  background: linear-gradient(145deg, #1B1514, rgba(210, 160, 110, .07));
  transition: border-color .35s;
}
.feat-card:hover { border-color: rgba(210, 160, 110, .5); }
.feat-card:hover .handle { transform: scale(1.35); }
@media (max-width: 900px) { .feat-card { grid-template-columns: 1fr; } }

.feat-card__media {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #15110E;
  min-height: 240px;
}
.feat-card__media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.feat-card__ribbon {
  position: absolute; top: 14px; left: 14px;
  padding: 6px 12px;
  background: var(--c-accent);
  color: #16120F;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 700;
}
.feat-card__body { display: flex; flex-direction: column; gap: 18px; }
.feat-card .pcard__pitch { font-size: 16px; }
.feat-card .pcard__name { font-size: clamp(20px, 2.2vw, 28px); }
.feat-card .plogo { width: 48px; height: 48px; font-size: 15px; }

/* ============ 3. 篩選 Chips ============ */
.listing { padding-top: clamp(40px, 5vw, 80px); }
.listing__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.listing__title { font-size: clamp(24px, 3vw, 36px); font-weight: 400; }
.listing__count { opacity: .5; }

.filters {
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px 0;
  border-top: 1px dashed var(--line-on-dark);
  border-bottom: 1px dashed var(--line-on-dark);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.filters__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.filters__label { opacity: .45; min-width: 36px; }
.chips { display: flex; gap: 9px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px;
  border: 1px dashed var(--line-on-dark);
  border-radius: 999px;
  font-size: 13px;
  color: rgba(247, 247, 247, .72);
  transition: border-color .25s, color .25s, background-color .25s;
}
.chip:hover { color: var(--c-text); border-color: rgba(210, 160, 110, .5); }
.chip.is-on {
  background: var(--c-accent);
  border-style: solid;
  border-color: var(--c-accent);
  color: #16120F;
  font-weight: 500;
}
.chip__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chip__dot[data-track="ai"] { background: var(--track-ai); }
.chip__dot[data-track="web3"] { background: var(--track-web3); }
.chip__dot[data-track="rwa"] { background: var(--track-rwa); }
.chip.is-on .chip__dot { box-shadow: 0 0 0 1.5px rgba(22, 18, 15, .35); }
.chip--reset { border-style: solid; border-color: transparent; opacity: .5; }
.chip--reset:hover { opacity: 1; border-color: var(--line-on-dark); }

/* ============ 4. 項目卡片 ============ */
.pgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2vw, 26px);
}
@media (max-width: 1060px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .pgrid { grid-template-columns: 1fr; } }

.pcard {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px 20px;
  border: 1px dashed var(--line-on-dark);
  background: var(--c-surface);
  transition: border-color .35s, transform .35s var(--ease-power4), background-color .35s;
}
.pcard:hover {
  border-color: rgba(210, 160, 110, .5);
  transform: translateY(-4px);
}
.pcard:hover .handle { transform: scale(1.35); }

/* 4.1 Logo、名稱、賽道色標 */
.pcard__top { display: flex; align-items: flex-start; gap: 12px; }
.plogo {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: linear-gradient(150deg, rgba(247, 247, 247, .1), rgba(247, 247, 247, .03));
  border: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c-text);
}
.pcard__id { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pcard__name {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  width: 100%;
}
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--track[data-track="ai"] { background: rgba(210, 160, 110, .16); color: var(--track-ai); }
.tag--track[data-track="web3"] { background: rgba(140, 169, 191, .16); color: var(--track-web3); }
.tag--track[data-track="rwa"] { background: rgba(157, 185, 140, .16); color: var(--track-rwa); }
.tag--plain {
  background: transparent;
  border: 1px dashed var(--line-on-dark);
  color: rgba(247, 247, 247, .6);
  font-weight: 500;
  text-transform: none;
  letter-spacing: .04em;
}

/* 狀態徽章 */
.status {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  border: 1px solid transparent;
}
.status i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.status--warming { color: var(--st-warming); border-color: rgba(185, 168, 143, .35); }
.status--warming i { background: var(--st-warming); }
.status--active { color: var(--st-active); border-color: rgba(210, 160, 110, .45); }
.status--active i {
  background: var(--st-active);
  box-shadow: 0 0 0 0 rgba(210, 160, 110, .6);
  animation: statusPulse 2s infinite;
}
.status--filled { color: var(--st-filled); border-color: rgba(157, 185, 140, .4); }
.status--filled i { background: var(--st-filled); }
.status--ended { color: var(--st-ended); border-color: rgba(110, 102, 94, .45); }
.status--ended i { background: var(--st-ended); }
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(210, 160, 110, .55); }
  70% { box-shadow: 0 0 0 6px rgba(210, 160, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(210, 160, 110, 0); }
}

/* 4.2 一句話定位、標籤、進度 */
.pcard__pitch {
  font-size: 14px;
  font-weight: 300;
  opacity: .72;
  line-height: 1.65;
}
.pcard__meta { display: flex; gap: 7px; flex-wrap: wrap; }

.progress { display: flex; flex-direction: column; gap: 8px; }
.progress__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.progress__label { font-size: 13px; opacity: .6; }
.progress__label b { font-weight: 500; opacity: 1; color: var(--c-text); font-size: 13px; }
.progress__pct { font-size: 14px; font-weight: 700; color: var(--c-accent); }
.progress__sub { font-size: 11px; opacity: .45; }

/* 狀態對應的進度條與數字配色 */
.pcard[data-status="warming"] .progress__pct,
.feat-card[data-status="warming"] .progress__pct { color: var(--st-warming); }
.pcard[data-status="filled"] .progress__pct { color: var(--st-filled); }
.pcard[data-status="filled"] .progress__bar i {
  background: linear-gradient(90deg, rgba(157, 185, 140, .5), var(--st-filled));
}
.pcard[data-status="ended"] .progress__pct { color: var(--st-ended); }
.pcard[data-status="ended"] .progress__bar i {
  background: rgba(247, 247, 247, .22);
}

/* 4.3 關鍵數據 */
.pcard__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-top: 1px dashed var(--line-on-dark);
  border-bottom: 1px dashed var(--line-on-dark);
}
.pcard__facts dt { font-size: 11px; opacity: .45; }
.pcard__facts dd { margin-top: 3px; font-size: 13.5px; font-weight: 500; }

/* 4.4 平台認證 / 路演 / 早鳥標識 */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; flex: none; }
.badge--verify { background: rgba(157, 185, 140, .12); color: #A9C497; }
.badge--roadshow { background: rgba(140, 169, 191, .12); color: #9DB8CB; }
.badge--early { background: rgba(210, 160, 110, .14); color: var(--c-accent); }

/* 操作按鈕 */
.pcard__cta {
  margin-top: auto;
  padding-top: 4px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-accent);
  transition: gap .3s var(--ease-power4), color .25s;
}
.pcard__cta:hover { gap: 14px; color: #E6BC8E; }

/* 底部操作列：左側為狀態動作，右側固定「查看詳情」 */
.pcard__ops { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.pcard__ops .pcard__cta { margin-top: 0; padding-top: 0; }
.pcard__more {
  margin-left: auto; display: inline-flex; align-items: center;
  padding: 7px 14px; border: 1px dashed var(--line-on-dark); border-radius: 5px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: rgba(247, 247, 247, .78);
  transition: border-color .25s, color .25s, background-color .25s;
}
.pcard__more:hover, .pcard__more:focus-visible { border-color: rgba(210, 160, 110, .7); color: var(--c-accent); background: rgba(210, 160, 110, .05); }
.pcard[data-status="ended"] .pcard__more { color: rgba(247, 247, 247, .7); }

/* ============ 5. 卡片狀態 ============ */
/* 預熱：整體低調，尚未開放認購 */
.pcard[data-status="warming"] { background: rgba(27, 21, 20, .7); }
.pcard[data-status="warming"] .pcard__cta { color: var(--st-warming); }
.pcard[data-status="warming"] .pcard__cta:hover { color: #D4C5AC; }

/* 已滿額：綠色左緣提示 */
.pcard[data-status="filled"]::before,
.pcard[data-status="ended"]::before {
  content: '';
  position: absolute; left: -1px; top: -1px; bottom: -1px;
  width: 2px;
}
.pcard[data-status="filled"]::before { background: var(--st-filled); }
.pcard[data-status="filled"] .pcard__cta { color: var(--st-filled); }

/* 已結束：整卡壓暗，hover 才恢復可讀性 */
.pcard[data-status="ended"] {
  opacity: .5;
  background: rgba(27, 21, 20, .5);
  transition: opacity .35s, border-color .35s, transform .35s var(--ease-power4);
}
.pcard[data-status="ended"]:hover { opacity: .85; transform: none; }
.pcard[data-status="ended"]::before { background: var(--st-ended); }
.pcard[data-status="ended"] .pcard__cta { color: rgba(247, 247, 247, .55); }
.pcard[data-status="ended"] .pcard__cta:hover { color: var(--c-text); }
.pcard[data-status="ended"] .handle { background: var(--st-ended); }

/* 篩選隱藏 */
.pcard[hidden] { display: none; }
.pgrid__empty {
  padding: 60px 20px;
  text-align: center;
  opacity: .5;
  border: 1px dashed var(--line-on-dark);
}

/* ============ 底部引導 ============ */
.hall-cta {
  position: relative;
  text-align: center;
  overflow: hidden;
  margin-top: clamp(50px, 7vw, 110px);
}
.hall-cta > *:not(.cta__rings) { position: relative; z-index: 1; }
.hall-cta__title { font-size: clamp(26px, 4vw, 48px); font-weight: 300; }
.hall-cta__sub { margin: 18px auto 0; max-width: 540px; opacity: .7; font-weight: 300; }
.hall-cta__actions {
  margin-top: 36px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}

.link-ghost {
  color: rgba(247, 247, 247, .6);
  transition: color .25s;
  align-self: center;
}
.link-ghost:hover { color: var(--c-accent); }
.pcard__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: auto; }

@media (prefers-reduced-motion: reduce) {
  .status--active i { animation: none; }
  .pcard, .feat-card { transition: none; }
}

/* 首頁賽道卡片以 #filters 跳轉時，避開固定導航 */
#filters { scroll-margin-top: 96px; }
