/* ─────────── Root Variables & Import ─────────── */
:root {
  --section-gap: 4rem;
  --nav-bg: rgba(58, 88, 50, 0.85);
  --primary: #f1c40f;
  --primary-dark: #d4ac0d;
  --text: #333;
  --bg: #f9f9f9;
}

/* ─────────── Base Reset & Typography ─────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
h1, h2, h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}
.hidden { display: none !important; }

/* ─────────── Links & Buttons ─────────── */
a { text-decoration: none; }
.hero__content a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}
.btn--primary:hover {
  background: var(--primary-dark);
}
.btn--secondary:hover {
  background: #1f5c1f;
}

/* ─────────── NAVIGATION ─────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  padding: 0.75rem 1rem;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo img {
  height: 100px;
}
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger, .hamburger::before, .hamburger::after {
  display: block;
  width: 24px; height: 3px;
  background: #fff;
  border-radius: 2px;
  position: relative;
}
.hamburger::before, .hamburger::after {
  content: '';
  position: absolute; left: 0;
}
.hamburger::before { top: -8px; }
.hamburger::after  { top: 8px; }
.nav__links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav__links a {
  color: #fff;
  font-weight: 500;
}
@media (max-width: 1024px) {
  .nav__toggle { display: block; }
}
@media (max-width: 768px) {
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(58, 88, 50, 0.9);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    display: none;
  }
  .nav__links.open { display: flex; }
}

/* ─────────── HERO CAROUSEL ─────────── */
.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--section-gap);
}
.hero__slides {
  display: flex;
  transition: transform 0.5s ease;
}
.hero__slide {
  flex: 0 0 100%;
  height: 40vh;
  min-height: 200px;
  position: relative;
  background: none;
}
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 1rem;
  color: #fff;
}
.hero__title {
  font-size: 2.75rem;
  margin-bottom: 0.25rem;
}
.hero__tagline {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.hero__prev,
.hero__next {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  color: #fff;
  border: none;
  font-size: 2rem;
  width: 40px; height: 40px;
  cursor: pointer;
  z-index: 3;
}
.hero__prev { left: 1rem; }
.hero__next { right: 1rem; }

/* ─────────── GLOBAL SECTION RHYTHM ─────────── */
section {
  padding: var(--section-gap) 1rem;
}

/* ─────────── FEATURES ─────────── */
.features { text-align: center; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 1.5rem;
}
.feature-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.feature-card img {
  width: 48px; height: 48px; margin-bottom: 1rem;
}
.feature-card h3 {
  margin-bottom: 0.5rem;
}

/* ─────────── ELEMENTAL BIOMES ─────────── */
.biomes { text-align: center; }
.biomes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 1rem;
}
.biome-card {
  position: relative;
  cursor: pointer;
}
.biome-card img {
  width: 100%;
}
.biome-card span {
  display: block; margin-top: 0.5rem; font-weight: 500;
}
.biome-popup {
  display: none;
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 200px; z-index: 100;
}
.biome-card:hover .biome-popup {
  display: block;
}

/* ─────────── PACK OPENER WRAPPER ─────────── */
#pack-opener-wrapper {
  margin: 2rem 0;
}
.pack-opener {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#demo > h2 { /* tighten heading */
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  color: var(--text);
}
#demo-launch {
  display: inline-block;
  margin-bottom: 1rem;
}
.controls {
  text-align: center;
  margin-bottom: 1rem;
}
.controls label,
.controls button {
  font-size: 1rem;
  margin: 0 1rem;
  color: #333;
}
.controls button {
  background: #2a7f2a;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
}

/* ─────────── Stage & Containers ─────────── */
:root {
  --card-stage-gap: 80px;
  --stack-offset-x: 0px;   /* remove fan-out */
  --stack-offset-y: 0px;
}
.card-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--card-stage-gap);
  position: relative;
  min-height: 520px;
  padding-bottom: 140px;
}
.card-fan,
.card-stack {
  position: relative;
  width: 280px;
  min-height: 420px;
  perspective: 1200px;
}
.card-stack {
  pointer-events: none;
}

/* ─────────── Cards ─────────── */
.card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 420px;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.card-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}
.card.flipped .card-inner {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}
.face-front { background: #222; }
.face-front img,
.face-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.face-back { transform: rotateY(180deg); }
.card.rare-placeholder .face-front img {
  filter: grayscale(80%) opacity(0.5);
}
.card.in-stack {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* stacked directly */
  cursor: default;
}

/* ─────────── Mobile ─────────── */
@media (max-width: 768px) {
  .card-stage {
    overflow-x: auto;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
  }
  .card-stage::-webkit-scrollbar { display: none; }
}
@media (max-width: 600px) {
  .card {
    width: 200px;
    height: 300px;
  }
  .info-overlay {
    width: 200px;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ─────────── Info Overlay ─────────── */
.info-overlay {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  text-align: left;
  z-index: 1000;
}
.info-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.info-overlay h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #222;
  white-space: nowrap;             /* title never wraps */
}
.info-overlay #cardMeta {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #444;
}
.info-overlay #cardMeta img {
  width: 24px;
  vertical-align: middle;
  margin-left: 0.5rem;
}
.info-overlay p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #555;
  white-space: normal;             /* lore wraps if needed */
}

/* ─────────── META PREVIEW ─────────── */
.meta { text-align: center; }
.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.meta-card {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 220px;
}
.meta-card img { width: 100%; }
.meta-card h3 { margin: 0.5rem 0; }

/* ─────────── TEAM ─────────── */
.team { text-align: center; }
.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.team-member {
  width: 180px;
  text-align: center;
}
.team-member img {
  width: 100%;
  border-radius: 50%;
  margin-bottom: 1rem;
}

/* ─────────── WAITLIST ─────────── */
.waitlist {
  background: #fff;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-align: center;
}
.waitlist-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}
.waitlist-form input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 250px;
}
.waitlist-form button {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}
.waitlist-form button:hover {
  background: var(--primary-dark);
}

/* ─────────── TRUSTED LOGOS ─────────── */
.trust { text-align: center; }
.trust-logos {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.trust-logos img {
  height: 40px;
  opacity: 0.7;
}

/* ─────────── BACK TO TOP & FOOTER ─────────── */
.back-to-top {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}
.footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: #666;
}
.footer__links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}
