/* ============================================================
   Mahjong Tiles - HOME page only
   Dark-jade table, champagne gold, game-style UI.
   Loaded only by /index.html so all sub-pages keep their styles.
   ============================================================ */

:root {
  --jade-950: #061a12;
  --jade-900: #08241a;
  --jade-800: #0b3323;
  --jade-700: #0f4a31;
  --gold: #e8c875;
  --gold-soft: #f3dfa8;
  --gold-dim: rgba(232, 200, 117, .35);
  --cream: #f6f2e8;
  --muted: rgba(246, 242, 232, .68);
}

/* ---------- page base ---------- */
.home-page {
  background: var(--jade-950);
  color: var(--cream);
  overflow-x: hidden;
}

/* ---------- header over hero ---------- */
.home-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid rgba(232, 200, 117, .14);
}
.home-header .brand { color: var(--cream); }
.home-header .brand-mark {
  width: 32px;
  height: 32px;
  box-shadow: 0 2px 10px rgba(232, 200, 117, .3);
}
.home-header .site-nav a { color: rgba(246, 242, 232, .78); }
.home-header .site-nav a:hover { color: var(--gold); }
.home-header .share-btn {
  border-color: rgba(232, 200, 117, .32);
  color: var(--cream);
}
.home-header .share-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(232, 200, 117, .1);
}
.home-header .share-menu {
  border-color: rgba(232, 200, 117, .3);
  background: #0b2a1d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.home-header .share-menu a,
.home-header .share-menu button { color: var(--cream); }
.home-header .share-menu a:hover,
.home-header .share-menu button:hover { background: rgba(232, 200, 117, .12); }

@media (max-width: 720px) {
  .home-header .site-nav {
    background: rgba(6, 26, 18, .97);
    border-bottom: 1px solid var(--gold-dim);
    backdrop-filter: blur(14px);
  }
  .home-header .nav-toggle-label {
    border-color: rgba(232, 200, 117, .3);
  }
  .home-header .nav-toggle-label span,
  .home-header .nav-toggle-label span::before,
  .home-header .nav-toggle-label span::after {
    background: var(--cream);
  }
}

/* ---------- HERO (two columns, compact) ---------- */
.home-hero {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('/assets/bg/hero-mahjong-table.webp') center 42% / cover no-repeat;
  transform: scale(1.04);
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 18, 12, .95) 0%, rgba(4, 18, 12, .88) 38%, rgba(4, 18, 12, .6) 70%, rgba(4, 18, 12, .55) 100%),
    linear-gradient(0deg, var(--jade-950) 0%, rgba(6, 26, 18, 0) 22%, rgba(6, 26, 18, 0) 80%, rgba(6, 26, 18, .55) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  grid-template-areas:
    "copy games"
    "after games";
  align-items: center;
  gap: 48px;
  padding-top: 76px;
  padding-bottom: 18px;
}
.hero-copy { grid-area: copy; max-width: 620px; }
.hero-after { grid-area: after; max-width: 620px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  background: rgba(8, 36, 26, .55);
  backdrop-filter: blur(8px);
  color: var(--gold-soft);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.hero-copy h1 {
  margin: 12px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 3.7vw, 3.1rem);
  line-height: .94;
  letter-spacing: -.035em;
  font-weight: 700;
  color: var(--cream);
  text-shadow: 0 6px 40px rgba(0, 0, 0, .45);
}
.hero-copy h1 span {
  color: var(--gold);
  text-shadow: 0 4px 30px rgba(232, 200, 117, .28);
}

.hero-lede {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(.88rem, 1.15vw, .98rem);
  line-height: 1.5;
}

