/* Vestigia portal.
 *
 * The colour tokens mirror viz-platform's app.css so the portal and the blocs
 * feel like one product rather than two sites that happen to link to each
 * other. Kept deliberately small: this page exists to get out of the way.
 */
:root {
  --surface-page: #f9f9f7;
  --surface-raised: #ffffff;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --radius: 6px;
  --radius-lg: 12px;
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans SC", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-page: #0d0d0d;
    --surface-raised: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --grid: #2c2c2a;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
  }
}
:root[data-theme="dark"] {
  --surface-page: #0d0d0d;
  --surface-raised: #1a1a19;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid: #2c2c2a;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #3987e5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.masthead {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.masthead h1 {
  margin: 0 0 10px;
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.02em;
  /* the name is the one place a little character is warranted */
  font-family: Georgia, "Songti SC", serif;
}

.tagline {
  margin: 0;
  max-width: 62ch;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.about-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.about-link:hover { border-bottom-color: var(--accent); }

.lang {
  flex: none;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-secondary);
  border-radius: var(--radius);
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lang:hover { color: var(--text-primary); }

.blocs {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 56px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.bloc {
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.bloc[href]:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
}
.bloc.pending { opacity: .72; cursor: default; }

.thumb {
  height: 150px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.02));
  border-bottom: 1px solid var(--border);
  display: block;
  overflow: hidden;
}
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* a bloc with nothing built yet gets a hatch, not a fake picture */
.thumb.empty {
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 7px, var(--grid) 7px, var(--grid) 8px);
}

.bloc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.bloc-title { font-size: 17px; font-weight: 550; letter-spacing: -0.01em; }
.bloc-desc { font-size: 13px; line-height: 1.6; color: var(--text-secondary); }

.bloc-meta {
  margin-top: 4px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.dot { display: inline-flex; align-items: center; gap: 5px; }
.dot::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.live { color: #0ca30c; }
.soon { color: var(--text-muted); }

.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 620px) {
  .masthead { padding-top: 40px; flex-direction: column; }
  .masthead h1 { font-size: 34px; }
}

.head-controls { display: inline-flex; align-items: center; gap: 8px; }
.theme-toggle {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border, #ddd); border-radius: 6px;
  background: transparent; color: var(--text-secondary, #666);
  font-size: 14px; cursor: pointer;
}
.theme-toggle:hover { color: var(--text-primary, #222); }


/* provenance line under each bloc card */
.bloc-sources { margin-top: 8px; font-size: 11px; line-height: 1.5; color: var(--text-muted); }
.bloc-sources .src-label { font-weight: 700; letter-spacing: .02em; margin-right: 4px; }
