/*
 * snowsleuth.com. Day on the ice in light mode, night in dark mode; the packs shelf is always night.
 * Paper pieces cast hard offset shadows, as the game's papercraft does. The hero's trail is the one
 * thing that moves by itself (once, on load); everything else moves only when it's used.
 */

@font-face {
  font-family: 'Fredoka';
  src: url('/assets/fredoka.99d6c78e04.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  src: url('/assets/figtree.4ba7d3d096.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Day on the ice (the game's light palette). */
  --ice: #dce8f1;
  --frost: #eef3f8;
  --snow: #ffffff;
  --rim: #c9d6e3;
  --ink: #14243a;
  --slate: #4a5b70;
  --shade: #b4c7d9;
  --button: #14243a;
  --on-button: #ffffff;
  --button-shade: #050c17;
  --flag: #e0559a;
  --flag-edge: #b23a76;
  --flag-track: #fadceb;
  --pole: #14243a;
  /* The night shelf, in both modes. */
  --night: #0e1726;
  --night-card: #17233a;
  --night-ink: #e8eff7;
  --night-mist: #9daec2;
  --night-shade: #050a12;

  --display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 16px;
  --measure: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ice: #0e1726;
    --frost: #17233a;
    --snow: #17233a;
    --rim: #2a3a55;
    --ink: #e8eff7;
    --slate: #9daec2;
    --shade: #050a12;
    --button: #dce8f1;
    --on-button: #0e1726;
    --button-shade: #6f8aa8;
    --flag-track: #5a2a45;
    --pole: #e8eff7;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--flag);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(34px, 5vw, 52px);
}

h3 {
  font-size: 24px;
  line-height: 1.15;
}

p {
  margin: 0;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

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

/* While the game is still being made (layout.ts's IN_DEVELOPMENT): a strip over every page, in
   the night's colours by day and the ice's by night, so it stands apart in both. */
.dev-note {
  margin: 0;
  padding: 9px var(--gutter);
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  background: var(--button);
  color: var(--on-button);
}
.dev-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--flag);
  color: #ffffff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  vertical-align: 1px;
}

/* The bar at the top: the game's name on the left, where to go on the right. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 23px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img {
  width: 44px;
  height: 44px;
}
.links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
}
.links a {
  text-decoration: none;
}
.links a:hover {
  text-decoration: underline;
}
.links .wide {
  display: none;
}

/* Buttons: paper pieces that press down. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 20px;
  background: var(--button);
  color: var(--on-button);
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--button-shade);
  transition:
    transform 80ms ease-out,
    box-shadow 80ms ease-out;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 0 var(--button-shade);
}
.button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--button-shade);
}
.button.small {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 17px;
  box-shadow: 0 4px 0 var(--button-shade);
}
.button svg {
  width: 18px;
  height: 18px;
}
.soon {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 20px;
  border: 2px dashed var(--rim);
  color: var(--slate);
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
}
.store img {
  height: 56px;
  width: auto;
}

/* The hero: the ice, a real night half replayed, and one track sliding in to its flag. */
.hero {
  position: relative;
  background-color: var(--ice);
  background-image: var(--tiles);
  background-size: 132px 132px;
  background-position: -30px -40px;
  padding-bottom: 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 40px;
  padding-top: 28px;
  padding-bottom: 36px;
}
.hero h1 {
  font-size: clamp(60px, 15vw, 116px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.lede {
  font-size: 21px;
  line-height: 1.5;
  color: var(--slate);
  max-width: 30ch;
  margin-bottom: 30px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.note {
  margin-top: 18px;
  font-size: 16px;
  color: var(--slate);
}
.slab {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 410px);
  transform: rotate(2deg);
}
.slab img {
  width: 100%;
  height: auto;
  border-radius: 26px;
  box-shadow: 10px 12px 0 var(--shade);
}
.slab figcaption {
  margin-top: 22px;
  text-align: center;
  font-size: 15px;
  color: var(--slate);
  transform: rotate(-2deg);
}
/* A track along the bottom of the hero, the detective standing on it, ending at its flag. */
.ground {
  position: relative;
  height: 132px;
}
.ground .track {
  position: absolute;
  left: -40px;
  right: calc(max(var(--gutter), 50% - 580px) + 40px);
  bottom: 28px;
  height: 34px;
  border-radius: 17px;
  background: var(--flag-track);
  border: 5px solid var(--flag-edge);
  transform-origin: left center;
  animation: slide-in 1.15s cubic-bezier(0.16, 0.84, 0.3, 1) 0.25s both;
}
.ground .flag {
  position: absolute;
  /* The pole (6px into the picture) stands at the track's end. */
  right: calc(max(var(--gutter), 50% - 580px) - 6px);
  bottom: 34px;
  width: 52px;
  height: 104px;
  transform-origin: 6px 100%;
  animation: plant 0.42s cubic-bezier(0.3, 1.6, 0.5, 1) 1.3s both;
}
.ground .detective {
  position: absolute;
  left: calc(max(var(--gutter), 50% - 580px) + 12px);
  bottom: 14px;
  width: 116px;
  height: auto;
}
@keyframes slide-in {
  from {
    transform: scaleX(0.04);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes plant {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ground .track,
  .ground .flag {
    animation: none;
  }
}

/* Sections. */
.section {
  padding-block: 72px;
}
.section-head {
  max-width: 34ch;
  margin-bottom: 36px;
}
.section-head p {
  margin-top: 14px;
  font-size: 20px;
  color: var(--slate);
}

/* How it works: three steps, each with How to play's picture. */
.steps {
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
}
.steps picture img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 7px 8px 0 var(--shade);
  margin-bottom: 22px;
}
.steps h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.steps h3::before {
  content: counter(step);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--button);
  color: var(--on-button);
  font-size: 20px;
  line-height: 1;
  transform: translateY(-3px);
}
.steps p {
  color: var(--slate);
  max-width: 36ch;
}
.aside {
  margin-top: 40px;
  max-width: 60ch;
  color: var(--slate);
}

/* The daily: the words beside today's card. */
.daily {
  display: grid;
  gap: 40px;
  align-items: center;
}
.daily .section-head {
  margin-bottom: 0;
}
.daily ul {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}
.daily li {
  position: relative;
  padding-left: 30px;
  max-width: 44ch;
}
.daily li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 14px;
  height: 8px;
  border-radius: 4px;
  background: var(--flag-track);
  border: 2px solid var(--flag-edge);
}
.card-shot img {
  width: 100%;
  height: auto;
  border-radius: 26px;
  box-shadow: 9px 10px 0 var(--shade);
}

/* The packs: always night, between two drifts of snow. */
.shelf {
  position: relative;
  background: var(--night);
  color: var(--night-ink);
  --slate: var(--night-mist);
  --shade: var(--night-shade);
  --rim: #2a3a55;
  padding-block: 64px 80px;
  margin-block: 40px;
  /* The tilted covers behind may reach past the screen's edge; the drifts above and below stay. */
  overflow-x: clip;
}
.shelf::before,
.shelf::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--drift) center / 1440px 48px repeat-x;
}
.shelf::before {
  top: -47px;
}
.shelf::after {
  bottom: -47px;
  transform: scaleY(-1);
}
.shelf .stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #e8eff7 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 9%, #e8eff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 57% 14%, #e8eff7 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 6%, #e8eff7 50%, transparent 51%),
    radial-gradient(2px 2px at 89% 21%, #e8eff7 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 26%, #9daec2 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 44%, #9daec2 50%, transparent 51%);
  opacity: 0.8;
  pointer-events: none;
}
.shelf .wrap {
  position: relative;
}
.packs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pack {
  margin: 0;
}
.covers {
  position: relative;
  aspect-ratio: 1;
  margin-bottom: 14px;
}
.covers img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  box-shadow: 6px 7px 0 var(--shade);
}
.covers .behind {
  transform: rotate(7deg) translate(9%, -3%) scale(0.92);
  filter: brightness(0.82);
}
.pack h3 {
  font-size: 20px;
}
.pack p {
  font-size: 16px;
  color: var(--slate);
  margin-top: 2px;
}
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: #1f6b45;
  color: #e3f4ea;
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  vertical-align: 3px;
}
.shelf-note {
  margin-top: 40px;
  max-width: 58ch;
  color: var(--slate);
}

