/*
 * Mullfox site, in the Star Battle app's design ("Direction C"): the night sky, Fraunces titles, Manrope text,
 * gold and teal on deep navy. Depth in three layers, as in the app: a faint far sky that fades out near the
 * top, near-opaque surfaces, crisp text on top.
 *
 * Privacy rule: every file this page loads comes from this site. Fonts are self-hosted subsets (SIL OFL,
 * licences in /fonts). No scripts, no analytics, no third-party requests.
 */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* The app's tokens (apps/starbattle/src/design/tokens.ts). */
:root {
  --night: #070b1a;
  --glow: #18275a;
  --text: #eef1fa;
  --soft: #c9d2ea;
  --softer: #dfe6f5;
  --note: #aab4d0;
  --muted: #9aa6c4;
  --gold: #ffd879;
  --gold-deep: #f2b93f;
  --gold-lip: #b9832a;
  --gold-text: #1a1405;
  --teal: #7fe6d8;
  --teal-pale: #bff6ee;
  --rose: #ff8fb0;
  --surface: rgba(16, 24, 50, 0.92);
  --surface-edge: rgba(201, 210, 234, 0.12);
  --hairline: rgba(201, 210, 234, 0.10);
  --r-card: 22px;
  --r-big: 26px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --press: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: rgba(201, 210, 234, 0.22) var(--night);
}
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  color: var(--soft);
  font: 500 1.0625rem/1.65 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--gold-text); }

/* Far layer: the glow and one dim, slightly soft starfield, gone well before the text gets long. */
.sky {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 470px;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, var(--glow) 0%, rgba(24, 39, 90, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}
.sky::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: url("img/sky-far.webp") center top / cover no-repeat;
  opacity: 0.3;
  filter: blur(1.5px);
}

.wrap {
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Header: the star and the studio name, and two chips. */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font: 600 1.375rem/1 var(--serif);
  letter-spacing: -0.005em;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; display: block; }
.site-nav { display: flex; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding-inline: 15px;
  border: 1px solid rgba(201, 210, 234, 0.14);
  border-radius: 9999px;
  color: var(--muted);
  font: 800 0.875rem/1 var(--sans);
  text-decoration: none;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.chip:hover { color: var(--softer); border-color: rgba(201, 210, 234, 0.28); }
.chip[aria-current="page"] {
  color: var(--gold);
  background: rgba(255, 216, 121, 0.16);
  border-color: rgba(255, 216, 121, 0.45);
}

/* Type. */
h1, h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 1.75rem + 3.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
h2 {
  margin: 3rem 0 0.75rem;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
h3 {
  margin: 0 0 0.25rem;
  color: var(--text);
  font: 700 1.0625rem/1.4 var(--sans);
  text-wrap: balance;
}
p, li { text-wrap: pretty; }
p { margin: 0 0 1rem; }
strong { color: var(--text); font-weight: 700; }
em { font-style: normal; color: var(--text); font-weight: 700; }
a {
  color: var(--gold);
  text-decoration-line: underline;
  text-decoration-color: rgba(255, 216, 121, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 160ms var(--ease);
}
a:hover { text-decoration-color: var(--gold); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
.chip:focus-visible, .button:focus-visible { border-radius: 9999px; }

main { padding-bottom: 1rem; }
.intro { padding-top: clamp(2rem, 1rem + 4vw, 4.5rem); }
.lead {
  margin: 1.125rem 0 0;
  max-width: 34rem;
  color: var(--softer);
  font-size: 1.1875rem;
  line-height: 1.6;
}
.meta { margin: 0.875rem 0 0; color: var(--note); font-size: 0.9375rem; line-height: 1.55; }

/* Surfaces: the middle layer, near-opaque so the sky never shows through what you read. */
.surface {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: var(--r-card);
  padding: 18px;
}
.surface > :last-child { margin-bottom: 0; }

/* Star Battle: the astronomer beside the game, as on the app's Journey card. */
.game {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "art title" "text text";
  column-gap: 16px;
  row-gap: 12px;
  align-items: center;
  margin-top: 2.5rem;
}
.game img {
  grid-area: art;
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 18px;
}
.game h2 { grid-area: title; margin: 0; }
.game p { grid-area: text; margin: 0; }

/* Support: one clear way to reach us, then the questions people ask. */
.contact .write {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 1rem;
  color: var(--text);
  font: 600 1.375rem/1.3 var(--serif);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-bottom: 5px; /* room for the lip */
  padding-inline: 22px;
  border-radius: 9999px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow: 0 5px 0 var(--gold-lip);
  color: var(--gold-text);
  font: 800 1.0625rem/1 var(--sans);
  letter-spacing: 0.006em;
  text-decoration: none;
  transition: transform 120ms var(--press), box-shadow 120ms var(--press);
}
.button svg { flex: none; }
.button:hover { color: var(--gold-text); }
.button:active { transform: translateY(3px) scale(0.97); box-shadow: 0 2px 0 var(--gold-lip); }

.faq {
  margin: 14px 0 0;
  padding: 4px 18px;
  list-style: none;
}
.faq li {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 14px;
  padding-block: 16px;
}
.faq li + li { border-top: 1px solid var(--hairline); }
.faq .icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(201, 210, 234, 0.08);
}
.faq h3 { align-self: center; min-height: 34px; display: flex; align-items: center; margin: 0; }
.faq p { grid-column: 1 / -1; margin: 0.5rem 0 0; }

/* The policy: one calm reading column. */
.policy h2 { margin-top: 2.75rem; }
.policy ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.policy li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.policy li::marker { color: var(--gold); }
.summary {
  margin-top: 2rem;
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(18, 52, 58, 0.97) 0%, rgba(12, 26, 44, 0.98) 100%);
  border-color: rgba(127, 230, 216, 0.35);
  color: var(--softer);
  font-size: 1.0625rem;
  line-height: 1.6;
}
.summary strong { color: var(--teal-pale); }

/* Footer. */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  /* The rule spans the text column, not the gutters. */
  width: calc(100% - 32px);
  max-width: calc(42rem - 48px);
  margin-top: 4rem;
  padding: 22px 0 40px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--softer); }
.site-foot span { margin-left: auto; }

@media (min-width: 40rem) {
  .wrap { padding-inline: 24px; }
  .site-foot { width: calc(100% - 48px); padding-inline: 0; }
  .site-head { padding-block: 24px; }
  .sky { height: 560px; }
  .surface { padding: 22px 24px; }
  .summary { font-size: 1.125rem; }
  .faq { padding: 4px 24px; }
  .faq p { grid-column: 2; margin-top: 0.25rem; }
  .game {
    grid-template-columns: 112px 1fr;
    grid-template-areas: "art title" "art text";
    column-gap: 22px;
    row-gap: 6px;
    align-items: start;
  }
  .game img { width: 112px; height: 112px; border-radius: 22px; }
  .game h2 { align-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .button, .chip, a { transition: none; }
  .button:active { transform: none; }
}

@media print {
  html, body { background: #fff; color: #111; }
  .sky, .site-nav, .game img { display: none; }
  h1, h2, h3, strong, em, .lead, .summary, .summary strong { color: #000; }
  a { color: #000; }
  .surface, .summary { background: none; border: 1px solid #bbb; }
  .button { background: none; box-shadow: none; color: #000; padding: 0; min-height: 0; }
  .site-foot { color: #333; }
}
