/* iso3200 gear catalogue — the iso3200.net Hugo site's design standards
   (iso3200.net-web: assets/css/main.css + glitch.css): its tokens, fonts,
   fixed nav, uppercase display headings and glitch effect. Dark only, like
   the site. Record names (lens, camera, film) keep their own case. */

:root {
  --bg:           #1e104e;
  --bg-mid:       #452e5a;
  --bg-card:      #261447;
  --accent:       #ff653f;
  --gold:         #ffc85c;
  --text:         #e8e0f8;
  --text-muted:   #9b8ab8;
  --border:       rgba(255, 200, 92, 0.10);
  --border-hover: rgba(255, 101, 63, 0.45);

  --glow-sm:  0 0 10px rgba(255, 101, 63, 0.45), 0 0 4px rgba(255, 101, 63, 0.6);

  --font-head: 'Black Han Sans', 'Impact', sans-serif;
  --font-body: 'Space Mono', 'Courier New', monospace;

  --container: 1200px;
  --nav-h:     64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 82% 8%,  rgba(69, 46, 90, 0.95) 0%, transparent 52%),
    radial-gradient(ellipse at 18% 92%, rgba(69, 46, 90, 0.80) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 50%, rgba(38, 20, 71, 0.50) 0%, transparent 68%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
a.quiet { color: var(--text); }
a.quiet:hover { color: var(--gold); }
p { margin-bottom: 1rem; }
code { font-family: var(--font-body); color: var(--gold); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.75rem; }

/* ── Navigation (as the Hugo site) ───────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(30, 16, 78, 0.88);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.site-nav .container { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.45rem;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-logo span { color: var(--accent); }
.nav-logo:hover { color: var(--gold); }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; list-style: none; }
.nav-links a {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

/* ── Page ────────────────────────────────────────────────────── */
main { padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 4rem; min-height: 70vh; }

.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.eyebrow::before { content: '▶'; font-size: 0.42rem; }

.page-title { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 0.92; display: inline-block; margin-bottom: 1rem; }
.record-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.05;
  text-transform: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.sub { color: var(--text-muted); max-width: 640px; margin-bottom: 1.5rem; }

h2 {
  font-size: 1.4rem;
  color: var(--gold);
  margin: 2.5rem 0 1rem;
  display: flex; align-items: center; gap: 1.25rem;
}
h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, rgba(255, 101, 63, 0.5), transparent); }

/* ── Work-in-progress notice (the Hugo site's beta badge colour) ── */
.wip {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-left: 2px solid var(--gold);
  background: rgba(38, 20, 71, 0.6);
  padding: 0.6rem 1rem;
  margin-bottom: 2rem;
  max-width: 820px;
}
.wip-label {
  color: var(--gold);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-right: 0.75rem;
  white-space: nowrap;
}

/* ── Forms ───────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin: 1.5rem 0; }
.filters label, .field-label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
input[type=search], select {
  font: inherit;
  font-size: 0.8rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid rgba(232, 224, 248, 0.22);
  border-radius: 0;
  padding: 0.55rem 0.75rem;
  max-width: 100%;
}
input[type=search]:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
input[type=search].big { font-size: 1rem; width: 100%; padding: 0.85rem 1rem; }
select option { background: var(--bg-card); color: var(--text); }

/* ── Chips, quick links ──────────────────────────────────────── */
.chip {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.1rem 0.55rem;
  border: 1px solid currentColor;
  color: var(--text-muted);
  margin: 0 0.35rem 0.2rem 0;
  white-space: nowrap;
  vertical-align: middle;
}
.chip.native  { color: var(--accent); }
.chip.adapted { color: var(--gold); }
a.chip:hover  { color: var(--accent); }
.active-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: -0.5rem 0 1.25rem; }
.active-filters a { color: var(--gold); }
.active-filters a:hover { color: var(--accent); }

