/* Army of One Studio — Home and Piter & Egg page compositions (lot 6.4).
   Loaded only by / and /piter-and-egg/. */

/* ---------- Home hero ---------- */
.hero {
  position: relative; overflow: clip; padding-block: var(--space-5) var(--space-7);
  background:
    radial-gradient(40% 55% at 78% 40%, rgb(242 203 78 / .16), rgb(95 216 165 / .07) 55%, transparent 75%),
    linear-gradient(180deg, var(--aos-ink-900), var(--aos-ink-900) 70%, rgb(37 23 66 / .6));
}
.hero__grid { position: relative; display: grid; gap: var(--space-5); align-items: center;
  grid-template-areas: "copy" "actions" "stage"; }
/* 6.8: on mobile the primary CTA comes before the World Window, so it is visible without scrolling past the art. */
.hero__copy { grid-area: copy; }
.hero__stage { grid-area: stage; }
.hero__actions { grid-area: actions; }
.hero__copy > * + * { margin-top: var(--space-3); }
.hero__stage { position: relative; padding-top: 10%; }
.hero h1 { font-size: clamp(2rem, 1rem + 4.2vw, 2.75rem); }
@media (min-width: 600px) { .hero h1 { font-size: clamp(2.5rem, 1.2rem + 3.2vw, 4rem); } }
.hero-window {
  position: relative; isolation: isolate; aspect-ratio: 4 / 5;
  border-radius: var(--radius-window); box-shadow: var(--shadow-window);
  background: #9DD372;
}
.hero-window__art { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; }
.hero-window__art img { width: 100%; height: 100%; object-fit: cover; }
.hero-window__path { position: absolute; left: 0; right: 0; bottom: 8%; width: 100%; height: auto; z-index: 1; pointer-events: none; }
.hero-window__duo {
  position: absolute; z-index: 2; left: 50%; bottom: 18%; width: 110%; max-width: none;
  transform: translateX(-50%); filter: drop-shadow(0 18px 22px rgb(17 8 24 / .35));
}
.hero-window__logo { position: absolute; z-index: 3; right: 5%; bottom: 4%; width: 34%; filter: drop-shadow(0 8px 12px rgb(17 8 24 / .4)); }
.hero-window__mascot { position: absolute; z-index: 3; left: -3%; bottom: -5%; width: 24%; max-width: 96px; filter: drop-shadow(0 8px 12px rgb(0 0 0 / .45)); }
@media (min-width: 600px) {
  .hero-window { aspect-ratio: 16 / 11; }
  .hero-window__duo { width: 78%; bottom: 14%; }
  .hero-window__logo { width: 24%; }
}
@media (min-width: 900px) {
  .hero { padding-block: var(--space-7) var(--space-8); }
  .hero__grid { grid-template-columns: 6fr 6fr; gap: var(--space-5) var(--space-7);
    grid-template-areas: "copy stage" "actions stage"; align-items: end; }
  .hero__actions { align-self: start; }
  .hero-window { aspect-ratio: 16 / 11; }
  .hero-window__duo { width: 98%; bottom: 10%; }
  .hero__stage { padding-top: 6%; }
}
.drawn-path { color: var(--aos-sun); }

/* ---------- Feature (featured game on Home) ---------- */
.feature { display: grid; gap: var(--space-6); align-items: center; }
.feature__logo { width: min(80%, 420px); margin-inline: auto; filter: drop-shadow(0 18px 30px rgb(0 0 0 / .45)); }
.feature__copy > * + * { margin-top: var(--space-4); }
.pillars { list-style: none; padding: 0; display: grid; gap: var(--space-4); }
.feature__copy .pillars { margin-top: var(--space-5); }
.pillar { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start; }
.pillar__icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--aos-ink-700); color: var(--aos-sun); box-shadow: inset 0 0 0 2px rgb(242 203 78 / .25);
}
.pillar__icon svg { width: 24px; height: 24px; }
.pillar__title { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--color-text); }
.pillar__text { color: var(--color-text-muted); }
.pillar > div > * + * { margin-top: 2px; }
.feature__shot { margin-top: var(--space-5); }
.feature__shot .media__frame { transform: rotate(-1.5deg); }
@media (min-width: 900px) { .feature { grid-template-columns: 5fr 7fr; gap: var(--space-8); } }

