/* Polon Games Lab. Mobile first: the base rules are for phones; wider screens add to them
   (min-width 600px: large phones / small tablets, 900px: tablets and desktops). */

@font-face { font-family: "Marcellus SC"; src: url("../fonts/MarcellusSC-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Medium.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0e0c14;
  --panel: #17141f;
  --line: #2c2738;
  --text: #e9e4da;
  --muted: #a69fb3;
  --gold: #d8b46a;
  --gold-soft: #f0d9a4;
  --max: 1080px;
  --pad: 18px;          /* page side margin */
  --gap: 44px;          /* space between sections */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.6 "Figtree", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-soft); text-underline-offset: 3px; }
h1, h2, h3, .brand { font-family: "Marcellus SC", Georgia, serif; font-weight: 400; letter-spacing: .02em; line-height: 1.2; }
h2 { font-size: 26px; margin: 0 0 18px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 6px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(14,12,20,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 54px; gap: 12px; }
.brand { color: var(--text); text-decoration: none; font-size: 17px; white-space: nowrap; }
.brand span { color: var(--gold); }
.top nav { display: flex; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; padding: 15px 8px; }
.top nav a:last-child { padding-right: 0; }
.top nav a[aria-current] { color: var(--gold-soft); }

/* buttons and small parts */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border-radius: 12px; border: 1px solid var(--gold); color: var(--gold-soft); text-decoration: none; font-weight: 700; font-size: 15px; text-align: center; }
.btn.gold { background: var(--gold); color: var(--bg); }
.btn.soon { border-color: var(--line); color: var(--muted); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; background: rgba(216,180,106,.16); color: var(--gold-soft); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.links { display: grid; gap: 10px; margin-top: 22px; }
.minor { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 14px; }
.minor a { color: var(--muted); }
.more { margin: 22px 0 0; }
.more .btn { width: 100%; }

section { padding: var(--gap) 0; }
section + section { border-top: 1px solid var(--line); }

/* hero: the studio intro's logo loop (tools/record_intro.gd), on the intro's own black */
.hero { background: #05040a; text-align: center; padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.hero .banner { width: 100%; max-width: 960px; margin: 0 auto; image-rendering: pixelated; }
.hero .tagline { margin: 0 auto; padding: 0 var(--pad); color: var(--muted); font-size: 15px; }

/* featured carousel: on phones a row of cards (the next one peeks in), text under the picture */
.carousel { position: relative; margin: 0 calc(-1 * var(--pad)); }
.slides { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); padding: 0 var(--pad) 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 86%; scroll-snap-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.slide > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.slide-text { padding: 14px 16px 18px; }
.slide-text h3 { font-size: 26px; margin: 8px 0 4px; }
.slide-text p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.slide-text .btn { width: 100%; }
.arrow { display: none; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.3); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--gold); width: 22px; border-radius: 4px; }
.carousel.single .arrow, .carousel.single .dots { display: none; }
.carousel.single .slide { flex-basis: 100%; }

