/* ═══════════════════════════════════════════════════════════════
   HK CASINO INDEX · Hero Banner system
   Color tokens, grain, neon bloom, typography system
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink:     #0b1e3a;   /* 深靛藍夜 primary */
  --ink-2:   #070f1c;   /* 近黑帶青 */
  --ink-3:   #142845;   /* 午夜中層 */
  --fog:     #3a4556;   /* 霧面灰 */
  --fog-2:   #5b6778;   /* 霧面灰 lighter */
  --neon:    #f5a623;   /* 霓虹橘黃 accent */
  --neon-2:  #ff8a3d;   /* 霓虹紅橘 */
  --gold:    #d4af37;   /* chips 金邊 */
  --paper:   #f2ece0;   /* 暖米白 — 禁純白 */
  --paper-2: #e8ddc8;   /* 泛黃紙 */
  --blood:   #b8342a;   /* 霓虹暗紅 */
  --jade:    #2a5a48;   /* chips 深綠 */

  /* rhythm */
  --gutter: 2.25rem;
  --edge:   3rem;

  /* effects — tweakable */
  --bloom: 1;       /* 0..2 */
  --grain: 1;       /* 0..2 */

  --f-serif: "Noto Serif TC", "Songti TC", "Source Han Serif TC", serif;
  --f-sans:  "Space Grotesk", "Helvetica Neue", sans-serif;
  --f-mono:  "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

/* ── base reset for any artboard ─────────────────────────────── */
.hero-root, .hero-root * { box-sizing: border-box; }
.hero-root {
  font-family: var(--f-sans);
  color: var(--paper);
  background: var(--ink-2);
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────────── */
.hero-h1 {
  font-family: var(--f-serif);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--paper);
  text-shadow: 0 2px 12px rgba(0,0,0,.7), 0 0 1px rgba(0,0,0,.4);
  margin: 0;
  text-wrap: balance;
}
.hero-eyebrow {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--neon);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}
.hero-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--neon);
  box-shadow: 0 0 calc(6px * var(--bloom)) rgba(245,166,35,.7);
}
.hero-deck {
  font-family: var(--f-serif);
  font-weight: 400;
  color: rgba(242, 236, 224, 0.78);
  line-height: 1.45;
  text-wrap: pretty;
}
.hero-kicker {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: rgba(242,236,224,.55);
  text-transform: uppercase;
}

/* ── Grain overlay ───────────────────────────────────────────── */
.grain-layer {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: calc(0.22 * var(--grain));
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.7 0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 50;
}

/* ── Vignette ────────────────────────────────────────────────── */
.vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 55%, transparent 40%, rgba(7,15,28,.55) 100%),
    linear-gradient(180deg, rgba(7,15,28,0) 60%, rgba(7,15,28,.75) 100%);
  z-index: 40;
}

/* ── Neon bloom helpers ──────────────────────────────────────── */
.neon-glow {
  color: var(--neon);
  text-shadow:
    0 0 calc(4px * var(--bloom))  rgba(245,166,35, 0.95),
    0 0 calc(18px * var(--bloom)) rgba(245,166,35, 0.55),
    0 0 calc(36px * var(--bloom)) rgba(245,166,35, 0.28);
}
.neon-glow-red {
  color: #ff5a48;
  text-shadow:
    0 0 calc(4px * var(--bloom))  rgba(255,90,72, 0.95),
    0 0 calc(20px * var(--bloom)) rgba(184,52,42, 0.55);
}

/* ── Photo placeholder (ComfyUI drop zones) ─────────────────── */
.photo-drop {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(58,69,86,.22) 0 10px,
      rgba(20,40,69,.22) 10px 20px
    ),
    linear-gradient(180deg, var(--ink-3) 0%, var(--ink) 55%, var(--ink-2) 100%);
  overflow: hidden;
  isolation: isolate;
}
.photo-drop::before,
.photo-drop::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--neon);
  opacity: 0.85;
  pointer-events: none;
}
.photo-drop::before {
  top: 8px; left: 8px;
  border-right: 0; border-bottom: 0;
}
.photo-drop::after {
  bottom: 8px; right: 8px;
  border-left: 0; border-top: 0;
}
.photo-drop .crop-br {
  position: absolute; top: 8px; right: 8px;
  width: 12px; height: 12px;
  border: 1px solid var(--neon);
  border-left: 0; border-bottom: 0;
  opacity: .85;
}
.photo-drop .crop-bl {
  position: absolute; bottom: 8px; left: 8px;
  width: 12px; height: 12px;
  border: 1px solid var(--neon);
  border-right: 0; border-top: 0;
  opacity: .85;
}

