/* Paerux Games Studio. One stylesheet, no dependencies, no external fonts. */

:root {
  --night: #0c1226;  /* page background */
  --deep: #121a36;   /* panels */
  --raise: #1a2550;  /* panel highlight */
  --line: #27335e;   /* grid lines and borders */
  --frost: #eef1fb;  /* text */
  --haze: #a3aed3;   /* secondary text */
  --ember: #ffb84d;  /* links, actions, one side of the map */
  --tide: #5cc8ff;   /* the other side of the map */

  --sans: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --panel: 20px;
  --pill: 999px;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--frost);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

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

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

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

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

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

.skip {
  position: absolute;
  left: -999rem;
  top: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  border-radius: var(--pill);
  background: var(--frost);
  color: var(--night);
}

.skip:focus {
  left: var(--gutter);
}

/* Header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(12, 18, 38, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--frost);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  flex: none;
  color: var(--ember);
}

.site-head ul,
.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-head nav a,
.site-foot nav a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--haze);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-head nav a:hover,
.site-foot nav a:hover,
.site-head nav a[aria-current="page"] {
  color: var(--frost);
}

.site-head nav a[aria-current="page"] {
  box-shadow: 0 2px 0 var(--ember);
}

.site-head nav a.lang,
.site-foot nav a.lang {
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--frost);
}

.site-head nav a.lang:hover,
.site-foot nav a.lang:hover {
  border-color: var(--haze);
}

/* Home: hero */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(44rem 26rem at 78% 34%, rgba(92, 200, 255, 0.12), transparent 70%),
    radial-gradient(40rem 26rem at 54% 50%, rgba(255, 184, 77, 0.1), transparent 70%),
    var(--night);
}

