:root {
  --bg: #F5F3F2;
  --line: #D6D1CF;
  --text: #1B1D2A;
  --muted: #5E6272;
  --accent-1: #D7263D;
  --accent-2: #3B5BDB;
  --font-display: "Syne", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

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

html, body { margin: 0; background: var(--bg); color: var(--text); }

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding: calc(var(--gutter) + env(safe-area-inset-top, 0px)) var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
}

/* Top row: mark */
.mark { display: block; width: 32px; height: 32px; }

/* Main: the constellation above the wordmark */
main {
  display: grid;
  grid-template-rows: minmax(220px, 1fr) auto;
  gap: 16px;
}

.map { position: relative; }

.map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.edge {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 4 7;
  stroke-linecap: round;
}
.edge-a1 { stroke: var(--accent-1); stroke-opacity: 0.55; }
.edge-a2 { stroke: var(--accent-2); stroke-opacity: 0.55; }
.edge-faint { stroke: var(--line); }

.node { fill: var(--bg); stroke-width: 1.5; transition: fill 0.7s ease; }
.node.hit { transition: none; }
.node-a1 { stroke: var(--accent-1); }
.node-a1.hit { fill: var(--accent-1); }
.node-a2 { stroke: var(--accent-2); }
.node-a2.hit { fill: var(--accent-2); }
.node-faint { fill: var(--line); stroke: none; }

.hub { fill: var(--text); }
.hub-ring {
  fill: none;
  stroke: var(--text);
  stroke-opacity: 0.25;
  stroke-width: 1.5;
}
.ripple {
  fill: none;
  stroke: var(--accent-1);
  stroke-width: 1.5;
  opacity: 0;
}

/* Pulses travelling along the hub links (added by the script) */
.pulse-a1 { fill: var(--accent-1); }
.pulse-a2 { fill: var(--accent-2); }
.pulse .halo { opacity: 0.18; }

/* Wordmark + footnote */
.bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px 32px;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 8.5vw, 104px);
  line-height: 1;
  letter-spacing: -0.02em;
}

h1 .dot { color: var(--accent-1); }

.tagline {
  margin: 14px 0 0;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 500;
  color: var(--muted);
}

.year {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: no-preference) {
  /* Each line's direction and phase are randomised by the script */
  .edge line { animation: flow 7s linear infinite; }
  .edge-faint line { animation-duration: 11s; }

  @keyframes flow { to { stroke-dashoffset: -110; } }
}
