/* Home page only. Shared pieces live in site.css. */

/* ---------- Hero: the Meadows, a layered scene from the game's own backdrop ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(#35a4fe, #3aa7fd 70%); }
.hero__copy { position: relative; z-index: 6; padding-top: 84px; }
.hero__copy .col { padding-left: 0; }
.hero h1 { margin: 0.1rem 0 1rem; }
.hero .place { color: var(--ink); }
.hero__panel .lede { margin-bottom: 0.5rem; max-width: 24ch; }
.hero__panel p:not(.lede):not(.small) { max-width: 38ch; }
.hero__panel .small { color: var(--ink); max-width: 42ch; margin: 0; }

.hero__scene { position: relative; height: 430px; margin-top: 0.4rem; --stage-shift: -4%; }
.hero__scene .parallax__stage { top: 0; bottom: 0; right: var(--stage-shift); height: 100%; aspect-ratio: 1672 / 941; }
.hero__scene picture { display: contents; }

/* The cast: positions are % of the stage (the backdrop's own frame), standing on its grass line. */
.hero .char { --char-scale: 1.2; width: calc(var(--w) * var(--char-scale)); bottom: 31.2%; }
.c-catapult { --x: 47%; --w: 9.5%; --ar: 0.8475; --depth: 0.55; --delay: -1.2s; }
.c-ram { --x: 57%; --w: 7.6%; --ar: 1.186; --depth: 0.62; --act-h: 96%; --delay: -0.4s; }
.c-grunt { --x: 71%; --w: 6.8%; --ar: 0.9136; --depth: 0.58; --act-h: 93%; --delay: -2s; }
.c-king { --x: 80%; --w: 11.5%; --ar: 0.85; --depth: 0.66; --act-h: 94%; --delay: -0.9s; }
.c-grunt { bottom: 31.6%; }
/* Where the catapult's cup is, and where the shot lands: the trail's first arc */
.launch-pt { position: absolute; left: 51.5%; bottom: 52%; width: 1px; height: 1px; }
.land-pt { position: absolute; left: 82%; bottom: 33.5%; width: 1px; height: 1px; }

/* From tablets up: the scene is pinned to the bottom of the hero at its own shape (full width), so the cast
   never moves relative to the screen however tall the copy is; plain sky fills any space above it. The copy
   sits on a panel over the left of the scene and the cast stands to its right. */
