/* Pope the Rockstar — sister brand to nengifilms, in full colour */

:root {
  /* Light shades for backgrounds */
  --cream: #FFF8EC;
  --lilac: #ECE4FF;
  --lemon: #FFF0B3;
  --mint:  #CFF5E1;
  --peach: #FFDCCB;
  --sky:   #D5EBFF;
  --pink:  #FFDDEB;

  /* Darker shades for text and accents */
  --ink:       #1E1838;
  --ink-soft:  #4A4363;
  --lilac-dk:  #5B3FD1;
  --lemon-dk:  #8A5A00;
  --mint-dk:   #0E6E4C;
  --peach-dk:  #B23A0B;
  --sky-dk:    #1F57C4;
  --pink-dk:   #B21F62;

  --border: 2.5px solid var(--ink);
  --pop: 6px 6px 0 var(--ink);
  --pop-lg: 10px 10px 0 var(--ink);
  --radius: 22px;

  --font-display: "Italiana", "Cormorant Garamond", serif;
  --font-head: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Courier Prime", "Courier New", ui-monospace, monospace;
  --font-label: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--lemon); color: var(--ink); }

/* Colour helpers: a light background with its matching dark accent */
.c-lilac { --bg: var(--lilac); --dk: var(--lilac-dk); }
.c-lemon { --bg: var(--lemon); --dk: var(--lemon-dk); }
.c-mint  { --bg: var(--mint);  --dk: var(--mint-dk); }
.c-peach { --bg: var(--peach); --dk: var(--peach-dk); }
.c-sky   { --bg: var(--sky);   --dk: var(--sky-dk); }
.c-pink  { --bg: var(--pink);  --dk: var(--pink-dk); }

.label {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Pill tags */
.chip {
  display: inline-block;
  font-family: var(--font-label); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--dk, var(--ink)); background: var(--bg, #fff);
  border: 2px solid currentColor; border-radius: 999px; padding: 4px 12px;
}

/* Arcade button */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-label); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); background: var(--bg, var(--lemon));
  border: var(--border); border-radius: 999px; padding: 12px 22px;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn--small { padding: 8px 16px; font-size: 11px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: var(--cream);
  transition: box-shadow .3s ease;
}
.nav.is-solid { box-shadow: 0 2.5px 0 var(--ink); }
.nav__logo { font-family: var(--font-head); font-weight: 800; font-size: 16px; white-space: nowrap; display: flex; align-items: center; }
.nav__logo .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--peach-dk); box-shadow: 15px 0 0 var(--lilac-dk); margin-right: 26px; }
.nav__links { display: flex; gap: clamp(4px, 1.5vw, 12px); }
.nav__links a {
  font-family: var(--font-label); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; border: 2px solid transparent; transition: all .15s;
}
.nav__links a:hover { border-color: var(--ink); }
.nav__links a[aria-current="page"] { background: var(--ink); color: var(--cream); }
@media (max-width: 560px) {
  .nav__logo { font-size: 14px; }
  .nav__logo .dot { display: none; }
  .nav__links { gap: 2px; }
  .nav__links a { font-size: 10px; letter-spacing: .1em; padding: 6px 9px; }
  .nav__links .hide-sm { display: none; }
}

/* ---------- Checkerboard ---------- */
.checker {
  --sq: clamp(16px, 2.6vw, 22px);
  --a: var(--ink); --b: var(--lemon);
  height: calc(var(--sq) * 2);
  background: repeating-conic-gradient(var(--a) 0 25%, var(--b) 0 50%) 0 0 / calc(var(--sq) * 2) calc(var(--sq) * 2);
  animation: checker-run 6s linear infinite;
  border-block: var(--border);
}
.checker--reverse { animation-direction: reverse; }
@keyframes checker-run { to { background-position: calc(var(--sq) * 4) 0; } }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  padding-top: 64px;
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--lilac);
  position: relative; overflow: hidden;
}
.hero__center {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px var(--gutter);
}
.hero__title {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(54px, 11.5vw, 140px); line-height: .95; margin: 0;
  color: var(--ink);
  text-shadow: 4px 4px 0 #fff;
}
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 30px 0 40px; }

/* Floating controller shapes */
.shapes { position: absolute; inset: 0; pointer-events: none; }
[data-shapes] > :not(.shapes) { position: relative; z-index: 1; }
.shape { position: absolute; width: clamp(34px, 6vw, 72px); height: auto; animation: bob 5s ease-in-out infinite; }
.shape:nth-child(2n) { animation-duration: 6.5s; animation-delay: -2s; }
.shape:nth-child(3n) { animation-duration: 7.5s; animation-delay: -4s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-16px) rotate(calc(var(--r, 0deg) + 12deg)); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 150px) var(--gutter); background: var(--bg, var(--cream)); }
.section + .section { border-top: var(--border); }
.wrap { max-width: var(--max); margin: 0 auto; }
.narrow { max-width: 640px; margin: 0 auto; text-align: center; }

.intro p { color: var(--ink-soft); font-size: clamp(15px, 1.6vw, 18px); }
.intro .intro__kicker { font-family: var(--font-head); font-size: clamp(22px, 2.8vw, 32px); font-weight: 700; line-height: 1.3; color: var(--ink); margin: 26px 0; letter-spacing: -.01em; }
.intro__kicker mark { background: var(--lemon); color: inherit; padding: 0 .2em; border-radius: 6px; }
.intro__sign { font-style: italic; margin-top: 40px; }

