* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #000;
  background: #fff;
  font-family: system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

main > section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  align-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1rem, 4vw, 4rem);
  gap: 3rem;
}

main > section:first-child {
  padding-top: 5rem;
}

.site-header {
  position: absolute;
  top: 1.5rem;
  left: clamp(1rem, 4vw, 4rem);
}

.site-header,
figcaption {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 3.5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

p {
  max-width: 45ch;
  margin: 0 0 1rem;
}

a {
  color: #00e;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

summary {
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 700;
}

details p {
  margin: 0 0 1.25rem;
}

.video-section {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.video-section.reverse {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

figure {
  min-width: 0;
  margin: 0;
}

figcaption {
  margin-bottom: 0.75rem;
}

video {
  display: block;
  width: 100%;
  height: 75svh;
  object-fit: cover;
}

main > section > img {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 100%;
  height: auto;
  max-height: 75svh;
  object-fit: contain;
}

@keyframes section-fade {
  0%, 100% {
    opacity: 0;
  }

  20%, 80% {
    opacity: 1;
  }
}

/* shortcut: unsupported browsers stay static; add a fallback if they need fades. */
@supports (animation-timeline: view()) {
  main > section > * {
    animation: section-fade linear both;
    animation-timeline: view();
  }

  main > section > *:focus-within {
    animation: none;
  }
}

@media (max-width: 48rem) {
  main > section,
  .video-section,
  .video-section.reverse {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  video {
    height: 55svh;
  }
}
