@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f2f3f4;
  --ink: #16181a;
  --ink-soft: #50565c;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --page: 80rem;
  color-scheme: light;
}

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

html {
  background: var(--paper);
  scrollbar-color: var(--ink-soft) var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: clamp(2.5rem, 8vw, 5.5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
  max-width: var(--page);
  margin-inline: auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

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

a {
  color: inherit;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.intro {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.intro h1 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.intro p {
  margin: 1rem 0 0;
  max-width: 48ch;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.concepts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.concept {
  position: relative;
}

.thumb {
  background: var(--ink);
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}

.thumb img {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.concept h2 {
  margin: 1rem 0 0;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.concept h2 a {
  text-decoration: none;
}

/* Stretch the single link over the whole entry so the thumb and idea line are clickable too. */
.concept h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.concept h2 a:focus-visible {
  outline: none;
}

.concept:has(a:focus-visible) .thumb {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.letter {
  margin-right: 0.15em;
  color: var(--ink-soft);
}

.concept p {
  margin: 0.375rem 0 0;
  max-width: 44ch;
  color: var(--ink-soft);
  text-wrap: pretty;
}

@media (hover: hover) {
  .concept:hover .thumb {
    transform: translateY(-0.375rem);
    box-shadow: 0 0.75rem 1.5rem -0.5rem rgba(22, 24, 26, 0.3);
  }

  .concept:hover h2 a {
    text-decoration: underline;
  }
}

@media (min-width: 40rem) {
  .concepts {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .concept {
    grid-column: span 3;
  }
}

@media (min-width: 64rem) {
  .concept {
    grid-column: span 2;
  }

  .concept:nth-child(n + 4) {
    grid-column: span 3;
  }

  .concept:nth-child(n + 4) h2 {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .concept:hover .thumb {
    transform: none;
  }
}