.hero .wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(82vh, 46rem);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.hero h1 {
  font-size: clamp(3.25rem, 11vw, 7.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: block;
}

.lede {
  max-width: 22ch;
  margin: 1.75rem 0 0;
  color: var(--haze);
  font-size: clamp(1.1875rem, 2.4vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* The map behind the hero: two territories and the tile between them. */

.board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--line);
  -webkit-mask-image: linear-gradient(to right, transparent 6%, #000 50%);
  mask-image: linear-gradient(to right, transparent 6%, #000 50%);
}

.board .ember {
  stroke: var(--ember);
  filter: drop-shadow(0 0 10px rgba(255, 184, 77, 0.4));
}

.board .tide {
  stroke: var(--tide);
  filter: drop-shadow(0 0 10px rgba(92, 200, 255, 0.4));
}

.board .core-ember {
  fill: var(--ember);
}

.board .core-tide {
  fill: var(--tide);
}

.board .contested {
  fill: none;
  stroke: var(--frost);
  stroke-dasharray: 5 5;
  opacity: 0.7;
}

.board .claim use,
.board .contested {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .board .claim use {
    opacity: 0;
    animation: claim 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }

  .board .claim use:nth-child(1) { animation-delay: 0.25s; }
  .board .claim use:nth-child(2) { animation-delay: 0.4s; }
  .board .claim use:nth-child(3) { animation-delay: 0.47s; }
  .board .claim use:nth-child(4) { animation-delay: 0.54s; }
  .board .claim use:nth-child(5) { animation-delay: 0.61s; }
  .board .claim use:nth-child(6) { animation-delay: 0.68s; }
  .board .claim use:nth-child(7) { animation-delay: 0.75s; }
  .board .claim use:nth-child(8) { animation-delay: 0.95s; }
  .board .claim use:nth-child(9) { animation-delay: 1.02s; }
  .board .claim use:nth-child(10) { animation-delay: 1.09s; }

  .board .contested {
    opacity: 0;
    animation: claim 0.6s ease-out 1.45s forwards, contested 3.6s ease-in-out 2.1s infinite;
  }
}

@keyframes claim {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes contested {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.25;
  }
}

/* Home: sections */

.band {
  border-bottom: 1px solid var(--line);
}

.band .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem 4rem;
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

.band h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.band p:last-child {
  margin-bottom: 0;
}

.statement {
  max-width: 24em;
  font-size: clamp(1.3125rem, 2.3vw, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--panel);
  background: linear-gradient(155deg, var(--raise), var(--deep) 62%);
}

.slot svg {
  width: clamp(4.5rem, 12vw, 6.5rem);
  height: auto;
  color: var(--haze);
}

.slot h3 {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.slot p {
  max-width: 34em;
  color: var(--haze);
}

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

.chips li {
  padding: 0.2rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(12, 18, 38, 0.5);
  font-size: 0.875rem;
  font-weight: 600;
}

.mail {
  margin-block: 1.5rem;
}

.mail a {
  display: inline-block;
  max-width: 100%;
  padding: 0.8rem 1.5rem;
  border-radius: var(--pill);
  background: var(--ember);
  color: var(--night);
  font-size: clamp(1rem, 4.4vw, 1.1875rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.mail a:hover {
  background: #ffc670;
}

.mail a:focus-visible {
  border-radius: var(--pill);
}

/* Document pages: privacy, terms, support, 404 */

.doc {
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.doc .wrap:not(.doc-grid) > *,
.doc-grid > * {
  max-width: 44rem;
}

.doc h1 {
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-bottom: 1rem;
}

.doc h2 {
  font-size: clamp(1.4375rem, 3vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 3.25rem 0 1rem;
}

.doc h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.6rem;
}

.doc ul,
.doc ol {
  padding-left: 1.25rem;
}

.doc li {
  margin-bottom: 0.4rem;
}

.doc li::marker {
  color: var(--haze);
}

.meta {
  color: var(--haze);
}

.doc-head {
  margin-bottom: 2rem;
}

.doc-head p:last-child {
  margin-bottom: 0;
  font-size: 1.1875rem;
  line-height: 1.5;
}

.toc {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--panel);
  background: var(--deep);
}

.toc ol {
  margin: 0;
}

.toc li {
  margin-bottom: 0.3rem;
}

.toc a {
  color: var(--frost);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ember);
}

.facts {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.6rem 1.25rem;
  padding: 1.1rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--deep);
}

.facts dt {
  color: var(--haze);
  font-weight: 600;
}

.facts dd {
  margin: 0;
}

.updated {
  margin: 3.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--haze);
}

@media (min-width: 62rem) {
  .doc-grid {
    display: grid;
    grid-template-columns: 16rem minmax(0, 44rem);
    column-gap: 4.5rem;
  }

  .doc-grid > .doc-head {
    grid-column: 1 / -1;
    max-width: 52rem;
    margin-bottom: 3.5rem;
  }

  .doc-grid > .toc {
    position: sticky;
    top: 5.5rem;
    align-self: start;
    padding: 0 0 0 1.25rem;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: none;
    font-size: 0.9375rem;
  }

  .doc-grid > .toc a {
    color: var(--haze);
  }

  .doc-grid > .toc a:hover {
    color: var(--frost);
  }

  .doc-body > h2:first-child {
    margin-top: 0;
  }
}

/* Footer */

.foot-rule {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem 2rem;
  color: var(--haze);
  font-size: 0.9375rem;
}

.site-foot p {
  margin: 0;
}

/* Small screens */

@media (max-width: 44rem) {
  html {
    scroll-padding-top: 1.5rem;
  }

  .site-head {
    position: static;
  }

  .hero .wrap {
    min-height: 0;
    padding-block: 0.5rem 3rem;
  }

  .board {
    position: relative;
    display: block;
    width: 165%;
    height: 19rem;
    margin-left: -59%;
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
    mask-image: linear-gradient(to bottom, #000 62%, transparent);
  }

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

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

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.125rem;
  }

  .facts dd {
    margin-bottom: 0.75rem;
  }

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