/* The studio's own pages: the home (the shelf of games), the site's privacy page and the 404.
   The studio stays quiet so each game's tile can look like its game. Light and dark follow the
   device. The tiles' faces come from /s/fonts.css. */

:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1c1e21;
  --muted: #565c64;
  --line: #e1ddd4;
  --accent: #1b6a56;
  --accent-soft: #e6f1ec;
  --accent-line: #b5d6cb;
  --ink: #111315;
  --paper: #f6f4ef;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191c;
    --surface: #1e2125;
    --text: #e9e7e2;
    --muted: #a6acb3;
    --line: #2e3338;
    --accent: #72d0b5;
    --accent-soft: #16292a;
    --accent-line: #2b5248;
    --ink: #f6f4ef;
    --paper: #111315;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--font);
}

.wrap {
  width: min(100% - 32px, 72rem);
  margin-inline: auto;
}

.wrap.narrow {
  width: min(100% - 32px, 42rem);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.6rem 0 0.6rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.4rem;
}

.lede {
  font-size: 1.18rem;
  max-width: 38rem;
}

.muted,
.meta {
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- The home ---------- */

.home {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgb(27 106 86 / 0.10), transparent 70%),
    var(--bg);
}

.kicker {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker span {
  opacity: 0.5;
}

/* The hero: the wordmark big, the four windows beside it */
.hero {
  display: grid;
  gap: 32px;
  padding: 40px 0 24px;
}

.hero .kicker {
  margin: 0 0 14px;
  font: 800 0.78rem/1.3 "Archivo", var(--font);
  font-stretch: 125%;
  letter-spacing: 0.2em;
}

.hero__title {
  margin: 0 0 18px;
  font-family: "Archivo", var(--font);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(3.4rem, 1.4rem + 8.4vw, 7.4rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero .lede {
  max-width: 28rem;
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgb(0 0 0 / 0.18);
}

.btn--line {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.btn--line:hover {
  box-shadow: inset 0 0 0 2px var(--ink), 0 10px 22px rgb(0 0 0 / 0.18);
}

.btn--paper {
  color: #111315;
  background: #f6f4ef;
}

/* the windows: the four banners laid on the paper at slight angles, breathing */
.windows {
  display: grid;
  gap: 0;
}

.windows img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgb(17 19 21 / 0.28), 0 2px 6px rgb(17 19 21 / 0.2);
  transform: rotate(var(--r)) translateX(var(--x));
  animation: breathe 7s var(--ease) infinite alternate;
  animation-delay: var(--d);
}

.windows img + img {
  margin-top: -6%;
}

.windows img:nth-child(1) { --r: -2.2deg; --x: -2%; --d: 0s; }
.windows img:nth-child(2) { --r: 1.4deg; --x: 4%; --d: -2s; }
.windows img:nth-child(3) { --r: -1deg; --x: -1%; --d: -4s; }
.windows img:nth-child(4) { --r: 2deg; --x: 3%; --d: -6s; }

@keyframes breathe {
  to { transform: rotate(calc(var(--r) * 0.6)) translate(var(--x), -5px); }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 56px;
    padding: 72px 0 56px;
  }
}

/* The shelf: two big tiles a row, under a ruled heading */
.shelf {
  padding: 24px 0 8px;
}

.shelf__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  margin-bottom: 18px;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.shelf__head h2 {
  margin: 0;
  font: 900 1.6rem/1.1 "Archivo", var(--font);
  font-stretch: 125%;
  letter-spacing: -0.01em;
}

.shelf__head p {
  margin: 0;
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tiles > li + li {
  margin-top: 0;
}

@media (min-width: 620px) {
  .tiles {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px 22px 22px;
  overflow: hidden;
  text-decoration: none;
  border-radius: 22px;
  isolation: isolate;
  transition: transform 350ms var(--ease), box-shadow 350ms var(--ease);
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.22);
}

.tile:hover {
  transform: translateY(-6px) rotate(-0.3deg);
  box-shadow: 0 26px 50px rgb(0 0 0 / 0.32);
}

.tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.tile__banner {
  display: block;
  width: calc(100% + 20px);
  max-width: none;
  height: auto;
  margin: 0 -10px 18px;
  border-radius: 14px;
  transition: transform 600ms var(--ease), filter 400ms var(--ease);
}

.tile:hover .tile__banner {
  transform: scale(1.03);
  filter: brightness(1.1) saturate(1.1);
}

.tile__icon {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 0;
}

@media (min-width: 620px) {
  .tile {
    display: grid;
    grid-template-columns: 64px 1fr;
    column-gap: 16px;
    align-content: start;
  }
  .tile > :not(.tile__icon) {
    grid-column: 1 / -1;
  }
  .tile__icon { grid-row: 2 / span 2; }
  .tile__name { grid-column: 2; margin-top: 2px; }
  .tile__kind { grid-column: 2; }
  .tile__go { justify-self: start; }
}

.tile__name {
  display: block;
  margin: 18px 0 4px;
  font-size: 2rem;
  line-height: 1.05;
}

.tile__kind {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tile__pitch {
  display: block;
  margin-bottom: 14px;
  font-size: 0.98rem;
  line-height: 1.45;
}

.tile__status {
  display: block;
  margin-bottom: 14px;
  font-size: 0.82rem;
  opacity: 0.8;
}

.tile__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
}

.tile__go::after {
  content: "→";
}

.tile__go.out::after {
  content: "↗";
}

/* Tiltsmith: the machine in the dark, brass and a lit wordmark */
.tile--tiltsmith {
  color: #f3e6cf;
  background:
    linear-gradient(90deg, rgb(12 8 5 / 0.96) 30%, rgb(12 8 5 / 0.55) 70%, rgb(12 8 5 / 0.2)),
    url("/tiltsmith/img/machine.webp") 72% 30% / cover no-repeat,
    #0c0805;
  border: 2px solid #8a6634;
  box-shadow: inset 0 0 0 1px rgb(255 214 140 / 0.12), 0 10px 24px rgb(0 0 0 / 0.3);
}

.tile--tiltsmith .tile__icon {
  border-radius: 14px;
  box-shadow: 0 0 0 2px #b8853f, 0 0 18px rgb(255 140 40 / 0.45);
}

.tile--tiltsmith .tile__name {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 900;
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  color: #f2c46d;
  background: linear-gradient(180deg, #fff1c9 0%, #f2c46d 45%, #b97a24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgb(255 160 60 / 0.35));
}

.tile--tiltsmith .tile__kind {
  font-family: "Archivo", var(--font);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: 0.3em;
  color: #ff9a5c;
}

.tile--tiltsmith .tile__go {
  color: #2a1606;
  background: linear-gradient(#ffd27a, #f2b54b);
  box-shadow: inset 0 -2px 0 rgb(120 70 10 / 0.5);
}

/* Depthsweeper: Sounding's console, chrome and lit teal */
.tile--depthsweeper {
  color: #e8eded;
  background: #15191c;
  border: 3px solid #7f8a91;
  box-shadow: inset 0 0 0 1px #aab3b9, inset 0 0 0 4px #0d1012, 0 10px 24px rgb(0 0 0 / 0.3);
}

.tile--depthsweeper .tile__icon {
  border-radius: 12px;
}

.tile--depthsweeper .tile__name {
  font-family: "Bricolage Grotesque", var(--font);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 2.15rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.tile--depthsweeper .tile__kind {
  font-family: "Bricolage Grotesque", var(--font);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #78f2e4;
}

.tile--depthsweeper .tile__pitch {
  font-family: "Atkinson Hyperlegible Next", var(--font);
  color: #c9d1d3;
}

.tile--depthsweeper .tile__go {
  color: #3c1800;
  background: #ffb042;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #0d1012, 0 0 0 2px #7f8a91;
}

/* Slingularity: gouache space, gold and sea-glass */
.tile--slingularity {
  color: #ece6d6;
  background:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 62%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 40% 74%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 44%, #fffa 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 12% 86%, #fff9 50%, transparent 51%),
    radial-gradient(140% 90% at 100% 110%, #2a6d73 0%, transparent 45%),
    radial-gradient(120% 120% at 10% 0%, #22305e 0%, #101e3a 55%, #1a1730 100%);
  border: 2px solid #2e3c66;
}

.tile--slingularity .tile__icon {
  border-radius: 50%;
  box-shadow: 0 0 0 3px #f8c545;
}

.tile--slingularity .tile__name {
  font-family: "Marcellus", Georgia, serif;
  font-size: 2.05rem;
}

.tile--slingularity .tile__kind {
  color: #8fc1b5;
}

.tile--slingularity .tile__go {
  color: #101e3a;
  background: #f8c545;
}

/* Atomic Ante: felt, paper and brass */
.tile--atomic-ante {
  color: #f1eee6;
  background:
    radial-gradient(120% 80% at 50% 0%, rgb(255 246 214 / 0.12), transparent 60%),
    url("/img/atomic-ante-felt.webp") center / cover,
    #163a1f;
  border: 3px solid #c39a4e;
  box-shadow: inset 0 0 0 1px rgb(255 230 170 / 0.35), 0 10px 24px rgb(0 0 0 / 0.3);
}

.tile--atomic-ante .tile__icon {
  border-radius: 12px;
  box-shadow: 0 0 0 2px #dfb65f;
}

.tile--atomic-ante .tile__name {
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  color: #f5cf8f;
}

.tile--atomic-ante .tile__kind {
  color: #9fd5e0;
}

.tile--atomic-ante .tile__go {
  color: #2b2118;
  background: #f1e7d0;
  box-shadow: inset 0 0 0 1px #b59b72;
}

/* ---------- About, contact, press ---------- */

.about {
  display: grid;
  gap: 8px 48px;
  padding: 1.5rem 0 3rem;
}

@media (min-width: 860px) {
  .about {
    grid-template-columns: 1.4fr 1fr;
  }
}

.about h2 {
  margin-top: 1.6rem;
}

/* ---------- The leaderboards ---------- */

/* the band on the home that leads to them: the bar's ink */
.band {
  margin: 48px 0 8px;
  color: #f6f4ef;
  background:
    radial-gradient(40rem 16rem at 90% 120%, rgb(114 208 181 / 0.18), transparent 70%),
    #111315;
}

@media (prefers-color-scheme: dark) {
  /* the bar's ink is close to the dark page: a hairline at each edge keeps the band a band */
  .band {
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), inset 0 -1px 0 rgb(255 255 255 / 0.08);
  }
}

.band__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding: 40px 0;
}

.band h2 {
  margin: 0 0 6px;
  font: 900 2.2rem/1 "Archivo", var(--font);
  font-stretch: 125%;
}

.band p {
  margin: 0;
  color: #c9cdd1;
}

.band .kicker {
  margin-bottom: 14px;
  font: 800 0.78rem/1.3 "Archivo", var(--font);
  font-stretch: 125%;
  letter-spacing: 0.2em;
  color: #7fd8bd;
}

/* /leaderboards/: a card for each game, in its own look where it has boards */
.hubs {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.hub {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 16px;
  align-items: start;
  margin: 0;
  padding: 18px 18px 8px;
  border-radius: 18px;
}

@media (min-width: 620px) {
  .hub {
    grid-template-columns: 64px 1fr;
    gap: 4px 20px;
    padding: 22px 24px 10px;
  }
}

li.hub + li.hub {
  margin-top: 0;
}

.hub__icon {
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.hub__name {
  margin: 0.1rem 0 0.1rem;
  font-size: 1.6rem;
}

.hub__state {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}

.hub__go::after {
  content: "→";
}

.hub.tile--slingularity .hub__icon {
  border-radius: 50%;
  box-shadow: 0 0 0 3px #f8c545;
}

.hub.tile--slingularity .hub__name {
  font-family: "Marcellus", Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
}

.hub.tile--slingularity .hub__state {
  color: #8fc1b5;
}

.hub.tile--slingularity .hub__go {
  color: #101e3a;
  background: #f8c545;
}

.hub.tile--slingularity .hub__go:hover {
  background: #ffd76e;
}

.hub.tile--slingularity .hub__go:focus-visible {
  outline-color: #f8c545;
}

.hub--soon {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
}

.hub--soon .hub__state,
.hub--soon p {
  color: var(--muted);
}

/* ---------- The site's privacy page and the 404 ---------- */

.page {
  padding: 2.2rem 0 3.5rem;
}

.summary {
  margin: 1.5rem 0 0.5rem;
  padding: 1.1rem 1.25rem 0.25rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 14px;
}

.summary h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.lost {
  padding: 3rem 0 4rem;
}

.lost .code {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .windows img,
  .tile,
  .tile__banner,
  .btn {
    animation: none;
    transition: none;
  }

  .tile:hover,
  .btn:hover,
  .tile:hover .tile__banner {
    transform: none;
  }
}
