/* ==========================================================
   YU XIN — layout: top brand bar, immersive hero, sections,
   bottom tab bar, footer. Mobile-first.
   ========================================================== */

/* ---------- Top brand bar (static, overlays hero) ---------- */
.brandbar {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  padding: var(--space-3) 0;
}
.brandbar .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: conic-gradient(from 210deg, var(--sand), var(--rose), var(--slate), var(--sage), var(--sand));
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.95rem; color: var(--on-accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em; }
.brand-domain { font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: 0.08em; }
.brandbar .btn { display: none; }

/* ---------- Immersive hero with fluid "video" loop ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden; isolation: isolate;
  padding: 7.5rem 0 var(--space-5);
  background: radial-gradient(120% 90% at 50% 110%, #2c2622 0%, var(--bg) 60%);
}
.hero-fluid { position: absolute; inset: -20%; z-index: -2; filter: blur(70px) saturate(0.9); }
.blob { position: absolute; border-radius: 50%; opacity: 0.55; mix-blend-mode: screen; }
.blob-1 { width: 46vmax; height: 46vmax; left: 8%;  top: 6%;  background: radial-gradient(circle, var(--rose) 0%, transparent 65%);  animation: drift-a 22s var(--ease) infinite alternate; }
.blob-2 { width: 40vmax; height: 40vmax; right: 6%; top: 18%; background: radial-gradient(circle, var(--slate) 0%, transparent 65%); animation: drift-b 26s var(--ease) infinite alternate; }
.blob-3 { width: 36vmax; height: 36vmax; left: 30%; bottom: 0;  background: radial-gradient(circle, var(--sage) 0%, transparent 65%);  animation: drift-c 30s var(--ease) infinite alternate; }
.blob-4 { width: 24vmax; height: 24vmax; right: 28%; bottom: 14%; background: radial-gradient(circle, var(--sand) 0%, transparent 65%); animation: drift-a 18s var(--ease) infinite alternate-reverse; }

.hero::before { /* legibility overlay */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(29,27,25,0.55) 0%, rgba(29,27,25,0.35) 45%, rgba(29,27,25,0.92) 100%);
}
.hero::after { /* film grain / scanline texture */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.18;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 3px);
}
.hero-inner { max-width: 880px; }
.hero h1 { margin-bottom: var(--space-3); }
.hero-lead { font-size: var(--fs-lg); color: var(--text); opacity: 0.88; max-width: 620px; line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4);
  margin-top: var(--space-5); padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta strong { font-size: var(--fs-lg); font-weight: 500; color: var(--text); }
.hero-meta span { font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }

.scroll-cue {
  position: absolute; left: 50%; bottom: calc(var(--tabbar-h) + 28px); transform: translateX(-50%);
  width: 1px; height: 48px; background: linear-gradient(var(--sand), transparent);
  animation: cue 2.4s var(--ease) infinite;
}

/* Sub-page hero (shorter) */
.hero--page { min-height: 72vh; min-height: 72svh; }
.hero--page .hero-inner { max-width: 760px; }
.breadcrumb { font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--space-3); color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--sand); }
.breadcrumb span[aria-hidden] { margin: 0 0.5rem; opacity: 0.6; }

/* Per-game hero tints */
.hero--ember .blob-1 { background: radial-gradient(circle, #c99a86 0%, transparent 65%); }
.hero--ember .blob-2 { background: radial-gradient(circle, #a8877b 0%, transparent 65%); }
.hero--lumen .blob-1 { background: radial-gradient(circle, #8fa7b0 0%, transparent 65%); }
.hero--lumen .blob-3 { background: radial-gradient(circle, #a3b89e 0%, transparent 65%); }

/* ---------- Sections ---------- */
.section { position: relative; padding: var(--space-5) 0; }
.section--soft { background: var(--bg-elev); }
.section-head { max-width: 680px; margin-bottom: var(--space-4); }
.section-head--center { margin-inline: auto; text-align: center; }

.split { display: grid; gap: var(--space-4); align-items: center; }

/* Parallax gradient panel standing in for imagery */
.visual {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; border: 1px solid var(--line);
  background:
    radial-gradient(60% 70% at 25% 30%, rgba(201,162,155,0.75), transparent 70%),
    radial-gradient(55% 60% at 80% 70%, rgba(143,160,179,0.7), transparent 70%),
    radial-gradient(50% 50% at 60% 20%, rgba(216,195,165,0.55), transparent 70%),
    var(--bg-soft);
}
.visual--sage {
  background:
    radial-gradient(60% 70% at 70% 30%, rgba(159,179,161,0.75), transparent 70%),
    radial-gradient(55% 60% at 20% 75%, rgba(184,155,122,0.65), transparent 70%),
    var(--bg-soft);
}
.visual--slate {
  background:
    radial-gradient(60% 70% at 30% 70%, rgba(143,160,179,0.8), transparent 70%),
    radial-gradient(50% 55% at 80% 25%, rgba(159,179,161,0.6), transparent 70%),
    var(--bg-soft);
}
.visual-layer { position: absolute; inset: 0; will-change: transform; }
.visual-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(236,230,223,0.35);
}
.visual-ring.r1 { width: 55%; aspect-ratio: 1; left: 22%; top: 18%; }
.visual-ring.r2 { width: 30%; aspect-ratio: 1; left: 58%; top: 52%; border-color: rgba(216,195,165,0.6); }
.visual-caption {
  position: absolute; left: var(--space-3); bottom: var(--space-3);
  font-family: var(--mono); font-size: var(--fs-xs); color: var(--text);
  background: rgba(29,27,25,0.72); padding: 0.4rem 0.75rem; border-radius: 8px;
}

/* ---------- Bottom tab bar ---------- */
.tabbar {
  position: fixed; z-index: 100;
  left: 50%; bottom: 14px; transform: translateX(-50%);
  width: min(100% - 20px, 560px); height: var(--tabbar-h);
  background: rgba(38, 35, 33, 0.86);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.tabbar ul { list-style: none; margin: 0; padding: 0 6px; height: 100%; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.03em; border-radius: 18px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a:hover { color: var(--text); }
.tabbar a[aria-current="page"], .tabbar a.is-active { color: var(--sand); }
.tabbar a[aria-current="page"]::after, .tabbar a.is-active::after {
  content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--sand);
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: var(--space-5) 0 var(--space-4); background: var(--bg); }
.footer-grid { display: grid; gap: var(--space-4); }
.footer h4 { font-size: var(--fs-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: var(--fs-sm); }
.footer ul a { color: var(--text); }
.footer ul a:hover { color: var(--sand); }
.footer address { font-style: normal; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.7; }
.footer-about { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.7; }
.footer-bottom {
  margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2);
  font-size: var(--fs-xs); color: var(--text-muted);
}

/* ---------- Keyframes ---------- */
@keyframes drift-a { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(12%, 10%) scale(1.15); } }
@keyframes drift-b { 0% { transform: translate(0,0) scale(1.1); } 100% { transform: translate(-14%, 8%) scale(0.95); } }
@keyframes drift-c { 0% { transform: translate(0,0) scale(0.95); } 100% { transform: translate(8%, -14%) scale(1.2); } }
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, -10px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Responsive (mobile-first, scale up) ---------- */
@media (min-width: 768px) {
  .section { padding: var(--space-6) 0; }
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .split--reverse > :first-child { order: 2; }
  .brandbar .btn { display: inline-flex; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; }
  .tabbar { bottom: 22px; }
}

@media (min-width: 1100px) {
  .hero-meta { gap: var(--space-5); }
}
