/* Jungle Blast teaser page - shared styles (the same file in every variation).
   Page-specific styles live in page.css. */

:root {
  --ink: #3a1a06;
  --gold: #ffd23f;
  --cream: #fff6dc;
  --leaf: #0f3d1d;
  --display: "Luckiest Guy", "Arial Black", Impact, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--leaf);
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
}
img { display: block; }
p, h1 { margin: 0; }

/* ---------- background scenes ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--leaf) center / cover no-repeat;
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--fade, 1600ms) ease;
}
.slide.on { opacity: 1; }
.slide .fill,
.slide .art {
  position: absolute;
  background-repeat: no-repeat;
  background-position: center;
}
/* Soft, blurred copy of the scene that fills wide screens. */
.slide .fill {
  inset: -48px;
  background-size: cover;
  filter: blur(26px) saturate(1.1) brightness(0.8);
}
/* The painting itself. Phones (portrait) show it edge to edge. */
.slide .art {
  inset: 0;
  background-size: cover;
}
.slide.zoom .art,
.slide.zoom .fill {
  animation: jbt-zoom var(--life, 8000ms) ease-out both;
}
@keyframes jbt-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}

/* Wider screens: the portrait painting keeps its sharpness in a wide centre
   band, and its sides melt into the blurred copy. */
@media (min-aspect-ratio: 3/5) {
  .slide .art {
    --w: max(66.7vh, 64vw);
    background-size: var(--w) auto;
    -webkit-mask-image: linear-gradient(90deg,
      transparent calc(50% - var(--w) / 2),
      #000 calc(50% - var(--w) * 0.31),
      #000 calc(50% + var(--w) * 0.31),
      transparent calc(50% + var(--w) / 2));
    mask-image: linear-gradient(90deg,
      transparent calc(50% - var(--w) / 2),
      #000 calc(50% - var(--w) * 0.31),
      #000 calc(50% + var(--w) * 0.31),
      transparent calc(50% + var(--w) / 2));
  }
}

/* Gentle shade behind the words and the footer so they read on every scene. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 56% at 50% 47%, rgba(8, 26, 10, 0.42) 0%, rgba(8, 26, 10, 0.2) 55%, rgba(8, 26, 10, 0) 82%),
    linear-gradient(to top, rgba(0, 0, 0, 0.62) 0, rgba(0, 0, 0, 0) 150px);
}

/* ---------- the centre stack ---------- */

.stage {
  position: relative;
  z-index: 3;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.6vh, 16px);
  padding: max(20px, env(safe-area-inset-top)) 16px 12px;
  text-align: center;
}

.logo img {
  width: min(88vw, 600px, 62vh);
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
}

/* Game-style lettering: light fill, thick dark-brown outline, drop shadow. */
.kicker,
.tagline,
.plank {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.04;
  --o: var(--ink);
  text-shadow:
    0 0.07em 0 var(--o), 0 -0.07em 0 var(--o), 0.07em 0 0 var(--o), -0.07em 0 0 var(--o),
    0.05em 0.05em 0 var(--o), -0.05em 0.05em 0 var(--o), 0.05em -0.05em 0 var(--o), -0.05em -0.05em 0 var(--o),
    0 0.13em 0 var(--o), 0.05em 0.12em 0 var(--o), -0.05em 0.12em 0 var(--o),
    0 0.2em 0.3em rgba(0, 0, 0, 0.45);
}

.kicker {
  font-size: clamp(30px, min(8.4vw, 7.6vh), 70px);
  letter-spacing: 0.02em;
  color: var(--cream);
  padding-top: 0.12em;
}
.kicker .w { display: inline-block; }
.kicker .blast { color: var(--gold); }

.tagline {
  font-size: clamp(17px, min(4.6vw, 3.5vh), 31px);
  letter-spacing: 0.03em;
  color: #fff;
  max-width: 22em;
}

.soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2px, 0.8vh, 8px);
  margin-top: clamp(2px, 1.2vh, 12px);
}

/* The wooden sign from the game's Jungle Market header. Its box keeps the
   art's own 1086:362 shape, so it is never stretched. */
.plank {
  display: grid;
  place-items: center;
  width: min(76vw, 400px, 46vh);
  aspect-ratio: 1086 / 362;
  background: url(img/sign.webp) center / 100% 100% no-repeat;
  font-size: min(9.4vw, 49px, 5.7vh);
  letter-spacing: 0.04em;
  color: var(--cream);
  padding-top: 0.14em;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4));
}

.platforms {
  font-size: clamp(15px, min(4.2vw, 2.4vh), 20px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* ---------- footer ---------- */

.foot {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 0 16px max(8px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
.foot a {
  display: inline-block;
  padding: 13px 6px;
  color: #fff;
  text-underline-offset: 3px;
}
.foot a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 0;
  border-radius: 6px;
}

/* Phones held sideways and other short screens: tighten so the footer fits. */
@media (max-height: 520px) {
  .stage { gap: 4px; padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 4px; }
  .kicker { font-size: clamp(22px, 7.4vh, 40px); }
  .tagline { font-size: clamp(13px, 3.8vh, 20px); }
  .platforms { font-size: 14px; }
  .soon { margin-top: 2px; }
  .foot a { padding: 12px 6px; }
}

/* ---------- arrival ---------- */

.js .stage > * {
  animation: jbt-rise 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.js .stage > :nth-child(2) { animation-delay: 120ms; }
.js .stage > :nth-child(3) { animation-delay: 240ms; }
.js .stage > :nth-child(4) { animation-delay: 360ms; }
.js .stage > :nth-child(5) { animation-delay: 480ms; }
@keyframes jbt-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .slide { transition-duration: 2400ms; }
  .slide.zoom .art,
  .slide.zoom .fill,
  .js .stage > * { animation: none; }
}
