/* WaifuHunt landing — простой scroll, без sticky.
 * - Hero: 2-колоночный layout, шкаф справа (Three.js), текст слева.
 * - 5 секций ниже: full-screen background-image + reveal через IO.
 *
 * Подключается ПОСЛЕ waifuhunt-gacha-3d.css, чтобы переопределить старые
 * overrides для .wh-hero-25d.
 */

/* ---------- main ---------- */

body.wh-page-index.is-scroll-scene main,
body.wh-page-index main:has(.wh-landing-hero),
main:has(.wh-guild-hero) {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: auto !important;
  text-align: left !important;
  overflow: visible !important;
}

body.wh-page-index.is-scroll-scene { overflow-x: clip; }

/* ---------- Nav opacity при скролле ниже hero ----------
 * waifuhunt-theme.css задаёт .site-header с !important — поэтому здесь
 * тоже !important, иначе наш скролл-стейт не перебивает базовый.
 */

body.wh-page-index .site-header {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

body.wh-page-index.is-scrolled .site-header {
  background:
    linear-gradient(90deg, rgba(255, 79, 163, 0.05), transparent 34%, rgba(255, 214, 107, 0.04)),
    rgba(7, 5, 16, 0.96) !important;
  border-bottom-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42) !important;
}

/* ---------- HERO ---------- */

.wh-landing-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(80px, 12vh, 140px) clamp(28px, 6vw, 96px) clamp(120px, 16vh, 180px);
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 78% 50%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(50% 50% at 22% 70%, rgba(255, 79, 163, 0.12), transparent 70%),
    linear-gradient(180deg, #06070f 0%, #05060d 100%);
}

.wh-landing-hero__copy {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 18px;
  align-content: center;
  max-width: 560px;
}

.wh-landing-hero__mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 214, 107, 0.32);
  background: rgba(255, 214, 107, 0.08);
  color: #ffe7a6;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  width: fit-content;
}

.wh-landing-hero__title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.0;
  letter-spacing: -0.005em;
  color: #fff;
  text-shadow: 0 0 28px rgba(255, 79, 163, 0.18);
}

.wh-landing-hero__sub {
  margin: 0;
  max-width: 420px;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
  color: rgba(232, 226, 244, 0.86);
}

.wh-landing-hero__cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #ff4fa3 0%, #9c66ff 60%, #ff8a7a 100%);
  color: #fff;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(255, 79, 163, 0.34), 0 0 34px rgba(255, 214, 107, 0.14);
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
  width: fit-content;
}

.wh-landing-hero__cta::after {
  content: "\2192";
  font-size: 16px;
  transition: transform 0.2s ease;
}

.wh-landing-hero__cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 22px 52px rgba(255, 79, 163, 0.42), 0 0 40px rgba(255, 214, 107, 0.2);
}

.wh-landing-hero__cta:hover::after { transform: translateX(4px); }

.wh-landing-hero__stage {
  position: relative;
  width: 100%;
  height: min(80vh, 700px);
  border-radius: 24px;
  overflow: visible;
}

/* 3D-stage внутри hero (canvas) */
body.wh-page-index .wh-landing-hero__stage #gacha3dStage {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

body.wh-page-index .wh-landing-hero__stage #gacha3dStage canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Тонкая стрелка скролла в самом низу hero */
.wh-landing-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(28px, 5vh, 60px);
  transform: translateX(-50%);
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
  color: rgba(232, 226, 244, 0.6);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.wh-landing-scroll-hint::after {
  content: "";
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, rgba(255, 214, 107, 0.78) 0%, transparent 100%);
  animation: wh-scroll-pulse 2.2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes wh-scroll-pulse {
  0%, 100% { transform: scaleY(0.45); opacity: 0.35; }
  50%      { transform: scaleY(1);    opacity: 1; }
}

/* ---------- SECTION (1 of 5) ---------- */

