/* MobLife site. Amber parchment look, same colors and fonts as the app.
   Plain CSS, no build step. All styling lives here because the site ships a strict
   Content-Security-Policy (no inline styles, no scripts). */

@font-face { font-family: 'Pixelify Sans'; font-weight: 400; font-display: swap; src: url('../fonts/pixelify-sans-400.ttf') format('truetype'); }
@font-face { font-family: 'Pixelify Sans'; font-weight: 600; font-display: swap; src: url('../fonts/pixelify-sans-600.ttf') format('truetype'); }
@font-face { font-family: 'Pixelify Sans'; font-weight: 700; font-display: swap; src: url('../fonts/pixelify-sans-700.ttf') format('truetype'); }
@font-face { font-family: 'Press Start 2P'; font-weight: 400; font-display: swap; src: url('../fonts/press-start-2p.ttf') format('truetype'); }

/* Pixelify Sans and Press Start 2P draw several digits ambiguously (2, 5 and 1 read as
   8, S and 7). These two faces carry only the digits 0-9, served from VT323, and sit
   first in each font stack so every number on the page is readable. size-adjust scales
   the VT323 digits to the height of the text they sit in. Same values as the app. */
@font-face { font-family: 'PixelDigits'; font-display: swap; src: url('../fonts/vt323.ttf') format('truetype'); unicode-range: U+0030-0039; size-adjust: 128%; }
@font-face { font-family: 'PixelDigitsGame'; font-display: swap; src: url('../fonts/vt323.ttf') format('truetype'); unicode-range: U+0030-0039; size-adjust: 190%; }

:root {
  --ink: #2B211A;
  --mid: #574333;
  --paper: #FFF4DA;
  --panel: #EFE0BC;
  --line: #D8C59A;
  --amber: #AD4C18;
  --light: #F4B75E;

  --shadow-lg: 8px 8px 0 #2B211A33;
  --shadow-md: 6px 6px 0 #2B211A26;
  --shadow-sm: 4px 4px 0 #2B211A26;

  --font-ui: 'PixelDigits', 'Pixelify Sans', sans-serif;
  --font-game: 'PixelDigitsGame', 'Press Start 2P', monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --wrap: 1180px;
}

* { box-sizing: border-box; font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui); font-weight: 400; font-size: 18px; line-height: 1.6;
  color: var(--ink);
}
body.plain { background-image: none; }
img { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--amber); text-underline-offset: 4px; }
a:focus-visible, .shots:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.px { image-rendering: pixelated; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 10;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px;
  font-family: var(--font-game); font-weight: 400; font-size: .7rem; line-height: 1; color: var(--ink); background: var(--light);
  border: 4px solid var(--ink); text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.eyebrow { font-family: var(--font-game); font-weight: 400; font-size: .7rem; line-height: 1.6; letter-spacing: .04em; color: var(--amber); }

/* Header */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; color: var(--ink); text-decoration: none; font-family: var(--font-game); font-weight: 400; font-size: .9rem; line-height: 1; }
.brand img { width: 48px; height: 48px; }
.site-head ul { display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-head li a, .foot-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px;
}
.site-head li a:hover, .foot-links a:hover { color: var(--amber); }

/* Hero */
.hero { display: grid; gap: clamp(32px, 5vw, 56px); padding-block: clamp(24px, 5vw, 56px) clamp(40px, 7vw, 88px); align-items: center; }
.hero-copy { display: grid; gap: 14px; align-content: center; max-width: 30rem; justify-items: start; }
.hero h1 { font-family: var(--font-ui); font-weight: 700; font-size: clamp(3rem, 6.6vw, 5.4rem); line-height: 1; letter-spacing: 0; }
.hero-desc { color: var(--mid); }
.play-badge { display: inline-block; margin: 4px 0 -4px -10px; padding: 0; }
.play-badge img { height: 72px; width: auto; }
.play-badge:hover { transform: translateY(-2px); }
.hero-note { font-weight: 600; color: var(--mid); font-size: .95rem; }