/* Values list */
.values { list-style: none; padding: 0; margin: 60px 0 0; text-align: center; }
.values li { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0; }
.values .num {
  font-family: var(--font-label); font-size: 11px; font-weight: 500;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--bg); color: var(--dk); border: 2px solid var(--dk);
}
.values .word {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(38px, 6.5vw, 70px); line-height: 1.15; color: var(--dk);
  display: inline-block; transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.values li:hover .word { transform: rotate(-4deg) scale(1.08); }

/* Feature cards */
.features { display: grid; gap: 28px; }
.feature {
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: start;
  padding: clamp(28px, 5vw, 56px);
  background: var(--bg); border: var(--border); border-radius: var(--radius); box-shadow: var(--pop);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: var(--pop-lg); }
.feature .label { color: var(--dk); }
.feature__title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(34px, 5.6vw, 64px); line-height: 1; letter-spacing: -.03em; margin: 14px 0 18px;
}
.feature__body { color: var(--ink-soft); max-width: 560px; margin: 0 0 26px; }
.feature__icon {
  width: clamp(64px, 9vw, 96px); height: clamp(64px, 9vw, 96px); flex: none;
  border-radius: 50%; background: #fff; border: var(--border); display: grid; place-items: center;
  color: var(--dk);
}
.feature__icon svg { width: 52%; height: 52%; }
.feature:hover .feature__icon { animation: wiggle .5s ease; }
@keyframes wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

.sticker {
  display: inline-block; vertical-align: middle; margin-left: 10px; white-space: nowrap;
  font-family: var(--font-label); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  background: var(--pink); color: var(--pink-dk); border: 2px solid var(--pink-dk); border-radius: 8px;
  padding: 4px 10px; transform: rotate(-6deg);
}
@media (max-width: 640px) {
  .feature { grid-template-columns: 1fr; }
  .feature__icon { order: -1; width: 60px; height: 60px; }
  .sticker { margin: 10px 0 0; }
}

.section-head { margin-bottom: 52px; }
.section-head h2 { font-family: var(--font-head); font-weight: 800; font-size: clamp(36px, 6vw, 68px); letter-spacing: -.03em; line-height: 1; margin: 16px 0 0; }

/* ---------- Page header (games page) ---------- */
.page-head { padding: 150px var(--gutter) 70px; text-align: center; background: var(--mint); border-bottom: var(--border); position: relative; overflow: hidden; }
.page-head > :not(.shapes) { position: relative; z-index: 1; }
.page-head h1 {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(60px, 11vw, 124px); line-height: 1; margin: 18px 0; text-shadow: 4px 4px 0 #fff;
}
.page-head p { color: var(--ink-soft); max-width: 560px; margin: 0 auto; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 48px; }
.filters button {
  font-family: var(--font-label); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; cursor: pointer;
  transition: all .15s;
}
.filters button:hover { background: var(--lemon); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

/* ---------- Game cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 28px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--pop);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.card:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: var(--pop-lg); }

.cover {
  aspect-ratio: 4 / 3; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--bg); border-bottom: var(--border);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__title {
  font-family: var(--font-display); font-style: italic; font-size: 40px; line-height: 1.05;
  padding: 0 24px; color: var(--ink); text-shadow: 3px 3px 0 #fff;
}

/* "Loading…" placeholder cover */
.loading { width: 62%; }
.loading__q { font-family: var(--font-head); font-weight: 800; font-size: 64px; line-height: 1; color: var(--dk); margin-bottom: 16px; animation: bob 3s ease-in-out infinite; }
.loading__bar { height: 20px; border: var(--border); border-radius: 999px; background: #fff; overflow: hidden; }
.loading__bar span {
  display: block; height: 100%; width: 40%;
  background: repeating-linear-gradient(45deg, var(--dk) 0 8px, var(--bg) 8px 16px);
  border-right: var(--border);
  animation: load 2.8s ease-in-out infinite;
}
@keyframes load { 0% { width: 8%; } 70%, 100% { width: 88%; } }
.loading__text { font-family: var(--font-label); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--dk); margin-top: 12px; }

.card__body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card__meta .chip { font-size: 10px; padding: 3px 10px; }
.card__title { font-family: var(--font-head); font-size: 24px; font-weight: 800; margin: 4px 0 0; letter-spacing: -.02em; }
.card__blurb { color: var(--ink-soft); font-size: 14px; margin: 0; flex: 1; }
.card__cta { margin-top: 10px; align-self: flex-start; }
.card.is-soon .card__cta { background: #fff; color: var(--ink-soft); box-shadow: none; border-style: dashed; cursor: default; }
.card.is-soon .card__cta:hover { transform: none; }

.empty { text-align: center; color: var(--ink-soft); padding: 60px 0; }

/* ---------- Play page ---------- */
.player { padding: 100px var(--gutter) 70px; background: var(--sky); min-height: 100svh; }
.player__bar {
  max-width: var(--max); margin: 0 auto 22px;
  display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: end; justify-content: space-between;
}
.player__bar h1 { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1; margin: 8px 0 0; text-shadow: 3px 3px 0 #fff; }
.player__actions { display: flex; gap: 12px; }
.player__frame {
  max-width: var(--max); margin: 0 auto; overflow: hidden;
  border: var(--border); border-radius: var(--radius); box-shadow: var(--pop-lg); background: #fff;
  height: min(78vh, 820px);
}
.player__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player__about { max-width: 720px; margin: 40px auto 0; color: var(--ink-soft); text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--lemon); }
.footer .checker { --b: var(--peach); border-top: 0; }
.footer__inner {
  padding: 56px var(--gutter); max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center;
}
.footer__name { font-family: var(--font-display); font-style: italic; font-size: 36px; line-height: 1; }
.footer a.inline { color: var(--lilac-dk); border-bottom: 2px solid currentColor; }
.footer__right { text-align: right; }
@media (max-width: 560px) { .footer__right { text-align: left; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.3,1.4,.5,1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
