/* Nooklight: night-time house, each game a lit arched doorway. */
:root {
  --night: #16123A;
  --dusk: #221C55;
  --plum: #4A3A8F;
  --lamp: #FFB547;
  --ember: #FF7A6B;
  --cream: #FFF3DC;
  --ink: #2B2650;
  --muted: rgba(255, 243, 220, .74);
  --arch: 999px 999px 22px 22px;
  --display: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--cream); font: 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--lamp); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }

/* ---------- header ---------- */
.top { position: relative; z-index: 5; padding: 22px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font: 600 28px var(--display); }
.brand img { width: 44px; height: 44px; }
.brand b { font-weight: 600; color: var(--lamp); }
.top nav { display: flex; gap: 22px; font-size: 16px; white-space: nowrap; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--cream); }

/* ---------- home hero: the wall of doorways ---------- */
.hero { position: relative; padding: 30px 0 90px; overflow: hidden; }
.hero::after { /* floor glow */
  content: ""; position: absolute; left: 0; right: 0; bottom: -25%; height: 70%;
  background: radial-gradient(closest-side, rgba(255,181,71,.16), transparent); pointer-events: none;
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: end; }
.hero h1 { font-size: clamp(44px, 6.4vw, 84px); }
.hero .lede { margin-top: 22px; font-size: 21px; color: var(--muted); max-width: 30ch; }
.hero .moon { position: absolute; top: 40px; right: 6%; width: 64px; height: 64px; border-radius: 50%; box-shadow: -14px 10px 0 0 var(--lamp); transform: rotate(-20deg); opacity: .9; }

.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: end; }
.door { position: relative; display: block; text-decoration: none; color: var(--cream); }
.door .frame, .door .sill, .door .spill { display: block; }
.door .frame {
  position: relative; aspect-ratio: 3 / 4.3; border-radius: var(--arch); overflow: hidden;
  border: 6px solid var(--cream); background: var(--dusk);
  box-shadow: 0 0 0 0 rgba(255,181,71,0); transition: box-shadow .35s ease, transform .35s ease;
}
.door:nth-child(2) .frame { aspect-ratio: 3 / 3.7; }
.door img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); transform: scale(1.22); transform-origin: 50% 25%; }
.door .frame::after { /* warm light spilling from the bottom of each doorway */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255,181,71,.45), rgba(255,122,107,.12) 30%, transparent 55%);
  mix-blend-mode: screen;
}
.door .sill { height: 8px; margin: 0 -14px; border-radius: 8px; background: var(--cream); }
.door .spill { height: 28px; margin: 0 -30px; background: radial-gradient(ellipse at 50% 0, rgba(255,181,71,.5), transparent 70%); }
.door .name { display: block; margin-top: 4px; font: 600 24px var(--display); }
.door .what { display: block; color: var(--muted); font-size: 16px; }
.door:hover .frame, .door:focus-visible .frame { box-shadow: 0 0 60px 6px rgba(255,181,71,.35); transform: translateY(-6px); }
.door .eyes { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; opacity: 0; transition: opacity .25s; }
.door .eyes i { width: 18px; height: 22px; border-radius: 50%; background: var(--cream); position: relative; }
.door .eyes i::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--night); right: 2px; top: 8px; }
.door:hover .eyes, .door:focus-visible .eyes { opacity: 1; }

/* one orchestrated moment: the doorways switch on when the page opens */
@media (prefers-reduced-motion: no-preference) {
  .door .frame { animation: lights-on 1.1s ease-out both; }
  .door:nth-child(2) .frame { animation-delay: .35s; }
  @keyframes lights-on { from { filter: brightness(.25); } 60% { filter: brightness(1.15); } to { filter: none; } }
}

