/* Vestige Works
   The formal face of the studio: a white page, black ink, and the mark at the
   scale of architecture. The two slabs are the only bold thing; everything
   else is set quietly and precisely.
   Type: Outfit (the logo's wordmark face) for headings and the wordmark,
   Source Serif 4 for running text. */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit.woff2") format("woff2");
  font-weight: 300 600; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif.woff2") format("woff2");
  font-weight: 400 600; font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --graphite: #5d5c58;   /* secondary text, 6.6:1 on paper */
  --stone: #d9d8d4;      /* the ground under the slabs */
  --sans: "Outfit", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --pad: clamp(1.25rem, 4.5vw, 4.5rem);
  --wide: 84rem;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.6 var(--serif);
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, p, dl, dd { margin: 0; }
h1, h2, dt { font-family: var(--sans); font-weight: 500; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* Header: the wordmark as it is set in the logo. */
.top {
  max-width: var(--wide); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.75rem var(--pad) 0;
}
.wordmark {
  font: 500 0.95rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}
/* The mark is set as the wordmark's first character: on the baseline, cap
   height (its peaks overshoot a hair, like an O), a word space after it. */
.wordmark__mark {
  height: 0.76em; width: auto; margin-right: 0.62em;
  vertical-align: baseline; fill: currentColor; overflow: visible;
}
/* Pointed at, the small gates part a little on their feet. */
.wordmark__l, .wordmark__r { transform-box: view-box; transition: transform 0.6s var(--ease); }
.wordmark__l { transform-origin: 0 500px; }
.wordmark__r { transform-origin: 624.8px 500px; }
.wordmark:hover .wordmark__l { transform: rotate(-9deg); }
.wordmark:hover .wordmark__r { transform: rotate(9deg); }
/* The bird from the hero, settled on the left point (added by gate.js). */
.wordmark__bird {
  fill: none; stroke: currentColor; stroke-width: 50;
  stroke-linecap: round; stroke-linejoin: round;
}
.top__link { font: 400 1rem/1 var(--sans); text-decoration: none; }
.top__link:hover { text-decoration: underline; }

/* Hero: the statement and the slabs share one ground line. */
.hero {
  max-width: var(--wide); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  column-gap: clamp(2rem, 6vw, 6rem); align-items: end;
  min-height: calc(100svh - 4.5rem);
  padding: 4rem var(--pad) 0;
  position: relative;
}
.hero::after {           /* the ground, full bleed */
  content: ""; position: absolute; left: 50%; bottom: 0; width: 100vw; height: 1px;
  transform: translateX(-50%); background: var(--ink);
}
.hero__text { padding-bottom: clamp(2.5rem, 6vh, 4.5rem); }
h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.75rem); line-height: 1.04; letter-spacing: -0.015em;
  font-weight: 400; max-width: 13ch; text-wrap: balance;
}
.lede {
  margin-top: 1.75rem; max-width: 34em;
  font-size: 1.25rem; line-height: 1.55; color: var(--graphite);
}
.gate {
  display: block; width: 100%; height: auto; max-height: 66svh;
  justify-self: end; overflow: hidden; fill: var(--ink);
}
/* The name is cut into the feet of the slabs, in the wordmark's face. */
.slab__word {
  fill: var(--paper); font: 500 34px var(--sans); letter-spacing: 0.24em;
  transition: opacity 2.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Debris from the raising (assets/js/gate.js) falls over the whole hero;
   gate.js stretches the canvas up over the header for the birds. */
.debris {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none;
}

/* Sections: heading in the narrow column, content in the wide one. */
.block {
  max-width: var(--wide); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  column-gap: clamp(2rem, 6vw, 6rem); row-gap: 1.5rem; align-items: baseline;
  padding: clamp(4rem, 9vw, 7.5rem) var(--pad) 0;
}
h2 { font-size: 1.5rem; line-height: 1.25; }
.prose { max-width: 34em; }
.prose, .lede, dd { text-wrap: pretty; }
[id] { scroll-margin-top: 2rem; }

.items { display: grid; gap: 2.5rem; }
.items--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 4vw, 4rem); row-gap: 3rem; }
dt { font-size: 1.25rem; line-height: 1.3; }
dd { margin-top: 0.5rem; max-width: 30em; }

/* Before Vestige Works: a few widely known titles the founder worked on, newest
   first. No studios, no small titles: enough to show the level, not enough to
   trace a person. The platforms are their own marks, in ink, set to one optical
   size; the year it shipped closes the row. The rules are the ground line again,
   in stone. */
.record { display: grid; gap: 2rem; }
.credits { list-style: none; margin: 0; padding: 0; font: 400 1.125rem/1.3 var(--sans); border-bottom: 1px solid var(--stone); }
.credits li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 3rem; align-items: center;
  column-gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0.95rem 0; border-top: 1px solid var(--stone);
}
.credit__pf { display: flex; align-items: center; justify-content: flex-end; gap: 1.15em; font-size: 0.95rem; }
.credit__year {
  text-align: right; font-size: 0.95rem; color: var(--graphite);
  font-variant-numeric: lining-nums tabular-nums;
}
.pf { display: inline-flex; align-items: center; gap: 0.32em; }
.pf__mark { display: block; height: var(--h); width: calc(var(--h) * var(--a)); fill: currentColor; }
.pf--word { --h: 0.62em; }     /* PS4 / PS5 logotypes */
.pf--glyph { --h: 0.95em; }    /* Windows, Xbox: solid glyphs read larger, so they sit smaller */
.pf__gen { font-size: 0.8em; line-height: 1; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.block--contact { padding-bottom: clamp(5rem, 10vw, 9rem); }
.mail {
  display: inline-block; margin-top: 1rem;
  font: 400 clamp(1.6rem, 4.4vw, 3.5rem)/1.1 var(--sans); letter-spacing: -0.01em;
  text-decoration-thickness: 1px; text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}
.mail:hover { text-decoration-thickness: 2px; }

.foot {
  max-width: var(--wide); margin: 0 auto;
  padding: 1.5rem var(--pad) 2rem;
  font: 400 0.9rem/1.4 var(--sans); color: var(--graphite);
}

/* The one moment: on load the slabs are raised out of the ground by
   assets/js/gate.js. Until it runs they wait below the ground line. */
.motion .slab { transform: translateY(501px); }
.motion .gate:not(.named) .slab__word { opacity: 0; }   /* the name surfaces once the stone is still, */
.slab--r .slab__word { transition-delay: 1.1s; }          /* left to right, as it is read */

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 3.5rem; row-gap: 3rem; }
  .hero__text { padding-bottom: 0; }
  .gate { width: min(100%, 30rem); max-height: none; justify-self: center; }
  .block { grid-template-columns: 1fr; }
  .items--grid { grid-template-columns: 1fr; row-gap: 2.25rem; }
}
@media (max-width: 560px) {
  .credits li {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "pf year";
    row-gap: 0.55rem;
  }
  .credit__title { grid-area: title; }
  .credit__pf { grid-area: pf; justify-content: flex-start; }
  .credit__year { grid-area: year; }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark__l, .wordmark__r { transition: none; }
}
@media (max-width: 480px) {
  body { font-size: 1.0625rem; }
  .lede { font-size: 1.125rem; }
  .wordmark { font-size: 0.85rem; letter-spacing: 0.2em; }
}