.quicklinks { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 0 0 1.5rem; }
.quicklinks a {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.quicklinks a::after { content: ' →'; color: var(--accent); }
.quicklinks a:hover { color: var(--gold); }

/* ── Tables ──────────────────────────────────────────────────── */
.count { font-size: 0.68rem; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.6rem; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
th {
  text-align: left;
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.75rem;
  white-space: nowrap;
}
th button {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: inherit; background: none; border: 0; cursor: pointer; padding: 0;
}
th button:hover, th[aria-sort] button { color: var(--gold); }
th .arrow { color: var(--accent); margin-left: 0.35rem; }
td { border-bottom: 1px solid var(--border); padding: 0.6rem 0.75rem; vertical-align: top; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(38, 20, 71, 0.7); }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Pager, buttons ──────────────────────────────────────────── */
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }
.btn {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(232, 224, 248, 0.22);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover:not(:disabled) { color: var(--gold); border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 200, 92, 0.18); }
.btn:disabled { opacity: 0.35; cursor: default; }

/* ── Records ─────────────────────────────────────────────────── */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 2rem; margin: 1.5rem 0; max-width: 820px; }
dl.facts dt { font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); padding-top: 0.25rem; }
dl.facts dd { margin: 0; }
.results { list-style: none; }
.results li { padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.results li:first-child { border-top: 1px solid var(--border); }
.results .why { color: var(--text-muted); font-size: 0.68rem; margin-left: 0.75rem; }
.aside { color: var(--text-muted); font-size: 0.75rem; margin-left: 0.5rem; }

.note { color: var(--text-muted); font-size: 0.8rem; }
.error { color: var(--accent); }
.loading { color: var(--text-muted); letter-spacing: 0.1em; }

/* ── Footer (as the Hugo site) ───────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: var(--font-head); font-size: 1.15rem; color: var(--text-muted); text-transform: uppercase; }
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.04em; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-copy a { color: var(--text-muted); }
.footer-copy a:hover { color: var(--accent); }

/* ── Glitch (glitch.css from the Hugo site) ──────────────────── */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  font: inherit; letter-spacing: inherit; text-transform: inherit; line-height: inherit;
  pointer-events: none;
  opacity: 0;
}
.glitch::before { color: #0ff; mix-blend-mode: screen; }
.glitch::after  { color: #f0f; mix-blend-mode: screen; }
.glitch.is-glitching::before { opacity: 1; animation: glitch-cyan 0.38s steps(3) forwards; }
.glitch.is-glitching::after  { opacity: 1; animation: glitch-magenta 0.38s steps(3) forwards; }
@keyframes glitch-cyan {
  0%   { clip-path: polygon(0 4%,  100% 4%,  100% 28%, 0 28%); transform: translate(-4px, 0); }
  33%  { clip-path: polygon(0 42%, 100% 42%, 100% 64%, 0 64%); transform: translate( 3px, 0); }
  66%  { clip-path: polygon(0 68%, 100% 68%, 100% 88%, 0 88%); transform: translate(-2px, 0); }
  100% { clip-path: inset(0 0 100% 0); opacity: 0; }
}
@keyframes glitch-magenta {
  0%   { clip-path: polygon(0 14%, 100% 14%, 100% 38%, 0 38%); transform: translate( 4px, 0); }
  33%  { clip-path: polygon(0 52%, 100% 52%, 100% 72%, 0 72%); transform: translate(-3px, 0); }
  66%  { clip-path: polygon(0 78%, 100% 78%, 100% 94%, 0 94%); transform: translate( 2px, 0); }
  100% { clip-path: inset(0 0 100% 0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .glitch.is-glitching::before, .glitch.is-glitching::after { animation: none; opacity: 0; }
}

/* ── Small screens ───────────────────────────────────────────── */
@media (max-width: 760px) {
  .site-nav { height: auto; padding: 0.75rem 0; }
  .site-nav .container { flex-direction: column; align-items: flex-start; }
  .nav-links { gap: 0.25rem 1.1rem; }
  main { padding-top: 8.5rem; }
  .container { padding: 0 1rem; }
  td.hide-sm, th.hide-sm { display: none; }
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: 0.75rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
