/* The paints (colour) live in assets/paints.css — load it first.

   ============================================================
   FRVRARETE — shared type + layout system
   Technical / minimal: monospace uppercase body, one edge-to-edge
   grotesque wordmark per page, numbered index lists.
   ------------------------------------------------------------
   DESIGN LEVERS (change one line, reload):
     --ink     colour of everything drawn on the page (red here).
     --paper   the background (sky here).
     --rule    hairline colour used by every divider and border.
     --body    base type size for the whole mono system.
   ============================================================ */

:root {
  --body: 11.5px;

  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Monaco,
          "Cascadia Mono", "Roboto Mono", "Courier New", monospace;
  --grotesque: "Helvetica Neue", Helvetica, Arial, "Inter", sans-serif;

  --gutter: clamp(20px, 3.2vw, 46px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--body);
  line-height: 1.7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 1px dashed var(--ink);
  outline-offset: 3px;
}

/* ---------- constellation canvas ---------- */

#constellation {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  z-index: -1;
}

/* ---------- shell ---------- */

.shell {
  max-width: 1700px;
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 30px) var(--gutter) clamp(40px, 6vw, 90px);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- wordmark: one line of type, edge to edge ---------- */

.wordmark {
  display: block;
  width: 100%;
  height: auto;
  fill: var(--ink);
  overflow: visible;
}

.wordmark a { text-decoration: none; }

.wordmark-wrap { display: block; }

/* ---------- metadata grid under the wordmark ---------- */

.meta {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(16px, 2vw, 34px);
  row-gap: 34px;
  margin-top: clamp(22px, 3vw, 40px);
}

.meta-block { grid-column: span 3; }

.meta-block h2,
.meta-label {
  font-size: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.meta-block p,
.meta-block li { font-weight: 400; }

.meta-block .arrow { display: block; }

.arrow::before {
  content: "\21B3";
  display: inline-block;
  margin-right: 6px;
  opacity: 0.75;
}

/* ---------- numbered index ---------- */

.index-list { list-style: none; }

.index-list li {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.index-list .num {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

/* ---------- document icons (folder / envelope / sheet + the mark) ---------- */

.doc-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 40px;
}

.doc-icon .glyph { width: 100%; height: 100%; }

.doc-icon .doc-star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  fill: var(--ink);
}

.doc-icon.icon-folder .doc-star { top: 60%; }

.icon-folder .glyph path {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.4;
}

.icon-folder .glyph .fold { fill: var(--wash); }

.icon-paper .glyph rect,
.icon-letter .glyph rect {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.4;
}

.icon-paper .glyph line {
  stroke: var(--ink);
  stroke-width: 1.2;
  opacity: 0.5;
}

.icon-letter .glyph .flap {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
}

/* large variant: fills whatever box it's placed in */
.doc-icon.xl { width: 100%; height: auto; aspect-ratio: 62 / 52; }
.doc-icon.xl .doc-star { width: 28%; height: auto; aspect-ratio: 1 / 1; }
.doc-icon.xl .glyph path,
.doc-icon.xl .glyph rect { stroke-width: 0.7; }
.doc-icon.xl .glyph line { stroke-width: 0.6; }

/* ---------- footer ---------- */

.site-foot {
  margin-top: clamp(50px, 8vw, 120px);
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
}

/* ---------- the star, glowing on hover ---------- */

.glow { transition: filter 0.4s ease; }

a:hover .glow {
  filter:
    drop-shadow(0 0 3px rgba(var(--ink-rgb), 0.65))
    drop-shadow(0 0 7px rgba(var(--ink-rgb), 0.4))
    drop-shadow(0 0 13px rgba(var(--ink-rgb), 0.2));
}

@media (prefers-reduced-motion: reduce) {
  .glow { transition: none; }
  a:hover .glow { filter: none; }
}

@media (max-width: 900px) {
  .meta-block { grid-column: span 6; }
}

@media (max-width: 560px) {
  .meta-block { grid-column: span 12; }
  .meta { row-gap: 26px; }
}
