/* Follows the gluon-infra design policy:
   https://forgejo.hosna.cloud/gluon/gluon-infra/src/branch/main/DESIGN.md
   The font files are copies of the ones in gluon-infra. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/next-latin.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: "Atkinson Hyperlegible Next";
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/next-latinext.woff2) format("woff2");
  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;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/mono-latin.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: "Atkinson Hyperlegible Mono";
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/mono-latinext.woff2) format("woff2");
  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;
}

:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #d6dae1;
  --text: #16181d;
  --muted: #525c6b;
  --accent: #0067a5;
  --accent-hover: #004e80;
  --danger: #c1440e;
  --font-sans: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --surface: #1b1e27;
    --border: #2a2f3a;
    --text: #e6e8ee;
    --muted: #9aa3b2;
    --accent: #56b4e9;
    --accent-hover: #7cc4ef;
    --danger: #ff7043;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

header p {
  margin: 0;
}

#owner {
  color: var(--muted);
}

#owner strong {
  color: var(--text);
}

button {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 0.5rem;
  cursor: pointer;
}

button:hover {
  color: var(--accent-hover);
}

#end {
  margin-left: auto;
  color: var(--danger);
}

#end:hover {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

/* A viewfinder: the letterboxing around the camera image stays black in both themes. */
video {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

section {
  padding: 0 1rem 1rem;
}

h2 {
  font-size: 1rem;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}

li span {
  flex: 1 1 12rem;
}

time,
data {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