/* The detective: four looks standing in a row on the snow. */
.lineup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 760px;
}
.lineup li {
  display: grid;
  justify-items: center;
}
.lineup img {
  width: 100%;
  max-width: 190px;
  height: auto;
}

/* Questions. */
.faq {
  display: grid;
  gap: 28px;
  margin: 0;
  max-width: 980px;
}
.faq dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.faq dd {
  margin: 0;
  color: var(--slate);
  max-width: 52ch;
}

/* The closing band. */
.again {
  display: grid;
  gap: 22px;
  justify-items: start;
  padding: 44px 32px;
  border-radius: 32px;
  background: var(--snow);
  box-shadow: 10px 12px 0 var(--shade);
}
.again h2 {
  font-size: clamp(30px, 4.6vw, 46px);
  max-width: 18ch;
}

/* Footer. */
.foot {
  padding-block: 56px 40px;
  font-size: 16px;
  color: var(--slate);
}
.foot-grid {
  display: grid;
  gap: 24px;
}
.foot .brand {
  color: var(--ink);
}
.foot .about {
  margin-top: 10px;
}
.foot .copy {
  margin-top: 28px;
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Pages of text: support, privacy, terms. */
.page {
  padding-block: 32px 72px;
}
.page h1 {
  font-size: clamp(44px, 8vw, 72px);
  line-height: 0.98;
  margin-bottom: 14px;
}
.page .updated {
  color: var(--slate);
  font-size: 16px;
}
.text {
  max-width: 68ch;
}
.text h2 {
  font-size: 27px;
  line-height: 1.2;
  margin: 40px 0 10px;
}
.text p + p {
  margin-top: 14px;
}
.contents {
  margin: 30px 0 8px;
  padding: 20px 24px;
  border-radius: 22px;
  background: var(--snow);
  box-shadow: 7px 8px 0 var(--shade);
  max-width: 68ch;
}
.contents h2 {
  margin: 0 0 8px;
  font-size: 19px;
}
.contents ol {
  margin: 0;
  padding-left: 22px;
  columns: 2 14em;
  column-gap: 32px;
  font-size: 16px;
}
.contents li {
  break-inside: avoid;
  padding-block: 2px;
}

/* Support. */
.reach {
  display: grid;
  gap: 18px;
  justify-items: start;
  margin-top: 26px;
  padding: 28px;
  border-radius: 26px;
  background: var(--snow);
  box-shadow: 9px 10px 0 var(--shade);
  max-width: 68ch;
}
.reach .address {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 4.5vw, 30px);
  overflow-wrap: anywhere;
}
.questions {
  max-width: 68ch;
  margin-top: 48px;
}
.questions h2 {
  font-size: 32px;
  margin-bottom: 16px;
}
details {
  border-top: 2px solid var(--rim);
}
details:last-of-type {
  border-bottom: 2px solid var(--rim);
}
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 160ms ease-out;
}
details[open] summary::after {
  transform: translateY(3px) rotate(-135deg);
}
details .answer {
  padding: 0 2px 20px;
  color: var(--slate);
}
details .answer p + p {
  margin-top: 10px;
}
@media (prefers-reduced-motion: reduce) {
  summary::after {
    transition: none;
  }
}

