:root {
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #343434;
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }

.page {
  --frame: clamp(1rem, 2.8vw, 2.625rem);
  --caption-height: 6rem;
  --image-height: calc(100vh - var(--frame) * 2 - var(--caption-height) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  --image-height: calc(100svh - var(--frame) * 2 - var(--caption-height) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--frame) + env(safe-area-inset-top, 0px))
    calc(var(--frame) + env(safe-area-inset-right, 0px))
    calc(var(--frame) + env(safe-area-inset-bottom, 0px))
    calc(var(--frame) + env(safe-area-inset-left, 0px));
  background: #fff;
}

.scene {
  flex: none;
  width: 100%;
  /* Fit the complete 3:2 photograph within the available width and height. */
  max-width: calc(max(10rem, var(--image-height)) * 1.5);
  aspect-ratio: 3 / 2;
}

.scene__photo {
  display: block;
  width: 100%;
  height: auto;
}

.contact {
  flex: none;
  width: 100%;
  min-height: var(--caption-height);
  display: grid;
  place-items: center;
  padding-top: .65rem;
  text-align: center;
}

.contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  padding: .5rem;
  text-decoration: none;
  transition: opacity 180ms ease;
}

.contact__artwork {
  /* Display the supplied PNG's lettering without its transparent square margins. */
  position: relative;
  display: block;
  width: clamp(11.25rem, 17vw, 13.125rem);
  max-width: 100%;
  aspect-ratio: 460 / 64;
  overflow: hidden;
}

.contact__artwork img {
  position: absolute;
  width: 217.391305%;
  height: auto;
  max-width: none;
  left: -58.695653%;
  top: -728.125%;
}

.contact a:hover { opacity: .65; }
.contact a:focus-visible { outline: 2px solid #70624c; outline-offset: 4px; }

@media (max-width: 600px) {
  .page { --caption-height: 4.5rem; }
  .contact__artwork { width: clamp(10rem, 48vw, 11.25rem); }
}

@media (max-width: 600px) and (orientation: portrait) {
  .scene {
    /* A story-sized crop, keeping the doorway and lettering at its centre. */
    max-width: calc(max(10rem, var(--image-height)) * 9 / 16);
    aspect-ratio: 9 / 16;
    overflow: hidden;
  }

  .scene__photo {
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
  }
}

@media (max-height: 500px) {
  .page { --frame: 1rem; --caption-height: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .contact a { transition: none; }
}
