/* keesriphagen.nl: reset, fonts, typography, 24-column grid */

@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/Outfit-VariableFont_wght.latin.woff2") format("woff2"),
       url("../assets/fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("../assets/fonts/RobotoMono-var.latin.woff2") format("woff2"),
       url("../assets/fonts/RobotoMono-var.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--w-body);
  font-size: var(--f-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1;
}

body.dark {
  color: var(--bone);
  background: var(--night);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Type roles */
.display,
h1.display {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--t1);
  letter-spacing: -0.03em;
  line-height: 0.92;
}

.h1,
h1,
.next-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--w-h1);
  font-size: var(--f-h1);
  letter-spacing: var(--track-h1);
  line-height: var(--lh-h1);
}

.h2,
h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--t2);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.lead {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--t3);
  letter-spacing: 0;
  line-height: 1.4;
}

.meta {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--t6);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1.4;
}

.ph {
  color: var(--ph);
}

.dark .ph {
  color: rgba(243, 241, 236, 0.45);
}

/* Page shell: leaves room for the fixed nav and pins the footer down. */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-height);
}

.page > main {
  flex: 1 0 auto;
}

/* 24-column zero-gutter grid, 24 px rows on desktop.
   From 701 px upward (including the 700–1100 px mid range) the 24-column
   grid stays; columns just get narrower. Rows stay 24 px.
   At 700 px and below: 6 columns, auto rows (DOM order is the reading order). */
.grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  grid-auto-rows: var(--row);
  column-gap: var(--gutter);
  row-gap: var(--gutter);
}

/* Optional placement: --d: row-start / col-start / row-end / col-end */
.grid > [style*="--d"] {
  grid-area: var(--d);
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: auto;
    grid-auto-flow: row dense;
  }

  .grid > [style*="--d"] {
    grid-area: auto;
    grid-column: var(--m, 1 / -1);
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* 24-column layout without fixed 24 px rows: for text and overview pages.
   The montage table (.grid) keeps the 24 px rows from the spec. */
.grid-flow {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  column-gap: var(--gutter);
  row-gap: var(--gutter);
}

@media (max-width: 700px) {
  .grid-flow {
    grid-template-columns: repeat(6, 1fr);
  }
}
/* Common overview spans (content starts at column 2, one column of margin). */
.col-wide { grid-column: 2 / 24; }
.col-main { grid-column: 2 / 16; }

@media (max-width: 700px) {
  .col-wide,
  .col-main {
    grid-column: 1 / -1;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* film grain on the light pages only (Kees t213u, t220u: one strength everywhere): tiled 512 px SVG noise, static, painted as page background so it never sits over stills or video */
body:not(.dark) {
  background-color: var(--paper);
  background-image: var(--grain);
  background-size: 512px 512px;
}

/* Kees t214u/t220u: light grain on black for the Music videos overview (the Films page now uses the same grain as all light pages) */
body.dark.ov-musicvideos {
  background-color: var(--night);
  background-image: var(--grain-dark);
  background-size: 512px 512px;
}
