@font-face {
  font-family: "Red Hat Mono";
  src: url(fonts/red-hat-mono-latin.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
  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: "Red Hat Mono";
  src: url(fonts/red-hat-mono-latin-ext.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

/* --bar + --cap + --pad must stay in sync with PHOTO_CHROME in build.py */
:root {
  --bg: #fff;
  --fg: #111;
  --muted: #8a8a8a;
  --bar: 3rem;
  --cap: 2.5rem;
  --pad: 1rem;
  --fade: 0.6s;
}

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

html {
  background: var(--bg);
  color: var(--fg);
  font: 400 13px/1.4 "Red Hat Mono", ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
}
body { background: var(--bg); min-height: 100svh; }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---- top bar ---- */
.bar {
  position: relative;
  z-index: 2;
  height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 var(--pad);
  background: var(--bg);
}
.bar nav {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a { color: var(--muted); transition: color 0.15s; }
.bar nav a:hover,
.bar nav a[aria-current] { color: var(--fg); }
.home { flex-shrink: 0; }
.landing-page .home { visibility: hidden; }

/* ---- photo viewer ---- */
.viewer {
  height: calc(100svh - var(--bar));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad) var(--pad);
}
.viewer figure {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.viewer img {
  max-width: calc(100vw - 2 * var(--pad));
  max-height: calc(100svh - var(--bar) - var(--cap) - var(--pad));
  width: auto;
  height: auto;
}
.viewer figcaption {
  height: var(--cap);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}
.nav {
  position: fixed;
  z-index: 1;
  top: var(--bar);
  bottom: 0;
  width: 50%;
  -webkit-tap-highlight-color: transparent;
}
.nav.prev { left: 0; cursor: w-resize; }
.nav.next { right: 0; cursor: e-resize; }

/* ---- landing ---- */
.landing {
  position: relative;
  height: calc(100svh - var(--bar));
}
.stage,
.final {
  position: absolute;
  inset: 0 var(--pad) var(--pad);
}
.stage { display: none; }
.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity var(--fade) ease;
}
.stage img.on { opacity: 1; }
.final {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: opacity var(--fade) ease;
}
.final a { display: block; }
.final h1 { font-size: 2rem; font-weight: 400; line-height: 2.5rem; }
.final img {
  max-width: 100%;
  max-height: calc(100svh - var(--bar) - 2.5rem - 0.75rem - 2 * var(--pad));
  width: auto;
  height: auto;
}
.play .bar nav { opacity: 0; visibility: hidden; transition: opacity var(--fade) ease, visibility var(--fade); }
.play.done .bar nav { opacity: 1; visibility: visible; }
.play .stage { display: block; }
.play .final { opacity: 0; pointer-events: none; }
.play.done .final { opacity: 1; pointer-events: auto; }
.play.done .stage { pointer-events: none; }
.play:not(.done) .landing { cursor: pointer; }

/* ---- misc ---- */
.message {
  height: calc(100svh - var(--bar));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.message a { color: var(--fg); }
