/* Brendan Flesher — one stylesheet for every page. */

:root {
  --serif: "EB Garamond", "Adobe Caslon Pro", Georgia, serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --pad: 43px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; }

/* ---------- header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 43px var(--pad) 0;
  z-index: 10;
}

.brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 33px;
  line-height: 1.25;
  letter-spacing: 0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 6px;
}

.site-nav {
  display: flex;
  gap: 38px;
  font-size: 17.7px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.site-nav a {
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.site-nav a.active { border-bottom-color: currentColor; }

.social { display: flex; gap: 17px; }

.social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.social svg { width: 21px; height: 21px; display: block; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #000;
  margin: 6px 0;
}

/* Headings kept for search engines and screen readers, hidden from view. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- home ---------- */

main { flex: 1 0 auto; }

.home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 290px 45px 120px;
}

.card { position: relative; display: block; text-decoration: none; }

.card-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
}

.card-photo figure,
.card-photo picture { display: block; height: 100%; margin: 0; }

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card h2 {
  position: absolute;
  left: 0;
  right: 0;
  top: 43%;
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 43.6px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* ---------- collection pages ---------- */

.gallery-page { padding: 176px var(--pad) 80px; }

.gallery { column-count: 3; column-gap: 13px; }

.gallery figure { margin: 0 0 13px; break-inside: avoid; }

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

body.pe-live .gallery img { cursor: zoom-in; }

/* ---------- about + prints ---------- */

.prose { padding: 228px var(--pad) 40px; }

.prose-grid {
  display: grid;
  grid-template-columns: minmax(0, 607px) minmax(0, 382px);
  gap: 124px;
  padding-left: 56px;
}

.prose h1,
.prose h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28.1px;
  line-height: 1.36;
  letter-spacing: 0.01em;
  margin: 0 0 20px;
}

.prose p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19.46px;
  line-height: 1.46;
  letter-spacing: 0.01em;
  margin: 0 0 22px;
}

.prose h2 + p { margin-bottom: 26px; }

.prose .section { margin-top: 35px; }

.prose a { text-decoration: underline; text-underline-offset: 3px; }

.prose .year { font-style: italic; }

.prose .sub { padding-left: 54px; }

.about-photo figure { margin: 0; }

.about-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 382 / 350;
  object-fit: cover;
  display: block;
}

.social-flat {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.social-flat a { color: #000; }

.social-flat svg { width: 20px; height: 20px; display: block; }

.prints { padding-top: 325px; }
.prints p { max-width: 640px; }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 60px 0 36px;
}

.site-footer a { color: #000; }

.site-footer svg { width: 20px; height: 20px; display: block; }

/* ---------- lightbox ---------- */

.lb {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lb.on { display: flex; }

.lb img {
  max-width: 88vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lb button {
  position: absolute;
  background: none;
  border: 0;
  color: #000;
  font-size: 30px;
  line-height: 1;
  padding: 12px;
  cursor: pointer;
}

.lb .close { top: 10px; right: 14px; font-size: 34px; }
.lb .prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- phone ---------- */

@media (max-width: 900px) {
  .site-header { padding: 18px 18px 0; align-items: center; }
  .brand { font-size: 24px; }
  .header-right { display: none; }
  .menu-toggle { display: block; }
  .site-header.open .header-right {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 10px 18px 22px;
    margin-top: 0;
  }
  .site-header.open .site-nav { flex-direction: column; gap: 16px; font-size: 20px; }
  .home { grid-template-columns: 1fr; gap: 22px; padding: 123px 24px 60px; }
  .card h2 { font-size: 32.2px; }
  .gallery-page { padding: 92px 12px 40px; }
  .gallery { column-count: 1; }
  .gallery figure { margin-bottom: 10px; }
  .prose { padding: 120px 24px 30px; }
  .prose-grid { grid-template-columns: 1fr; gap: 40px; padding-left: 0; }
  .prints { padding-top: 150px; }
  .site-footer { padding: 40px 0 28px; }
}
