/* Defrost Studio — layout and type copied from the Cargo site.
   Sizes are in rem; the root size scales with the window like Cargo does. */

:root {
  --sans: "Diatype", "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "Diatype Mono", "Geist Mono", ui-monospace, monospace;
  --line: 1.56rem;            /* one empty line of body text */
  --pad: 1.5rem;              /* page padding */
}

html { font-size: 1.44vh; -webkit-text-size-adjust: 100%; overflow-x: clip; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #fff;
  color: #000;
  overflow-x: clip;
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(0, 0, 0, 0.75);
  -webkit-font-smoothing: antialiased;
}
a { color: rgba(0, 0, 0, 0.75); text-decoration: none; }
b, strong { font-weight: 600; }
i, em { font-style: italic; }
img { display: block; max-width: 100%; height: auto; border: 0; }

h1 {
  margin: 0; padding: 0;
  font-size: 2.6rem; line-height: 1; font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
}
h1 a { color: rgba(0, 0, 0, 0.85); }
h1 b { font-weight: 600; }
.h1-link { color: rgba(0, 0, 0, 0.4); }

.large, h2 {
  margin: 0; padding: 0;
  font-size: 1.3rem; line-height: 1.3; font-weight: 500;
  letter-spacing: 0.04rem;
  color: rgba(0, 0, 0, 0.75);
}
small, .mono {
  display: inline-block;
  font-family: var(--mono);
  font-size: 1.2rem; line-height: 1.3; font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.5);
}
small a { color: rgba(0, 0, 0, 0.5); }
small b { font-weight: 600; }

hr {
  display: block; height: 1px; border: 0;
  margin: 0.6rem 0;
  background: rgba(0, 0, 0, 0.2);
}

/* ── Container: 90% wide, centred ── */
.container { width: 90%; margin: 0 auto; padding: var(--pad); }
.page { padding-top: calc(var(--pad) * 2 + 2.6rem + var(--line) * 2); }

/* ── 12-column grid (Cargo "grid-pad 2") ── */
.row { display: flex; flex-wrap: wrap; margin: -1rem; }
.col { padding: 1rem; flex: 0 0 auto; }
.c2 { width: 16.6667%; } .c4 { width: 33.3333%; } .c6 { width: 50%; } .c8 { width: 66.6667%; }
.right { text-align: right; }
.center { text-align: center; }

/* ── Header (fixed, transparent) ── */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 4; pointer-events: none; }
.site-header a { pointer-events: auto; }
.site-header .container { padding-bottom: calc(var(--pad) + var(--line) * 2); }
.site-header a.active { border-bottom: 1px solid rgba(0, 0, 0, 0.4); }
.header-mobile { display: none; }
.header-mobile .brand {
  margin: 0; font-size: 1.8rem; line-height: 1.3; font-weight: 500;
  letter-spacing: 0.04rem; color: rgba(0, 0, 0, 0.75);
}

/* ── Spacing: one "line" = an empty line of body text ── */
.sp { height: calc(var(--line) * var(--n, 1)); }

/* ── Home: project rows ── */
.home-row { padding: var(--pad) 0; }
.home-row .year { color: rgba(0, 0, 0, 0.4); }
.home-row a { display: block; }
.home-list { margin: calc(var(--pad) * -1) 0; }

/* ── Project blocks ── */
.text-small p, .text-large p { margin: 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  column-gap: 1.5rem;
}
.gallery.wide { column-gap: 2rem; }
.gallery img { width: 100%; margin-bottom: 1.4rem; }
.gallery.framed { border: 1px solid #000; padding: 0.75rem; margin: -0.75rem; }

.videos {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  column-gap: 2rem; row-gap: 2.04rem;
  margin-bottom: 0.48rem;
}
.videos iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

.collage { position: relative; }
.collage img { position: absolute; display: block; height: auto; max-width: none; }

/* ── Mobile (portrait windows, like Cargo) ── */
@media (max-aspect-ratio: 799/1000) {
  html { font-size: min(2.88vw, 1.56vh); }
  :root { --pad: 1rem; }
  .container { width: 100%; }
  .header-desktop { display: none; }
  .header-mobile { display: block; }
  .site-header .container { padding-bottom: calc(var(--pad) + var(--line)); }
  .page { padding-top: calc(var(--pad) * 2 + var(--line) * 4); }
  .stack .col { width: 100%; }
  .gallery.stack, .videos.stack { grid-template-columns: 1fr; }
}