.hero-seo-copy {
  margin-top: 20px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-seo-copy p {
  margin: 0;
  color: rgba(246, 242, 232, .72);
  font-size: .86rem;
  line-height: 1.6;
}
.hero-seo-copy a { color: var(--gold-soft); text-underline-offset: 3px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(232, 200, 117, .16);
  max-width: 520px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold);
}
.stat span {
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- HERO GAMES (four banners inside hero right column) ---------- */
.hero-games { grid-area: games; min-width: 0; }
.hero-games-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(232, 200, 117, .16);
}
.hero-games-hint {
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.game-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.game-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(232, 200, 117, .22);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(15, 74, 49, .5), rgba(6, 26, 18, .85));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  text-decoration: none;
  color: var(--cream);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.game-banner:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 200, 117, .6);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(232, 200, 117, .12);
}
.banner-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--jade-800);
}
.banner-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .4s ease;
}
.game-banner:hover .banner-art img { transform: scale(1.06); }
.banner-tag {
  position: absolute;
  top: 9px; left: 9px;
  z-index: 2;
  padding: 4px 10px;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  background: rgba(6, 26, 18, .8);
  backdrop-filter: blur(10px);
  color: var(--gold);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.banner-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(6, 26, 18, .5), transparent 45%);
}
.banner-body {
  position: relative;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.banner-body h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: .96rem;
  line-height: 1.2;
}
.banner-cta {
  color: var(--gold);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .02em;
}
.banner-cta span { transition: transform .2s ease; }
.game-banner:hover .banner-cta span { transform: translateX(4px); }

/* ---------- FEATURES ---------- */
.features-section {
  padding: 0 0 100px;
  background: var(--jade-950);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 56px;
  border-top: 1px solid rgba(232, 200, 117, .12);
}
.feature { text-align: center; padding: 10px 20px; }
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 54px; height: 54px;
  margin-bottom: 18px;
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  background: rgba(232, 200, 117, .07);
}
.feature-icon svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 1.2rem;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.6;
}

/* ---------- FOOTER ---------- */
.home-footer {
  margin-top: 0;
  padding: 30px 0;
  border-top: 1px solid rgba(232, 200, 117, .12);
  background: var(--jade-900);
}
.home-footer .footer-note {
  margin: 0; padding: 0; border: 0;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}
.home-footer a { color: var(--gold); }

/* ---------- COMPACT DESKTOP (fit four banners + copy in one screen) ---------- */
@media (min-width: 1081px) and (max-height: 900px) {
  .hero-inner { padding-top: 66px; padding-bottom: 12px; gap: 34px; }
  .hero-copy h1 { margin: 8px 0; font-size: clamp(2rem, 3.2vw, 2.7rem); }
  .hero-lede { font-size: .86rem; line-height: 1.45; }
  .hero-stats { display: none; }
  .banner-art { aspect-ratio: 2 / 1; }
  .banner-body { padding: 8px 11px 10px; }
  .banner-body h3 { font-size: .88rem; }
  .game-showcase { gap: 10px; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .hero-inner { gap: 26px; }
  .game-showcase { gap: 10px; }
  .banner-body h3 { font-size: .82rem; }
  .hero-games-hint { display: none; }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "games" "after";
    padding-top: 76px;
    padding-bottom: 28px;
    gap: 18px;
  }
  .hero-copy, .hero-after { max-width: none; }
  .hero-games-head { margin-bottom: 8px; padding-bottom: 7px; }
  .game-showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .banner-art { aspect-ratio: 16 / 9; }
  .banner-body h3 { font-size: .9rem; }
  .feature-grid { gap: 12px; }
}

@media (max-width: 560px) {
  .game-showcase { gap: 8px; }
  .banner-art { aspect-ratio: 2 / 1; }
  .banner-body { padding: 7px 9px 8px; }
  .banner-body h3 { font-size: .74rem; }
  .banner-cta { font-size: .64rem; }
  .hero-games-hint { display: none; }
  .hero-copy h1 { margin: 8px 0; font-size: clamp(2rem, 10vw, 2.9rem); }
  .hero-lede { font-size: .84rem; line-height: 1.45; }
  .hero-seo-copy { margin-top: 14px; }
  .hero-stats { gap: 16px; margin-top: 18px; }
  .feature-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .feature { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .game-banner, .banner-art img, .btn-play, .btn-ghost { transition: none; }
}
