:root {
  --color-accent: #78a9ff;
  --color-accent2: #be95ff;
  --color-background: #161616;
  --color-charging: #33b1ff;
  --color-critical: #ee5396;
  --color-error: #ee5396;
  --color-good: #25be6a;
  --color-info: #33b1ff;
  --color-island-bg: #0d0d0d;
  --color-main-bg: #161616;
  --color-main-br: #484848;
  --color-main-fg: #f2f4f8;
  --color-muted: #a6adc8;
  --color-on-primary: #161616;
  --color-on-surface: #f2f4f8;
  --color-on-surface-variant: #a6adc8;
  --color-outline: #484848;
  --color-outline-variant: #48484899;
  --color-primary: #78a9ff;
  --color-primary-container: #2c4a7a;
  --color-primary-text: #161616;
  --color-secondary: #be95ff;
  --color-success: #25be6a;
  --color-surface: #161616;
  --color-surface-container: #1b1b1b;
  --color-surface-container-high: #252525;
  --color-surface-container-highest: #2f2f2f;
  --color-surface-container-low: #121212;
  --color-surface-container-lowest: #0d0d0d;
  --color-surface-text: #f2f4f8;
  --color-surface-variant: #2a2a2a;
  --color-surface-variant-text: #a6adc8;
  --color-warning: #08bdba;
  --font-family: "Noto Sans";
  --font-mono: "UbuntuMono Nerd Font";
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 12px;
  --space-l: 16px;
  --space-xl: 24px;
  --radius-xs: 4px;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
}

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

body {
  background: var(--color-main-bg);
  color: var(--color-main-fg);
  font-family: var(--font-family), system-ui, sans-serif;
}

/* The colors come from the theme (opico-web writes it before these rules): carbonfox, dark only.
   Each var() has the carbonfox value as a fallback, so the page also shows correctly when it is
   opened from disk without the theme. The landing keeps its own font. */
:root {
  /* Scale of the 2560x1440 background under background-size: cover. */
  --k: max(100vw / 2560, 100vh / 1440);
}

html, body { height: 100%; }

body {
  background: var(--color-main-bg, #161616) url("/background.svg") center / cover no-repeat;
  color: var(--color-main-fg, #f2f4f8);
  font-family: "Noto Sans", system-ui, sans-serif;
  overflow: hidden;
}

/* The live background (opico-web-wasm) lies over the CSS background. It stays transparent until
   its first frame, and also when the wasm or the GPU path fails: then background.svg shows. The
   logo lies over the canvas, with the same cover fit of the 2560x1440 design. */
.background, .logo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

main {
  position: relative;
  height: 100%;
}

/* The logo sits at the centre of the background; the status line goes below the description box. */
.status {
  position: absolute;
  left: 50%;
  top: calc(50% + 300 * var(--k));
  transform: translateX(-50%);
  white-space: nowrap;
  font-weight: 500;
  font-size: max(15px, 34 * var(--k));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

.status::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.6em;
  border-radius: 50%;
  background: var(--color-accent, #78a9ff);
  box-shadow: 0 0 0.6em var(--color-accent, #78a9ff);
  vertical-align: 0.12em;
}

footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  padding: 0 16px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
