:root {
  --bg: #f3f1ec;
  --surface: #faf9f6;
  --fg: #1a1916;
  --muted: #5f5a54;
  --border: #e3dfd6;
  --primary: #1a1916;
  --primary-fg: #faf9f6;
  --danger: #8c3a32;
  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --radius-sm: 0.5rem;
  --radius-xl: 1.5rem;
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; }

button,
.button {
  cursor: pointer;
  font: inherit;
}

img { max-width: 100%; height: auto; display: block; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

.wrap {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid var(--border); }

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
}

.wordmark-name {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.wordmark-photos {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { display: flex; gap: 0.25rem; }

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a.is-active { color: var(--fg); }

.hero, .section { padding-top: 2.5rem; padding-bottom: 5rem; }

.kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

h1 {
  margin: 0.75rem 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.page-links {
  display: grid;
  margin-top: 2.5rem;
  border: 1px solid var(--display);
  background: var(--display);
  gap: 1px;
}

.page-links a {
  background: var(--surface);
  text-decoration: none;
  padding: 0.5rem;
  min-height: 5.5rem;
}

.page-links a:hover { background: var(--bg); }

.page-links strong {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
}

.page-links span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.home-grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 4rem;
}

.caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-top: 0.75rem;
}

.caption b {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.125rem;
}

.caption i {
  font-style: normal;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.photo-frame { overflow: hidden; background: var(--surface); }

.more {
  margin-top: 3rem;
  font-size: 0.875rem;
  font-weight: 560;
}

.more a { text-underline-offset: 0.25rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }

.filters button {
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  padding-inline: 1rem;
  background: var(--surface);
  color: var(--muted);
}

.filters button[aria-selected="true"] {
  background: var(--primary);
  color: var(--primary-fg);
}

.masonry { columns: 1; column-gap: 2rem; }

.masonry figure { break-inside: avoid; margin: 0 0 2rem; }

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(26 25 22 / 0.8);
}

.lightbox.is-open { display: flex; }

.lightbox figure { margin: 0; max-width: 64rem; text-align: center; }

.lightbox img { max-height: 75vh; width: auto; margin-inline: auto; }

.lightbox figcaption { margin-top: 1rem; color: var(--primary-fg); }
.lightbox figcaption b { font-family: var(--display); font-size: 1.25rem; font-weight: 500; }
.lightbox figcaption span { display: block; margin-top: 0.25rem; color: rgb(250 249 246 / 0.7); font-size: 0.875rem; }

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}

label { display: block; font-size: 0.875rem; font-weight: 560; margin-bottom: 0.5rem; }

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  padding: 0.7rem 0.75rem;
}

textarea { min-height: 8rem; resize: vertical; }

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgb(26 25 22 / 0.3);
  outline-offset: 2px;
}

.stack { display: flex; flex-direction: column; gap: 1rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--primary-fg);
  text-decoration: none;
}

.button.outline {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border);
}

.button.ghost {
  background: transparent;
  color: var(--fg);
}

.button.danger { background: var(--danger); color: var(--primary-fg); }

.button.small { min-height: 2.5rem; font-size: 0.875rem; }

.note { color: var(--muted); font-size: 0.875rem; margin: 0; }
.error { color: var(--danger); font-size: 0.875rem; margin: 0; }

.contact-grid,
.admin-grid {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}

.mail {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.photo-row {
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.photo-row img { width: 100%; background: var(--surface); }

.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

.login { max-width: 28rem; padding-top: 4rem; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-block: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-bar a { text-decoration: none; }
.footer-bar a:hover { color: var(--fg); }
.footer-bar p { margin: 0; }

@media (min-width: 40rem) {
  .page-links { grid-template-columns: repeat(3, 1fr); }
  .masonry { columns: 2; }
  .footer-bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .photo-row { grid-template-columns: 8rem 1fr; }
  .photo-row img { width: 8rem; }
}

@media (min-width: 64rem) {
  .home-grid { grid-template-columns: repeat(12, 1fr); gap: 2rem; }
  .span-8 { grid-column: span 8; }
  .span-4 { grid-column: span 4; }
  .span-7 { grid-column: span 7; }
  .span-5 { grid-column: span 5; }
  .masonry { columns: 3; }
  .contact-grid,
  .admin-grid { grid-template-columns: minmax(0, 22rem) 1fr; }
  .admin-grid .panel { align-self: start; }
}

@media (prefers-reduced-motion: no-preference) {
  .photo-frame img { transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1); }
  .photo-frame:hover img { transform: scale(1.015); }
}
