/* trees - quiet easter egg. Minimal CSS: full-bleed canvas, one caption, one font. */

@font-face {
  font-family: "PlexMono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette derived from the hue-family of a native app's forest point-cloud
     background (pale warm mist in light mode, near-black in dark mode), retinted
     to the muted conifer green the spec calls for. No image or asset reused. */
  --bg-light: #f3f1e6;
  --fg-light: #33402c;
  --bg-dark: #05100a;
  --fg-dark: #cdd8bf;
  --fog-light: rgba(243, 241, 230, 0.55);
  --fog-dark: rgba(5, 16, 10, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-light);
  font-family: "PlexMono", monospace;
}

@media (prefers-color-scheme: dark) {
  html, body {
    background: var(--bg-dark);
  }
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#scene {
  z-index: 1;
}

#seismo {
  z-index: 2;
  /* height is set precisely in JS (40-60px * devicePixelRatio); this just
     anchors it to the bottom edge for CSS layout purposes before JS runs. */
  top: auto;
  bottom: 0;
  height: 56px;
}

#caption {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--fg-light);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  #caption {
    color: var(--fg-dark);
  }
}

@media (max-width: 480px) {
  #caption {
    bottom: 64px;
    font-size: 12px;
  }
}

/* Tip line (D9, order BM): the one sanctioned <a> in this page, added by
   main.js only when TIP_URL is non-empty, and only after five minutes of
   visible/focused time. Sits above the caption so it never crowds the
   seismograph strip. */
#tip {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg-light);
  opacity: 0;
  transition: opacity 2s ease;
  text-align: center;
  max-width: 84%;
}

#tip.show {
  opacity: 0.6;
}

#tip a {
  color: inherit;
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  #tip {
    color: var(--fg-dark);
  }
}

@media (max-width: 480px) {
  #tip {
    bottom: 90px;
    font-size: 11px;
  }
}