/* ---------- Founder ---------- */
.founder { display: grid; gap: var(--space-6); align-items: center; }
.founder__portrait { width: min(64%, 300px); margin-inline: auto; }
.founder__portrait img {
  width: 100%; border-radius: 48% 52% 46% 54% / 55% 50% 50% 45%;
  box-shadow: 0 0 0 6px var(--aos-ink-900), 0 0 0 10px var(--aos-mint), var(--shadow-card);
}
.founder__copy > * + * { margin-top: var(--space-4); }
.founder__slogan { font-size: var(--text-h2); font-weight: 700; }
@media (min-width: 900px) { .founder { grid-template-columns: 4fr 8fr; gap: var(--space-8); } }

/* ---------- Game page hero ---------- */
.game-hero { padding-block: var(--space-5) var(--space-8); }
.game-hero__window {
  position: relative; isolation: isolate; overflow: hidden; display: grid;
  border-radius: var(--radius-window); box-shadow: var(--shadow-window);
  margin-inline: calc(var(--space-2) - var(--page-margin));
}
.game-hero__art { position: absolute; inset: 0; z-index: -2; }
.game-hero__art img { width: 100%; height: 100%; object-fit: cover; }
.game-hero__logo { padding: var(--space-6) var(--space-5) 0; }
.game-hero__logo img { width: min(84%, 460px); margin-inline: auto; filter: drop-shadow(0 18px 26px rgb(17 8 24 / .4)); }
.game-hero__copy {
  padding: var(--space-6) var(--space-5) var(--space-6);
  background: linear-gradient(180deg, rgb(26 16 48 / 0), rgb(26 16 48 / .55) 7%, rgb(26 16 48 / .86) 16%, rgb(26 16 48 / .95) 26%);
  color: var(--aos-text); --color-text: var(--aos-text); --color-text-muted: var(--aos-text-muted);
}
.game-hero__copy > * + * { margin-top: var(--space-3); }
.game-hero__tagline { font-family: var(--font-display); font-size: var(--text-h3); color: var(--aos-sun); font-weight: 600; }
.game-hero__copy .cluster { margin-top: var(--space-5); }
@media (min-width: 600px) { .game-hero__window { margin-inline: 0; } }
@media (min-width: 900px) {
  .game-hero__window { grid-template-columns: 6fr 6fr; align-items: center; min-height: 560px; }
  .game-hero__logo { order: 2; padding: var(--space-7) var(--space-6); }
  .game-hero__copy {
    align-self: stretch; display: flex; flex-direction: column; justify-content: center;
    padding: var(--space-8) var(--space-9) var(--space-8) var(--space-7);
    background: none;
  }
  /* 6.8: one long scrim across the whole window instead of a gradient that stopped at the column edge. */
  .game-hero__window::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, rgb(26 16 48 / .95) 0%, rgb(26 16 48 / .9) 45%, rgb(26 16 48 / .72) 52%,
      rgb(26 16 48 / .42) 59%, rgb(26 16 48 / .16) 66%, rgb(26 16 48 / 0) 75%);
  }
}

/* ---------- Characters ---------- */
.duo-cards { display: grid; gap: var(--space-7); }
.character { display: grid; gap: var(--space-3); }
.character > * + * { margin-top: 0; }
.character__stage {
  display: grid; place-items: end center; min-height: 200px; padding-top: var(--space-4);
  background: radial-gradient(70% 70% at 50% 100%, rgb(157 211 114 / .5), rgb(157 211 114 / .1) 60%, transparent 76%);
}
.character__stage img { width: auto; max-width: 100%; max-height: 220px; filter: drop-shadow(0 14px 16px rgb(0 0 0 / .35)); }
.character__text { color: var(--color-text-muted); }
@media (min-width: 900px) {
  .duo-cards { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .character__stage { min-height: 300px; }
  .character__stage img { max-height: 290px; }
}

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: var(--space-7); }
.step { display: grid; gap: var(--space-3); align-content: start; }
.step__num {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--aos-sun); color: var(--aos-ink-900); font-family: var(--font-display); font-weight: 700; font-size: 1.375rem;
  box-shadow: 0 4px 0 var(--aos-sun-deep);
}
.step__text { color: var(--color-text-muted); }
@media (min-width: 900px) {
  /* 6.8: subgrid lines up number, title, text and image across the three steps, whatever the text length. */
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3) var(--space-6); }
  .step { grid-row: span 4; grid-template-rows: subgrid; justify-items: start; }
  .step .media__frame { align-self: start; justify-self: stretch; }
}

