/* burstfall.com: the icon's colours (scripts/icon.py) and the game's own
   font, Saira, whose width axis condenses the lines as the menus do. */

@font-face {
  font-family: "Saira";
  src: url("fonts/saira.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
}

:root {
  --night: #0f1067;
  --deep: #080936;
  --sun: #fcd744;
  --amber: #fcb922;
  --ember: #e56f14;
  --text: #fff4dc;
  --quiet: #a4a6e6;
  /* A cube's width knocked out of each corner of a picture. */
  --notch: clamp(8px, 1.1vw, 14px);
}

* { box-sizing: border-box; }

html {
  background: var(--deep);
  color: var(--text);
  font-family: "Saira", system-ui, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: linear-gradient(var(--night) 0, var(--night) 40rem, var(--deep) 140rem);
}

main {
  width: min(1240px, 94vw);
  margin: 0 auto;
}

/* The wordmark's letters set its height; its trail falls on past them,
   beside the first line, each piece placed in the drawing's own pixels. */
.mark { padding: clamp(3rem, 9vw, 7.5rem) 0 0; }

h1 { margin: 0; }

.wordmark {
  position: relative;
  display: block;
  width: min(100%, 980px);
  aspect-ratio: 3037 / 531;
}

.wordmark img { position: absolute; display: block; }
.letters { left: 0; top: 0; width: 100%; height: auto; }

.piece {
  left: calc(var(--x) / 3037 * 100%);
  top: calc(var(--y) / 531 * 100%);
  width: calc(var(--w) / 3037 * 100%);
  height: auto;
}

@media (prefers-reduced-motion: no-preference) {
  /* The break: each piece drops from the foot of the L, then holds, as a
     hit holds in the game. */
  .piece {
    opacity: 0;
    animation: fall 620ms cubic-bezier(.2, .75, .3, 1) both;
    animation-delay: calc(450ms + var(--n) * 90ms);
  }
  @keyframes fall {
    from {
      opacity: 0;
      transform: translate(-30%, calc(-120% - var(--n) * 55%)) rotate(-28deg);
    }
    25% { opacity: 1; }
    to { opacity: 1; transform: none; }
  }
}

.line {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(1.6rem, 3.6vw, 2.75rem);
  font-weight: 620;
  font-stretch: 82%;
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

/* In from the wordmark's outline, to its letters' edge. */
.mark .line { margin-top: clamp(0.5rem, 2vw, 1.5rem); padding-left: 0.6%; }
.line.right { margin: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.5rem) auto; text-align: right; }
main > .line:last-child { margin: clamp(4rem, 9vw, 7rem) 0 0; color: var(--sun); }

.shot { margin: 0; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--deep);
  clip-path: polygon(
    0 var(--notch), var(--notch) var(--notch), var(--notch) 0,
    calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%,
    var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch)));
}

.town { margin-top: clamp(3rem, 8vw, 6rem); }

/* The pictures below step down the page, as the pieces do. */
.pair {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  align-items: start;
}

.pair + .pair { margin-top: clamp(0.75rem, 2vw, 1.5rem); }

@media (min-width: 760px) {
  .pair.first { grid-template-columns: 8fr 4fr; }
  .pair.first .shot:last-child { margin-top: clamp(2rem, 6vw, 5rem); }
  .pair.second { grid-template-columns: 1fr 1fr; width: 96%; margin-left: auto; }
  .pair.second .shot:last-child { margin-top: clamp(2rem, 6vw, 5rem); }
}

footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(1240px, 94vw);
  margin: clamp(5rem, 12vw, 9rem) auto 0;
  padding: 1.5rem 0 2.5rem;
  color: var(--quiet);
  font-size: 0.95rem;
}

footer a { margin-left: auto; }

a { color: var(--sun); text-underline-offset: 0.2em; }
a:hover { color: var(--text); }
a:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; border-radius: 2px; }

/* The privacy page: plain reading. */
.page {
  width: min(40rem, 90vw);
  padding: clamp(3rem, 8vw, 6rem) 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.page .home { display: inline-block; width: 11rem; }
.page .home img { display: block; width: 100%; height: auto; }

.page h1 {
  margin: 2.5rem 0 1rem;
  font-size: 2.5rem;
  font-weight: 650;
  font-stretch: 82%;
  line-height: 1.1;
}

.page h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 620;
  font-stretch: 88%;
  color: var(--sun);
}

.page p, .page ul { margin: 0 0 1rem; }
.page ul { padding-left: 1.25rem; }
.page li + li { margin-top: 0.35rem; }
.page + footer { width: min(40rem, 90vw); }
