/* ==========================================================================
   Game site styles
   To re-colour the whole site to match your game's art, change the values
   in :root below. Everything else uses these variables.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Palette */
  --night:    #232a31;  /* "asphalt": hero, footer, main text */
  --dusk:     #36404a;  /* "steel": hover states, deeper panels */
  --mist:     #e4e6e7;  /* "concrete": page background */
  --paper:    #f7f8f8;  /* light text on dark, form panel */
  --marigold: #ffc629;  /* "hi-vis": Steam button, signup band */
  --marigold-edge: #c79300; /* the hi-vis button's pressed edge */
  --blueprint:#2361c4;  /* focus ring on light backgrounds */
  --ink-soft: #4e5964;  /* secondary text on light */

  /* Type */
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  /* Spacing & layout */
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space-section: clamp(4rem, 9vw, 7.5rem);
  --radius: 10px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--mist);
  color: var(--night);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
ul { margin: 0; padding: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  margin: 0;
}
h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 760;
  font-stretch: 80%;
  letter-spacing: -0.015em;
}

:focus-visible {
  outline: 3px solid var(--focus, var(--blueprint));
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--marigold);
  color: var(--night);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.muted { color: var(--ink-soft); }

/* ---------- Header ---------- */
.site-header {
  --focus: var(--marigold);
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  color: var(--paper);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  font-size: 0.98rem;
}
.nav a { text-decoration: none; opacity: 0.85; }
.nav a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 40rem) {
  .nav li:nth-child(-n+2) { display: none; } /* keep header tidy on phones */
}

/* ---------- Hero ---------- */
.hero {
  --focus: var(--marigold);
  position: relative;
  isolation: isolate;
  min-height: min(100svh, 56rem);
  display: grid;
  align-items: end;
  background: var(--night);
  color: var(--paper);
  overflow: hidden;
}
.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {               /* darkens the bottom so text stays readable on any art */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, var(--night) 8%, rgb(35 42 49 / 0.6) 45%, rgb(35 42 49 / 0.2) 100%);
}
.hero__inner {
  padding-top: 7rem;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
/* The game logo. The PNG has a wide transparent margin for its shadow, so the image
   is drawn larger than its letters and pulled back so the letters line up with the text. */
.hero__title {
  --logo-w: min(124%, 55rem);
  margin: 0 0 1.9rem;
  line-height: 0;
}
.hero__title img {
  width: var(--logo-w);
  max-width: none;
  height: auto;
  margin-left: calc(var(--logo-w) * -0.1016);
  margin-top: calc(var(--logo-w) * -0.142);
  margin-bottom: calc(var(--logo-w) * -0.102);
}
.hero__pitch {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0 0 2rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.hero__status {
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
  opacity: 0.8;
}

/* The one orchestrated moment: logo, pitch and buttons settle in on load */
@media (prefers-reduced-motion: no-preference) {
  .hero__title, .hero__pitch, .hero__actions, .hero__status {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero__pitch   { animation-delay: 0.12s; }
  .hero__actions { animation-delay: 0.24s; }
  .hero__status  { animation-delay: 0.36s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  line-height: 1.1;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

/* The Steam button is the boldest thing on the page: a chunky key that presses in */
.btn--steam {
  background: var(--marigold);
  color: var(--night);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 800;
  font-stretch: 85%;
  padding: 1.05rem 2rem;
  box-shadow: 0 6px 0 var(--marigold-edge), 0 14px 30px rgb(0 0 0 / 0.35);
}
.btn--steam:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--marigold-edge), 0 18px 34px rgb(0 0 0 / 0.38); }
.btn--steam:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--marigold-edge), 0 6px 14px rgb(0 0 0 / 0.3); }

.btn--ghost {
  color: var(--paper);
  box-shadow: inset 0 0 0 2px rgb(249 248 254 / 0.6);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--paper); background: rgb(249 248 254 / 0.08); }

.btn--ink {
  background: var(--night);
  color: var(--paper);
}
.btn--ink:hover { background: var(--dusk); }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); }
.section--tight { padding-top: 0; }

.split {
  display: grid;
  gap: 1.25rem 3rem;
}
@media (min-width: 56rem) {
  .split { grid-template-columns: 17rem 1fr; }
}

