/* wolfyk: a moonlit snowfield. The scenery is painted by snow.js; this sheet
   styles the words, the pictures and the snow they sit on.

   Served under a strict same-origin CSP (style-src 'self'), so no inline
   style="" attributes anywhere in the markup: give an element a class here
   instead. Fonts are self-hosted (latin subset, SIL OFL, see fonts/OFL.txt). */

@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/alegreya-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/alegreya-latin-var-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/alegreya-sans-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/alegreya-sans-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/alegreya-sans-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/alegreya-sans-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/alegreya-sans-sc-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/alegreya-sans-sc-latin-700.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --snow: #e5ecf4;
  --snow-deep: #d4deea;
  --ink: #0f1a2c;
  --muted: #4d5c72;
  /* Darkened from the prototype's #7d8ba0 (2.9:1 on the snow) to clear 4.5:1:
     it colours real text, the age labels and the platforms not yet supported. */
  --faint: #5b697e;
  --night: #0b1224;
  --fresh: #9a5a00;
  --paper: #ffffff;
  --shadow: 46, 72, 110;
  --snow-tex: none;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--fresh);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sc {
  font-family: 'Alegreya Sans SC', 'Alegreya Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.07em;
}

/* ---- The night scene -------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  max-height: 920px;
  overflow: hidden;
  background: var(--night);
  color: #eef2f8;
}
.hero.short {
  height: 62vh;
  min-height: 520px;
  max-height: 640px;
}
.hero canvas.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero .vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 30%, transparent 55%, rgba(4, 8, 18, 0.4) 100%);
}
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(229, 236, 244, 0), var(--snow));
}
.hero .grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: var(--grain);
}
.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 4vw, 44px);
}
.word {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Alegreya', serif;
  font-weight: 800;
  font-size: 27px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #eef2f8;
}
.word svg {
  width: 17px;
  height: 21px;
  fill: currentColor;
}
.bar nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  font-size: 16px;
  color: #c4cee0;
}
.bar nav a {
  text-decoration: none;
}
.bar nav a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.sound {
  border: 1px solid rgba(196, 206, 224, 0.35);
  background: rgba(8, 14, 28, 0.35);
  color: #c4cee0;
  font: inherit;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.sound[aria-pressed='true'] {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
}
.hero-text {
  position: absolute;
  z-index: 3;
  left: clamp(18px, 7vw, 110px);
  right: clamp(18px, 7vw, 110px);
  bottom: clamp(56px, 10vh, 110px);
  color: var(--ink);
}
.hero-text h1 {
  margin: 0;
  font-family: 'Alegreya', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(44px, 6.2vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  max-width: 11em;
}
.hero-text p {
  margin: 16px 0 0;
  font-size: clamp(17px, 1.6vw, 21px);
  color: #2a3a52;
  max-width: 32ch;
}
.hero-text .kicker {
  margin: 0 0 8px;
  font-size: 15px;
  /* The hero paragraph's colour, not the prototype's #3f5170: just below the
     horizon the painted snow is about #9aacc5, where #3f5170 measured 3.5:1. */
  color: #2a3a52;
}
.hero.short .hero-text h1 {
  font-style: normal;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 72px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero.short .hero-text h1 img {
  width: clamp(44px, 5vw, 62px);
  height: auto;
}
/* The short hero's words start just below its horizon, which snow.js paints at
   42% of the height. Anchored from the bottom instead (as the prototype was),
   they landed on the dark tree line at most desktop window heights. The
   min-height on .hero.short leaves room for them on the snow. */
.hero.short .hero-text {
  top: 45%;
  bottom: auto;
}
.hero-text .kicker {
  max-width: none;
}
.cue {
  position: absolute;
  z-index: 3;
  right: clamp(18px, 6vw, 90px);
  bottom: 34px;
  font-size: 14px;
  color: #3f5170;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cue span {
  display: block;
  width: 1px;
  height: 38px;
  background: linear-gradient(#3f5170, transparent);
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0% {
    transform: scaleY(0);
  }
  50% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ---- The snowfield ----------------------------------------------------------- */
.field {
  position: relative;
  background-color: var(--snow);
  background-image: var(--snow-tex);
  padding: clamp(40px, 7vw, 90px) clamp(18px, 5vw, 60px) 40px;
  overflow: hidden;
}
.field > * {
  position: relative;
  z-index: 2;
}
.field .tracks,
.field .dents {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.field .tracks img,
.field .dents i {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: auto;
  will-change: opacity;
}
.field .tracks img.pending {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.field .tracks img.pending.on {
  opacity: 1;
}
.field .dents i {
  width: 20px;
  height: 13px;
  background-image: var(--dent);
  background-size: 100% 100%;
  animation: fill 2.6s ease-in forwards;
}
@keyframes fill {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.inner {
  max-width: 1180px;
  margin-inline: auto;
  padding-left: clamp(36px, 9vw, 120px);
}

.clearing {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding-block: clamp(30px, 6vw, 80px);
}
.clearing.flip {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}
.clearing.flip .words {
  order: 2;
}
.clearing .photo {
  --tilt: 1.4deg;
}
.clearing.flip .photo {
  --tilt: -1.6deg;
}
.clearing.pond .photo {
  --tilt: -1deg;
}
.words .kicker {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.words .kicker b {
  color: var(--fresh);
  font-weight: 500;
}
.words h2 {
  margin: 6px 0 0;
  font-family: 'Alegreya', serif;
  font-weight: 800;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.words h2 img {
  width: 48px;
  height: 48px;
}
.words h2 a {
  text-decoration: none;
}
.words h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
.lede {
  margin: 14px 0 0;
  font-size: 20px;
  max-width: 36ch;
}
.words > p:not(.kicker):not(.lede) {
  margin: 12px 0 0;
  max-width: 46ch;
}
.words > p.small {
  margin-top: 14px;
}
.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #f4f7fb;
  padding: 13px 20px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 10px 20px -12px rgba(var(--shadow), 0.8);
}
.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.btn:hover {
  background: #22324d;
}
.get small {
  color: var(--muted);
  font-size: 15px;
}
.plats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
}
.plats b {
  color: var(--ink);
  font-weight: 700;
}
.plats s {
  color: var(--faint);
}
.feats {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}
.feats li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
}
.feats li img {
  width: 14px;
  height: auto;
  margin-top: 5px;
  transform: rotate(90deg);
  opacity: 0.9;
}
.more {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
  text-underline-offset: 5px;
}

/* Pictures lying on the snow. */
.photo {
  position: relative;
  margin: 0;
  background: var(--paper);
  padding: 10px 10px 12px;
  transform: rotate(var(--tilt, 1.3deg));
  box-shadow:
    0 1px 2px rgba(var(--shadow), 0.25),
    0 28px 38px -22px rgba(var(--shadow), 0.55),
    0 70px 90px -60px rgba(var(--shadow), 0.4);
}
.photo img {
  width: 100%;
  height: auto;
  cursor: zoom-in;
}
.photo figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.photo.dark {
  background: #1b2130;
}
.photo.dark figcaption {
  color: #aab4c6;
}

.cmd {
  position: relative;
  margin-top: 22px;
  background: #0f1726;
  color: #dfe7f1;
  border-radius: 4px;
  padding: 14px 16px;
  font:
    14.5px/1.7 ui-monospace,
    'Cascadia Code',
    Menlo,
    Consolas,
    monospace;
  box-shadow: 0 16px 28px -18px rgba(var(--shadow), 0.9);
  overflow-x: auto;
}
.cmd.narrow {
  max-width: 640px;
}
.cmd pre {
  margin: 0;
  font: inherit;
}
.cmd code {
  white-space: pre;
  display: block;
  font: inherit;
}
.cmd .p {
  color: #7f8ca3;
  user-select: none;
}
.cmd button {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid #34425c;
  background: #172238;
  color: #c9d4e6;
  font:
    13px/1 'Alegreya Sans',
    sans-serif;
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
}
.cmd button:hover {
  color: #fff;
}

/* Older tracks: one print per release, softened with age by the real date. */
.recent {
  padding-block: clamp(40px, 7vw, 90px) 10px;
  max-width: 760px;
}
.recent h2,
.block h2 {
  margin: 0 0 6px;
  font-family: 'Alegreya', serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 36px);
}
.recent > p,
.block > p.sub {
  margin: 0 0 18px;
  color: var(--muted);
}
.recent > p.small.after {
  margin: 22px 0 0;
}
.trackrow {
  margin: 0;
  padding: 0;
  list-style: none;
}
.trackrow li {
  display: grid;
  grid-template-columns: 36px 118px minmax(0, 1fr);
  gap: 2px 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(var(--shadow), 0.14);
}
.trackrow li > img,
.trackrow li > time {
  grid-row: 1 / span 2;
}
.trackrow li > b,
.trackrow li > span {
  grid-column: 3;
}
.trackrow img {
  width: 26px;
  height: auto;
  transform: rotate(90deg);
  justify-self: center;
  margin-top: 4px;
}
.trackrow time {
  font-size: 15px;
  color: var(--muted);
}
.trackrow time i {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--faint);
}
.trackrow li.fresh time i {
  color: var(--fresh);
}
.trackrow b {
  font-family: 'Alegreya', serif;
  font-size: 19px;
}
.trackrow span {
  color: var(--muted);
}

.exit {
  margin: clamp(60px, 9vw, 120px) 0 0 auto;
  max-width: 300px;
  text-align: right;
  font-family: 'Alegreya', serif;
  font-style: italic;
  font-size: 24px;
  line-height: 1.25;
}
.exit span {
  display: block;
  margin-top: 6px;
  font-family: 'Alegreya Sans', sans-serif;
  font-style: normal;
  font-size: 16px;
  color: var(--muted);
}
.foot {
  margin-top: clamp(60px, 8vw, 100px);
  padding-top: 18px;
  border-top: 1px solid rgba(var(--shadow), 0.18);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
}
.foot a {
  text-underline-offset: 4px;
}

/* App pages */
.block {
  padding-block: clamp(34px, 5vw, 64px);
}
.gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}
.gallery .photo:nth-child(1) {
  --tilt: -1.2deg;
}
.gallery .photo:nth-child(2) {
  --tilt: 2deg;
  margin-top: 26px;
}
.gallery .photo:nth-child(3) {
  --tilt: -2.2deg;
  margin-top: 8px;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
}
.two h2 {
  margin: 0 0 12px;
  font-family: 'Alegreya', serif;
  font-weight: 700;
  font-size: 26px;
}
.two h2.later {
  margin-top: 26px;
}
.two dl {
  margin: 0;
  display: grid;
  gap: 12px;
}
.two dt {
  font-weight: 700;
}
.two dd {
  margin: 2px 0 0;
  color: var(--muted);
}
.two ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.keys {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.keys kbd {
  display: inline-block;
  min-width: 26px;
  text-align: center;
  font:
    13px/1 ui-monospace,
    Menlo,
    Consolas,
    monospace;
  color: var(--ink);
  background: var(--paper);
  border-radius: 3px;
  padding: 5px 6px;
  margin-right: 8px;
  box-shadow: 0 2px 0 rgba(var(--shadow), 0.35);
}
.small {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.block .small.note {
  margin: 10px 0 0;
  max-width: 62ch;
}
.back {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
  text-underline-offset: 5px;
}

/* Not found */
.lost {
  padding-block: clamp(30px, 6vw, 80px);
  max-width: 640px;
}
.lost h2 {
  margin: 0 0 10px;
  font-family: 'Alegreya', serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 36px);
}
.lost p {
  margin: 0 0 12px;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 10, 20, 0.92);
  display: grid;
  place-items: center;
  padding: 56px 16px 16px;
}
.lightbox img {
  max-width: min(1600px, 100%);
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
.lightbox button {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 1px solid #56627a;
  background: #111a2c;
  color: #e6ecf5;
  padding: 7px 14px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .bar nav a.hide-s {
    display: none;
  }
  .clearing,
  .clearing.flip,
  .two {
    grid-template-columns: 1fr;
  }
  .clearing.flip .words {
    order: 0;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery .photo:nth-child(n) {
    margin-top: 0;
  }
  .trackrow li {
    grid-template-columns: 30px 1fr;
  }
  .trackrow li > img {
    grid-row: 1 / span 3;
  }
  .trackrow li > time {
    grid-row: auto;
    grid-column: 2;
  }
  .trackrow li > b,
  .trackrow li > span {
    grid-column: 2;
  }
  .inner {
    padding-left: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .cue span {
    animation: none;
  }
  .field .tracks img.pending {
    transition: none;
  }
}
