/* ---------- 1. FONTS ---------- */
@font-face {
  font-family: "Host Grotesk";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/host-grotesk-400.woff2") format("woff2");
}
@font-face {
  font-family: "Host Grotesk";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/host-grotesk-500.woff2") format("woff2");
}
@font-face {
  font-family: "Host Grotesk";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/host-grotesk-700.woff2") format("woff2");
}

/* ---------- 2. SETTINGS: change colours, font and text sizes here ----------
   Layout idea: a 1024-unit canvas scaled to the browser width. The pink cover scrolls away,
   the big name stays fixed at the bottom, and the pictures slide over it. */
:root {
  --pink: #ffd6de; /* cover and contact ground */
  --paper: #ffffff; /* work ground */
  --ink: #1c1b1b; /* wordmark and running text */
  --black: #020202; /* navigation and cover text */
  --mute: #9d9a9b; /* captions, a grey leaning towards the pink */
  --rule: #e9e4e5;
  --sans: "Host Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --u: calc((100vw - 2 * var(--gut)) / 992); /* one design unit */
  --gut: max(16px, 1.5625vw);
  --t-nav: clamp(15px, 1.2vw, 22px);
  --t-cap: clamp(11.5px, 0.9vw, 16px);
  --t-big: clamp(22px, 2.5vw, 44px);
  color-scheme: light;
}

/* ---------- 3. BASICS ---------- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-nav);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,
h2,
h3,
p,
figure,
ul,
dl,
dd {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- 4. NAVIGATION ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  padding: calc(env(safe-area-inset-top, 0px) + 18 * var(--u)) var(--gut) 0;
  color: var(--black);
  pointer-events: none;
}
.nav a {
  pointer-events: auto;
}
.nav .logo {
  font-weight: 700;
  justify-self: start;
}
.nav .links {
  display: grid;
  grid-template-columns: repeat(3, calc(126.5 * var(--u)));
  position: absolute;
  left: calc(50% - 115 * var(--u));
  top: calc(env(safe-area-inset-top, 0px) + 18 * var(--u));
}
.nav .links a:hover,
.nav .logo:hover {
  opacity: 0.55;
}
.nav .mark {
  justify-self: end;
  display: flex;
  gap: 0.3em;
  padding-top: 0.05em;
}
.nav .mark i {
  width: 0.62em;
  height: 0.62em;
  background: currentColor;
}

/* ---------- 5. BIG NAME AT THE BOTTOM ---------- */
.wordmark {
  position: fixed;
  left: var(--gut);
  right: var(--gut);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22 * var(--u));
  z-index: 1;
  pointer-events: none;
}
.wordmark img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72svh;
  object-fit: contain;
  object-position: left bottom;
}

/* ---------- 6. COVER ---------- */
.cover {
  position: relative;
  z-index: 0;
  background: var(--pink);
  min-height: 100svh;
  padding: calc(21 * var(--u)) var(--gut);
}
.cover p {
  margin-left: calc(113 * var(--u));
  max-width: max(15em, calc(176 * var(--u)));
  color: var(--black);
}

/* ---------- 7. WORK: rows, pictures, captions, project texts ---------- */
.work {
  padding: calc(110 * var(--u)) var(--gut) calc(260 * var(--u));
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: calc(200 * var(--u));
}
.row:first-child {
  margin-top: 0;
}
.fig {
  position: relative;
  z-index: 2;
  flex: none;
  width: calc(var(--w) * var(--u));
  margin-top: calc(var(--mt, 0) * var(--u));
}
.fig:first-child {
  margin-left: calc((var(--x) - 16) * var(--u));
}
.fig:only-child {
  margin-right: auto;
}
.fig img {
  background: var(--rule);
}
figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: calc(8 * var(--u));
  font-size: var(--t-cap);
  line-height: 1.16;
  color: var(--mute);
}
figcaption span:last-child {
  text-align: right;
  white-space: nowrap;
}
.note {
  position: relative;
  z-index: 2;
  margin-left: calc(113 * var(--u));
  width: min(100%, max(19em, calc(300 * var(--u))));
  color: #fff;
  mix-blend-mode: difference;
  scroll-margin-top: calc(90 * var(--u));
}
.note h2 {
  font-size: inherit;
  font-weight: 700;
}
.note .meta {
  opacity: 0.6;
}
.note p + p {
  margin-top: 0.9em;
}
.note .meta + p {
  margin-top: 0.9em;
}

