/* ŚWIT STUDIO — the home page only (the game pages keep site.css).
   A warm orange dawn: the page takes the brown of the hills in the scene,
   dithered bands between the ground, the page and the footer.
   Two games, each with its store buttons. */

@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ground: #17110e;
  --sky: #21160f;
  --page: #3a2216;
  --line: #5a301c;
  --rust: #844324;
  --orange: #f08a3c;
  --amber: #f7a95e;
  --peach: #ffdcb0;
  --sand: #efd3ae;
  --cream: #fff1dc;
  --muted: #c49a78;
  --gutter: 16px;
  --max: 1040px;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--sand);
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* one language at a time: <span data-l="pl"> / <span data-l="en"> */
html[data-lang="en"] [data-l="pl"],
html[data-lang="pl"] [data-l="en"] { display: none !important; }

a { color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
img { display: block; max-width: 100%; }

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

/* ------------------------------------------------------------ bar */
.top { background: var(--sky); }
.bar { display: flex; align-items: center; height: 64px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--cream); text-decoration: none;
  font-weight: 700; font-size: 15px; letter-spacing: .1em;
}
.logo svg { width: 20px; height: 20px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--sand); text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange); }

.lang { display: flex; gap: 2px; }
.lang button {
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  background: none; border: 0; padding: 4px 6px; cursor: pointer;
  color: var(--muted);
}
.lang button:hover { color: var(--sand); }
.lang button[aria-pressed="true"] { color: var(--orange); box-shadow: inset 0 -2px 0 var(--orange); }

/* ------------------------------------------------------------ hero */
.hero { position: relative; height: min(84vh, 760px); min-height: 520px; background: var(--ground); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.hero .copy {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding-bottom: 22vh;
}
.eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin-bottom: .8em; text-shadow: 0 2px 0 var(--ground); }
.hero h1 {
  font-size: clamp(44px, 10vw, 112px); line-height: 1.1; letter-spacing: .04em; margin: 0;
  color: var(--peach); text-shadow: 0 4px 0 var(--ground);
}
.hero .tag {
  font-size: clamp(16px, 2.4vw, 22px); color: var(--cream);
  margin: .4em 0 0; max-width: 30ch; text-shadow: 0 2px 0 var(--ground);
}

/* dithered band between two colours: --a above fades into --b below
   (three 2 px-pixel rows: 75 %, 50 %, 25 % of --a), like the game's dawn sweep */
.dither {
  height: 12px;
  background:
    conic-gradient(var(--a) 0 75%, var(--b) 0) 0 0 / 4px 4px repeat-x,
    repeating-conic-gradient(var(--a) 0 25%, var(--b) 0 50%) 0 4px / 4px 4px repeat-x,
    conic-gradient(var(--a) 0 25%, var(--b) 0) 0 8px / 4px 4px repeat-x;
  background-color: var(--b);
}

/* ------------------------------------------------------------ games */
.games { padding-top: 64px; padding-bottom: 88px; }
.games + .games { padding-top: 0; }
.head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 0 28px; padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
  font-size: 14px; font-weight: 400; color: var(--muted);
}

/* one game per row: the text, then three portrait screenshots in phone frames */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 80px; }
.game { display: grid; gap: 28px; }
@media (min-width: 860px) {
  .game { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 48px; align-items: center; }
}

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .shots { gap: 16px; } }
.shots figure { margin: 0; }
.phone { border: 3px solid var(--peach); border-radius: 16px; padding: 5px; background: var(--ground); }
.phone img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; }
@media (min-width: 720px) {
  .phone { border-radius: 22px; padding: 8px; }
  .phone img { border-radius: 14px; }
}
.phone.tall img { aspect-ratio: 208 / 450; }
.shots figcaption { margin-top: 8px; text-align: center; font-size: 12px; color: var(--muted); }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.game { scroll-margin-top: 24px; }

.game h3 {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 0 8px;
  font-size: 26px; line-height: 1.2; letter-spacing: .04em; color: var(--cream);
}
.status { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.status::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  background: var(--orange);
}
.status.dev::before { background: none; box-shadow: inset 0 0 0 2px var(--amber); }
.game p { margin: 0 0 12px; max-width: 44ch; }
.meta { font-size: 13px; color: var(--muted); }

/* store buttons */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 18px;
  border: 3px solid var(--peach); background: var(--ground); color: var(--peach);
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase;
  cursor: pointer; transition: transform .08s ease;
}
.btn:hover { background: var(--peach); color: var(--ground); }
.btn:active { transform: translateY(2px); }
.btn small { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .85; }
.btn.soon { opacity: .6; cursor: default; }
.btn.soon:hover { background: var(--ground); color: var(--peach); }
.btn.soon:active { transform: none; }

/* ------------------------------------------------------------ footer */
footer { background: var(--ground); padding: 32px 0 40px; font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--sand); text-decoration: none; }
footer a:hover { color: var(--amber); text-decoration: underline; }
footer .soon { color: var(--muted); }
footer .copy { margin-left: auto; }
@media (max-width: 640px) { footer .copy { margin-left: 0; width: 100%; } }

/* ------------------------------------------------------------ blog
   The blog shares the bar and the footer; the page head sits on the sky
   colour and drops into the page through the same dithered band. */
.page-head { background: var(--sky); padding: 56px 0 40px; }
.page-head h1 {
  margin: 0; max-width: 22ch;
  font-size: clamp(30px, 5.4vw, 52px); line-height: 1.12; letter-spacing: .02em;
  color: var(--peach); text-shadow: 0 3px 0 var(--ground);
}
.page-head .lead { margin: 16px 0 0; max-width: 56ch; font-size: clamp(16px, 2vw, 19px); color: var(--cream); }
.page-head .meta { margin-top: 20px; }

.posts { list-style: none; margin: 0; padding: 56px 0 88px; display: grid; gap: 0; }
.posts li { padding: 28px 0; border-bottom: 2px solid var(--line); }
.posts li:first-child { padding-top: 0; }
.posts h2 { margin: 6px 0 8px; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.25; }
.posts h2 a { color: var(--cream); text-decoration: none; }
.posts h2 a:hover { color: var(--amber); }
.posts p { margin: 0; max-width: 64ch; }

.prose { padding-top: 48px; padding-bottom: 88px; font-size: 17px; line-height: 1.75; }
.prose > * { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { margin: 2.2em 0 0; font-size: 24px; line-height: 1.25; color: var(--cream); }
.prose h3 { margin: 1.8em 0 0; font-size: 19px; line-height: 1.3; color: var(--peach); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose strong { color: var(--cream); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--orange); color: var(--cream); }
.prose figure { margin: 2em 0; }
.prose figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.prose .shots { max-width: 560px; }
.prose .shots figure { margin: 0; }
.prose .shots.five { max-width: none; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 2em; }
@media (max-width: 719px) { .prose .shots.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.prose hr { border: 0; border-top: 2px solid var(--line); margin: 2.4em 0; }
.prose .note { font-size: 14px; color: var(--muted); }
.prose .btns { margin-top: 16px; }
