@font-face {
  font-family: "Lilian";
  src: url("fonts/Lilian.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "BMarmy";
  src: url("fonts/BMarmy.ttf") format("truetype");
  font-display: swap;
}

:root {
  --background: #0a111c;
  --text: #dfe7ef;
  --line: #88d7ed;
  --blip: #0cf1ff;
  --name-top: #ffd55e;
  --name-bottom: #6cd0ff;
  --name-outline: #6d417d;
  --name-shadow: #4d13a4;
  --column: 640px;
}

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 16px;
  line-height: 1.6;
}

main {
  max-width: var(--column);
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.page-header {
  display: block;
  width: min(100%, 420px);
  height: auto;
  margin: 0 auto 32px;
}

/* A stage: its name, the modes it's legal in, its picture, its paragraph. */
.stage { margin: 0 0 56px; }

.stage-name {
  margin: 0 0 12px;
  text-align: center;
  font-family: "Lilian", sans-serif;
  font-weight: normal;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.15;
  /* The campaign's lettering: yellow over light blue, split hard, outlined and dropped in purple. */
  background: linear-gradient(to bottom, var(--name-top) 0 58%, var(--name-bottom) 58% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(2px 0 0 var(--name-outline)) drop-shadow(-2px 0 0 var(--name-outline))
    drop-shadow(0 2px 0 var(--name-outline)) drop-shadow(0 -2px 0 var(--name-outline))
    drop-shadow(0 4px 0 var(--name-shadow));
}

/* A stage's modes side by side, every frame the widest one's width; stacked on a narrow screen. */
.modes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px 12px;
  width: fit-content;
  margin: 0 auto 16px;
  padding: 0;
  list-style: none;
}
@media (max-width: 600px) {
  .modes { grid-auto-flow: row; }
}

/* A mode in frame 6 without its tail, its ends as drawn and its plain middle stretched to fit:
   ring 8 at its left, then the mode's name, centred in the rest. */
.mode {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  min-width: 124px;
  padding: 0 26px 0 30px;
  border: 0 solid transparent;
  border-image-source: url("ui/frame6_tailless.png");
  border-image-slice: 0 434 0 494 fill;
  border-image-width: 0 57px 0 65px;
  border-image-repeat: stretch;
  font-family: "BMarmy", monospace;
  font-size: 12px;
  color: var(--line);
  text-transform: uppercase;
  white-space: nowrap;
}

.mode .label {
  flex: 1;
  text-align: center;
}

/* Ring 8: a blip in its middle where the stage is legal, nothing where it isn't. */
.tick {
  position: relative;
  flex: none;
  width: 20px;
  aspect-ratio: 596 / 582;
}
.tick::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--line);
  -webkit-mask: url("ui/ring8.png") center / contain no-repeat;
  mask: url("ui/ring8.png") center / contain no-repeat;
}
.legal .tick::after {
  content: "";
  position: absolute;
  left: 25%;
  top: 25%;
  width: 50%;
  height: 50%;
  border-radius: 50%;
  background: var(--blip);
  box-shadow: 0 0 6px var(--blip);
}

.stage-picture {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 16px;
}

.stage p { margin: 0; }

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