/* ============================================================
   EO-Map static-page theme (inherited 2026-07-07 identity rollout)
   Shared by every non-SPA page, and by the app's offline fallback
   (offline.html), which precaches it via sw.js. Provides:
     1. The brand fonts (same self-hosted woff2 files as the app)
     2. Accent tokens defaulting to Ember (#ffb35c)
   /static-theme.js (loaded right after this file) overrides the
   accent tokens inline from localStorage['efmap:prefs'] so these
   pages follow whatever accent the visitor uses in the app —
   including custom Ember hues. Without JS the Ember defaults
   below apply.
   ============================================================ */

@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ChakraPetch-400.woff2') format('woff2');
  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: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ChakraPetch-500.woff2') format('woff2');
  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: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ChakraPetch-600.woff2') format('woff2');
  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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/IBMPlexMono-400.woff2') format('woff2');
  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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/IBMPlexMono-500.woff2') format('woff2');
  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;
}

:root {
  /* Ember defaults — mirror src/app/theme.ts ACCENT_THEMES.ember.
     /static-theme.js overrides these inline per the visitor's prefs. */
  --accent: #ffb35c;
  --accent-hover: #ffc27f;
  --accent-rgb: 255, 179, 92;
  --control-accent: #ffc27f;
  --accent-ink: #2b1503;
  --font-display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, 'Roboto Mono', monospace;
}

.ef-static-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #2a2a2a);
  color: var(--muted-foreground, #a3a3a3);
  font-family: var(--font-display);
  font-size: 0.9rem;
  line-height: 1.65;
  text-align: center;
}

.ef-static-footer p { margin: 0; }
.ef-static-footer .ef-static-footer-row { margin-top: 0.55rem; }
.ef-static-footer a { color: var(--accent); text-decoration: none; }
.ef-static-footer a:hover { color: var(--accent-hover); }
.ef-static-footer strong { color: var(--foreground, #fafafa); }

/* ============================================================
   Screenshot lightbox (ported for the EO blog, 2026-09-02).
   Behaviour lives in the second IIFE of /static-theme.js. Only
   anchors that WRAP an image and point at a same-origin image
   path are handled, and only those get the zoom cursor.
   ============================================================ */

a[data-eo-zoom],
a[data-eo-zoom] img { cursor: zoom-in; }

html.eo-lightbox-open,
html.eo-lightbox-open body { overflow: hidden; }

.eo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: clamp(0.5rem, 1.5vw, 1rem);
  /* Deep enough that the article recedes to a ghost rather than competing
     with the screenshot. On a narrow portrait phone a 16:9 capture only
     fills a band of the stage, so a lighter backdrop left the surrounding
     body text readable and the image looked lost inside it. */
  background: rgba(6, 6, 8, 0.96);
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 120ms ease;
}

.eo-lightbox[data-open] { opacity: 1; }

.eo-lightbox__bar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

/* min-height:0 is what lets the image's max-height:100% resolve
   against the remaining space instead of overflowing the viewport. */
.eo-lightbox__stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eo-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
  background: #0a0a0a;
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}

.eo-lightbox__close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--foreground, #fafafa);
  background: rgba(20, 20, 24, 0.85);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 3px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.eo-lightbox__close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.eo-lightbox__close:focus-visible {
  outline: 2px solid var(--control-accent, #ffc27f);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .eo-lightbox { transition: none; }
  .eo-lightbox__close { transition: none; }
}