/* library tiles: two columns on phones */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--text); text-decoration: none; }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tile-text { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.tile-title { display: flex; justify-content: space-between; gap: 6px; font-family: "Marcellus SC", Georgia, serif; font-size: 17px; line-height: 1.2; }
.tile .ext { color: var(--gold); font-family: "Figtree", sans-serif; font-size: 14px; }
.tile-meta { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.tile .badge { align-self: flex-start; margin-top: auto; }
.list { padding: 28px 0 56px; }
.list h1 { font-size: 32px; margin: 0 0 20px; }

/* studio + contact */
.about { display: grid; gap: 32px; }
.about p { margin: 0 0 14px; }
.contact .mail { font-weight: 700; font-size: 19px; text-decoration: none; word-break: break-all; }

/* a game's own page: the picture, then the title under it on phones */
.game-hero { position: relative; border-bottom: 1px solid var(--line); }
.game-hero > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game-hero .wrap { display: flex; align-items: center; gap: 14px; padding-top: 16px; padding-bottom: 20px; position: relative; }
.game-hero .icon { width: 72px; height: 72px; flex: none; border-radius: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.6); background: var(--panel); }
.game-hero h1 { font-size: 30px; margin: 4px 0 0; }
.game-hero p { margin: 0; color: var(--muted); font-size: 14px; }
.game-page section { padding: 32px 0; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.features li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.features h3 { font-size: 18px; margin: 0 0 2px; color: var(--gold-soft); }
.features p { margin: 0; color: var(--muted); font-size: 15px; }
/* screenshots and art: a sideways strip on phones */
.shots, .art { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 6px; scroll-padding: 0 var(--pad); scrollbar-width: none; }
.shots::-webkit-scrollbar, .art::-webkit-scrollbar { display: none; }
.shots > a { flex: 0 0 88%; scroll-snap-align: start; }
.shots img { border-radius: 10px; border: 1px solid var(--line); }
.art img { flex: 0 0 42%; min-width: 0; scroll-snap-align: start; border-radius: 10px; aspect-ratio: 597 / 800; object-fit: cover; }

/* legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 28px var(--pad) 56px; }
.doc h1 { font-size: 30px; margin: 0 0 4px; }
.doc .meta { color: var(--muted); margin: 0 0 28px; font-size: 14px; }
.doc h2 { font-size: 21px; margin: 34px 0 10px; color: var(--gold-soft); }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
/* the data table: a card per row on phones */
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc tr:first-child { display: none; }
.doc tr { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; }
.doc td { display: block; padding: 2px 0; }
.doc td:first-child { font-weight: 700; margin-bottom: 4px; }
.doc td + td { color: var(--muted); }
.doc td + td::before { content: attr(data-label) ": "; color: var(--gold); font-weight: 700; font-size: 13px; }
.note { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 16px; margin: 20px 0; }
.note p { margin: 0; }
.fill { background: #5b1f2a; color: #ffd2d9; padding: 0 5px; border-radius: 4px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-direction: column; gap: 10px; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer .legal { display: block; margin: 16px auto 0; font-size: 11.5px; line-height: 1.5; color: #6c6578; }

/* hover only where there is a mouse */
@media (hover: hover) {
  a:hover { color: #fff; }
  .top nav a:hover { color: var(--gold-soft); }
  .btn:hover { background: var(--gold); color: var(--bg); }
  .btn.gold:hover { background: var(--gold-soft); }
  .btn.soon:hover { background: none; color: var(--muted); }
  .tile { transition: border-color .15s, transform .15s; }
  .tile:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
}

/* large phones, small tablets */
@media (min-width: 600px) {
  :root { --pad: 28px; --gap: 64px; }
  h2 { font-size: 32px; }
  .hero .tagline { font-size: 17px; }
  .slide { flex-basis: 70%; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
  .tile-title { font-size: 20px; }
  .tile-meta { font-size: 13.5px; }
  .links { display: flex; flex-wrap: wrap; }
  .more .btn { width: auto; }
  .shots > a { flex-basis: 70%; }
  .art img { flex-basis: 26%; }
  .doc { padding-top: 48px; }
  .doc h1 { font-size: 40px; }
  /* the data table is a table again */
  .doc tr:first-child { display: table-row; }
  .doc tr { display: table-row; background: none; border: 0; padding: 0; }
  .doc td, .doc th { display: table-cell; text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .doc th { color: var(--muted); font-weight: 700; }
  .doc td:first-child { font-weight: 500; margin: 0; }
  .doc td + td { color: var(--text); }
  .doc td + td::before { content: none; }
  footer .wrap { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* tablets and desktops */
@media (min-width: 900px) {
  :root { --gap: 80px; }
  body { font-size: 17px; line-height: 1.65; }
  h2 { font-size: 36px; margin-bottom: 26px; }
  .top .wrap { height: 64px; }
  .brand { font-size: 22px; }
  .top nav a { font-size: 15px; padding: 20px 11px; }
  .hero { padding-bottom: 40px; }
  /* the carousel: one full-width picture at a time, the text over it */
  .carousel { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
  .slides { gap: 0; padding: 0; scroll-padding: 0; }
  .slide { flex-basis: 100%; border: 0; border-radius: 0; aspect-ratio: 16 / 8; }
  .slide > img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  .slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,8,14,.95) 0%, rgba(10,8,14,.8) 40%, rgba(10,8,14,0) 75%); }
  .slide-text { position: absolute; z-index: 1; left: 88px; bottom: 48px; max-width: 460px; padding: 0; }
  .slide-text h3 { font-size: 52px; margin: 12px 0 8px; }
  .slide-text p { font-size: 18px; color: var(--text); margin-bottom: 22px; }
  .slide-text .btn { width: auto; }
  .arrow { display: block; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(10,8,14,.6); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; }
  .arrow:hover { border-color: var(--gold); color: var(--gold-soft); }
  .arrow.prev { left: 14px; }
  .arrow.next { right: 14px; }
  .dots { position: absolute; z-index: 2; right: 24px; bottom: 22px; margin: 0; }
  .list { padding: 56px 0 96px; }
  .list h1 { font-size: 44px; margin-bottom: 28px; }
  .about { grid-template-columns: 1fr 1fr; gap: 48px; }
  .contact .mail { font-size: 22px; }
  /* a game's page: the title over the bottom of the picture */
  .game-hero { min-height: 440px; display: flex; align-items: flex-end; }
  .game-hero > img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  .game-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,12,20,.1) 0%, rgba(14,12,20,.55) 55%, var(--bg) 100%); }
  .game-hero .wrap { z-index: 1; width: 100%; gap: 24px; margin-top: 0; padding-bottom: 36px; }
  .game-hero .icon { width: 112px; height: 112px; border-radius: 26px; }
  .game-hero h1 { font-size: 64px; margin: 8px 0 2px; text-shadow: 0 2px 20px #000; }
  .game-hero p { color: var(--text); font-size: 17px; text-shadow: 0 1px 10px #000; }
  .game-page section { padding: 64px 0; }
  .features { gap: 14px; }
  .features li { padding: 16px 20px; }
  .features h3 { font-size: 20px; }
  .shots, .art { display: grid; overflow: visible; margin: 0; padding: 0; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .art { grid-template-columns: repeat(6, 1fr); gap: 14px; }
}