.see-also {
  margin-top: 32px;
  max-width: 68ch;
}

/* Not found. */
.lost {
  display: grid;
  gap: 24px;
  justify-items: start;
  padding-block: 40px 96px;
}
.lost img {
  width: 180px;
  height: auto;
}
.lost .actions {
  gap: 22px;
}
.plain {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
}

/* Wider screens. */
@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }
  .links .wide {
    display: list-item;
  }
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
  .packs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 28px;
  }
  .lineup {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .faq {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
  }
  .again {
    padding: 56px;
  }
  .foot-grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    padding-top: 40px;
  }
  .ground {
    height: 150px;
  }
  .ground .detective {
    width: 140px;
  }
  .daily {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }
  .section {
    padding-block: 104px;
  }
}

:root {
  --tiles: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'132'%20height%3D'132'%3E%3Crect%20x%3D'4'%20y%3D'4'%20width%3D'124'%20height%3D'124'%20rx%3D'16'%20fill%3D'%23F6FAFD'%20fill-opacity%3D'0.62'%2F%3E%3C%2Fsvg%3E");
  --drift: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'1440'%20height%3D'48'%20viewBox%3D'0%200%201440%2048'%20preserveAspectRatio%3D'none'%3E%3Cpath%20d%3D'M0%2048V20C160%202%20300%204%20460%2018S760%2040%20940%2022%201240%200%201440%2020V48Z'%20fill%3D'%231b2840'%2F%3E%3Cpath%20d%3D'M0%2048V30C140%2016%20280%2014%20420%2026S700%2046%20880%2032%201200%2012%201440%2030V48Z'%20fill%3D'%230e1726'%2F%3E%3C%2Fsvg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    --tiles: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'132'%20height%3D'132'%3E%3Crect%20x%3D'4'%20y%3D'4'%20width%3D'124'%20height%3D'124'%20rx%3D'16'%20fill%3D'%231B2840'%20fill-opacity%3D'0.7'%2F%3E%3C%2Fsvg%3E");
  }
}
