/* Self-contained on purpose: no web fonts or third-party requests, so the
   Content-Security-Policy in infra/nginx.conf can stay at 'self'. */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b2330;
  --muted: #5a6577;
  --border: #e2e6ec;
  --accent: #1f4e79;
  --mark-fg: #ffffff;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 4px 16px rgb(16 24 40 / 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #161d27;
    --text: #e6eaf0;
    --muted: #9aa5b5;
    --border: #253040;
    --accent: #7fb0e0;
    --mark-fg: #0f141b;
    --shadow: none;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.925rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--text); }

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--accent);
  flex-shrink: 0;
}

.brand-glyph { stroke: var(--mark-fg); }

.brand-tld { color: var(--muted); font-weight: 500; }

/* Main */
main { flex: 1; }

.hero {
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
  max-width: 44rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 38rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  padding-bottom: 4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Gallery */
.gallery { padding-bottom: 5rem; }

.gallery h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.section-lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.gallery figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery picture { display: block; }

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--border);
}

.gallery figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem 0.9rem;
}

.caption-title {
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.35;
}

.caption-credit {
  color: var(--muted);
  font-size: 0.78rem;
}

.caption-credit a,
.gallery-note a { color: inherit; }

.caption-credit a:hover { color: var(--accent); }

.gallery-note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.gallery-more { margin: 1.25rem 0 0; font-weight: 600; }

.gallery-more a { color: var(--accent); text-decoration: none; }

.gallery-more a:hover { text-decoration: underline; }

/* Gallery as a page of its own */
.gallery-page { padding-top: clamp(2.5rem, 7vw, 4.5rem); }

.gallery-page h1 { margin-bottom: 0.75rem; }

.gallery-page .lede { margin-bottom: 2rem; }

/* page2: per-photo file links and the test-file tables */
.muted { color: var(--muted); font-weight: 400; }

.files {
  border-top: 1px solid var(--border);
  padding: 0.6rem 1rem 0.75rem;
  font-size: 0.8rem;
}

.files summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.files table { margin-top: 0.5rem; border-collapse: collapse; }

.files th {
  text-align: left;
  padding: 0.15rem 0.75rem 0.15rem 0;
  color: var(--muted);
  font-weight: 600;
}

.files a, .file-table a { color: var(--accent); }

.test-files { padding-bottom: 5rem; }

.test-files h2 { margin: 0 0 0.35rem; font-size: 1.5rem; letter-spacing: -0.015em; }

.test-files h3 { margin: 2rem 0 0.6rem; font-size: 1.05rem; }

.test-files h3 .muted { font-size: 0.85rem; margin-left: 0.4rem; }

.file-table {
  width: 100%;
  table-layout: fixed;   /* same column widths in every table */
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  font-size: 0.875rem;
}

.file-table th, .file-table td {
  padding: 0.55rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.file-table thead th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }

.file-table th:nth-child(1) { width: 30%; }
.file-table th:nth-child(2) { width: 30%; }
.file-table th:nth-child(3) { width: 28%; }
.file-table th:nth-child(4) { width: 12%; text-align: right; }

.file-table td { overflow-wrap: anywhere; }

.file-table tbody tr:last-child td { border-bottom: 0; }

.file-table td:last-child { white-space: nowrap; text-align: right; }

.file-table code { font-size: 0.8rem; color: var(--muted); }

/* Narrow screens: drop the Content-Type column rather than scroll sideways */
@media (max-width: 40rem) {
  .file-table th:nth-child(3), .file-table td:nth-child(3) { display: none; }
  .file-table th:nth-child(1), .file-table th:nth-child(2) { width: 40%; }
  .file-table th:nth-child(4) { width: 20%; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer p { margin: 1.5rem 0; }
