/* JiliPrime Originals provider site.
 *
 * Dark only, on purpose: the wordmark is gold on black and both games are set
 * at night, so a light theme would fight the brand rather than serve it.
 * One accent (logo gold). Radius rule: pills for interactive controls, 20px for
 * every surface and image, nothing else.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #0a0b14;
  --bg-2: #10111f;
  --surface: #151729;
  --surface-2: #1b1e35;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --text: #f3f1ec;
  --muted: #a9abc2;
  --gold: #f5b82e;
  --gold-hi: #ffd56b;
  --gold-ink: #1c1405;
  --indigo: 58 64 140;
  --rose: 160 60 120;
  --shadow: 0 0 0;
  --radius: 20px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--gold); color: var(--gold-ink); }
html { scrollbar-color: var(--surface-2) var(--bg); }
a { text-underline-offset: 0.2em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 30;
  background: var(--gold); color: var(--gold-ink); padding: 8px 16px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.icon--lg { width: 28px; height: 28px; color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 600 1rem/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: var(--gold-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), 0 10px 24px -12px rgb(var(--shadow) / 0.8);
}
.btn--gold:hover { transform: translateY(-1px); background: linear-gradient(180deg, #ffe08c, var(--gold-hi)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 14px 28px -12px rgb(var(--shadow) / 0.85); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--text); background: rgb(255 255 255 / 0.03); }
.btn--ghost:hover { border-color: rgb(255 255 255 / 0.3); background: rgb(255 255 255 / 0.06); }
.btn--ghost .icon { transition: transform 0.25s var(--ease); }
.btn--ghost:hover .icon { transform: translateX(3px); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 1.0625rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgb(10 11 20 / 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.nav__brand img { height: 40px; width: auto; }
.nav nav { margin-left: auto; }
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a { display: inline-block; padding: 10px 2px; text-decoration: none; color: var(--muted); font-size: 0.9375rem; font-weight: 500; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
@media (max-width: 760px) {
  .nav nav { display: none; }
  .nav__inner { justify-content: space-between; gap: 12px; }
  .nav__brand img { height: 34px; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
  isolation: isolate;
  overflow-x: clip; /* the tilted art may poke past the gutter on phones */
}
/* Stage light: the logo's gold falling on an indigo night, kept low so it reads as atmosphere. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 40%, rgb(245 184 46 / 0.16), transparent 70%),
    radial-gradient(50% 60% at 10% 0%, rgb(var(--indigo) / 0.35), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__title {
  font-size: clamp(2.5rem, 1.5rem + 3vw, 4.25rem);
  font-weight: 750; line-height: 1.02; letter-spacing: -0.03em;
}
.hero__title em { font-style: normal; color: var(--gold); }
.hero__sub { margin-top: 24px; max-width: 34ch; color: var(--muted); font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; }
.hero__ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__art { position: relative; aspect-ratio: 1 / 1.08; }
.hero__art img { position: absolute; border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.8); }
.hero__key { width: 64%; left: 4%; top: 0; transform: rotate(-4deg); }
.hero__phone { width: 40%; right: 2%; bottom: 0; transform: rotate(5deg); border-radius: 28px; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 460px; width: 100%; margin-inline: auto; }
}

/* ---------- Section scaffolding ---------- */
.section-title {
  font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.025em;
}