/* ---------- Tools (6.9: original in-game icons on small World Window tiles) ---------- */
/* 7.1: seven tools. Centred wrapping rows (2+2+2+1, 4+3, then one row of 7) so no row is left-aligned and lopsided. */
.tool-grid { --tool-cols: 2; --tool-gap: var(--space-4); list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-5) var(--tool-gap); }
@media (min-width: 600px) { .tool-grid { --tool-cols: 4; --tool-gap: var(--space-5); row-gap: var(--space-6); } }
@media (min-width: 1200px) { .tool-grid { --tool-cols: 7; --tool-gap: var(--space-4); row-gap: var(--space-5); } }
.tool-card { flex: 0 0 calc((100% - (var(--tool-cols) - 1) * var(--tool-gap)) / var(--tool-cols)); display: grid; gap: var(--space-2); align-content: start; min-width: 0; }
/* Two columns: the odd last card fills its row, art at the same column width, text beside it. */
@media (max-width: 599.98px) {
  .tool-card:last-child:nth-child(odd) { flex-basis: 100%; grid-template-columns: calc((100% - var(--tool-gap)) / 2) minmax(0, 1fr); column-gap: var(--tool-gap); align-content: center; }
  .tool-card:last-child:nth-child(odd) .tool-card__art { grid-row: 1 / span 2; align-self: center; }
  .tool-card:last-child:nth-child(odd) .tool-card__name { margin-top: 0; align-self: end; }
}
.tool-card__art {
  position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-lg);
  background: #9DD372 url("../img/games/piter-and-egg/world-green-640.webp") center / cover;
  /* 6.9 review: same file the hero already downloaded on high-density screens (no extra request) */
  background-image: image-set(url("../img/games/piter-and-egg/world-green-640.webp") 1x, url("../img/games/piter-and-egg/world-green-1280.webp") 2x);
  box-shadow: 0 0 0 3px var(--aos-ink-500), var(--shadow-card);
}
.tool-card__art img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; filter: drop-shadow(0 8px 10px rgb(17 8 24 / .35)); }
.tool-card__name { font-size: 1.125rem; margin-top: var(--space-2); }
.tool-card__text { color: var(--color-text-muted); }

/* ---------- More characters (6.9) ---------- */
.cast { margin-top: var(--space-7); display: grid; gap: var(--space-5); align-items: center; }
.cast__title { font-size: var(--text-h3); }
.cast__text { color: var(--color-text-muted); margin-top: var(--space-2); }
.cast__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.cast__item figure { margin: 0; }
.cast__window {
  display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-lg); background: #000;
  box-shadow: 0 0 0 3px var(--aos-ink-500), var(--shadow-card);
}
.cast__window img { width: 100%; height: 100%; object-fit: contain; }
.cast__name { margin-top: var(--space-2); text-align: center; font-family: var(--font-display); font-weight: 600; color: var(--color-text); }
@media (min-width: 900px) {
  .cast { grid-template-columns: 5fr 7fr; gap: var(--space-8); }
  .cast__list { width: 100%; max-width: 520px; justify-self: end; gap: var(--space-5); }
}

/* ---------- Game modes (6.9) ---------- */
.modes { list-style: none; padding: 0; display: grid; gap: var(--space-4); }
.mode-card {
  display: grid; grid-template-columns: 80px 1fr; column-gap: var(--space-4); row-gap: var(--space-1); align-items: center;
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); background: var(--aos-ink-800);
  box-shadow: inset 0 0 0 1px rgb(242 203 78 / .22); min-width: 0;
}
.mode-card__art { grid-row: span 2; width: 80px; height: 80px; object-fit: contain; align-self: start; }
.mode-card__name { font-size: var(--text-h3); }
.mode-card__text { color: var(--color-text-muted); }
@media (min-width: 768px) {
  .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
  .mode-card { grid-template-columns: 1fr; justify-items: center; text-align: center; align-content: start; padding: var(--space-6) var(--space-5); }
  .mode-card__art { grid-row: auto; width: 128px; height: 128px; align-self: auto; margin-bottom: var(--space-2); }
}

/* ---------- Closing composition (6.9) ---------- */
.finale { display: grid; gap: var(--space-6); align-items: center; }
.finale__art { width: min(78%, 420px); height: auto; margin-inline: auto; filter: drop-shadow(0 18px 26px rgb(0 0 0 / .4)); }
@media (min-width: 900px) { .finale { grid-template-columns: 5fr 7fr; gap: var(--space-8); } }


.game-hero__window > * { min-width: 0; }
.game-hero__copy { overflow-wrap: anywhere; hyphens: auto; }