.demo { display: grid; gap: 28px; align-items: center; justify-items: center; min-width: 0; }
.phone { position: relative; width: min(74vw, 300px); }
.frame { position: relative; width: 100%; aspect-ratio: 9 / 16; border: 4px solid var(--ink); background: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: cycle 18s steps(1) infinite; }
.frame img:nth-child(1) { opacity: 1; animation-delay: 0s; }
.frame img:nth-child(2) { animation-delay: -15s; }
.frame img:nth-child(3) { animation-delay: -12s; }
.frame img:nth-child(4) { animation-delay: -9s; }
.frame img:nth-child(5) { animation-delay: -6s; }
.frame img:nth-child(6) { animation-delay: -3s; }
@keyframes cycle { 0% { opacity: 1; } 16.667% { opacity: 0; } 100% { opacity: 0; } }

.side { display: grid; gap: 22px; min-width: 0; width: 100%; }
.hud { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; border: 4px solid var(--ink); background: var(--panel); padding: 12px 14px; box-shadow: var(--shadow-md); }
.hud-label { font-family: var(--font-game); font-weight: 400; font-size: .7rem; line-height: 1; }
.xp { position: relative; display: block; height: 18px; border: 3px solid var(--ink); background: var(--paper); }
.xp span { position: absolute; inset: 0; display: block; background: var(--light); transform-origin: left; transform: scaleX(.72); animation: xploop 8s steps(1) .3s infinite; }
.xp span::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 10px, #AD4C1833 10px 12px); }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(.72); } }

.party { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 16px 28px; min-height: 144px; }
.trainer { display: block; width: 96px; height: 144px; background-repeat: no-repeat; background-size: 384px 144px; background-position: 0 0; image-rendering: pixelated; animation: walk .8s steps(4) infinite; }
.trainer.archon { background-image: url('../img/archon-idle.png'); }
.trainer.vex { background-image: url('../img/vex-idle.png'); animation-delay: -.2s; }
.trainer.zara { background-image: url('../img/zara-idle.png'); animation-delay: -.4s; }
@keyframes walk { to { background-position: -384px 0; } }
.loot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 128px; }

.facts { display: grid; gap: 12px; margin: 0; }
.facts div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); align-items: baseline; gap: 14px; border: 4px solid var(--ink); background: var(--paper); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.facts dt { font-family: var(--font-game); font-weight: 400; font-size: .8rem; line-height: 1.4; color: var(--amber); }
.facts dd { margin: 0; font-size: .9rem; line-height: 1.4; color: var(--mid); }

/* Shared section bits */
.section { padding-block: clamp(36px, 6vw, 72px); }
.section > h2, .panels h2, .closing h2 { font-family: var(--font-ui); font-weight: 600; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; }
.section > h2 { margin-bottom: clamp(24px, 4vw, 40px); }

.lead { border: 4px solid var(--ink); background: var(--panel); box-shadow: var(--shadow-lg); padding: clamp(22px, 4vw, 44px); }
.lead p { font-family: var(--font-ui); font-weight: 600; font-size: clamp(1.25rem, 2.6vw, 1.9rem); line-height: 1.4; max-width: 40em; }

/* How it works */
.steps { display: grid; gap: 24px; }
.step { display: flex; flex-direction: column; gap: 14px; border: 4px solid var(--ink); background: var(--paper); box-shadow: var(--shadow-md); padding: 22px; }
.step-art { display: flex; align-items: flex-end; min-height: 144px; }
.step-art .trainer { animation-delay: 0s; }
.step-art .xp { width: 100%; max-width: 260px; margin-bottom: 8px; }
.num { font-family: var(--font-game); font-weight: 400; font-size: 1.1rem; line-height: 1; color: var(--amber); }
.step p { color: var(--ink); }

/* What you get */
.tiles { display: grid; gap: 16px; }
.tiles li { display: flex; align-items: flex-start; gap: 14px; border: 4px solid var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); padding: 18px 20px; font-weight: 600; }
.tiles li::before { content: ""; flex: none; width: 12px; height: 12px; margin-top: .5em; background: var(--amber); box-shadow: 3px 3px 0 var(--light); }
.mobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px; margin-top: clamp(28px, 4vw, 48px); }
.mobs li { display: grid; place-items: center; aspect-ratio: 1; border: 3px solid var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); }
.mobs img { width: 64px; height: 64px; }

