/* ===== INDEX: MERGED LAYER COMPOSITE HERO ===== */

@import url("https://fonts.cdnfonts.com/css/minecraft-4");

.lunar-banner {
  position: relative;
  width: 100%;
  max-width: none;
  overflow: hidden;
  isolation: isolate;
  background: #080d2d;
  line-height: 0;
}

/* Night composite hero — waterfall from hero-night-meta.json */
body.theme-nocturne .lunar-fall-layer {
  left: 56%;
  top: calc(45.5% - 1mm);
  width: 7.2%;
}

body.theme-nocturne .lunar-fg-layer {
  display: block;
  top: 70.5613%;
  z-index: 9;
}

/* Full merged scene — native resolution, no CSS layer gaps */
.lunar-bg-layer,
.lunar-fg-layer {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  filter: none;
  transform: none;
  opacity: 1;
  image-rendering: auto;
  pointer-events: none;
  user-select: none;
  vertical-align: top;
}

.lunar-bg-layer {
  position: relative;
  z-index: 1;
}

/* Foreground cliff/cave — overlaps waterfall edges (matches merge_hero_layers.py) */
.lunar-fg-layer {
  position: absolute;
  left: 0;
  top: 77.02%;
  z-index: 9;
}

/*
 * Waterfall — single animated PNG, natural aspect ratio, full height visible.
 * Asset: 147×562px. Aligned to surface pool → ravine (composite analysis).
 */
.lunar-fall-layer {
  position: absolute;
  left: 56%;
  top: 56.8%;
  transform: translateX(-50%);
  width: 7.2%;
  height: auto;
  max-height: none;
  z-index: 8;
  pointer-events: none;
  image-rendering: auto;
}

.lunar-copy-stack {
  position: absolute;
  top: clamp(110px, calc(var(--nav-h) + var(--announce-h) + 3vh), 180px);
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, calc(100% - 40px));
  text-align: center;
  z-index: 12;
  pointer-events: none;
  line-height: normal;
}

.lunar-copy-stack a {
  pointer-events: auto;
}

.lunar-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.75rem;
  text-shadow: 0 1px 3px rgba(43, 25, 58, 0.4);
}

.lunar-title {
  font-family: "Minecraft", var(--font-display), sans-serif;
  font-size: clamp(1.65rem, 4.2vw, 3.25rem);
  line-height: 1.45;
  letter-spacing: 0.06em;
  font-weight: 400;
  color: #fff;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  text-shadow:
    0.08em 0 #5a5a5a,
    0.08em 0.08em #5a5a5a,
    0 0.08em #5a5a5a,
    0.16em 0.16em 0 #3a3a3a;
}

.lunar-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.lunar-mote {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #f4a8c8;
  opacity: 0.28;
  border-radius: 1px;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0%   { transform: translateY(-10px); opacity: 0; }
  10%  { opacity: 0.28; }
  100% { transform: translateY(50vh); opacity: 0; }
}

@media (max-width: 768px) {
  .lunar-fall-layer {
    left: 55.5%;
    top: 56.2%;
    width: 9%;
  }

  body.theme-nocturne .lunar-fall-layer {
    top: calc(43.8% - 1mm);
    left: 55.5%;
    width: 9%;
  }

  .lunar-title {
    font-size: clamp(1.25rem, 6.5vw, 1.85rem);
    letter-spacing: 0.04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lunar-mote,
  .lunar-dust { display: none; }
  .rift-title-fx {
    animation: none !important;
    -webkit-text-fill-color: inherit;
    background: none;
    color: inherit;
  }
}

/* ===== BAMBOO CANYON HERO ===== */
.lunar-banner--canyon {
  --canyon-cream: #f5f0de;
  --canyon-green: #6aad4a;
  --canyon-deep: #0d1511;
  display: block;
  min-height: clamp(44rem, 85vh, 58rem);
  height: 85vh;
  background-color: var(--canyon-deep);
  background-image: none;
  line-height: normal;
  isolation: isolate;
  overflow: hidden;
}

.lunar-canyon-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  border: 0;
  filter: none;
  transform: none;
  opacity: 1;
  image-rendering: auto;
}

.lunar-canyon-readability {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 34% 28% at 50% 42%,
      rgba(8, 14, 10, 0.18) 0%,
      rgba(8, 14, 10, 0.06) 45%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 84%,
      rgba(13, 21, 17, 0.35) 94%,
      #0d1511 100%
    );
}

.lunar-banner--canyon::before,
.lunar-banner--canyon::after {
  content: none;
  display: none;
}

.lunar-canyon-dust {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.lunar-dust {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 230, 160, 0.65);
  box-shadow: 0 0 5px rgba(255, 210, 120, 0.35);
  opacity: 0;
  animation: canyonDust ease-in-out infinite;
}

@keyframes canyonDust {
  0%   { transform: translateY(8px); opacity: 0; }
  20%  { opacity: 0.45; }
  80%  { opacity: 0.28; }
  100% { transform: translateY(-28px); opacity: 0; }
}

