/* Compost Mortem — the look shared by the public website and the administration.
   The chunky look follows the game's ChunkyPalette (GameRender/Sprites/ChunkySprites.swift): a navy outline, a face
   that lightens upwards over a darker lip, and Lilita One for everything loud. Tokens, the font, a small reset and the
   chunky components (buttons, panels, chips, badges, titles, the wordmark); every page adds its own stylesheet. */

@font-face {
  font-family: "Lilita One";
  src: url("../assets/fonts/LilitaOne-Regular.woff2") format("woff2"),
       url("../assets/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #10163A;
  --navy-face: #1F2C70;
  --navy-top: #3A4FAE;
  --navy-lip: #141B4D;
  --cream: #FFF2CE;
  --flash: #FFC33D;
  --moss: #9DBB38;
  --petrol: #087F70;
  --pine: #06352D;

  --sky-top: #8FE0FF;
  --sky: #1F8FF0;
  --sky-deep: #1260B4;
  --grass: #3CBF2E;

  --soil-1: #B4631F;
  --soil-2: #8E4819;
  --soil-3: #5C2D13;
  --soil-4: #2E1D11;
  --core-1: #0A2F28;
  --core-2: #06352D;
  --core-3: #04241F;

  --font-display: "Lilita One", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --font-body: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 22px;
  --border: 4px;
  --gutter: clamp(16px, 4vw, 40px);
  --topbar-h: 76px;

  /* The tone a component paints with; .tone-* classes swap it. */
  --t-top: #FFF06A;
  --t-face: #FFC21A;
  --t-lip: #C26E00;
  --t-ink: var(--navy);

  /* ChunkyPalette and GameTheme: the cloud tone of tiles, the recessed tray, the sunburst behind sheets. */
  --cloud-top: #F4F8FF;
  --cloud-face: #BFD0F4;
  --cloud-lip: #7F95CC;
  --tray-top: #0F1640;
  --tray-bottom: #1C2A6E;
  --label-muted: #C7D2FF;
  --sunburst-glow: #7BDCFF;
  --sunburst-mid: #2B7DF1;
  --sunburst-edge: #173AAE;
}

.tone-yellow { --t-top: #FFF06A; --t-face: #FFC21A; --t-lip: #C26E00; }
.tone-green { --t-top: #9EF56A; --t-face: #3CBF2E; --t-lip: #23861B; }
.tone-orange { --t-top: #FFC27A; --t-face: #FF7A1F; --t-lip: #C24E0C; }
.tone-blue { --t-top: #8FE0FF; --t-face: #1F8FF0; --t-lip: #1260B4; }
.tone-purple { --t-top: #D4A6FF; --t-face: #7B3FF2; --t-lip: #4F22B0; }
.tone-red { --t-top: #FF8A7A; --t-face: #E0302B; --t-lip: #9C1A17; }
.tone-navy { --t-top: #3A4FAE; --t-face: #1F2C70; --t-lip: #141B4D; }
.tone-pink { --t-top: #FFC2D6; --t-face: #F06A9B; --t-lip: #B23A68; }
.tone-lavender { --t-top: #D9C8FF; --t-face: #9479E0; --t-lip: #5E46A8; }
.tone-petrol { --t-top: #6FE3D0; --t-face: #0FA08C; --t-lip: #087060; }
.tone-cloud { --t-top: #F4F8FF; --t-face: #BFD0F4; --t-lip: #7F95CC; }
.tone-hazard { --t-top: #FFF27A; --t-face: #FFD60A; --t-lip: #B88F00; }

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 0.95rem + 0.2vw, 18px);
  line-height: 1.55;
  color: var(--cream);
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--flash);
  color: var(--navy);
  font-family: var(--font-display);
  text-decoration: none;
  border: var(--border) solid var(--navy);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 8px var(--navy);
  border-radius: 10px;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Outlined display text, as OutlinedTextRenderer draws it ---------- */

.outlined, .title, .section-title, .sub-title, .btn__label, .wordmark__text {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  -webkit-text-stroke: var(--stroke, 0.14em) var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 var(--depth, 0.08em) 0 var(--navy);
}

/* ---------- Chunky components ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.7em 1.35em 0.95em;
  border: var(--border) solid var(--navy);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--t-top) 0%, var(--t-face) 58%);
  box-shadow: inset 0 -0.36em 0 var(--t-lip), 0 0.3em 0 var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 5px;
  height: 26%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0.22em); box-shadow: inset 0 -0.18em 0 var(--t-lip), 0 0.08em 0 var(--navy); }
.btn__label { position: relative; color: #fff; --stroke: 0.2em; --depth: 0.07em; }
.btn--small { font-size: 0.95rem; padding: 0.6em 1em 0.8em; border-radius: 14px; }
.btn--hero { font-size: clamp(1.35rem, 1rem + 1.2vw, 1.9rem); padding: 0.55em 1.1em 0.75em 0.8em; border-radius: 24px; border-width: 5px; }
.btn__icon { width: 1.5em; height: 1.5em; flex: none; color: #fff; filter: drop-shadow(0 0.08em 0 var(--navy)) drop-shadow(0 0 1.5px var(--navy)) drop-shadow(0 0 1.5px var(--navy)); position: relative; }
.btn__stack { display: grid; gap: 0.25em; text-align: left; }
.btn__sub { font-size: 0.5em; color: var(--navy); letter-spacing: 0.04em; }

.panel {
  position: relative;
  border: var(--border) solid var(--navy);
  border-radius: 26px;
  background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-face) 42%);
  box-shadow: inset 0 -10px 0 var(--navy-lip), 0 8px 0 rgba(16, 22, 58, 0.55);
  padding: clamp(20px, 3vw, 34px);
}

.chip, .pill, .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  width: fit-content;
  border: 3px solid var(--navy);
  border-radius: 999px;
  font-family: var(--font-display);
  line-height: 1;
}
.chip { padding: 0.45em 0.85em 0.5em; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.chip--navy { background: var(--navy-face); color: #fff; box-shadow: inset 0 -3px 0 var(--navy-lip); }
.chip--free { background: linear-gradient(#9EF56A, #3CBF2E 60%); color: #fff; box-shadow: inset 0 -3px 0 #23861B; text-shadow: 0 1px 0 var(--navy), 0 0 2px var(--navy); }
.chip--full { background: linear-gradient(#D4A6FF, #7B3FF2 60%); color: #fff; box-shadow: inset 0 -3px 0 #4F22B0; text-shadow: 0 1px 0 var(--navy), 0 0 2px var(--navy); }
.pill { padding: 0.65em 1.1em; background: rgba(16, 22, 58, 0.78); color: #fff; font-family: var(--font-body); font-weight: 700; border-color: rgba(16, 22, 58, 0.9); }
.pill--soon::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--flash); box-shadow: 0 0 0 3px rgba(255, 195, 61, 0.3); }
.tag { padding: 0.45em 0.8em; background: var(--flash); color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

.badge-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: none;
  border: var(--border) solid var(--navy);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, var(--t-top), var(--t-face) 62%);
  box-shadow: inset 0 -6px 0 var(--t-lip), 0 4px 0 var(--navy);
  color: #fff;
}
.badge-icon svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 var(--navy)); }

.eyebrow {
  display: inline-block;
  justify-self: start;
  width: fit-content;
  margin-bottom: 0.6rem;
  padding: 0.35em 0.8em 0.4em;
  border-radius: 999px;
  background: var(--flash);
  border: 3px solid var(--navy);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 var(--navy);
}

.section-title {
  color: #fff;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.2rem);
  line-height: 1.02;
  text-wrap: balance;
}
.section-title--big { font-size: clamp(2.5rem, 1.4rem + 4.6vw, 5.4rem); }
.sub-title { color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); line-height: 1.1; }
.section-head { display: grid; gap: 0.9rem; max-width: 760px; margin-bottom: clamp(28px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--center .eyebrow { justify-self: center; }

.section-lede { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem); color: var(--cream); max-width: 62ch; }

.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.wordmark img { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--navy); }
.wordmark__text { font-size: 1.35rem; color: var(--flash); --stroke: 0.2em; line-height: 1; text-transform: uppercase; }