.prose { max-width: 38rem; }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.45;
}
.pillars {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}
.pillar {
  border-left: 4px solid var(--marigold);
  padding-left: 1.25rem;
}
.pillar h3 {
  font-size: 1.5rem;
  font-weight: 750;
  font-stretch: 85%;
  margin-bottom: 0.4rem;
}
.pillar p { margin: 0; }

/* Press fact sheet */
.facts {
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid rgb(35 42 49 / 0.25);
}
.facts div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgb(35 42 49 / 0.25);
}
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

/* ---------- Screenshots ---------- */
#screenshots h2 { margin-bottom: 2rem; }
.shots {
  list-style: none;
  display: grid;
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 56rem) {
  .shots { grid-template-columns: repeat(4, 1fr); }
}
.shots a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--night);
  aspect-ratio: 16 / 9;
}
.shots img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.shots a:hover img { transform: scale(1.03); }
.steam-widget {
  display: block;
  width: 100%;
  max-width: 646px;
  height: 190px;
  border: 0;
  margin-top: 2.5rem;
}

/* ---------- Email signup ---------- */
.signup {
  position: relative;
  background: var(--marigold);
  color: var(--night);
  padding-block: clamp(4rem, 7.5vw, 6rem) clamp(3.5rem, 7vw, 5.5rem);
}
.signup::before {           /* hazard tape along the top edge */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--night) 0 16px, var(--marigold) 16px 32px);
}
.signup__inner {
  display: grid;
  gap: 2rem 4rem;
  align-items: center;
}
@media (min-width: 56rem) {
  .signup__inner { grid-template-columns: 1fr 1fr; }
}
.signup__text p { margin: 1rem 0 0; max-width: 34rem; }
.signup__form {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  box-shadow: 6px 6px 0 var(--night);
  min-height: 6rem;
}
.signup__form noscript p { margin: 0; }
.signup__placeholder {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 6rem;
  border: 2px dashed var(--ink-soft);
  border-radius: calc(var(--radius) - 4px);
  color: var(--ink-soft);
  text-align: center;
  padding: 1rem;
}
/* Tidy up the EmailOctopus form inside the white panel */
.signup__form [data-form],
.signup__form .emailoctopus-form-wrapper { margin: 0 !important; max-width: none !important; }

/* ---------- Press ---------- */
.section--press { padding-top: 0; }
.section--press .split {
  /* rule above the press section, aligned with the text rather than the screen edge */
  background: linear-gradient(var(--night), var(--night)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 2px no-repeat;
  padding-top: var(--space-section);
}
.press__actions { margin: 1.75rem 0 1.25rem !important; }

/* ---------- Footer ---------- */
.site-footer {
  --focus: var(--marigold);
  background: var(--night);
  color: var(--paper);
  padding-block: 2.5rem;
  font-size: 0.95rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
}
.site-footer p { margin: 0; }
.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.site-footer a:hover { color: var(--marigold); }

/* ---------- Lightbox ---------- */
.lightbox {
  --focus: var(--marigold);
  width: min(96vw, 1400px);
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--night);
  color: var(--paper);
  overflow: hidden;
}
.lightbox::backdrop { background: rgb(18 22 26 / 0.9); }
.lightbox__img {
  width: 100%;
  max-height: calc(96vh - 4.5rem);
  object-fit: contain;
  background: #000;
}
.lightbox__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}
.lightbox__count { margin-right: auto; margin-left: 0.25rem; opacity: 0.8; font-size: 0.95rem; }
.lightbox__btn {
  font: inherit;
  font-weight: 700;
  color: var(--paper);
  background: rgb(249 248 254 / 0.1);
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.lightbox__btn:hover { background: rgb(249 248 254 / 0.2); }
.lightbox__btn[data-prev] { order: -1; }
.lightbox__close { background: var(--marigold); color: var(--night); }
.lightbox__close:hover { background: #ffd65e; }

/* ---------- Simple pages (404, privacy) ---------- */
.simple {
  padding-block: clamp(3rem, 8vw, 6rem);
  max-width: 44rem;
}
.simple h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 760;
  font-stretch: 80%;
  margin: 1rem 0 1.5rem;
}
.simple h2 {
  font-size: 1.5rem;
  font-stretch: 90%;
  margin: 2.25rem 0 0.75rem;
}
