
/*
 * Reflections — Digital Photography Exhibition
 * Standalone, responsive stylesheet
 */

:root {
  color-scheme: light;

  --page-bg: #f5f3ef;
  --text-color: #292929;
  --secondary-text: #555;
  --muted-color: #696969;
  --border-color: #d8d5d0;
  --image-bg: #e8e5e0;
  --focus-color: #3366aa;

  --font-body: system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
}

/* Base styles */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-color);
  font: 16px/1.6 var(--font-body);
}

/* Exhibition container */

.exhibition {
  width: min(100% - 40px, 1100px);
  margin: 0 auto;
}

/* Exhibition header */

.exhibition-header {
  padding:
    clamp(52px, 9vw, 112px) 0
    clamp(50px, 8vw, 92px);
  text-align: center;
}

.exhibition-kicker {
  margin: 0 0 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--muted-color);
}

h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.1;
}

.exhibition-intro {
  max-width: 570px;
  margin: 25px auto 0;
  color: var(--secondary-text);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

/* Photographs */

.photo {
  display: table;
  width: auto;
  max-width: 100%;
  margin: 0 auto clamp(72px, 11vw, 132px);
}

.photo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  height: auto;
  object-fit: contain;
  background: var(--image-bg);
}

/* Captions */

.photo figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  padding-top: 16px;
  font-size: .9rem;
  color: var(--secondary-text);
}

.photo-title {
  font-weight: 500;
  color: var(--text-color);
}

.photo-meta {
  font-size: .84rem;
  color: var(--muted-color);
}

.photo-note {
  flex-basis: 100%;
  margin: 0;
  max-width: 65ch;
}

/* Footer */

/* Exhibition footer */

.exhibition-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;

  border-top: 1px solid var(--border-color);
  padding: 24px 0 64px;

  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted-color);
}

.exhibition-footer a,
.exhibition-footer a:link,
.exhibition-footer a:visited {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: var(--text-color);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.exhibition-footer a:hover {
  color: var(--secondary-text);
}

.exhibition-footer > * {
  margin: 0;
}

.exhibition-footer a {
  white-space: nowrap;
}

/* Mobile */

@media (max-width: 600px) {
  .exhibition {
    width: min(100% - 24px, 1100px);
  }

  .exhibition-header {
    padding-top: 58px;
  }

  .photo {
    margin-bottom: 68px;
  }

  .photo figcaption {
    padding-top: 12px;
  }

  .exhibition-footer {
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 36px;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

