/*
  The whole page is black. The fire is a canvas. Two lines of text.
  Nothing else. Resist adding things.
*/

:root {
  --ink: #7a6f63;          /* warm grey for the caption */
  --ink-dim: #4a433d;      /* caption colour when the fire has died */
  --ember: #d9601c;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: #000;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
}

#fire {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Transparent hit area over the logs. Size/position set from JS. */
#feed {
  position: fixed;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  outline: none;
}
#feed:focus-visible {
  box-shadow: 0 0 0 1px rgba(217, 96, 28, 0.35);
}
#feed[disabled] {
  cursor: default;
}

.caption {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom, 0px) + 22px);
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 2.4s ease 0.8s, color 3s ease;
  pointer-events: none;
}
.caption.is-visible { opacity: 1; }
body.is-dead .caption { color: var(--ink-dim); }

.cooldown {
  position: fixed;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--ember);
  opacity: 0;
  transform-origin: left center;
  transform: scaleX(0);
}
.cooldown.is-active {
  opacity: 0.55;
  animation: drain var(--cooldown-ms, 10000ms) linear forwards;
}
@keyframes drain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

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

@media (prefers-reduced-motion: reduce) {
  .caption { transition: none; }
}
