/* Foxmoon Studios
   Colours come from the logo kit: the night behind the lockups, the fox's
   orange and the moon's cream from the wordmark, the nebula from the galaxy
   background. Type is Barlow Condensed, the nearest web face to the
   wordmark's Bahnschrift, with Barlow for reading. */

/* Barlow and Barlow Condensed, self-hosted (SIL Open Font License, assets/fonts/OFL.txt) */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/barlow-condensed-700.woff2") format("woff2"); }

:root {
  --night: #110e22;
  --deep: #0c0910;
  --fox: #ea8632;
  --fox-light: #f6a35a;
  --moon: #f3efc4;
  --nebula: #9048a0;
  --haze: #aaa4c4;
  --ink: #0f0d17;
  --line: rgb(243 239 196 / 0.12);

  --display: "Barlow Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --text: "Barlow", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 34rem;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* jump links land below the fixed header */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--moon);
  font: 400 1.125rem/1.6 var(--text);
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 0.005em;
}

h3 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

p {
  margin: 0;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 30;
  padding: 0.5rem 1rem;
  background: var(--fox);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 70rem);
  margin-inline: auto;
}

/* Header: stays at the top of the screen. It's clear over the hero, and
   once the page scrolls under it (the script adds .is-scrolled) it slims
   down and gets a backdrop so the links stay readable. */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  padding-block: 1.25rem;
  transition: padding-block 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.site-header.is-scrolled {
  padding-block: 0.625rem;
  background: rgb(12 9 16 / 0.86);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  text-decoration: none;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
}

.site-nav ul {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--moon);
}

.site-nav a:hover {
  color: var(--fox-light);
}

/* Hero: the sleeping fox under the galaxy's moon */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6.5rem var(--gutter) 5rem;
  text-align: center;
  background:
    linear-gradient(to bottom, rgb(17 14 34 / 0) 72%, var(--night)),
    url("assets/galaxy.webp") 70% 0 / cover no-repeat,
    var(--deep);
}

.hero-inner {
  display: grid;
  justify-items: center;
}

.fox {
  position: relative;
  width: min(64vw, 23rem);
  aspect-ratio: 1;
}

.fox::before {
  content: "";
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgb(243 239 196 / 0.34) 0%,
    rgb(243 239 196 / 0.16) 34%,
    rgb(243 239 196 / 0.05) 52%,
    rgb(243 239 196 / 0) 68%
  );
  pointer-events: none;
}

.fox-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fox-toggle {
  position: absolute;
  right: -0.25rem;
  bottom: 0.25rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgb(243 239 196 / 0.3);
  border-radius: 50%;
  background: rgb(12 9 16 / 0.6);
  color: var(--moon);
  cursor: pointer;
  opacity: 0.7;
}

.fox-toggle:hover,
.fox-toggle:focus-visible {
  opacity: 1;
}

.fox-toggle svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: currentColor;
}

.fox-toggle[hidden] {
  display: none;
}

.hero h1 {
  width: min(88vw, 38rem);
  margin-top: clamp(1.25rem, 4vw, 2rem);
}

.hero h1 img {
  width: 100%;
  height: auto;
}

.tagline {
  max-width: 30rem;
  margin-top: 1.25rem;
  font-size: clamp(1.125rem, 2.4vw, 1.3125rem);
  line-height: 1.5;
  color: rgb(243 239 196 / 0.88);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.625rem 1.375rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
  flex: none;
}

.btn-primary {
  background: var(--fox);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--fox-light);
}

.btn-ghost {
  border-color: rgb(243 239 196 / 0.55);
  color: var(--moon);
}

.btn-ghost:hover {
  border-color: var(--moon);
  background: rgb(243 239 196 / 0.08);
}

/* Games */

.section {
  padding-block: clamp(4rem, 10vw, 7rem);
}

.games {
  padding-top: clamp(2rem, 6vw, 4rem);
}

.game-list {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4.5vw, 4rem);
  align-items: center;
  padding-block: clamp(2rem, 5vw, 3.25rem);
}

.game + .game {
  border-top: 1px solid var(--line);
}

.game-art {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--deep);
  box-shadow: 0 1.5rem 3rem -1.5rem rgb(0 0 0 / 0.7);
}

.game-art img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.game-art:hover img {
  transform: scale(1.025);
}

