/* Fonts: the two pixel faces are the ones the game itself uses. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("assets/fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Colours are sampled from the game: night street, plum panels, lamp gold. */
:root {
  --night: #120e1c;
  --dusk: #1b1429;
  --panel: #241a35;
  --line: #3b2c50;
  --parchment: #f3ead8;
  --haze: #b9abc8;
  --gold: #f5a524;
  --gold-deep: #c9791a;
  --ink: #2a1a08;

  --font-display: "Pixelify Sans", "IBM Plex Sans", system-ui, sans-serif;
  --font-label: "Silkscreen", "Pixelify Sans", monospace;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
}
.skip:focus {
  top: 1rem;
}

/* Type */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.4rem, 10.5vw, 6.25rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
h2 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
}
h3 {
  font-size: 1.3rem;
  line-height: 1.2;
}

.label {
  margin-bottom: 0.9rem;
  color: var(--gold);
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hook {
  margin-top: 0.75rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 600;
}
.sub {
  margin-top: 0.6rem;
  color: var(--haze);
  font-size: 1.15rem;
}
.status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status span {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  color: var(--haze);
}
.status span:first-child {
  border-color: var(--gold-deep);
  color: var(--gold);
}
.lead {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--haze);
  font-size: 1.2rem;
}
.lead strong {
  color: var(--parchment);
  font-weight: 600;
}

.prose {
  max-width: 38rem;
}
.prose p + p {
  margin-top: 1rem;
}

.textlink {
  text-decoration: underline;
  text-decoration-color: var(--gold-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.textlink:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(18 14 28 / 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}
.brand__mark {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--gold);
}
.brand__horizon {
  fill: var(--haze);
}
.top__nav {
  display: flex;
  gap: 0.25rem;
}
.top__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  color: var(--haze);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.top__nav a:hover {
  color: var(--parchment);
}

/* Hero */
.hero {
  padding-block: clamp(3rem, 8vw, 6rem);
  /* one lamp: warm light falling from where the screenshot sits */
  background: radial-gradient(42rem 30rem at 82% 30%, rgb(245 165 36 / 0.13), transparent 70%);
}
.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding-inline: 1.5rem;
  background: var(--gold);
  /* the hard lower edge copies the game's own buttons */
  box-shadow: 0 4px 0 var(--gold-deep);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--gold-deep);
}

/* Screenshots sit in a plain bezel; pixels stay crisp when scaled up. */
.phone {
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 14px;
  background: #000;
}
.phone img {
  width: 100%;
}
.phone a,
a.phone {
  display: block;
  cursor: zoom-in;
}
.phone--hero {
  width: min(100%, 19rem);
  margin-inline: auto;
  border-color: #4d3a66;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.8);
}

/* Sections */
.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
}
.section--alt {
  background: var(--dusk);
}
.two {
  display: grid;
  gap: 2.5rem;
}

.facts {
  display: grid;
  align-content: start;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--haze);
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  line-height: 2;
  text-transform: uppercase;
}
.facts dd {
  text-align: right;
}

.two h2 + .prose,
.spot .prose {
  margin-top: 1.5rem;
}

.features {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.features .phone {
  max-width: 17rem;
}
.features h3 {
  margin-top: 1.1rem;
}
.features p {
  max-width: 22rem;
  margin-top: 0.45rem;
  color: var(--haze);
}

.spot {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.phone--spot {
  width: min(100%, 19rem);
  margin-inline: auto;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
.gallery a {
  display: block;
  transition: border-color 0.15s ease;
}
.gallery a:hover {
  border-color: var(--gold);
}

.studio {
  margin-top: 1.5rem;
}
.contact {
  max-width: 38rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--panel);
}
.contact p {
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.foot {
  border-top: 1px solid var(--line);
  color: var(--haze);
  font-size: 0.9rem;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.75rem;
}

@media (max-width: 40rem) {
  .top__nav a:not(:first-child) {
    display: none;
  }
}

@media (min-width: 48rem) {
  .hero__grid {
    grid-template-columns: 1.25fr 0.75fr;
  }
  .two {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
  }
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .spot {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
  }
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}

/* Screenshot viewer: three quarters of the window, with previous/next and zoom. */
.viewer {
  box-sizing: content-box;
  /* The window hugs the picture, so there is nothing beside it. Fitted, the picture is as tall as
     three quarters of the screen allows; zooming widens the window until it reaches the cap. */
  --cap-w: 75vw;
  --cap-h: 75vh;
  --bar: calc(2.75rem + 1px);
  --stage-h: min(calc(var(--cap-h) - var(--bar)), calc(var(--cap-w) * 16 / 9));
  width: min(var(--cap-w), calc(var(--stage-h) * 9 / 16 * var(--zoom, 1)));
  height: calc(var(--stage-h) + var(--bar));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--dusk);
  color: var(--parchment);
  overflow: hidden;
}
.viewer[open] {
  display: grid;
  grid-template-rows: auto 1fr;
}
.viewer::backdrop {
  background: rgb(8 6 14 / 0.82);
}
.viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 1rem;
  border-bottom: 1px solid var(--line);
}
.viewer__count {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}
.viewer__tools {
  display: flex;
}
.viewer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--parchment);
  font: 600 1.5rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.viewer button:hover:not(:disabled) {
  background: var(--panel);
  color: var(--gold);
}
.viewer button:disabled {
  opacity: 0.35;
  cursor: default;
}
.viewer__stage {
  display: flex;
  min-height: 0;
  overflow: auto;
  background: var(--dusk);
  /* panning is by drag, wheel or touch; scrollbars would eat into the picture */
  scrollbar-width: none;
}
.viewer__stage::-webkit-scrollbar {
  display: none;
}
.viewer__stage img {
  flex: none;
  width: auto;
  max-width: none;
  /* --zoom 1 fits the picture to the stage; higher values overflow and can be dragged */
  height: calc(100% * var(--zoom, 1));
  margin: auto;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.viewer__stage.is-zoomed img {
  cursor: grab;
}
.viewer__stage.is-dragging img {
  cursor: grabbing;
}
.viewer .viewer__nav {
  position: absolute;
  top: 50%;
  height: 4rem;
  background: rgb(18 14 28 / 0.75);
  font-size: 2rem;
  transform: translateY(-50%);
}
.viewer__nav--prev {
  left: 0;
}
.viewer__nav--next {
  right: 0;
}

@media (max-width: 40rem) {
  .viewer {
    --cap-w: 94vw;
    --cap-h: 80vh;
  }
}