/* ---------- Games ---------- */
.games { padding: clamp(64px, 9vw, 120px) 0; background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.games .section-title { max-width: 16ch; }
.game { margin-top: clamp(40px, 6vw, 72px); }
.game__title { font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.game p { color: var(--muted); margin-top: 14px; max-width: 46ch; font-size: 1.0625rem; }
.tag {
  font: 500 0.8125rem/1 var(--body); letter-spacing: 0; color: var(--gold-hi);
  border: 1px solid rgb(245 184 46 / 0.35); background: rgb(245 184 46 / 0.08);
  padding: 7px 12px; border-radius: 999px;
}

/* Perya Pop: overlapping desktop + phone stage, copy to the right. */
.game--pop { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.game__stage { position: relative; padding-bottom: 8%; padding-right: 8%; }
.game__desktop { border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: 0 30px 70px -35px rgb(0 0 0 / 0.9); }
.game__mobile {
  position: absolute; right: 0; bottom: 0; width: 26%;
  border-radius: 18px; border: 1px solid var(--line-strong);
  box-shadow: 0 24px 50px -20px rgb(0 0 0 / 0.85);
}

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 28px 0 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.facts dt { color: var(--muted); font-size: 0.8125rem; }
.facts dd { margin: 4px 0 0; font: 700 1.375rem/1.2 var(--display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* Perya Nights: full-width capture, a different composition from Perya Pop on purpose. */
.game__wide { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.9); }
.game__wide img { width: 100%; transition: transform 1.2s var(--ease); }
.game__wide:hover img { transform: scale(1.015); }
.game__row { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: 32px; }
.facts--row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; }
.facts--row dd { font-size: 1.125rem; }

@media (max-width: 900px) {
  .game--pop, .game__row { grid-template-columns: 1fr; }
  .facts--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Platform bento ---------- */
.platform { padding: clamp(64px, 9vw, 120px) 0; background: var(--bg-2); }
.bento {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "server server server server fair fair"
    "server server server server mobile mobile"
    "wallet wallet office office office office"
    "config config office office office office";
}
.cell {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 2.5vw, 32px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  min-height: 220px;
}
.cell h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.cell p { color: var(--muted); font-size: 0.9875rem; max-width: 42ch; }
.cell .icon--lg { margin-bottom: 6px; }
.cell--server { grid-area: server; min-height: 420px; background: radial-gradient(90% 80% at 85% 10%, rgb(var(--indigo) / 0.55), transparent 70%), var(--surface); }
.cell--fair { grid-area: fair; }
.cell--mobile { grid-area: mobile; }
.cell--wallet { grid-area: wallet; }
.cell--config { grid-area: config; background: linear-gradient(160deg, rgb(245 184 46 / 0.14), transparent 60%), var(--surface); border-color: rgb(245 184 46 / 0.2); }
.cell--office { grid-area: office; background: radial-gradient(80% 90% at 100% 0%, rgb(var(--rose) / 0.28), transparent 70%), var(--surface); }

.cell__art { position: absolute; top: 18px; right: 18px; display: flex; align-items: flex-end; }
.cell__art img { width: clamp(120px, 15vw, 190px); filter: drop-shadow(0 20px 30px rgb(0 0 0 / 0.5)); transition: transform 0.6s var(--ease); }
.cell__art img + img { margin-left: -40px; margin-top: 40px; }
.cell--server:hover .cell__art img:first-child { transform: translateY(-6px) rotate(-3deg); }
.cell--server:hover .cell__art img + img { transform: translateY(4px) rotate(4deg); }

.cell__symbols { position: absolute; top: 20px; right: 20px; display: flex; gap: 4px; }
.cell__symbols img { width: clamp(72px, 9vw, 132px); filter: drop-shadow(0 14px 20px rgb(0 0 0 / 0.5)); }

@media (max-width: 900px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "server server"
      "fair mobile"
      "wallet config"
      "office office";
  }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "server" "fair" "mobile" "wallet" "config" "office"; }
  .cell { min-height: 0; }
  .cell--server { min-height: 380px; }
  .cell--office { padding-top: 120px; }
}

/* ---------- Brand assets ---------- */
.brand { padding: clamp(64px, 9vw, 120px) 0; }
.brand__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.brand__stage {
  border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(70% 90% at 50% 50%, rgb(245 184 46 / 0.12), transparent 70%), #07070c;
  padding: clamp(32px, 6vw, 80px) clamp(20px, 4vw, 48px);
}
.brand__stage img { width: 100%; }
.brand__copy p { color: var(--muted); margin-top: 18px; max-width: 44ch; }
.downloads { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.downloads a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; transition: border-color 0.2s, background-color 0.2s, transform 0.25s var(--ease);
}
.downloads a:hover { border-color: rgb(245 184 46 / 0.45); background: var(--surface-2); }
.downloads a:active { transform: scale(0.99); }
.downloads strong { display: block; font-weight: 600; }
.downloads small { color: var(--muted); font-size: 0.8125rem; }
.downloads .icon { color: var(--gold); width: 22px; height: 22px; }
@media (max-width: 860px) { .brand__grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { padding: 0 0 clamp(64px, 9vw, 120px); }
.contact__inner {
  text-align: center; padding: clamp(48px, 8vw, 96px) var(--gutter);
  border-radius: var(--radius); border: 1px solid rgb(245 184 46 / 0.22);
  background:
    radial-gradient(60% 120% at 50% 0%, rgb(245 184 46 / 0.16), transparent 70%),
    var(--surface);
}
.contact__title { font-size: clamp(2rem, 1.5rem + 2.6vw, 3.75rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.04; max-width: 18ch; margin-inline: auto; }
.contact__inner > p { color: var(--muted); margin: 18px auto 32px; max-width: 46ch; font-size: 1.0625rem; }
.contact__inner .contact__addr { margin: 16px auto 0; font-size: 0.9375rem; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.foot__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; color: var(--muted); font-size: 0.875rem; }
.foot__inner img { height: 32px; width: auto; }
.foot__copy { margin-left: auto; }
@media (max-width: 640px) { .foot__copy { margin-left: 0; } }

/* ---------- Motion ----------
 * Hero rises in sequence on load (establishes reading order); sections fade up
 * once as they enter (pacing on a long scroll). Both only when motion is welcome,
 * and only when JS is running, so content is never hidden without a way back. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
  .hero__key { animation: settle-l 1.1s var(--ease) 0.15s both; }
  .hero__phone { animation: settle-r 1.1s var(--ease) 0.3s both; }
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes settle-l { from { opacity: 0; transform: rotate(-9deg) translateY(30px); } }
@keyframes settle-r { from { opacity: 0; transform: rotate(11deg) translate(20px, 40px); } }
/* Reduced motion keeps colour and border feedback; only movement goes. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .btn:active, .btn--ghost:hover .icon, .downloads a:active,
  .game__wide:hover img, .cell--server:hover .cell__art img { transform: none; }
}