@media (min-width: 760px) {
  .hero { background: linear-gradient(#35a4fe, #5ab4fb 85%); min-height: 56.28vw; }
  .hero__copy { padding-top: 92px; padding-bottom: 2.5rem; max-width: 58%; margin-left: 0; }
  .hero__copy .col { padding-left: var(--lane); }
  .hero h1 { font-size: clamp(2.9rem, 7.4vw, 6.6rem); }
  .hero__scene { position: absolute; left: 0; right: 0; bottom: 0; height: 56.28vw; margin: 0; }
  .hero__scene .parallax__stage { inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
  .hero__scene .parallax__layer--sky { -webkit-mask-image: linear-gradient(transparent, #000 18%); mask-image: linear-gradient(transparent, #000 18%); }
  .hero__panel { background: var(--paper); border: var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-l); padding: 1.2rem 1.3rem 1.1rem; }
  .hero__panel .btn-row { gap: 0.6rem 0.8rem; }
  .hero .char { --char-scale: 1.15; }
  .c-catapult { --x: 58%; }
  .c-ram { --x: 67%; }
  .c-grunt { display: none; }
  .c-king { --x: 80%; }
  .launch-pt { left: 63%; bottom: 55%; }
  .land-pt { left: 82.5%; bottom: 33.5%; }
}
@media (min-width: 1240px) {
  .hero__copy { padding-top: 96px; padding-bottom: 3rem; max-width: 690px; }
  .hero__copy.wrap { margin-left: max(0px, calc((100vw - var(--wrap)) / 2)); }
  .hero__panel { padding: 1.3rem 1.5rem 1.2rem; }
  .hero .char { --char-scale: 1; }
  .c-catapult { --x: 56%; --w: 9%; }
  .c-ram { --x: 64.6%; --w: 7.4%; }
  .c-grunt { display: block; --x: 74.8%; --w: 6.6%; }
  .c-king { --x: 83%; --w: 12.5%; }
  .launch-pt { left: 59.6%; bottom: 50%; }
  .land-pt { left: 83.6%; bottom: 33.6%; }
}

/* ---------- How to play ---------- */
.howto { background: var(--sage); }
.howto__grid { display: grid; gap: var(--space-6); margin-top: var(--space-5); align-items: start; }
.screen { margin: 0; }
.screen img { width: 100%; border: var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-l); background: var(--sky); }
.screen figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.8rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); counter-reset: step; }
.step {
  display: grid; grid-template-columns: 112px 1fr; gap: 1rem; align-items: center;
  background: var(--paper); border: var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-m);
  padding: 0.8rem 1rem 0.8rem 0.8rem;
}
.step__art { height: 84px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, #ffe08a, var(--gold) 72%); border: var(--line); border-radius: var(--radius-m); overflow: hidden; }
.step__art img { max-height: 70px; width: auto; }
.step h3 { font-size: 1.5rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.step__n { counter-increment: step; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--ink); color: var(--paper); font: 800 0.8rem/1 var(--sans); }
.step__n::before { content: counter(step); }
.step p { margin: 0; font-size: 1.02rem; }
.motion .step:hover .step__art img { animation: char-hop 0.7s cubic-bezier(.3, 1.4, .5, 1); }
@media (prefers-reduced-motion: no-preference) {
  .motion .steps[data-reveal] .step { opacity: 0; transform: translateY(14px); transition: opacity 0.45s, transform 0.45s cubic-bezier(.3, 1.4, .5, 1); }
  .motion .steps[data-reveal].is-in .step { opacity: 1; transform: none; }
  .motion .steps[data-reveal].is-in .step:nth-child(2) { transition-delay: 0.18s; }
  .motion .steps[data-reveal].is-in .step:nth-child(3) { transition-delay: 0.36s; }
}
@media (min-width: 960px) {
  .howto__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-7); }
}

/* ---------- The lay of the land: the map ---------- */
.lay-grid { display: grid; gap: var(--space-6); margin-top: var(--space-6); }
.map { position: relative; margin: 0 calc(var(--gutter) * -1); z-index: 10; }
.map img { width: 100%; aspect-ratio: 864 / 1152; -webkit-mask-image: radial-gradient(120% 95% at 50% 52%, #000 62%, transparent 100%); mask-image: radial-gradient(120% 95% at 50% 52%, #000 62%, transparent 100%); }
.pin { position: absolute; display: flex; align-items: center; gap: 6px; transform: translate(-11px, -50%); text-decoration: none; color: var(--ink); border-radius: var(--radius-s); }
.pin i { width: 22px; height: 22px; flex: none; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--paper); border: var(--line); box-shadow: 0 3px 0 rgba(42, 29, 18, 0.5); position: relative; }
.pin i::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--c, var(--meadow)); }
.pin b { font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 0.95rem; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-s); padding: 0.05em 0.45em; white-space: nowrap; }
.pin--flip { flex-direction: row-reverse; transform: translate(calc(-100% + 11px), -50%); }
.map .pin, .sec--lake .map .pin { color: var(--ink); }
.pin:hover b, .pin:focus-visible b { background: var(--gold); }
.key { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.key li { display: grid; gap: 0.3rem; padding-bottom: 1.3rem; border-bottom: 2px dashed rgba(255, 248, 231, 0.28); }
.key li:last-child { border-bottom: 0; }
.key h3 { font-style: italic; font-weight: 800; font-size: 1.7rem; }
.key p { margin: 0; color: var(--on-dark-soft); }
.key a { font-weight: 700; }
@media (min-width: 760px) {
  .lay-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: var(--space-7); }
  .map { margin: 0; }
  .pin b { font-size: 1.05rem; }
}

