/* The hub. One screen that links to the three pieces.
   Tokens and type match research/ and proposal/ by hand. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-serif-latin-300-normal.woff2") format("woff2"); }

:root {
  --night:  #151515;
  --linen:  #F6EDE6;
  --slate:  #233D4D;
  --lime:   #C6EB4C;
  --coral:  #E1885E;
  --oat:    #E6DACB;

  --serif: "IBM Plex Serif", Georgia, serif;
  --sans:  "IBM Plex Sans", system-ui, sans-serif;

  --side:  clamp(1rem, 2.5vw, 3rem);
  --gap:   clamp(1.5rem, 3.75vw, 4.5rem);
  --rule:  2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }

.ground-night { --bg: var(--night); --ink: var(--linen); --mark: var(--lime); }
.ground-night { background: var(--bg); color: var(--ink); }

/* ---------- TYPE ---------- */
.display-2, .display-4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-left: -0.055em;
}
.display-2 { font-size: clamp(2.75rem, 8.75vw, 10.5rem); }
.display-4 { font-size: clamp(2.25rem, 5.42vw, 6.5rem); }
.lead  { font: 500 clamp(1.375rem, 2.08vw, 2.5rem) / 1.2 var(--sans); letter-spacing: -0.01em; }
.body  { font: 400 clamp(1.0625rem, 1.354vw, 1.625rem) / 1.4 var(--sans); }
.label { font: 600 0.75rem / 1.34 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- PAGE ---------- */
.hub {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--side);
  max-width: 120rem;
  margin: 0 auto;
}

.frame-top, .frame-foot {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 1rem;
  padding: clamp(1rem, 1.56vw, 1.875rem) 0;
}

.hub-head {
  display: grid;
  grid-template-columns: minmax(0, 880fr) minmax(0, 872fr);
  column-gap: var(--gap);
  margin-top: clamp(4rem, 9vw, 11rem);
}
.hub-head h1 { grid-column: 1 / -1; }
.hub-head h1 span { display: block; white-space: nowrap; }
.hub-head .lead { grid-column: 2; margin-top: clamp(1.5rem, 3vw, 3.5rem); }
.hub-head h1 .dim { color: color-mix(in srgb, var(--ink) 60%, transparent); }
.hub-head .lead { max-width: 30ch; }

/* The three links. A rule above each, the name on the left,
   what is inside on the right. */
.pieces {
  margin: clamp(3.5rem, 7vw, 8rem) 0 clamp(3rem, 6vw, 7rem);
  flex: 1;
}
.piece {
  display: grid;
  grid-template-columns: minmax(0, 880fr) minmax(0, 872fr);
  column-gap: var(--gap);
  align-items: baseline;
  padding: clamp(1rem, 1.4vw, 1.75rem) 0 clamp(2rem, 3.2vw, 3.75rem);
  border-top: var(--rule) solid var(--ink);
  color: inherit;
  text-decoration: none;
}
.piece-desc { max-width: 34ch; color: color-mix(in srgb, var(--ink) 80%, transparent); }
.piece:hover, .piece:focus-visible { color: var(--mark); border-top-color: var(--mark); }
.piece:hover .piece-desc, .piece:focus-visible .piece-desc { color: var(--ink); }
.piece:focus-visible { outline: none; }

.frame-foot { border-top: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); }

@media (max-width: 760px) {
  .hub-head, .piece { grid-template-columns: 1fr; row-gap: 1rem; }
  .hub-head .lead { grid-column: 1; }
  .hub-head h1 span { white-space: normal; }
  .frame-top, .frame-foot { grid-template-columns: 1fr auto; row-gap: 0.25rem; }
  .frame-top > :first-child, .frame-foot > :first-child { grid-column: 1 / -1; }
}