.photo-spec {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: rgba(242,236,224,.78);
  max-width: 62%;
}
.photo-spec .label {
  color: var(--neon);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 9.5px;
  display: block;
  margin-bottom: 4px;
}
.photo-spec .dim {
  color: rgba(212,175,55,.85);
  font-variant-numeric: tabular-nums;
}
.photo-spec ul { margin: 4px 0 0; padding-left: 14px; }
.photo-spec li { margin: 1px 0; color: rgba(242,236,224,.65); }
.photo-spec li::marker { color: var(--neon); }

/* Simulated cinematic glow blobs inside placeholders */
.photo-drop .glow-neon {
  position: absolute;
  border-radius: 50%;
  filter: blur(calc(28px * var(--bloom)));
  opacity: calc(0.55 * var(--bloom));
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ── CTA rect (blank, crop marks) ────────────────────────────── */
.cta-rect {
  position: relative;
  width: 240px; height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: var(--neon);
  color: var(--ink-2);
  font-family: var(--f-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.9375rem;
  cursor: pointer;
  border: 0;
  box-shadow:
    0 0 calc(10px * var(--bloom)) rgba(245,166,35,.45),
    0 10px 30px rgba(0,0,0,.35);
  transition: transform .12s ease, box-shadow .2s ease;
}
.cta-rect:hover { transform: translateY(-1px); box-shadow: 0 0 calc(18px * var(--bloom)) rgba(245,166,35,.7), 0 14px 36px rgba(0,0,0,.4); }
.cta-rect .arrow { font-family: var(--f-mono); font-size: 1.1rem; }
.cta-rect::before, .cta-rect::after {
  content:""; position:absolute; width: 10px; height: 10px;
  border: 1px solid rgba(242,236,224,.35);
  pointer-events: none;
}
.cta-rect::before { top: -6px; left: -6px; border-right:0; border-bottom:0; }
.cta-rect::after  { bottom: -6px; right: -6px; border-left:0; border-top:0; }

.cta-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-mono); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(242,236,224,.72);
  border-bottom: 1px solid rgba(242,236,224,.25);
  padding-bottom: 4px; cursor: pointer;
}
.cta-secondary:hover { color: var(--paper); border-color: var(--neon); }

/* ── Pill (「2026 最新 · 香港玩家推薦」) ─────────────────────── */
.hk-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--neon);
  color: var(--neon);
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: rgba(245,166,35,.06);
  box-shadow: inset 0 0 calc(12px * var(--bloom)) rgba(245,166,35,.12);
}
.hk-pill .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 calc(4px * var(--bloom)) var(--neon);
}

/* ── Editorial trust strip (FT-style data row) ─────────────── */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(242,236,224,.16);
  border-bottom: 1px solid rgba(242,236,224,.16);
  padding: 0.875rem 0;
}
.trust-cell {
  padding: 0 1.25rem;
  border-left: 1px solid rgba(242,236,224,.1);
  display: flex; flex-direction: column; gap: 0.125rem;
}
.trust-cell:first-child { border-left: 0; padding-left: 0; }
.trust-cell .num {
  font-family: var(--f-mono);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--paper);
  line-height: 1;
}
.trust-cell .num .u {
  font-size: 0.75rem; color: var(--fog-2);
  margin-left: 0.25rem; letter-spacing: 0.08em;
}
.trust-cell .lbl {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,236,224,.5);
  margin-top: 0.375rem;
}

/* ── Subtitle bar (電影字幕式) ──────────────────────────────── */
.sub-bar {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242,236,224,.72);
  background: rgba(7,15,28,.7);
  border-left: 2px solid var(--neon);
  padding: 0.5rem 0.875rem;
  backdrop-filter: blur(4px);
}
.sub-bar .tc {
  font-variant-numeric: tabular-nums;
  color: var(--neon);
}