.wh-landing-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(80px, 10vh, 120px) clamp(28px, 6vw, 96px);
  isolation: isolate;
  background-color: #06070f;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.wh-landing-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 6, 18, 0.78), rgba(7, 6, 18, 0.36) 60%, rgba(7, 6, 18, 0.62)),
    rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.wh-landing-section__inner {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.wh-landing-section.is-revealed .wh-landing-section__inner {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion: показываем сразу */
@media (prefers-reduced-motion: reduce) {
  .wh-landing-section__inner {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.wh-landing-section__copy {
  display: grid;
  gap: 18px;
  align-content: center;
  max-width: 520px;
}

.wh-landing-section__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--wh-section-tint-border, rgba(255, 214, 107, 0.32));
  background: color-mix(in srgb, var(--wh-section-tint, #ff4fa3) 14%, transparent);
  color: var(--wh-section-tint-ink, #ffd66b);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  width: fit-content;
}

.wh-landing-section__tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wh-section-tint-ink, #ffd66b);
  box-shadow: 0 0 12px var(--wh-section-tint-ink, #ffd66b);
}

.wh-landing-section__title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.0;
  color: #fff;
  letter-spacing: -0.005em;
  text-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
}

.wh-landing-section__body {
  margin: 0;
  max-width: 460px;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
  color: rgba(232, 226, 244, 0.86);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.4);
}

.wh-landing-section__cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--wh-section-tint, #ff4fa3) 56%, rgba(255, 255, 255, 0.14));
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--wh-section-tint, #ff4fa3) 88%, #fff 12%) 0%,
    color-mix(in srgb, var(--wh-section-tint, #ff4fa3) 56%, #1a0d2a 44%) 100%);
  color: #fff;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--wh-section-tint, #ff4fa3) 28%, transparent);
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
  width: fit-content;
}

.wh-landing-section__cta::after {
  content: "\2192";
  font-size: 16px;
  transition: transform 0.2s ease;
}

.wh-landing-section__cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.wh-landing-section__cta:hover::after { transform: translateX(4px); }

/* ---------- Showcase (right column) — gacha-style cards ---------- */

.wh-landing-section__showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 320px;
}

.wh-landing-showcase-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 20px);
}

.wh-landing-card {
  position: relative;
  width: clamp(180px, 18vw, 260px);
  aspect-ratio: 0.72;
  border-radius: 22px;
  overflow: hidden;
  background: #0e0719;
  border: 1px solid color-mix(in srgb, var(--wh-section-tint, #ff4fa3) 50%, rgba(255, 255, 255, 0.1));
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.55),
    0 0 40px color-mix(in srgb, var(--wh-section-tint, #ff4fa3) 22%, transparent);
  transform: rotate(var(--wh-card-tilt, 0deg)) translateY(var(--wh-card-lift, 0));
  transition: transform 0.4s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.wh-landing-card:hover {
  transform: rotate(0deg) translateY(-6px);
  filter: brightness(1.05);
}

.wh-landing-card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0e0719 center/cover no-repeat;
  display: block;
}

.wh-landing-card__media-placeholder {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.42), rgba(255, 79, 163, 0.32));
}

.wh-landing-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(7, 6, 18, 0.94) 100%);
  pointer-events: none;
}