/* ---------- 8. ABOUT ---------- */
.about {
  position: relative;
  z-index: 2;
  background: var(--paper);
  padding: calc(120 * var(--u)) var(--gut) calc(160 * var(--u));
  display: grid;
  grid-template-columns: calc(312 * var(--u)) minmax(0, 1fr);
  column-gap: calc(111 * var(--u));
  row-gap: calc(90 * var(--u));
  border-top: 1px solid var(--rule);
}
.about .portrait figcaption {
  margin-top: calc(8 * var(--u));
}
.about .lead {
  font-size: var(--t-big);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 21em;
  text-wrap: balance;
}
.about .body {
  margin-top: 1.6em;
  max-width: 34em;
  display: grid;
  gap: 0.9em;
  font-weight: 400;
  line-height: 1.3;
}
.facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(60 * var(--u)) calc(40 * var(--u));
}
.facts h3 {
  font-size: inherit;
  font-weight: 700;
  margin-bottom: 0.9em;
}
.facts li {
  display: grid;
  grid-template-columns: 6.2em minmax(0, 1fr);
  gap: 0.8em;
  padding: 0.5em 0;
  border-top: 1px solid var(--rule);
  font-size: max(13.5px, var(--t-cap));
  line-height: 1.25;
}
.facts li span:first-child {
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.facts li small {
  display: block;
  font-size: inherit;
  color: var(--mute);
}
.facts .plain li {
  grid-template-columns: 1fr;
}
.facts .plain li span:first-child {
  color: inherit;
}

/* ---------- 9. CONTACT: same layout as the cover, text sits beside the navigation ---------- */
.contact {
  position: relative;
  z-index: 0;
  background: var(--pink);
  min-height: 100svh;
  padding: calc(21 * var(--u)) var(--gut);
  color: var(--black);
}
.contact .inner {
  position: relative;
  z-index: 2;
  margin-left: calc(113 * var(--u));
  max-width: max(15em, calc(176 * var(--u)));
}
.mail {
  margin-top: 0.9em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em 0.8em;
}
.mail span {
  user-select: all;
  overflow-wrap: anywhere;
}
.mail button {
  font: inherit;
  font-size: var(--t-cap);
  color: inherit;
  background: none;
  border: 1px solid currentColor;
  border-radius: 99px;
  padding: 0.25em 0.8em;
  cursor: pointer;
}
.mail button:hover {
  background: var(--black);
  color: var(--pink);
}

/* ---------- 10. PHONES AND SMALL SCREENS ---------- */
@media (max-width: 760px) {
  :root {
    --t-nav: 15px;
    --t-cap: 12px;
    --t-big: 26px;
  }
  .nav {
    grid-template-columns: auto 1fr;
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
  }
  .nav .links {
    position: static;
    display: flex;
    justify-self: end;
    gap: 18px;
  }
  .nav .mark {
    display: none;
  }
  .wordmark {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  }
  .cover {
    padding-top: 64px;
  }
  .cover p,
  .contact .inner {
    margin-left: 0;
    max-width: 19em;
  }
  .work {
    padding-block: 72px 150px;
  }
  .row {
    flex-direction: column;
    gap: 72px;
    margin-top: 72px;
  }
  .fig,
  .fig:first-child {
    width: var(--mw, 100%);
    margin-left: 0;
    margin-top: 0;
  }
  .fig.m-right,
  .fig.m-right:first-child {
    margin-left: auto;
  }
  .fig:only-child {
    margin-right: 0;
  }
  figcaption {
    margin-top: 8px;
  }
  .note {
    margin-left: 0;
    width: min(100%, 21em);
    scroll-margin-top: 70px;
  }
  .about {
    grid-template-columns: 1fr;
    padding-block: 72px 96px;
    row-gap: 48px;
  }
  .about .portrait {
    width: 72%;
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .contact {
    padding-top: 64px;
  }
}

/* ---------- 11. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
