:root {
  color-scheme: dark;
  --paper: #171918;
  --ink: #edf0ec;
  --muted: #9ba39f;
  --line: #343936;
  --accent: #d96a53;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.login-view {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(24px, 5vw, 72px);
  animation: arrive 500ms ease-out both;
}

.wordmark {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.login-panel {
  width: min(100%, 450px);
  align-self: center;
  justify-self: center;
  padding: 48px 0 64px;
}

.eyebrow {
  margin: 0 0 21px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.login-panel h1,
.gallery-intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 400;
  line-height: 1.03;
  text-align: left;
}

.login-copy {
  margin: 24px 0 38px;
  color: #b2bab6;
  font-size: 14px;
}

#login-form label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 600;
}

.password-field {
  display: flex;
  height: 54px;
  border: 1px solid #505752;
  background: #202321;
}

.password-field:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.password-field input {
  min-width: 0;
  flex: 1;
  padding: 0 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.submit-button {
  width: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border: 0;
  background: #edf0ec;
  color: #171918;
  cursor: pointer;
}

.submit-button:hover {
  background: var(--accent);
}

.submit-button svg,
.logout-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.submit-button:focus-visible,
.logout-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.form-message {
  margin: 12px 0 0;
  color: #a7342d;
  font-size: 13px;
}

.login-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.7px;
}

.login-footnote span {
  padding: 0 7px;
  color: var(--accent);
}

.gallery-view {
  min-height: 100svh;
  animation: arrive 500ms ease-out both;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
}

.brand-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.brand-name small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.8px;
}

.logout-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b2bab6;
  font-size: 12px;
  cursor: pointer;
}

.logout-button:hover {
  color: var(--accent);
}

.gallery-intro {
  padding: clamp(48px, 8vw, 104px) clamp(20px, 4vw, 64px) 40px;
}

.gallery-intro .eyebrow {
  margin-bottom: 15px;
}

.gallery-intro h1 {
  font-size: clamp(40px, 5vw, 62px);
}

.gallery-note {
  margin: 13px 0 0;
  color: #adb5b1;
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}

#photo-count {
  padding-left: 8px;
  color: var(--muted);
  font-weight: 500;
}

.collection-picker {
  display: grid;
  gap: 28px;
  padding: 0 clamp(20px, 4vw, 64px) 64px;
}

.collection-year h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.collection-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.collection-button {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #202321;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.collection-button:hover,
.collection-button.is-selected {
  border-color: var(--accent);
  color: var(--accent);
}

.collection-button small {
  color: var(--muted);
}

#clone-gallery.photo-gallery {
  display: block !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 clamp(12px, 2vw, 28px) 54px;
  background: transparent;
}

#clone-gallery[hidden] {
  display: none !important;
}

#clone-gallery .gallery-container {
  margin: 0 auto;
}

#clone-gallery .gallery-strips-item img {
  object-fit: cover;
}

.gallery-error,
.empty-state {
  margin: 16px clamp(20px, 4vw, 64px) 80px;
  color: #adb5b1;
  font-size: 14px;
}

.site-footer {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.3px;
}

.site-footer span:first-child {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

#clone-gallery .gallery-strips-item img {
  cursor: zoom-in;
}

.photo-dialog {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: 24px 72px;
  border: 0;
  background: rgba(10, 11, 10, 0.96);
  color: var(--ink);
}

.photo-dialog::backdrop {
  background: rgba(10, 11, 10, 0.96);
}

.photo-dialog-content {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  margin: 0;
}

.photo-dialog-content img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100svh - 92px);
  object-fit: contain;
}

.photo-dialog-content figcaption {
  margin-top: 12px;
  color: #adb5b1;
  font-family: var(--serif);
  font-size: 14px;
}

.photo-dialog-close,
.photo-dialog-nav {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(32, 35, 33, 0.82);
  color: var(--ink);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.photo-dialog-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.photo-dialog-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transform: translateY(-50%);
  font-family: Arial, sans-serif;
  font-size: 34px;
  font-weight: 300;
}

.photo-dialog-prev {
  left: 18px;
}

.photo-dialog-next {
  right: 18px;
}

.photo-dialog-close:hover,
.photo-dialog-nav:hover {
  background: rgba(237, 240, 236, 0.14);
  color: #ffffff;
}

.photo-dialog-close:focus-visible,
.photo-dialog-nav:focus-visible {
  outline: 2px solid rgba(237, 240, 236, 0.72);
  outline-offset: 3px;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .photo-dialog {
    padding: 64px 12px 24px;
  }

  .photo-dialog-nav {
    top: auto;
    bottom: 14px;
    width: 42px;
    height: 42px;
    transform: none;
  }

  .photo-dialog-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .photo-dialog-prev {
    left: 12px;
  }

  .photo-dialog-next {
    right: 12px;
  }

  .photo-dialog-content img {
    max-height: calc(100svh - 132px);
  }

  .login-view {
    padding: 24px;
  }

  .login-panel {
    padding: 34px 0 50px;
  }

  .site-header {
    min-height: 70px;
    padding: 0 20px;
  }

  .brand-name {
    font-size: 9px;
  }

  .gallery-intro {
    padding: 58px 20px 30px;
  }

  #clone-gallery.photo-gallery {
    padding: 0 8px 36px;
  }

  .site-footer {
    min-height: 60px;
  }

  .site-footer span:last-child {
    font-size: 8px;
    letter-spacing: 1px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}