/* Home page: hero, the true story and the holiday-drop teaser. The game itself lives on
   its own page (play/, styled by game.css). */

/* ------------------------------------------------------------------ hero */
/* The scene is the store from the game (assets/ui/home-scene.png, 800 x 270 art pixels),
   always drawn at a whole-number scale --k, with the raccoon on the same pixel grid. */
/* The hero fills one screen: content on top, the store band takes the rest (at least the
   floor and the bottom shelf), so the strolling raccoon is always above the fold. */
.home-hero {
  --k: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: clamp(540px, calc(100svh - var(--nav-h)), 1000px);
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 560px) {
  .home-hero { --k: 2; }
}

@media (min-width: 1600px) {
  .home-hero { --k: 3; }
}

.home-hero__snow {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.home-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  max-width: 760px;
  padding: 40px 20px 0;
  margin-bottom: calc(-28px * var(--k));
  text-align: center;
}

.home-hero__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 7px 12px 6px;
  font: 9px/1 var(--font-pixel);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--red);
  box-shadow: inset 0 var(--px) 0 var(--red-hi), inset 0 calc(-1 * var(--px)) 0 var(--red-lo), var(--frame);
}

.home-hero__kicker .ico {
  font-size: 10px;
  color: var(--snow);
}

.home-hero__logo {
  margin: 0;
}

.home-hero__logo img {
  width: 244px;   /* 4x */
  height: auto;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.45));
}

.home-hero__tag {
  max-width: 36ch;
  margin: 20px 0 26px;
  font-size: 19px;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.8);
}

.home-hero__tag b {
  color: var(--amber-hi);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.home-hero__actions .btn--xl .ico {
  font-size: 16px;
}

.home-hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  color: var(--cream-2);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.8);
}

.home-hero__facts li + li::before {
  content: '·';
  margin: 0 12px;
  color: var(--amber);
}

.home-hero__advisory {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.8);
}

.home-hero__best {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 7px 10px 6px;
  font: 9px/1 var(--font-pixel);
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(12, 8, 6, 0.75);
}

.home-hero__best .ico {
  font-size: 12px;
  color: var(--gold);
}

.home-hero__best b {
  font-weight: 400;
  color: var(--amber-hi);
}

/* The store, bottom-aligned at scale --k. The band grows to fill the hero; the fade is
   measured up from the floor, so the art's top edge always sits in solid night. */
.home-hero__scene {
  position: relative;
  z-index: 0;
  flex: 1 0 auto;
  width: 100%;
  min-height: calc(130px * var(--k));
  background: #120c08 url('../assets/ui/home-scene.png') 50% 100% / calc(800px * var(--k)) calc(270px * var(--k)) repeat-x;
  image-rendering: pixelated;
}

.home-hero__scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #120c08 0%, rgba(18, 12, 8, 0.78) 24%, rgba(18, 12, 8, 0.3) 46%, rgba(18, 12, 8, 0) 62%),
    linear-gradient(0deg,
      rgba(18, 12, 8, 0) 0,
      rgba(18, 12, 8, 0) calc(96px * var(--k)),
      rgba(18, 12, 8, 0.45) calc(140px * var(--k)),
      rgba(18, 12, 8, 0.88) calc(178px * var(--k)),
      #120c08 calc(206px * var(--k)));
}

.home-hero__scene::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: calc(var(--px) * 2);
  background: var(--ink);
}

/* Santa Panda, walking along the floor lane (art row 232; feet sit on row 51 of the 80 x 66 cell) */
.home-hero__raccoon {
  position: absolute;
  left: 0;
  bottom: calc(23px * var(--k));
  z-index: 1;
  width: calc(80px * var(--k));
  height: calc(66px * var(--k));
  background: url('../assets/game/raccoon.png') 0 calc(-330px * var(--k)) / calc(480px * var(--k)) calc(660px * var(--k)) no-repeat;
  image-rendering: pixelated;
  transform: translateX(calc(-80px * var(--k)));
  animation:
    hero-walk 0.84s steps(6) infinite,
    hero-stroll var(--stroll, 24s) linear infinite;
}

@keyframes hero-walk {
  to { background-position-x: calc(-480px * var(--k)); }
}

@keyframes hero-stroll {
  from { transform: translateX(calc(-80px * var(--k))); }
  to { transform: translateX(100vw); }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__raccoon {
    left: 14%;
    transform: none;
    animation: none;
  }
}

@media (min-width: 560px) {
  .home-hero__content {
    padding-top: 56px;
  }
  .home-hero__logo img {
    width: 305px;   /* 5x */
  }
  .home-hero__tag {
    max-width: 40ch;
    font-size: 20px;
  }
}

@media (min-width: 1200px) and (min-height: 940px) {
  .home-hero__logo img {
    width: 366px;   /* 6x */
  }
}

@media (max-width: 480px) {
  .home-hero__tag {
    margin: 18px 0 22px;
    font-size: 18px;
  }
  .home-hero__actions {
    flex-direction: column;
    align-self: stretch;
    gap: 12px;
  }
  .home-hero__actions .btn {
    width: 100%;
  }
  .home-hero__actions .btn--lg {
    min-height: 46px;
    padding: 15px 20px 13px;
    font-size: 11px;
  }
  .home-hero__facts {
    margin-top: 18px;
    font-size: 15px;
  }
  .home-hero__facts li + li::before {
    margin: 0 8px;
  }
}

/* ------------------------------------------------------------------ story */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px 72px;
  scroll-margin-top: calc(var(--nav-h) - 40px);
}

/* the bathroom art at 1x or 2x, never in between (cropped at the sides on narrow phones) */
.story__art {
  container-type: inline-size;
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding-bottom: calc(var(--px) * 5);
}

.story__art img {
  width: 352px;
  height: 184px;
  max-width: none;
  box-shadow: var(--frame), 0 calc(var(--px) * 4) 0 rgba(0, 0, 0, 0.4);
}

@container (min-width: 704px) {
  .story__art img {
    width: 704px;
    height: 368px;
  }
}

@media (min-width: 1240px) {
  .story {
    grid-template-columns: 704px minmax(0, 1fr);
  }
}

.story__text h2 {
  margin-bottom: 22px;
  font-size: 20px;
  line-height: 1.5;
}

.story__text p {
  color: var(--cream-2);
  font-size: 19px;
}

.story__text q {
  color: var(--cream);
  font-style: italic;
}

.story__cta {
  margin-top: 26px;
}

@media (max-width: 900px) {
  .story {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 64px;
  }
  .story__text h2 {
    font-size: 16px;
  }
}

/* eyebrows inside text blocks keep their own type, not the paragraph styling */
.story__text .eyebrow {
  font-size: 10px;
  color: var(--amber);
}