.game-status {
  margin-top: 0.625rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--fox-light);
}

.game-desc {
  max-width: var(--measure);
  margin-top: 1rem;
}

.game .btn {
  margin-top: 1.5rem;
}

/* Prototypes: a smaller tier under the released games */

.prototypes {
  margin-top: clamp(1rem, 3vw, 2rem);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}

.tier {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  color: var(--haze);
}

.tier-note {
  max-width: var(--measure);
  margin-top: 0.5rem;
  color: var(--haze);
}

.prototypes .game-list {
  margin-top: 0;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--haze);
}

.game--small {
  grid-template-columns: 19.6875rem minmax(0, 1fr);
  padding-bottom: 0;
}

.game-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  line-height: 1;
}

/* Follow along */

.follow {
  background:
    radial-gradient(60rem 30rem at 85% 0%, rgb(144 72 160 / 0.22), transparent 70%),
    var(--deep);
}

.lede {
  max-width: var(--measure);
  margin-top: 1.25rem;
  font-size: 1.25rem;
  color: rgb(243 239 196 / 0.9);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem clamp(0.75rem, 3vw, 2rem);
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.socials a {
  display: grid;
  justify-items: center;
  gap: 0.625rem;
  width: 5rem;
  text-decoration: none;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 2px solid rgb(243 239 196 / 0.3);
  border-radius: 50%;
  transition: border-color 0.15s, background-color 0.15s;
}

.social-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: var(--moon);
  transition: fill 0.15s;
}

.social-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.1;
  color: var(--haze);
  transition: color 0.15s;
}

.socials a:hover .social-icon {
  border-color: var(--fox-light);
  background: rgb(243 239 196 / 0.06);
}

.socials a:hover svg {
  fill: var(--fox-light);
}

.socials a:hover .social-name {
  color: var(--moon);
}

/* Contact */

.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
}

.contact p {
  max-width: var(--measure);
  margin-top: 1rem;
  color: rgb(243 239 196 / 0.9);
}

.email {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 3rem);
  line-height: 1.1;
  color: var(--fox);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.email:hover {
  color: var(--fox-light);
}

.contact-fox {
  width: clamp(6rem, 14vw, 9rem);
  height: auto;
  opacity: 0.95;
}

/* Footer */

.site-footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--haze);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer .brand {
  font-size: 1.25rem;
  color: var(--moon);
}

.site-footer .brand img {
  width: 2rem;
  height: 2rem;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-socials a {
  display: block;
  padding: 0.375rem;
}

.footer-socials svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--haze);
  transition: fill 0.15s;
}

.footer-socials a:hover svg {
  fill: var(--moon);
}

/* 404 */

.lost {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6rem var(--gutter) 4rem;
  text-align: center;
  background:
    url("assets/galaxy-1280.webp") 70% 0 / cover no-repeat,
    var(--deep);
}

.lost .fox {
  width: min(56vw, 16rem);
  margin-inline: auto;
}

.lost h1 {
  margin-top: 2rem;
  font-size: clamp(2.5rem, 7vw, 4rem);
}

.lost p {
  margin-top: 1rem;
  color: rgb(243 239 196 / 0.88);
}

.lost .actions {
  margin-top: 1.75rem;
}

/* Press kit pages (press/) */

.site-nav a[aria-current="page"] {
  color: var(--fox-light);
}

.press-hero {
  padding: 8.5rem 0 clamp(3rem, 7vw, 4.5rem);
  background:
    linear-gradient(to bottom, rgb(17 14 34 / 0.55), rgb(17 14 34 / 0.8) 60%, var(--night)),
    var(--press-art) center 30% / cover no-repeat,
    var(--deep);
}

.press-hero--studio {
  background:
    linear-gradient(to bottom, rgb(17 14 34 / 0.2), var(--night)),
    url("assets/galaxy-1280.webp") 70% 0 / cover no-repeat,
    var(--deep);
}

.press-hero h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
}

.press-hero .tagline {
  max-width: 38rem;
}

.press-hero .actions,
.actions--left {
  justify-content: flex-start;
}

.press-kicker {
  margin-bottom: 0.75rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--fox-light);
}

.press-kicker a {
  text-decoration: none;
}

.press-kicker a::before {
  content: "\2190\00a0";
}

.press-layout {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(4rem, 9vw, 6rem);
}