/* Screens */
.shots { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 12px 16px 0; scroll-padding-inline: 0; }
.shots figure { flex: 0 0 min(64vw, 230px); margin: 0; scroll-snap-align: start; }
.shots .frame { box-shadow: var(--shadow-md); }
.shots .frame img { position: static; opacity: 1; animation: none; display: block; }
.shots figcaption { margin-top: 14px; text-align: center; font-family: var(--font-game); font-weight: 400; font-size: .7rem; line-height: 1.4; color: var(--mid); }

/* Two panels */
.panels { display: grid; gap: 24px; padding-block: clamp(36px, 6vw, 72px); }
.panel { border: 4px solid var(--ink); background: var(--panel); box-shadow: var(--shadow-md); padding: clamp(22px, 3.5vw, 36px); display: grid; gap: 12px; align-content: start; }
.panel h2 { font-size: clamp(1.3rem, 5.4vw, 2.2rem); }
.panel p { color: var(--ink); }

/* Closing call */
.closing { padding-block: clamp(36px, 6vw, 72px) clamp(48px, 8vw, 96px); }
.closing-box { display: grid; gap: 24px; justify-items: center; text-align: center; border: 4px solid var(--ink); background: var(--paper); box-shadow: var(--shadow-lg); padding: clamp(28px, 5vw, 56px); }
.closing-box .egg { width: 160px; height: 192px; }
.closing-text { display: grid; gap: 14px; justify-items: center; }
.closing-text .play-badge { margin: 8px 0 0; }

/* Footer */
.site-foot { border-top: 4px solid var(--ink); background: var(--panel); }
.foot { display: grid; gap: 8px 24px; padding-block: 24px 32px; align-items: center; }
.foot-brand { font-family: var(--font-game); font-weight: 400; font-size: .8rem; line-height: 1; }
.foot-links { display: flex; flex-wrap: wrap; margin-left: -12px; }
.foot-note { font-size: .85rem; color: var(--mid); }

/* Privacy page */
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.legal { padding: 8px 0 56px; }
.legal h1 { font-family: var(--font-game); font-weight: 400; font-size: 20px; line-height: 1.5; margin: 0 0 8px; }
.legal h2 { font-family: var(--font-ui); font-weight: 600; font-size: 22px; line-height: 1.4; margin: 32px 0 8px; padding-top: 18px; border-top: 2px solid var(--line); }
.legal .meta { color: var(--mid); font-size: 15px; margin-bottom: 28px; }
.legal p, .legal li { color: var(--ink); }
.legal ul, .legal ol { padding-left: 22px; list-style: revert; }
.legal ol { list-style: decimal; }
.legal li { margin: 6px 0; }
.legal table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.legal th, .legal td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--panel); font-weight: 600; }
.legal td a { overflow-wrap: anywhere; }

/* 404 */
.lost { display: grid; gap: 20px; justify-items: center; text-align: center; min-height: 100vh; align-content: center; padding: 40px 20px; }
.lost h1 { font-family: var(--font-ui); font-weight: 700; font-size: clamp(2.2rem, 7vw, 3.6rem); line-height: 1.1; }
.lost .egg { width: 120px; height: 144px; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; font-family: var(--font-game); font-weight: 400; font-size: .72rem; line-height: 1; color: var(--ink); background: var(--light); border: 4px solid var(--ink); box-shadow: var(--shadow-md); text-decoration: none; }
.button:hover { background: var(--panel); }

/* Wider screens */
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phone { width: 300px; }
}
@media (min-width: 900px) {
  .foot { grid-template-columns: auto auto 1fr; }
  .shots { display: grid; grid-template-columns: repeat(3, minmax(0, 320px)); justify-content: center; gap: 32px 28px; overflow: visible; padding: 0 8px 8px 0; }
  .shots figure { flex: none; }
}
@media (min-width: 960px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .hero { grid-template-columns: minmax(0, .72fr) minmax(0, 1.6fr); }
  .demo { grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; gap: clamp(24px, 4vw, 48px); }
  .phone { width: clamp(230px, 22vw, 280px); }
  .party { justify-content: flex-start; }
}