/* ---------- home: game bands ---------- */
.band { padding: 90px 0; }
.band + .band { padding-top: 0; }
.band .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.band.flip .wrap { grid-template-columns: 1fr 1.1fr; }
.band.flip .shot { order: 2; }
.band .shot { border-radius: 28px 28px 28px 28px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.band .shot img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.status { display: inline-block; font: 600 15px var(--display); padding: 4px 14px; border-radius: 999px; background: var(--lamp); color: var(--night); }
.status.dev { background: #62D6B8; }
.band h2 { font-size: clamp(34px, 4vw, 52px); margin-top: 14px; }
.band p.pitch { margin-top: 16px; color: var(--muted); max-width: 46ch; }
.band .more { display: inline-block; margin-top: 18px; font: 600 19px var(--display); }

/* ---------- store buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 200px; padding: 10px 20px 10px 16px;
  border-radius: 16px; background: var(--cream); color: var(--night); text-decoration: none; border: 2px solid var(--cream);
}
.store svg { width: 28px; height: 28px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: 13px; }
.store strong { font: 600 21px var(--display); }
.store.soon { background: transparent; color: var(--cream); border-color: rgba(255,243,220,.35); cursor: default; }
.store.soon small { color: var(--muted); }
a.store:not(.soon):hover { background: var(--lamp); border-color: var(--lamp); }
.notify { font-size: 16px; }
.stores[data-device="android"] .store[data-platform="ios"],
.stores[data-device="ios"] .store[data-platform="android"] { display: none; }

/* ---------- game page ---------- */
.g-hero { padding: 110px 0 70px; position: relative; overflow: hidden; }
.g-hero::after { content: ""; position: absolute; right: -10%; top: 10%; width: 70%; height: 90%; background: radial-gradient(closest-side, rgba(255,181,71,.14), transparent); pointer-events: none; }
.g-hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.g-hero h1 { font-size: clamp(46px, 6.6vw, 92px); max-width: 11ch; }
.g-hero .tag { margin-top: 18px; font-size: 22px; max-width: 30ch; }
.g-hero .art { position: relative; border-radius: var(--arch); overflow: hidden; border: 6px solid var(--cream); aspect-ratio: 4 / 5; box-shadow: 0 0 90px 0 rgba(255,181,71,.22); }
.g-hero .art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); transform-origin: 45% 30%; }
.g-hero .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(255,181,71,.35), transparent 45%); mix-blend-mode: screen; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px; padding: 0; list-style: none; color: var(--muted); font-size: 16px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 12px; height: 14px; border-radius: 7px 7px 2px 2px; background: var(--lamp); }

.plays { padding: 100px 0 40px; }
.plays h2 { font-size: clamp(32px, 4vw, 48px); max-width: 18ch; }
.plays .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; margin-top: 44px; }
.plays h3 { font-size: 26px; margin-bottom: 10px; }
.plays .grid > div { border-top: 4px solid var(--lamp); padding-top: 18px; }
.plays .grid > div:nth-child(2) { border-color: var(--ember); }
.plays .grid > div:nth-child(3) { border-color: #9C8CFF; }
.plays p { color: var(--muted); }

.gallery { padding: 70px 0 30px; }
.gallery .head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.gallery h2 { font-size: clamp(30px, 3.6vw, 44px); }
.gallery .note { color: var(--muted); font-size: 16px; }
.strip { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 30px max(24px, (100% - 1160px) / 2) 30px; scrollbar-width: thin; scrollbar-color: var(--plum) transparent; }
.strip button { flex: 0 0 min(78vw, 720px); scroll-snap-align: center; padding: 10px; border: 0; border-radius: 30px; background: #0E0B26; cursor: zoom-in; box-shadow: 0 24px 50px -24px rgba(0,0,0,.7); }
.strip button img { border-radius: 20px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.strip button span { display: block; padding: 12px 6px 4px; text-align: left; color: var(--muted); font: 16px var(--body); }

.crew { padding: 70px 0; }
.crew h2 { font-size: clamp(30px, 3.6vw, 44px); }
.crew ul { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 26px; }
.crew li strong { display: block; font: 600 22px var(--display); }
.crew li { color: var(--muted); font-size: 16px; }

.cta { padding: 90px 0 110px; text-align: center; background: radial-gradient(ellipse at 50% 100%, rgba(255,181,71,.22), transparent 60%); }
.cta h2 { font-size: clamp(34px, 4.6vw, 58px); }
.cta p { margin-top: 12px; color: var(--muted); }
.cta .stores { justify-content: center; }

dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1500px); }
dialog.lightbox::backdrop { background: rgba(10,8,30,.88); }
dialog.lightbox img { border-radius: 18px; max-height: 88vh; width: auto; }
dialog.lightbox button { position: absolute; top: 10px; right: 10px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--cream); color: var(--night); font: 600 24px var(--display); cursor: pointer; }

/* ---------- footer ---------- */
footer { padding: 40px 0 50px; border-top: 1px solid rgba(255,243,220,.12); font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero .wrap, .band .wrap, .band.flip .wrap { grid-template-columns: 1fr; gap: 36px; }
  .band.flip .shot { order: 0; }
  .doors { gap: 18px; }
  .plays .grid { grid-template-columns: 1fr; gap: 30px; }
  .top nav { gap: 16px; }
  .hero .moon { display: none; }
  .g-hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .g-hero .art { aspect-ratio: 4 / 3.4; order: -1; }
  .g-hero { padding-top: 90px; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .top nav { gap: 14px; font-size: 15px; }
  .brand { font-size: 24px; } .brand img { width: 36px; height: 36px; }
  .plays { padding-top: 56px; } .g-hero { padding-bottom: 30px; } .band { padding: 60px 0; }
  .top nav a.hide-sm { display: none; }
  .store { min-width: 0; flex: 1 1 100%; }
}
