/* Theme: the fonts (vendored, offline) and the ground that warms with the heat level.
   The ground is four fixed layers, one per level, stacked; raising the level fades the next
   one in (opacity only, so the phone's compositor does the work, not the main thread). */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../vendor/fonts/fraunces-5.3.0-latin-full.woff2') format('woff2-variations');
  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: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../vendor/fonts/atkinson-hyperlegible-next-5.3.0-latin-wght.woff2') format('woff2-variations');
  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;
}

html {
  background: var(--ground-1-top);
}

#ground {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  view-transition-name: ground;
}

#ground > i {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--dur-heat) var(--ease);
}

#ground > .g1 {
  opacity: 1;
  background:
    radial-gradient(130% 48% at 50% 112%, var(--ground-1-glow) 0%, rgb(0 0 0 / 0) 66%),
    linear-gradient(180deg, var(--ground-1-top) 0%, var(--ground-1-bottom) 100%);
}

#ground > .g2 {
  background:
    radial-gradient(130% 56% at 50% 112%, var(--ground-2-glow) 0%, rgb(240 128 72 / 0.12) 40%, rgb(0 0 0 / 0) 70%),
    linear-gradient(180deg, var(--ground-2-top) 0%, #191432 52%, var(--ground-2-bottom) 100%);
}

#ground > .g3 {
  background:
    radial-gradient(135% 64% at 50% 112%, var(--ground-3-glow) 0%, rgb(220 90 110 / 0.14) 42%, rgb(0 0 0 / 0) 74%),
    linear-gradient(180deg, var(--ground-3-top) 0%, #1d1231 50%, var(--ground-3-bottom) 100%);
}

#ground > .g4 {
  background:
    radial-gradient(140% 72% at 50% 112%, var(--ground-4-glow) 0%, rgb(210 70 50 / 0.16) 44%, rgb(0 0 0 / 0) 78%),
    linear-gradient(180deg, var(--ground-4-top) 0%, #230d24 48%, var(--ground-4-bottom) 100%);
}

html[data-heat='2'] #ground > .g2,
html[data-heat='3'] #ground > .g2,
html[data-heat='3'] #ground > .g3,
html[data-heat='4'] #ground > .g2,
html[data-heat='4'] #ground > .g3,
html[data-heat='4'] #ground > .g4 {
  opacity: 1;
}
