/*
 * The Loud family's look, shared by every page here: LoudClips' dark base and amber, the same tokens LoudStages,
 * LoudWidgets, LoudCoasters and LoudEffects use, so the sites look like one family. Dark is the only theme.
 */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f2430;
  --line: #262b35;
  --line-strong: #2e3440;
  --text: #e8eaf0;
  --text-2: #c3c9d4;
  --muted: #9aa3b2;
  --accent: #f5c542;
  --accent-hover: #ffd86a;
  --accent-ink: #1a1400;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading: "Space Grotesk", "Inter", ui-sans-serif, sans-serif;
  --gutter: 28px;
  --header-h: 72px;          /* 20 above the logo, 18 logo, 6, 11 line, 16 below, 1 hairline */
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--heading); }
button, input, select { font: inherit; color: inherit; }

/* Header -------------------------------------------------------------------- */
/* Laid out like the other Loud sites' headers: the logo top left with "Powered by Volume.com" under it, a
   hairline under the whole bar, the pages on the right. It stays at the top while the page scrolls. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  padding: 20px var(--gutter) 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.site-id > a { align-self: flex-start; color: var(--text); }
.site-id > a:hover, .site-id > a:focus-visible { color: var(--accent); }

/* The SVG is a mask filled with the current text colour, so one file takes a link's hover colour. */
.logo {
  display: block;
  flex: none;
  height: 18px;
  aspect-ratio: 1795 / 131;
  background: currentColor;
  -webkit-mask: url("../brand/loudwatermark-logo.svg") center / contain no-repeat;
  mask: url("../brand/loudwatermark-logo.svg") center / contain no-repeat;
}
.logo.lg { height: 20px; }

.powered { display: block; font-size: 11px; line-height: 1; white-space: nowrap; color: var(--muted); }
.powered a { font-weight: 500; color: var(--text-2); text-decoration: none; }
.powered a:hover { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--panel-2); color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--panel-2); color: var(--text); }
.site-nav a[aria-current="page"] svg { color: var(--accent); }
.site-nav .n { font: 11px var(--mono); padding: 1px 6px; border-radius: 999px; background: var(--bg); color: var(--muted); font-variant-numeric: tabular-nums; }
.site-nav a.btn { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.site-nav a.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }

/* Footer -------------------------------------------------------------------- */

.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--bg); }
.site-footer .inner { display: flex; flex-direction: column; gap: 32px; padding: 36px var(--gutter); }
.site-footer .top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 40px; }
.site-footer .about { display: flex; flex-direction: column; gap: 8px; }
.site-footer .about > a { align-self: flex-start; color: var(--text); }
.site-footer .about > a:hover { color: var(--accent); }
.site-footer .about p { margin: 0; font-size: 13px; color: var(--muted); }
.site-footer .pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.site-footer .pages a { font-size: 13px; color: var(--text-2); text-decoration: none; }
.site-footer .pages a:hover { color: var(--accent); }
.site-footer .legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.site-footer .legal p { margin: 0; }
.site-footer .legal nav { display: flex; gap: 20px; }
.site-footer .legal a { color: var(--muted); text-decoration: none; }
.site-footer .legal a:hover { color: var(--accent); }

/* Plain-words pages: terms, privacy, tech log ------------------------------- */

.doc { width: 100%; max-width: calc(56rem + 2 * var(--gutter)); padding: 40px var(--gutter) 64px; display: flex; flex-direction: column; gap: 40px; }
.doc.narrow { max-width: calc(42rem + 2 * var(--gutter)); gap: 32px; }
.doc header { display: flex; flex-direction: column; gap: 8px; }
.doc h1 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 600; }
.doc .updated { margin: 0; font-size: 13px; color: var(--muted); }
.doc .lead { margin: 0; max-width: 42rem; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.doc section { display: flex; flex-direction: column; gap: 8px; }
.doc h2 { margin: 0; font-size: 20px; font-weight: 600; }
.doc p { margin: 0; line-height: 1.6; color: var(--text-2); }
.doc ul { margin: 0; padding-left: 20px; line-height: 1.6; color: var(--text-2); }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--accent); }
.doc a:hover { color: var(--accent-hover); }
.doc .what { font-size: 13px; color: var(--muted); }
.doc .note { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: 13px; }

.tech-list { margin: 0; display: flex; flex-direction: column; }
.tech-list > div { display: grid; gap: 2px 24px; padding: 10px 0; border-top: 1px solid var(--line); }
.tech-list dt { font-size: 13px; font-weight: 500; color: var(--text); }
.tech-list dd { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-2); }
@media (min-width: 640px) { .tech-list > div { grid-template-columns: 13rem 1fr; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat b { display: block; font: 600 24px/1.1 var(--heading); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }

/* On a phone the pages sit in a row of their own under the name, as on the other Loud sites, so the bar never
   crowds the logo. */
@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 110px; }   /* 20, 14 logo, 6, 11 line, 10, 32 links, 16, 1 */
  .logo { height: 14px; }
  .logo.lg { height: 16px; }
  .site-header { flex-wrap: wrap; row-gap: 10px; align-content: flex-start; }
  .site-nav { width: 100%; margin: 0 -9px; overflow-x: auto; scrollbar-width: none; }
  .site-nav a { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
