/* ================================================================
   GUARDIANS — Vertical Scroll Story with parallax
   ================================================================ */

.grd-page {
  position: relative;
  background: #1a1f17;
  color: #f5f3ed;
  overflow: hidden;
}

/* ============== HERO ============== */
.grd-hero {
  position: relative;
  min-height: calc(100vh - 50px);
  margin-top: 50px;                   /* sits flush below the fixed nav */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(96,112,87,0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(201,179,132,0.20) 0%, transparent 55%),
    linear-gradient(180deg, #14180f 0%, #1a1f17 60%, #1a1f17 100%);
  overflow: hidden;
}
@media (max-width: 991px) {
  .grd-hero {
    /* Mobile nav is transparent at top — let the hero's dark bg fill the
       area BEHIND it instead of leaving a white gap above. */
    margin-top: 0;
    padding-top: 90px;            /* push content below mobile nav (~56px) */
    min-height: 100vh;
  }
}
/* Hero video background — sits below the stars layer */
.grd-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

/* Dark overlay above the video for text legibility */
.grd-hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(96,112,87,0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(201,179,132,0.20) 0%, transparent 55%),
    linear-gradient(180deg, rgba(20,24,15,0.55) 0%, rgba(26,31,23,0.78) 100%);
  pointer-events: none;
}
/* When video is present, raise stars + content above overlay */
.grd-hero:has(.grd-hero-video) .grd-hero-stars { z-index: 2; }
.grd-hero:has(.grd-hero-video) .grd-hero-inner { z-index: 3; }

.grd-hero-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 40% 75%, rgba(201,179,132,0.7), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 15% 80%, rgba(201,179,132,0.5), transparent),
    radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.6), transparent);
  background-size: 100% 100%;
  animation: grd-drift 80s linear infinite;
  opacity: 0.7;
}
@keyframes grd-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50px, -30px, 0); }
}

.grd-hero-inner {
  position: relative;
  max-width: 820px;
  text-align: center;
  z-index: 2;
}
.grd-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #c9b384;
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid rgba(201,179,132,0.4);
  border-radius: 2px;
}
.grd-hero-title {
  font-size: 36px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0 0 28px 0;
  text-transform: none;
}
.grd-hero-title em {
  font-style: italic;
  font-weight: 200;
  color: #c9b384;
}
@media (min-width: 992px) {
  .grd-hero-title { font-size: 56px; }
}