.factsheet {
  position: sticky;
  top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(243 239 196 / 0.03);
}

.factsheet h2 {
  font-size: 1.875rem;
}

.factsheet dl {
  margin: 1.25rem 0 0;
}

.factsheet dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--haze);
}

.factsheet dd {
  margin: 0.125rem 0 1rem;
  font-size: 1rem;
  line-height: 1.45;
}

.factsheet dd:last-child {
  margin-bottom: 0;
}

.factsheet a,
.press-main a:not(.btn):not(.game-art) {
  color: var(--fox-light);
}

.press-block + .press-block {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.press-block h2 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
}

.press-block h3 {
  margin-top: 1.75rem;
  font-size: 1.625rem;
}

.press-block > p,
.press-block > h3 + p {
  max-width: 42rem;
  margin-top: 1rem;
}

.press-block h3 + p {
  margin-top: 0.5rem;
}

.feature-list {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
}

.feature-list li + li {
  margin-top: 0.5rem;
}

.feature-list li::marker {
  color: var(--fox);
}

.press-note {
  font-size: 1rem;
  color: var(--haze);
}

.press-email {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.video {
  margin-top: 1.25rem;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--deep);
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.5rem 1.25rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.media-grid li > a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: var(--deep);
}

.media-grid img {
  width: 100%;
  height: auto;
}

/* Logos and art sit on a checkerboard so their transparency shows. */
.media-grid--art li > a {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 0.75rem;
  background:
    repeating-conic-gradient(rgb(243 239 196 / 0.06) 0 25%, transparent 0 50%) 0 0 / 1rem 1rem,
    #1a1530;
}

.media-grid--art img {
  width: auto;
  max-height: 100%;
  object-fit: contain;
}

.media-grid p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--haze);
}

.media-meta {
  margin-right: 0.5rem;
}

.press-games {
  margin-top: 0.5rem;
}

.press-games .game {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding-block: 2rem;
}

.press-games h3 {
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
}

@media (max-width: 900px) {
  .press-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .factsheet {
    position: static;
  }
}

/* Printing a press page gives a plain fact sheet: no media, no buttons. */
@media print {
  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }

  .site-header,
  .site-header.is-scrolled {
    position: static;
    padding-block: 0 1rem;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
  }

  .site-nav,
  .skip,
  .press-kicker,
  .actions,
  .press-block--media,
  .video,
  .footer-socials {
    display: none !important;
  }

  .press-hero,
  .press-hero--studio {
    padding: 0 0 1.5rem;
    background: none;
  }

  .press-hero h1 {
    font-size: 30pt;
  }

  .tagline,
  .press-note,
  .factsheet dt,
  .site-footer {
    color: #444;
  }

  .press-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    padding-block: 0;
  }

  .factsheet {
    position: static;
    border-color: #ccc;
    background: none;
  }

  .factsheet a,
  .press-main a:not(.btn):not(.game-art) {
    color: #111;
  }

  .press-block + .press-block {
    margin-top: 1.75rem;
  }

  .press-block h2 {
    font-size: 20pt;
  }

  .press-block h3 {
    margin-top: 1rem;
    font-size: 14pt;
  }

  .press-games .game-art {
    display: none;
  }

  .press-games .game {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 0.75rem;
    border-color: #ccc;
  }

  .site-footer {
    margin-top: 2rem;
    border-color: #ccc;
  }

  .site-footer .brand {
    color: #111;
  }
}

/* Small screens */

@media (max-width: 760px) {
  .game,
  .game--small {
    grid-template-columns: minmax(0, 1fr);
  }

  .game--small .game-art {
    max-width: 19.6875rem;
  }

  .contact .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-fox {
    display: none;
  }

  .hero {
    background:
      linear-gradient(to bottom, rgb(17 14 34 / 0) 72%, var(--night)),
      url("assets/galaxy-1280.webp") 78% 0 / cover no-repeat,
      var(--deep);
  }
}

@media (max-width: 480px) {
  .site-header .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .socials a {
    width: 4.25rem;
  }

  .social-icon {
    width: 3.5rem;
    height: 3.5rem;
  }
}

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

  .site-header,
  .game-art img,
  .btn,
  .social-icon,
  .social-icon svg,
  .social-name,
  .footer-socials svg {
    transition: none;
  }

  .game-art:hover img {
    transform: none;
  }
}