@media (max-width: 1279px) {
  .loot { width: auto; flex-direction: row; align-items: flex-end; gap: 16px; }
}

@media (max-width: 559px) {
  .site-head ul { margin-left: -8px; }
  .site-head li a { padding: 0 8px; font-size: 16px; }
  .mobs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .mobs li { aspect-ratio: auto; padding: 4px 0; }
}

@media (min-width: 700px) {
  .mobs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .mobs img { width: 128px; height: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .frame img:not(:first-child) { opacity: 0; }
  .play-badge:hover { transform: none; }
}
.nb { white-space: nowrap; }

/* ===== Motion. Everything below is transform and opacity only, so nothing shifts the layout.
   Steps timing keeps it pixel-style. Reduced motion turns it all off (block above). ===== */

/* Parchment grid drifts one pixel at a time. Fixed layer, so only it moves. */
body:not(.plain)::before {
  content: ""; position: fixed; inset: -32px; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--panel) 2px, transparent 2px), linear-gradient(90deg, var(--panel) 2px, transparent 2px);
  background-size: 32px 32px;
  animation: drift 48s steps(32) infinite;
}
@keyframes drift { to { transform: translate(32px, 32px); } }

/* Hero entrance on load */
.hero-copy > * { animation: rise .5s steps(5) backwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
.demo { animation: rise .6s steps(6) .15s backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Stepped bobbing for the logo Mob, the phone and the Mob grid */
.brand img { animation: bob 1.2s steps(1) infinite; }
.phone { animation: bob 3s steps(1) infinite; }
.mobs img { animation: bob 1.6s steps(1) infinite; }
.mobs li:nth-child(5n+2) img { animation-delay: -.3s; }
.mobs li:nth-child(5n+3) img { animation-delay: -.6s; }
.mobs li:nth-child(5n+4) img { animation-delay: -.9s; }
.mobs li:nth-child(5n+5) img { animation-delay: -1.2s; }
.mobs li:hover img { animation: hop .4s steps(4) 1; }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
@keyframes hop { 50% { transform: translateY(-12px); } }

/* XP bars: hero loops fill, hold, top up, flash, reset */
@keyframes xploop {
  0% { transform: scaleX(0); } 12% { transform: scaleX(.18); } 16% { transform: scaleX(.36); } 20% { transform: scaleX(.54); } 24%, 60% { transform: scaleX(.72); }
  66% { transform: scaleX(.86); } 72%, 84% { transform: scaleX(1); } 78% { transform: scaleX(1); background: var(--paper); } 90%, 100% { transform: scaleX(0); }
}
.js .step .xp span { transform: scaleX(0); }
.js .step.in .xp span { animation: fill 1.4s steps(18) .2s both; }

/* Boss HP bar: three hits, then it refills */
.hp { position: relative; display: block; height: 18px; border: 3px solid var(--ink); background: var(--paper); animation: hit 7s steps(1) infinite; }
.hp span { position: absolute; inset: 0; display: block; background: var(--amber); transform-origin: left; animation: hpdrop 7s steps(1) infinite; }
.hp span::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 10px, #2B211A33 10px 12px); }
@keyframes hpdrop { 0% { transform: none; } 20% { transform: scaleX(.78); } 40% { transform: scaleX(.52); } 60% { transform: scaleX(.26); } 88% { transform: none; } }
@keyframes hit {
  0%, 100% { transform: none; } 20% { transform: translateX(-4px); } 22% { transform: translateX(4px); } 24% { transform: none; }
  40% { transform: translateX(-4px); } 42% { transform: translateX(4px); } 44% { transform: none; }
  60% { transform: translateX(-4px); } 62% { transform: translateX(4px); } 64% { transform: none; }
}

/* Egg wobbles, cracks, a Mob hatches. Layers stack; one shows at a time. */
.hatch { --u: 2px; position: relative; display: block; width: calc(64 * var(--u)); height: calc(64 * var(--u)); flex: none; animation: wobble 8s steps(1) infinite; transform-origin: 50% 100%; }
.hatch img { position: absolute; left: 50%; bottom: 0; margin-left: calc(var(--w) * var(--u) / -2); width: calc(var(--w) * var(--u)); height: auto; opacity: 0; }
.hatch .h0, .hatch .h1, .hatch .h2 { --w: 40; }
.hatch .h3, .hatch .h4 { --w: 56; }
.hatch .hm { --w: 64; }
.hatch .h0 { opacity: 1; animation: s0 8s steps(1) infinite; }
.hatch .h1 { animation: s1 8s steps(1) infinite; }
.hatch .h2 { animation: s2 8s steps(1) infinite; }
.hatch .h3 { animation: s3 8s steps(1) infinite; }
.hatch .h4 { animation: s4 8s steps(1) infinite; }
.hatch .hm { animation: sm 8s steps(1) infinite, bob 1.2s steps(1) infinite; }
.js .hatch:not(.in), .js .hatch:not(.in) img { animation-play-state: paused; }
@keyframes wobble { 0%, 14% { transform: none; } 16% { transform: rotate(-6deg); } 20% { transform: rotate(6deg); } 24% { transform: rotate(-6deg); } 28% { transform: rotate(6deg); } 32%, 100% { transform: none; } }
@keyframes s0 { 0%, 34% { opacity: 1; } 35%, 100% { opacity: 0; } }
@keyframes s1 { 0%, 34% { opacity: 0; } 35%, 41% { opacity: 1; } 42%, 100% { opacity: 0; } }
@keyframes s2 { 0%, 41% { opacity: 0; } 42%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
@keyframes s3 { 0%, 48% { opacity: 0; } 49%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes s4 { 0%, 55% { opacity: 0; } 56%, 62% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes sm { 0%, 62% { opacity: 0; } 63%, 94% { opacity: 1; } 95%, 100% { opacity: 0; } }

/* Daily gift chest: two hops, then it opens */
.chest-box { position: relative; display: block; width: 72px; height: 60px; animation: chesthop 4s steps(1) infinite; }
.chest-box img { position: absolute; inset: 0; width: 72px; height: 60px; }
.chest-box .chest-open { opacity: 0; animation: chestopen 4s steps(1) infinite; }
@keyframes chesthop { 0%, 100% { transform: none; } 6% { transform: translateY(-10px); } 12% { transform: none; } 18% { transform: translateY(-10px); } 24% { transform: none; } }
@keyframes chestopen { 0%, 30% { opacity: 0; } 31%, 75% { opacity: 1; } 76%, 100% { opacity: 0; } }

/* Closing egg: little wobble every few seconds */
.closing-box .wob { transform-origin: 50% 100%; animation: wobble2 3.2s steps(1) infinite; }
@keyframes wobble2 { 0%, 60%, 100% { transform: none; } 66% { transform: rotate(-7deg); } 72% { transform: rotate(7deg); } 78% { transform: rotate(-7deg); } 84% { transform: rotate(7deg); } 90% { transform: none; } }

/* Scroll reveals (class .in is set by assets/js/motion.js; without the script nothing is hidden) */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .45s steps(5), transform .45s steps(5); }
.js .shots figure { opacity: 0; transform: translateX(28px); }
.js .shots.in figure { opacity: 1; transform: none; transition: opacity .45s steps(5), transform .45s steps(5); }
.js .step:nth-child(2), .js .tiles li:nth-child(2n), .js .shots figure:nth-child(2), .js .panel:nth-child(2) { transition-delay: .1s; }
.js .step:nth-child(3), .js .tiles li:nth-child(3n), .js .shots figure:nth-child(3) { transition-delay: .2s; }
.js .shots figure:nth-child(4) { transition-delay: .1s; }
.js .shots figure:nth-child(5) { transition-delay: .2s; }
.js .shots figure:nth-child(6) { transition-delay: .3s; }

/* Screenshot row slides once to show it scrolls */
.shots.nudge figure { animation: nudge 1.4s steps(8) 1; }
@keyframes nudge { 40% { transform: translateX(-36px); } 100% { transform: none; } }