.grd-hero-lead {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.82);
  margin: 0 0 18px 0;
}
.grd-hero-lead strong {
  color: #fff;
  font-weight: 500;
}
.grd-hero-cta {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin: 30px 0 0 0;
}
.grd-hero-cta a {
  color: #c9b384;
  border-bottom: 1px solid rgba(201,179,132,0.4);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.grd-hero-cta a:hover { color: #fff; border-color: #fff; }

.grd-hero-scroll {
  display: none !important;            /* hidden — UI looks cleaner without it */
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  animation: grd-bounce 2.4s ease-in-out infinite;
}
.grd-hero-scroll i { font-size: 18px; }
@keyframes grd-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ============== STICKY PROGRESS RAIL ============== */
.grd-rail {
  position: fixed;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.grd-rail.is-visible { opacity: 1; }

.grd-rail-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  transform-origin: right center;
}
.grd-rail-dot:hover {
  border-color: #c9b384;
  background: rgba(0,0,0,0.65);
  color: #fff;
  text-decoration: none;
  transform: translateX(-4px);
}
.grd-rail-dot.is-active {
  background: #c9b384;
  border-color: #c9b384;
  color: #2a3026;
  transform: translateX(-6px) scale(1.05);
}
.grd-rail-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.grd-rail-dot.is-active .grd-rail-name { font-weight: 600; }

@media (max-width: 991px) {
  .grd-rail { display: none; }
}

/* ============== GUARDIAN SCENE ============== */
.grd-scene {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 24px;
  overflow: hidden;
}

/* Per-guardian themed backgrounds — each gradient picks up the character's palette */

/* 01 Boko — peach + sage spots (warm earth) */
.grd-theme-boko   .grd-scene-bg { background: radial-gradient(ellipse at center, #4a3a2e 0%, #2b2520 55%, #14180f 100%); }
.grd-theme-boko   .grd-scene-glow { background: radial-gradient(circle, rgba(214,176,128,0.28) 0%, transparent 70%); }

/* 02 Fufun — icy white + soft blue (chilly Mechanica) */
.grd-theme-fufun  .grd-scene-bg { background: radial-gradient(ellipse at center, #2a3a4a 0%, #1a232f 55%, #0f1418 100%); }
.grd-theme-fufun  .grd-scene-glow { background: radial-gradient(circle, rgba(180,210,235,0.30) 0%, transparent 70%); }

/* 03 Pacha — pastel pink + lavender (cotton candy) */
.grd-theme-pacha  .grd-scene-bg { background: radial-gradient(ellipse at center, #4a2a40 0%, #2a1a2a 55%, #14101a 100%); }
.grd-theme-pacha  .grd-scene-glow { background: radial-gradient(circle, rgba(240,180,210,0.30) 0%, transparent 70%); }

/* 04 Zoey — ocean teal + aqua */
.grd-theme-zoey   .grd-scene-bg { background: radial-gradient(ellipse at center, #1a3a4a 0%, #102330 55%, #0a1418 100%); }
.grd-theme-zoey   .grd-scene-glow { background: radial-gradient(circle, rgba(110,180,200,0.28) 0%, transparent 70%); }

/* 05 Gamma — neon magenta + violet (cosmic gaming) */
.grd-theme-gamma  .grd-scene-bg { background: radial-gradient(ellipse at center, #3a1a3a 0%, #221024 55%, #110614 100%); }
.grd-theme-gamma  .grd-scene-glow { background: radial-gradient(circle, rgba(220,140,200,0.30) 0%, transparent 70%); }

/* 06 Meton — pearl silver + steel blue */
.grd-theme-meton  .grd-scene-bg { background: radial-gradient(ellipse at center, #2a3340 0%, #181f28 55%, #0d1218 100%); }
.grd-theme-meton  .grd-scene-glow { background: radial-gradient(circle, rgba(200,210,225,0.26) 0%, transparent 70%); }

/* 07 BigJag — amber peach + deep canyon */
.grd-theme-bigjag .grd-scene-bg { background: radial-gradient(ellipse at center, #4a2e1a 0%, #2b1a10 55%, #14100a 100%); }
.grd-theme-bigjag .grd-scene-glow { background: radial-gradient(circle, rgba(230,150,100,0.28) 0%, transparent 70%); }

/* 08 Dana — mist jade + soft mint */
.grd-theme-dana   .grd-scene-bg { background: radial-gradient(ellipse at center, #2a4032 0%, #182518 55%, #0d140d 100%); }
.grd-theme-dana   .grd-scene-glow { background: radial-gradient(circle, rgba(170,210,160,0.28) 0%, transparent 70%); }

/* 09 Woody — forest brown + warm sepia */
.grd-theme-woody  .grd-scene-bg { background: radial-gradient(ellipse at center, #3a2818 0%, #221610 55%, #14100a 100%); }
.grd-theme-woody  .grd-scene-glow { background: radial-gradient(circle, rgba(220,180,130,0.26) 0%, transparent 70%); }

/* 10 Sucoo — desert gold + sand */
.grd-theme-sucoo  .grd-scene-bg { background: radial-gradient(ellipse at center, #4a3a1a 0%, #2a210f 55%, #14110a 100%); }
.grd-theme-sucoo  .grd-scene-glow { background: radial-gradient(circle, rgba(240,210,120,0.30) 0%, transparent 70%); }

/* 11 Osa — glowing meadow green + gold */
.grd-theme-osa    .grd-scene-bg { background: radial-gradient(ellipse at center, #1a3a1a 0%, #112310 55%, #081410 100%); }
.grd-theme-osa    .grd-scene-glow { background: radial-gradient(circle, rgba(180,230,120,0.32) 0%, transparent 70%); }

/* 12 Monga — magma red + coral */
.grd-theme-monga  .grd-scene-bg { background: radial-gradient(ellipse at center, #4a1f1a 0%, #2a120f 55%, #14080a 100%); }
.grd-theme-monga  .grd-scene-glow { background: radial-gradient(circle, rgba(240,130,110,0.32) 0%, transparent 70%); }

.grd-scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Soft glowing orb behind character */
.grd-scene-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,179,132,0.18) 0%, transparent 70%);
  filter: blur(40px);
  top: 50%;
  left: 25%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}
.grd-scene.is-flipped .grd-scene-glow { left: 75%; }

/* Inner layout — 2 columns: character + info */
.grd-scene-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.grd-scene.is-flipped .grd-scene-inner {
  direction: rtl;
}
.grd-scene.is-flipped .grd-info,
.grd-scene.is-flipped .grd-char { direction: ltr; }

/* ====== Character (3D parallax tilt) ====== */
.grd-char {
  position: relative;
  text-align: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 1.1s ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.grd-scene.is-inview .grd-char {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.grd-char img {
  display: inline-block;
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.6));
  transform-style: preserve-3d;
  z-index: 2;
  /* JS sets --tx, --ty for mouse-tilt parallax;
     --hover-scale lets :hover add a subtle bounce without overwriting tilt. */
  transform: perspective(1200px)
             rotateX(var(--ty, 0deg))
             rotateY(var(--tx, 0deg))
             scale(var(--hover-scale, 1));
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease;
}
/* Default pose is in normal flow — hover pose stacks on top via absolute */
.grd-char .grd-char-default { position: relative; }
.grd-char .grd-char-hover {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
}
/* Swap when the cursor is over the character — same feel as token-redemption */
.grd-char:hover { --hover-scale: 1.03; }
.grd-char:hover .grd-char-default { opacity: 0; }
.grd-char:hover .grd-char-hover   { opacity: 1; }

/* Soft ground shadow */
.grd-char-shadow {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 60%;
  height: 30px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, transparent 70%);
  filter: blur(8px);
  z-index: 1;
}

/* ====== Info block ====== */
.grd-info {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s ease 0.2s, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.grd-scene.is-inview .grd-info {
  opacity: 1;
  transform: translateY(0);
}

.grd-info-name {
  font-size: 48px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #fff;
  margin: 0 0 16px 0;
  line-height: 1;
}
@media (min-width: 992px) {
  .grd-info-name { font-size: 64px; letter-spacing: 6px; }
}

.grd-info-zone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 22px;
  border: 1px solid rgba(201,179,132,0.4);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #c9b384;
}
.grd-info-zone i { font-size: 12px; }

.grd-info-desc {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  margin: 0;
  max-width: 540px;
}
@media (min-width: 992px) {
  .grd-info-desc { font-size: 16px; }
}

/* ====== Outro ====== */
.grd-outro {
  position: relative;
  padding: 100px 24px 120px 24px;
  text-align: center;
  background:
    radial-gradient(ellipse at center top, rgba(201,179,132,0.18) 0%, transparent 60%),
    linear-gradient(180deg, #1a1f17 0%, #14180f 100%);
}
.grd-outro-title {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
  margin: 0 0 18px 0;
}
@media (min-width: 992px) {
  .grd-outro-title { font-size: 48px; }
}
.grd-outro p {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  margin: 0 0 36px 0;
}
.grd-outro-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  background: #c9b384;
  color: #2a3026;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: gap 0.3s ease, background 0.3s ease;
}
.grd-outro-btn:hover {
  background: #fff;
  color: #2a3026;
  text-decoration: none;
  gap: 16px;
}

/* ============================================================
   Facility Features variant — used by includes/facility-features.php
   Images are full photos (not transparent die-cuts) so we add a frame
   ============================================================ */
.ff-page.grd-page { padding: 0; }
.ff-hero { min-height: 70vh !important; padding: 60px 24px !important; }
.ff-hero .grd-hero-title { font-size: 32px; }
@media (min-width: 992px) {
  .ff-hero .grd-hero-title { font-size: 44px; }
}

/* Feature image — die-cut transparent PNG (no frame, just shadow) */
.ff-feature-img img {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.6));
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Slightly shorter scene height for facility features */
.ff-page .grd-scene { min-height: 90vh; padding: 70px 24px; }

/* Outro not needed — last scene is the end */
.ff-page .grd-outro { display: none; }

/* Terms & Conditions list inside outro (game pages) */
.grd-outro-terms {
  list-style: none;
  padding: 0;
  margin: 36px auto 0 auto;
  max-width: 580px;
  text-align: left;
  border-top: 1px dotted rgba(201,179,132,0.35);
  padding-top: 24px;
}
.grd-outro-terms li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
}
.grd-outro-terms li::before {
  content: "·";
  position: absolute;
  left: 6px;
  top: -2px;
  color: #c9b384;
  font-size: 22px;
  line-height: 1;
}
@media (max-width: 991px) {
  .grd-scene { padding: 70px 24px; min-height: auto; }
  .grd-scene-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  .grd-scene.is-flipped .grd-scene-inner { direction: ltr; }
  .grd-char img { max-height: 50vh; }
  .grd-scene-glow { width: 400px; height: 400px; left: 50% !important; }
  .grd-info-name { font-size: 36px; }
  .grd-info-zone { margin-left: auto; margin-right: auto; }
  .grd-info-desc { margin: 0 auto; }
}
