/* Homepage only. Visible copy is the title and four names. */

:root {
  color-scheme: light;
  --ink: #1c1917;
  --paper: #ffffff;
  --frame: #f3f0ea;
  --line: #e4dfd6;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Liberation Serif", Georgia, "Times New Roman", serif;
}

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

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem max(1.25rem, env(safe-area-inset-right)) 4.5rem max(1.25rem, env(safe-area-inset-left));
  background: var(--paper);
  color: var(--ink);
}

main {
  width: min(100%, 72rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin: 0 0 3.25rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 5vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: center;
}

nav {
  width: 100%;
}

.people {
  width: min(100%, 68rem);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.75rem 2.25rem;
  justify-content: center;
}

.people a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.95rem;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.people img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 12%;
  display: block;
  background: var(--frame);
  box-shadow: 0 0 0 1px var(--line);
}

.people span {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.2vw, 1.9rem);
  line-height: 1.2;
  text-align: center;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

:focus:not(:focus-visible) {
  outline: none;
}

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

@media (prefers-reduced-motion: no-preference) {
  .people img,
  .people span {
    transition: box-shadow 180ms ease, transform 180ms ease, background-size 180ms ease;
  }

  .people a:hover img,
  .people a:focus-visible img {
    box-shadow: 0 0 0 1px var(--ink);
    transform: translateY(-3px);
  }

  .people a:hover span,
  .people a:focus-visible span {
    background-size: 100% 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .people a:hover img,
  .people a:focus-visible img {
    box-shadow: 0 0 0 1px var(--ink);
  }

  .people a:hover span,
  .people a:focus-visible span {
    background-size: 100% 1px;
  }
}

@media (max-width: 980px) {
  .people {
    grid-template-columns: repeat(2, minmax(0, 17.5rem));
    width: min(100%, 40rem);
  }
}

@media (max-width: 560px), (max-height: 760px) {
  body {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  body {
    padding-top: 2.25rem;
  }

  h1 {
    margin-bottom: 2.25rem;
  }

  .people {
    grid-template-columns: minmax(0, 19.5rem);
    width: min(100%, 21rem);
    gap: 2.25rem;
  }
}