.wh-landing-card__rarity {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(8, 7, 18, 0.7);
  border: 1px solid color-mix(in srgb, var(--wh-card-rarity, #ffd66b) 60%, rgba(255,255,255,0.12));
  color: var(--wh-card-rarity, #ffd66b);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.wh-landing-card__lock-chip {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(8, 7, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.wh-landing-card__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 16px 16px;
  display: grid;
  gap: 4px;
  color: #fff;
}

.wh-landing-card__name {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.wh-landing-card__sub {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: 11px;
  color: rgba(232, 226, 244, 0.78);
  letter-spacing: 0.04em;
}

/* «Веер» из 3 карт для коллекции */
.wh-landing-showcase-row.is-fan .wh-landing-card:nth-child(1) {
  --wh-card-tilt: -8deg;
  --wh-card-lift: 12px;
  z-index: 1;
}
.wh-landing-showcase-row.is-fan .wh-landing-card:nth-child(2) {
  z-index: 3;
}
.wh-landing-showcase-row.is-fan .wh-landing-card:nth-child(3) {
  --wh-card-tilt: 8deg;
  --wh-card-lift: 12px;
  z-index: 2;
}

.wh-landing-showcase-row.is-fan .wh-landing-card {
  width: clamp(150px, 15vw, 200px);
  margin-inline: -24px;
}

/* Rarity tints (используем data-attr на карточке) */
.wh-landing-card[data-rarity="legendary"] { --wh-card-rarity: #ffd66b; }
.wh-landing-card[data-rarity="epic"]      { --wh-card-rarity: #d6b8ff; }
.wh-landing-card[data-rarity="rare"]      { --wh-card-rarity: #76e8d8; }
.wh-landing-card[data-rarity="common"]    { --wh-card-rarity: #c7d2fe; }
.wh-landing-card[data-rarity="mythic"]    { --wh-card-rarity: #ffaad1; }

/* ---------- Per-section tints + bg ---------- */

.wh-landing-section--hunt {
  background-image: url("assets/showcase/zone-hunt-bg.png");
  --wh-section-tint: #7c3aed;
  --wh-section-tint-ink: #c4a4ff;
  --wh-section-tint-border: rgba(124, 58, 237, 0.45);
}

.wh-landing-section--collection {
  background-image: url("assets/showcase/zone-collection-bg.png");
  --wh-section-tint: #db2777;
  --wh-section-tint-ink: #ffaad1;
  --wh-section-tint-border: rgba(219, 39, 119, 0.45);
}

.wh-landing-section--hubs {
  background-image: url("assets/showcase/zone-hubs-bg.png");
  --wh-section-tint: #d97706;
  --wh-section-tint-ink: #ffd58a;
  --wh-section-tint-border: rgba(217, 119, 6, 0.45);
}

.wh-landing-section--tops {
  background-image: url("assets/showcase/zone-tops-bg.png");
  --wh-section-tint: #0d9488;
  --wh-section-tint-ink: #76e8d8;
  --wh-section-tint-border: rgba(13, 148, 136, 0.45);
}

.wh-landing-section--market {
  background-image: url("assets/showcase/zone-market-bg.png");
  --wh-section-tint: #1d4ed8;
  --wh-section-tint-ink: #a3bdff;
  --wh-section-tint-border: rgba(29, 78, 216, 0.45);
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .wh-landing-hero {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.05fr) minmax(0, 1.1fr);
    gap: 18px;
    padding: clamp(80px, 12vh, 120px) 20px clamp(100px, 14vh, 140px);
    min-height: 100vh;
  }

  .wh-landing-hero__copy {
    align-content: end;
    max-width: 100%;
  }

  .wh-landing-hero__stage {
    height: 100%;
    min-height: 280px;
  }

  .wh-landing-section {
    padding: clamp(72px, 9vh, 100px) 20px;
  }

  .wh-landing-section__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }

  .wh-landing-section__showcase {
    justify-content: flex-start;
  }

  .wh-landing-showcase-row.is-fan .wh-landing-card {
    width: clamp(120px, 28vw, 160px);
    margin-inline: -18px;
  }

  .wh-landing-card { width: clamp(180px, 50vw, 220px); }

  .wh-landing-hero__title { font-size: clamp(30px, 9vw, 44px); }
  .wh-landing-section__title { font-size: clamp(28px, 8vw, 40px); }
}

/* =========================================================
   TAVERN NAVBAR — wooden style for guild hall mode
   ========================================================= */

body:has(.wh-guild-hero) .site-header {
  background:
    linear-gradient(180deg, rgba(18, 10, 6, 0.95) 0%, rgba(30, 16, 8, 0.90) 100%) !important;
  border-bottom: 2px solid rgba(180, 130, 40, 0.4) !important;
  box-shadow:
    0 2px 20px rgba(0, 0, 0, 0.6),
    inset 0 -1px 0 rgba(180, 130, 40, 0.2) !important;
}

body:has(.wh-guild-hero) .site-header .logo {
  font-family: "Cinzel", serif;
  color: rgba(230, 195, 120, 0.95);
  text-shadow: 0 0 14px rgba(200, 160, 60, 0.5);
  letter-spacing: 0.04em;
}

body:has(.wh-guild-hero) .site-header .desktop-nav .nav-link {
  font-family: "Cinzel", serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(200, 170, 100, 0.8);
  text-shadow: 0 0 8px rgba(180, 130, 40, 0.3);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

body:has(.wh-guild-hero) .site-header .desktop-nav .nav-link:hover {
  color: rgba(220, 190, 120, 1);
  text-shadow: 0 0 12px rgba(200, 160, 60, 0.6);
}

/* Account menu mount — login button/avatar slot */
body:has(.wh-guild-hero) #accountMenuMount button,
body:has(.wh-guild-hero) #accountMenuMount .auth-trigger,
body:has(.wh-guild-hero) #accountMenuMount > .help-btn {
  background: linear-gradient(135deg, rgba(100, 60, 10, 0.8), rgba(60, 35, 5, 0.8)) !important;
  border: 1px solid rgba(180, 130, 40, 0.5) !important;
  color: rgba(220, 185, 100, 0.9) !important;
  font-family: "Cinzel", serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 100, 0.15),
    0 0 10px rgba(150, 100, 20, 0.2) !important;
}

/* Mobile burger button — match tavern tone */
body:has(.wh-guild-hero) .site-header .mobile-nav-btn {
  color: rgba(220, 185, 100, 0.85);
  border-color: rgba(180, 130, 40, 0.35);
}

/* Account dropdown panel — parchment scroll */
body:has(.wh-guild-hero) .account-menu-panel,
body:has(.wh-guild-hero) .dropdown-menu {
  background: linear-gradient(180deg, #1a0e06 0%, #120a04 100%) !important;
  border: 1px solid rgba(180, 130, 40, 0.3) !important;
  border-top: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7) !important;
  border-radius: 0 0 6px 6px !important;
}

body:has(.wh-guild-hero) .account-menu-panel a,
body:has(.wh-guild-hero) .account-menu-panel button,
body:has(.wh-guild-hero) .dropdown-menu a {
  color: rgba(190, 155, 85, 0.8) !important;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 13px;
  border-bottom: 1px solid rgba(100, 70, 20, 0.2);
}

body:has(.wh-guild-hero) .account-menu-panel a:hover,
body:has(.wh-guild-hero) .account-menu-panel button:hover,
body:has(.wh-guild-hero) .dropdown-menu a:hover {
  background: rgba(180, 130, 40, 0.08) !important;
  color: rgba(220, 185, 100, 1) !important;
}

/* =========================================================
   GUILD HALL HERO
   ========================================================= */

/* Fixed full-viewport so no main/grid can constrain it */
.wh-guild-hero {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #060409;
  z-index: 1;
}

/* When guild hall is mounted, page footer is irrelevant — hide page scroll */
body:has(.wh-guild-hero) {
  overflow: hidden;
}

/* Footer/other below-fold content hides on landing for guild hall mode */
body:has(.wh-guild-hero) > footer,
body:has(.wh-guild-hero) main > *:not(.wh-guild-hero) {
  display: none !important;
}

#guildHallCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Signature + scroll arrow */
.wh-guild-signature {
  position: absolute;
  bottom: clamp(28px, 5vh, 52px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  color: rgba(210, 200, 230, 0.6);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wh-guild-signature::after {
  content: "";
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, rgba(255, 214, 107, 0.72) 0%, transparent 100%);
  animation: wh-scroll-pulse 2.2s ease-in-out infinite;
  transform-origin: top;
}

/* =========================================================
   ZONE BADGES — CSS2DRenderer floating labels
   ========================================================= */

.zone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  background: rgba(6, 3, 18, 0.88);
  border: 1px solid rgba(150, 110, 255, 0.45);
  color: rgba(215, 195, 255, 0.92);
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 18px rgba(120, 60, 240, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  pointer-events: none;
  user-select: none;
  animation: zone-badge-float 3.2s ease-in-out infinite;
  will-change: opacity, transform;
}

.zone-badge__icon {
  font-size: 12px;
  line-height: 1;
  filter: drop-shadow(0 0 5px rgba(180, 130, 255, 0.9));
}

.zone-badge__label {
  font-weight: 600;
}

@keyframes zone-badge-float {
  0%, 100% { opacity: 0.72; transform: translateY(0px);  }
  50%       { opacity: 1.00; transform: translateY(-4px); }
}

/* Mobile nav buttons — hidden on desktop */
.wh-guild-mobile-nav {
  display: none;
}

@media (max-width: 767px) {
  .wh-guild-mobile-nav {
    display: flex;
    position: absolute;
    bottom: clamp(80px, 14vh, 120px);
    left: 0;
    right: 0;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px;
    z-index: 10;
  }

  .wh-guild-mobile-nav a {
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(12, 8, 22, 0.88);
    color: #fff;
    text-decoration: none;
    font-family: "Manrope", "Inter", system-ui, sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    backdrop-filter: blur(12px);
    transition: background 0.18s ease;
  }

  .wh-guild-mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.14);
  }
}

/* =========================================================
   GUILD HALL NAV OVERLAY
   ========================================================= */

.gh-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(40px, 8vh, 80px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gh-overlay.gh-visible {
  pointer-events: auto;
  opacity: 1;
}

.gh-overlay__panel {
  width: min(500px, 92vw);
  padding: 28px 28px 26px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(9, 6, 18, 0.93);
  backdrop-filter: blur(20px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  display: grid;
  gap: 14px;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.gh-overlay.gh-visible .gh-overlay__panel {
  transform: translateY(0);
}

.gh-overlay__back {
  background: none;
  border: none;
  color: rgba(200, 188, 220, 0.68);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.18s ease;
  width: fit-content;
}

.gh-overlay__back:hover { color: #fff; }

.gh-overlay__title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.gh-overlay__desc {
  margin: 0;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(218, 208, 238, 0.82);
  font-weight: 300;
}

.gh-overlay__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #ff4fa3 0%, #9c66ff 58%, #ff8a7a 100%);
  color: #fff;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  width: fit-content;
  box-shadow: 0 16px 40px rgba(255, 79, 163, 0.32);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.gh-overlay__cta::after {
  content: "\2192";
  font-size: 16px;
  transition: transform 0.2s ease;
}

.gh-overlay__cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.gh-overlay__cta:hover::after { transform: translateX(3px); }

/* =========================================================
   FOOTER DRAWER — slide-up from bottom edge
   ========================================================= */

#footer-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transform: translateY(calc(100% - 32px));
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

#footer-drawer.open {
  transform: translateY(0);
}

#footer-handle {
  height: 32px;
  background: rgba(7, 3, 16, 0.94);
  border-top: 1px solid rgba(124, 58, 237, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 20px;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(160, 140, 200, 0.5);
  backdrop-filter: blur(12px);
  user-select: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

#footer-handle:hover {
  color: rgba(190, 165, 235, 0.8);
  border-top-color: rgba(124, 58, 237, 0.5);
  background: rgba(10, 5, 24, 0.97);
}

#footer-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 14px;
  line-height: 1;
  opacity: 0.65;
}

/* Footer content area — scrollable, no extra top margin */
#footer-drawer .site-footer {
  margin-top: 0 !important;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Show drawer over the guild-hall canvas */
body:has(.wh-guild-hero) #footer-drawer {
  display: block !important;
}