.lunar-banner--canyon .lunar-copy-stack {
  position: absolute;
  left: 50%;
  top: 46%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(780px, calc(100% - 2.5rem));
  max-width: 780px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.lunar-banner--canyon .lunar-eyebrow {
  font-size: clamp(0.625rem, 1.05vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--canyon-green);
  margin: 0 0 0.85rem;
  text-shadow:
    0 1px 0 #1a2a14,
    0 2px 6px rgba(8, 14, 10, 0.7);
}

.lunar-banner--canyon .lunar-title {
  font-family: "Minecraft", var(--font-display), sans-serif;
  font-size: clamp(2.5rem, 4.6vw, 4.5rem);
  line-height: 1.14;
  letter-spacing: 0.035em;
  font-weight: 400;
  color: var(--canyon-cream);
  text-transform: uppercase;
  margin: 0 0 0.95rem;
  max-width: none;
  -webkit-font-smoothing: antialiased;
  text-shadow:
    3px 0 0 #24301c,
    0 3px 0 #24301c,
    3px 3px 0 #1a2414,
    5px 5px 0 #101812;
}

.lunar-lead {
  margin: 0 0 1.55rem;
  max-width: 38.75rem;
  font-size: clamp(0.9375rem, 1.25vw, 1.125rem);
  line-height: 1.55;
  color: rgba(245, 240, 222, 0.94);
  text-shadow: 0 1px 6px rgba(8, 14, 10, 0.8);
}

.lunar-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  pointer-events: auto;
}

.lunar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.85rem 1.7rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.lunar-cta--primary {
  color: #f5f0de;
  background: linear-gradient(180deg, #7bc44a 0%, #4f8a2e 48%, #3d6e24 100%);
  border: 2px solid #2d5218;
  border-top-color: #9ad46a;
  border-bottom-width: 4px;
  border-bottom-color: #1e3a10;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.lunar-cta--secondary {
  color: #f5f0de;
  background: linear-gradient(180deg, rgba(18, 28, 22, 0.78) 0%, rgba(10, 16, 13, 0.88) 100%);
  border: 2px solid rgba(245, 240, 222, 0.3);
  border-bottom-width: 3px;
  border-bottom-color: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lunar-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.lunar-cta:active {
  transform: translateY(1px);
  filter: brightness(0.96);
}

/* Section & card title shimmer (rest of page) */
.rift-title-fx {
  position: relative;
}

h2.rift-title-fx,
h3.rift-title-fx,
.party-title.rift-title-fx {
  background: linear-gradient(
    105deg,
    var(--night-text, #f3f4ef) 0%,
    #c8e6a0 30%,
    #f0d878 50%,
    #c8e6a0 70%,
    var(--night-text, #f3f4ef) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleShimmer 7s linear infinite;
}

h2.rift-title-fx::after {
  animation: titleUnderlinePulse 4s ease-in-out infinite alternate;
}

@keyframes titleShimmer {
  to { background-position: 200% center; }
}

@keyframes titleUnderlinePulse {
  from { opacity: 0.55; box-shadow: 0 0 6px rgba(200, 230, 160, 0.2); }
  to { opacity: 1; box-shadow: 0 0 14px rgba(240, 216, 120, 0.35); }
}

@media (max-width: 900px) {
  .lunar-banner--canyon {
    min-height: clamp(36rem, 80vh, 48rem);
    height: 80vh;
  }

  .lunar-banner--canyon .lunar-title {
    font-size: clamp(2.15rem, 6.2vw, 3.35rem);
  }
}

@media (max-width: 640px) {
  .lunar-banner--canyon {
    min-height: clamp(30rem, 74vh, 40rem);
    height: 74vh;
  }

  .lunar-canyon-image {
    object-position: center 45%;
  }

  .lunar-banner--canyon .lunar-copy-stack {
    top: 44%;
    width: min(100%, calc(100% - 1.5rem));
  }

  .lunar-banner--canyon .lunar-title {
    font-size: clamp(2.2rem, 8.5vw, 2.85rem);
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
  }

  .lunar-lead {
    font-size: 0.9375rem;
    margin-bottom: 1.2rem;
    max-width: 22rem;
  }

  .lunar-cta-row {
    flex-direction: column;
    width: 100%;
    max-width: 18.5rem;
  }

  .lunar-cta {
    width: 100%;
    min-height: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lunar-dust { animation: none; opacity: 0; }
}

/* Content sections below hero */
.bedrock-intro {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .bedrock-intro { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
}

.bedrock-intro-img {
  width: 100%;
  border: 2px solid var(--mc-border);
  display: block;
  border-radius: 0;
}

.bedrock-intro-panel {
  padding: 2rem;
}

@media (min-width: 768px) {
  .bedrock-intro-panel { padding: 2.5rem; }
}

.use-block-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .use-block-grid { grid-template-columns: repeat(3, 1fr); }
}

.use-block {
  background: #1c1e1b;
  border: 2px solid #333830;
  padding: 1.25rem;
  min-height: 100px;
}

.use-block.span-2 { grid-column: span 2; }

.final-cta {
  background: linear-gradient(180deg, #1a1c19 0%, #121411 100%);
  border-top: 2px solid var(--mc-border);
  text-align: center;
  padding: 5rem 1rem;
}

.final-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-transform: uppercase;
  margin: 0 0 1rem;
}