/* ---------- Founders' camp ---------- */
.camp-grid { display: grid; gap: var(--space-6); }
.promise { margin: var(--space-6) 0 var(--space-5); }
.promise h3 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: 0.4rem; }
.mascot { display: none; }
@media (min-width: 960px) {
  .camp-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-7); align-items: center; }
  .mascot { display: block; position: relative; }
  .mascot .parallax { aspect-ratio: 1; max-width: 420px; margin: 0 auto; overflow: visible; --amp-x: 30px; --amp-y: 16px; }
  .mascot .parallax__stage { inset: 0; }
  .mascot .ground { position: absolute; inset: auto; left: 8%; width: 84%; bottom: 6%; height: 16%; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 122, 32, 0.45), rgba(60, 122, 32, 0)); --depth: 0.2; }
  .c-mega { --x: 4%; --w: 92%; --ar: 1.186; --depth: 0.5; --act-h: 98%; bottom: 10%; }
  .mascot .sign { font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 1.2rem; text-align: center; margin: 0.4rem 0 0; }
}

/* ---------- The road ahead: one banner per world ---------- */
.road-intro { background: var(--sage); padding: 0 0 var(--space-6); }
.land { position: relative; }
.land__art { position: relative; height: clamp(300px, 40vw, 560px); overflow: hidden; }
.land__art .parallax { position: absolute; inset: 0; --amp-x: 36px; --amp-y: 14px; }
.land__art .parallax__stage { inset: 0; }
.land__art .parallax__layer { --depth: 0.18; }
.land__art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(20, 12, 6, 0.38)); z-index: 4; pointer-events: none; }
.land .char { --depth: 0.6; left: auto; right: max(4%, var(--gutter)); bottom: 6%; width: clamp(104px, 17vw, 230px); }
.land .char img { left: auto; right: 0; transform: none; }
.land__name { position: absolute; left: 0; right: 0; bottom: calc(8% + 1.2rem); z-index: 5; pointer-events: none; }
.land__name .wp { top: 50%; margin-top: -11px; }
.land h3 { font-style: italic; font-weight: 800; font-size: clamp(2.1rem, 8.6vw, 6rem); letter-spacing: -0.01em; -webkit-text-stroke-width: 0.07em; text-shadow: 0 0.06em 0 var(--ink); }
.land__body { padding: 0 0 var(--space-7); }
.land__body .panel { position: relative; z-index: 6; margin-top: -1.4rem; margin-left: var(--lane); max-width: 560px; }
.land__body .chip { margin-bottom: 0.8rem; }
.land--wild .land__body { background: var(--moss); }
.land--frost .land__body { background: var(--ice); }
.land--crag .land__body { background: var(--crag); }

/* ---------- Made with AI: the devlog teaser ---------- */
.notes-grid { display: grid; gap: var(--space-6); align-items: center; margin-top: var(--space-2); }
.polaroid { margin: 0; background: var(--paper); border: var(--line); border-radius: 16px; padding: 10px 10px 14px; box-shadow: 0 6px 0 #120d1f; transform: rotate(-1.2deg); color: var(--ink); }
.polaroid img { width: 100%; border-radius: 8px; border: 2px solid var(--ink); }
.polaroid figcaption { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.05rem; padding: 0.6rem 0.3rem 0; }
@media (min-width: 860px) { .notes-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); } }

/* ---------- Other games ---------- */
.others { background: var(--paper-deep); border-top: var(--line); }
.others .names { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; }
.others .names li { font-family: var(--sans); font-weight: 800; letter-spacing: 0.04em; font-size: 0.95rem; padding: 0.25em 0.7em; border: 2px solid var(--ink); border-radius: var(--radius-s); background: var(--paper); }
