/* Shared by every page except index.html. Breakpoints match the Figma frames: 390, 768, 1280. */
:root { --fg: #000; --bg: #fff; --pad: 20px; --gap: 56px; --u: .625px; }
.dark { --fg: #fff; --bg: #000; }

* { box-sizing: border-box; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/18px Inter, sans-serif;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { font: inherit; }

main { display: flex; flex-direction: column; gap: var(--gap); margin-top: var(--gap); }

/* Type */
.display { font-size: 36px; line-height: 42px; text-transform: uppercase; }
.lead { font-size: 20px; line-height: 28px; }
.body { font-size: 16px; line-height: 24px; }
.heading { font-size: 28px; line-height: 34px; }

/* Header */
.top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 24px var(--pad) 0; }
.home { display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.home img { transform: scaleX(-1); }
.menu { margin-left: auto; }

/* Rotated project title, shown from 1280 up; below that it stays for screen readers only */
.vlabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Project facts */
.info { display: grid; align-content: start; gap: 8px; text-transform: uppercase; }
.info div { display: flex; gap: 8px; }
.info dt { flex: none; width: 104px; opacity: .4; }

/* Previous / next circles: every size scales from the 256px desktop circle through --u */
.more { display: flex; justify-content: center; gap: 30px; }
.more a {
  position: relative;
  flex: none;
  width: calc(256 * var(--u));
  height: calc(256 * var(--u));
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font: 500 calc(24 * var(--u)) / calc(32 * var(--u)) Inter, sans-serif;
  text-align: center;
  text-transform: uppercase;
}
.more img { position: absolute; left: calc(104 * var(--u)); top: calc(64 * var(--u)); width: calc(48 * var(--u)); height: auto; }
.more .prev img { transform: scaleX(-1); }
.more span {
  position: absolute;
  left: calc(var(--l) * var(--u));
  top: calc(var(--c) * var(--u));
  width: calc(var(--w) * var(--u));
  transform: translateY(-50%);
}

/* Footer */
.foot { display: flex; flex-direction: column; gap: 12px; margin-top: var(--gap); padding: 0 var(--pad) 32px; text-transform: uppercase; }
.foot nav { display: flex; align-items: center; gap: 32px; }
.ext { display: flex; align-items: center; gap: 8px; }
.ext u { text-decoration-thickness: from-font; text-underline-position: from-font; }
.ne { display: grid; place-items: center; width: 16.971px; height: 16.971px; }
.ne img { rotate: -45deg; }
.rule { width: 1px; height: 24px; background: var(--fg); opacity: .16; }

@media (min-width: 768px) {
  :root { --pad: 48px; --gap: 80px; --u: .78125px; }
  .display { max-width: 560px; font-size: 48px; line-height: 56px; }
  .lead { font-size: 24px; line-height: 32px; }
  .body { font-size: 18px; line-height: 26px; }
  .heading { font-size: 40px; line-height: 48px; }
  .more { gap: 96px; }
  .foot { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1280px) {
  :root { --pad: 80px; --u: 1px; }
  main { gap: 0; margin-top: 0; }
  main > * { width: 1280px; margin-inline: auto; }
  main > .bleed { width: auto; margin-inline: 0; }
  .top { padding-inline: 32px; }
  .display { max-width: none; font-size: 72px; font-weight: 500; line-height: 88px; }
  .lead { font-size: 32px; font-weight: 500; line-height: 40px; }
  .vlabel { left: 32px; width: auto; height: auto; clip-path: none; color: var(--fg); text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); }
  .info div { align-items: center; }
  .info dt { width: 88px; }
  .info dd { width: 256px; }
  .more { gap: 224px; }
  .foot { width: 1280px; margin-inline: auto; }
}

/* Until site.js takes over: nothing flashes before its reveal, and the first visit stays white behind the Home modal */
.anim main, .anim .foot, .anim .top, .anim #home > * { visibility: hidden; }
.opening body { background: #fff; }