/* ── Nav bar (shared) ────────────────────────────────────────── */
.hero-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--edge);
  z-index: 30;
  font-family: var(--f-sans);
}
.hero-nav .brand {
  display: flex; align-items: center; gap: 0.625rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
}
.hero-nav .brand .mark {
  width: 22px; height: 22px;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  display: inline-flex; align-items:center; justify-content:center;
  font-family: var(--f-serif); font-size: 0.8rem;
  box-shadow: 0 0 calc(8px * var(--bloom)) rgba(245,166,35,.4);
}
.hero-nav .links {
  display: flex; gap: 2rem;
  font-size: 0.8125rem;
  color: rgba(242,236,224,.72);
}
.hero-nav .links a { color: inherit; text-decoration: none; }
.hero-nav .links a:hover { color: var(--neon); }
.hero-nav .cta-mini {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--neon);
  padding: 0.5rem 0.875rem;
  border: 0;
  cursor: pointer;
}

/* ── Scene filters (tone tweaks) ─────────────────────────────── */
.tone-dusk .photo-drop {
  filter: hue-rotate(-8deg) saturate(1.1) brightness(1.08);
}
.tone-dusk { --ink: #2b1f3a; --ink-2: #1a1022; --ink-3: #3b2446; }
.tone-rain .photo-drop {
  filter: saturate(0.88) brightness(0.96) contrast(1.06);
}
.tone-rain { --fog: #455566; }

/* ── Mobile-specific tweaks ──────────────────────────────────── */
.m-root { --edge: 1.25rem; --gutter: 1rem; }
.m-root .hero-h1 { letter-spacing: -0.025em; }
.m-root .trust-strip { grid-template-columns: repeat(2, 1fr); gap: 0.75rem 0; }
.m-root .trust-cell { border-left: 0; padding-left: 0; padding-right: 0; }

/* ─── Site-001 Variant B polish overrides (added 2026-04-24) ─── */
.hero-variant-b .hero-root {
  min-height: 720px !important;
  width: 100% !important;
  max-width: 100vw;
}
.hero-variant-b .hero-h1 {
  text-shadow: 0 4px 24px rgba(0,0,0,.92), 0 2px 6px rgba(0,0,0,.8), 0 0 1px rgba(0,0,0,.5) !important;
}
.hero-variant-b .hero-deck, .hero-variant-b .hero-eyebrow {
  text-shadow: 0 2px 8px rgba(0,0,0,.85) !important;
}
/* 加強左側 scrim */
.hero-variant-b > div > div[style*="linear-gradient(90deg"] {
  background: linear-gradient(90deg, rgba(7,15,28,.98) 0%, rgba(7,15,28,.92) 35%, rgba(7,15,28,.55) 75%, transparent 100%) !important;
}
/* chips overlay 限制不要侵入文字區 */
.hero-variant-b .photo-drop[style*="right: -4%"] {
  left: 48% !important;
  right: 0 !important;
  width: 52% !important;
  opacity: 0.7 !important;
}

/* ─── v2 polish 2026-04-24 ─── */
.hero-variant-b {
  padding: 0 !important;
  background: var(--ink-2);
  overflow: hidden;
  margin: 0;
}
.hero-variant-b .hero-root {
  width: 100% !important;
  height: 760px !important;
  min-height: 720px;
  max-height: 90vh;
}
/* chips overlay 更淡，不侵入文字區 */
.hero-variant-b .photo-drop[style*="left: 48%"],
.hero-variant-b .photo-drop[style*="right: -4%"],
.hero-variant-b .photo-drop[style*="right: 0%"] {
  opacity: 0.45 !important;
  mix-blend-mode: overlay !important;
  filter: saturate(0.8);
}
/* h1 再加 stroke effect */
.hero-variant-b .hero-h1 {
  text-shadow: 0 6px 30px rgba(0,0,0,.95), 0 3px 10px rgba(0,0,0,.9), 0 0 2px rgba(11,30,58,.8), 1px 1px 0 rgba(0,0,0,.6), -1px -1px 0 rgba(0,0,0,.6) !important;
  letter-spacing: -0.015em;
}
/* 隱藏 FIG marker（too dev） */
.hero-variant-b div[style*="FIG"] { display: none; }
.hero-variant-b .vignette { opacity: 0.55 !important; }
/* 移除 Variant B 自帶下邊 margin/padding */
.hero-variant-b .hero-root + * { display: none; }

/* ─── v3 final polish 2026-04-24 ─── */
.hero-variant-b .photo-drop[style*="left: 48%"],
.hero-variant-b .photo-drop[style*="right: -4%"],
.hero-variant-b .photo-drop[style*="right: 0%"] {
  opacity: 0.28 !important;
  mix-blend-mode: soft-light !important;
  filter: saturate(0.5) blur(2px);
}
/* 左側 scrim 延伸到 80% */
.hero-variant-b > div > div[style*="linear-gradient(90deg"] {
  background: linear-gradient(90deg, rgba(7,15,28,.99) 0%, rgba(7,15,28,.96) 50%, rgba(7,15,28,.75) 80%, transparent 100%) !important;
}
/* h1 再加深 shadow */
.hero-variant-b .hero-h1 {
  text-shadow: 0 6px 40px rgba(0,0,0,1), 0 4px 16px rgba(0,0,0,.98), 0 2px 4px rgba(0,0,0,.9), 0 0 1px #000 !important;
  color: #fff !important;
}
.hero-variant-b .hero-eyebrow, .hero-variant-b .hero-deck, .hero-variant-b .hk-pill {
  text-shadow: 0 2px 10px rgba(0,0,0,.95) !important;
}

/* ─── v4 bg dim 2026-04-24 ─── */
.hero-variant-b .photo-drop img {
  filter: brightness(0.48) saturate(0.85) !important;
}




.hero-variant-b .hero-h1 {
  -webkit-text-stroke: 0 !important;
  paint-order: stroke fill;
  color: #ffffff !important;
  text-shadow: 
    0 0 14px rgba(0,0,0,1),
    0 4px 22px rgba(0,0,0,1),
    0 2px 6px rgba(0,0,0,1),
    0 0 2px #000 !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.85));
}
.hero-variant-b .hero-eyebrow {
  color: var(--neon, #f5a623) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.9) !important;
}
.hero-variant-b .hero-deck {
  color: rgba(255,255,255,.95) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.9) !important;
}

/* ─── v7 simplify — hide chips overlay, clean hero ─── */
.hero-variant-b .photo-drop[style*="left: 48%"],
.hero-variant-b .photo-drop[style*="right: -4%"] {
  display: none !important;
}
.hero-variant-b .photo-drop img {
  filter: brightness(0.28) saturate(0.75) !important;
}
.hero-variant-b .hero-h1 {
  color: #ffffff !important;
  text-shadow: 
    0 0 10px rgba(0,0,0,.9),
    0 3px 14px rgba(0,0,0,.95),
    0 1px 3px rgba(0,0,0,1) !important;
  -webkit-text-stroke: 0 !important;
}
.hero-variant-b > div > div[style*="linear-gradient(90deg"] {
  background: linear-gradient(90deg, rgba(7,15,28,.92) 0%, rgba(7,15,28,.7) 55%, rgba(7,15,28,.35) 85%, transparent 100%) !important;
}

/* ─── v10 強制 fill-color 白 ─── */
.hero-variant-b .hero-h1, .hero-variant-b .hero-h1 span {
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
}
.hero-variant-b .hero-h1 .neon-glow {
  -webkit-text-fill-color: #f5a623 !important;
  color: #f5a623 !important;
}

/* ─── Hero-variant-b mobile responsive ─── */
@media (max-width: 768px) {
  .hero-variant-b .hero-root {
    height: auto !important;
    min-height: 520px !important;
    max-height: none !important;
  }
  /* 砍 chips overlay + vertical 繁中字 (mobile 沒空間) */
  .hero-variant-b .photo-drop[style*="left: 48%"],
  .hero-variant-b .photo-drop[style*="right: -4%"],
  .hero-variant-b [style*="writing-mode: vertical"] {
    display: none !important;
  }
  /* 左文字 column 改 full width + center */
  .hero-variant-b > div[style*="left: var(--edge)"] {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    padding: 40px 20px !important;
    max-width: 100% !important;
  }
  .hero-variant-b .hero-h1 {
    font-size: 2.2rem !important;
    line-height: 1.1;
  }
  .hero-variant-b .trust-strip {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }
  /* 砍 bottom FIG marker */
  .hero-variant-b [style*="FIG"],
  .hero-variant-b div[style*="bottom: 1.5rem"] {
    display: none !important;
  }
  .hero-variant-b .cta-rect {
    width: 100%;
    font-size: 14px !important;
  }
}
