/* ---------- Base ---------- */

/* Inter is served from this site (one small file), so no third-party request */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-size: 14px;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.05em;
  text-align: center;
  color: black;
  background: white;
  -webkit-font-smoothing: antialiased;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

ul {
  list-style: none;
}

/* Present for screen readers and search engines, not shown on screen */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Home ---------- */

/* The links sit in the exact center of the screen */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.hero nav {
  position: relative;
}

/* The image hangs above the links without pushing them off center */
.hero img {
  position: absolute;
  bottom: calc(100% + 6rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 100vw - 2rem);
  height: auto;
}

/* Hidden password field that appears under the links */
.egg {
  position: absolute;
  top: calc(100% + 2rem);
  left: 50%;
  transform: translateX(-50%);
}

.egg input {
  width: 5rem;
  border: 0;
  border-bottom: 1px solid black;
  border-radius: 0;
  outline: 0;
  background: none;
  font: inherit;
  letter-spacing: 0.3em;
  text-align: center;
}

/* ---------- Inner pages ---------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  max-width: 40rem;
  margin: 0 auto;
  padding: 6rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page h1,
.page h2 {
  font-size: inherit;
  font-weight: inherit;
}

.page h1 {
  margin-bottom: 2rem;
}

.page h2 {
  margin-top: 2rem;
}

.page mark {
  padding: 0.1em 0.25em;
  border-radius: 0.2em;
  background: #fdf28b;
  color: inherit;
}

.back {
  margin-top: 2rem;
}

/* ---------- Article ---------- */

/* Left-aligned so the bullet points line up */
.article {
  text-align: left;
}

.article ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.article .back {
  align-self: flex-start;
}

/* ---------- Photo and video pages ---------- */

.gallery {
  max-width: 72rem;
}

/* Every photo is cropped to the same square tile; a short last row is centered */
.photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.photos li {
  width: calc((100% - 3rem) / 4);
}

.photos a {
  display: block;
}

.photos img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f2f2f2;
}

/* Shown at its own shape and real size, shrinking on small screens */
.video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  background: black;
}

.photos + .video {
  margin-top: 1rem;
}

@media (max-width: 700px) {
  .photos li {
    width: calc((100% - 1rem) / 2);
  }
}
