:root {
  --bg: #000000;
  --ink: #f3f1ec;
  --muted: #8d8a84;
  --line: rgba(255, 255, 255, 0.08);
  --album-bg: #000000;
  --white: #fff;
  --header-h: 73px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: Manrope, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 20px 28px;
  background: #000;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.menu {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu a {
  opacity: 0.58;
}

.menu a:hover,
.menu a.is-active {
  opacity: 1;
}

.hero {
  position: relative;
  height: calc(100dvh - var(--header-h));
  min-height: 240px;
  overflow: hidden;
  background: #000;
}

.hero[hidden] {
  display: none !important;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.84);
  transition: opacity 0.35s ease;
}

.hero-media img.is-leaving {
  opacity: 0;
}

.hero-copy {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 56px;
  z-index: 1;
  color: var(--white);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
}

.hero-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.78;
}

.hero-title {
  margin: 0;
  max-width: 14em;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(36px, 5.4vw, 78px);
  font-weight: 500;
  line-height: 0.95;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

.page {
  padding: 56px 12px 96px;
}

#albums {
  scroll-margin-top: 88px;
}

.page-rule {
  max-width: 1680px;
  height: 1px;
  margin: 8px auto 32px;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 8px;
  max-width: 1680px;
  margin: 0 auto;
}

.album-card {
  position: relative;
  display: block;
  align-self: start;
  overflow: hidden;
  background: #000;
  aspect-ratio: 3 / 2;
}

.album-card:nth-child(6n + 1) {
  grid-column: span 2;
  grid-row: span 2;
  align-self: stretch;
  aspect-ratio: auto;
}

.album-card:nth-child(6n + 1):last-child {
  grid-row: span 1;
  aspect-ratio: 3 / 2;
}

.album-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s ease;
}

.album-card:hover img {
  transform: scale(1.045);
}

.album-card .meta {
  position: absolute;
  inset: auto 0 0;
  padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.album-card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 500;
}

.album-card p {
  margin: 5px 0 0;
  color: rgba(243, 241, 236, 0.68);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.album-card:nth-child(6n + 1) h2 {
  font-size: clamp(28px, 3vw, 44px);
}

.site-footer {
  padding: 8px 28px 40px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.contacts {
  max-width: 720px;
  margin: 0 auto;
  padding: 88px 32px 120px;
}

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

.contacts h1 {
  margin-bottom: 12px;
}

.contacts-lead {
  margin: 0 0 48px;
  max-width: 18em;
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-style: italic;
  color: #d8d4cb;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  margin: 0 0 28px;
}

.contact-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-list a {
  font-family: "Cormorant Garamond", serif;
  font-size: 32px;
}

.contact-list a:hover {
  opacity: 0.6;
}

.album-page {
  --photo-max: calc(100vw - 32px);
  --photo-max-h: calc(100dvh - 104px);
  background: var(--album-bg);
  color: var(--ink);
}

.album-main {
  padding: 28px 0 100px;
}

.album-intro {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.crumbs {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.album-intro h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
}

.album-description {
  max-width: 36em;
  margin: 18px 0 0;
  color: #c8c4bb;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.45;
}

.album-description[hidden] {
  display: none;
}

.photo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

.photo-stack figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: fit-content;
  max-width: min(100%, var(--photo-max));
  min-width: 0;
  margin: 0 auto;
  cursor: zoom-in;
}

.photo-stack img {
  display: block;
  box-sizing: content-box;
  width: auto;
  height: auto;
  max-width: min(100%, var(--photo-max));
  max-height: var(--photo-max-h);
  object-fit: contain;
  flex: 0 0 auto;
  align-self: center;
}

.photo-stack figcaption {
  box-sizing: border-box;
  width: 100%;
  max-width: 36em;
  padding: 14px 8px 0;
  color: #c8c4bb;
  text-align: center;
}

.photo-title {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}

.photo-description {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: rgba(12, 12, 12, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lightbox:fullscreen,
.lightbox:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 8, 0.94);
}

.lightbox-stage {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-frame {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  max-height: 100%;
}

.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  cursor: pointer;
}

.lightbox-close {
  top: 16px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: transparent;
  font-size: 36px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 36px;
}

.lightbox-nav.prev {
  left: 16px;
}

.lightbox-nav.next {
  right: 16px;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  padding: 14px 16px;
  background: rgba(12, 12, 12, 0.78);
  color: #f0f0f0;
  text-align: left;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox.is-caption-hidden .lightbox-caption,
.lightbox.is-caption-empty .lightbox-caption {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox-caption-toggle {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox.is-caption-hidden:not(.is-caption-empty) .lightbox-caption-toggle {
  opacity: 1;
  visibility: visible;
}

.lightbox-caption-toggle:hover {
  color: #fff;
}

.lightbox-title {
  margin: 0;
  color: #f2f2f2;
  font-size: 16px;
}

.lightbox-description {
  margin: 6px 0 0;
  color: #d8d8d8;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .album-card:nth-child(6n + 1) {
    grid-column: span 1;
    grid-row: span 1;
    align-self: start;
    aspect-ratio: 3 / 2;
  }

  .album-card:nth-child(3n + 1) {
    grid-column: span 2;
  }

  .album-card:nth-child(3n + 1) h2,
  .album-card:nth-child(6n + 1) h2 {
    font-size: clamp(24px, 5vw, 34px);
  }
}

@media (max-width: 800px) {
  .site-header {
    padding: 14px 18px;
    gap: 16px;
  }

  .brand {
    font-size: 22px;
  }

  .menu {
    gap: 16px;
  }

  .hero-copy,
  .page,
  .contacts {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-copy {
    bottom: 36px;
  }

  .album-page {
    --photo-max: calc(100vw - 24px);
  }

  .photo-stack {
    gap: 36px;
  }
}

@media (max-width: 620px) {
  .banner-home {
    grid-template-columns: 1fr;
  }

  .banner-home-item.is-phone {
    width: min(180px, 56vw);
  }

  .site-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .menu {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 14px;
  }

  .album-grid {
    grid-template-columns: 1fr;
  }

  .album-card:nth-child(6n + 1),
  .album-card:nth-child(3n + 1) {
    grid-column: auto;
    grid-row: auto;
  }
}

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

  .album-card img {
    transition: none;
  }

  .album-card:hover img {
    transform: none;
  }
}

.edit-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #e6c98a;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.edit-badge:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.edit-badge.is-off {
  color: #8a8a8a;
  border-color: rgba(255, 255, 255, 0.16);
}

.edit-status {
  margin: 12px 0 0;
  color: #e6c98a;
  font-size: 13px;
}

.edit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 14px 0 0;
}

.edit-toolbar button {
  padding: 6px 12px;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  background: #222;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.edit-toolbar button[aria-pressed="true"] {
  border-color: #e6c98a;
  color: #e6c98a;
}

.edit-toolbar button:disabled {
  opacity: 0.4;
  cursor: default;
}

.edit-toolbar .edit-delete-album,
.edit-toolbar .edit-delete-selected {
  border-color: #8a4a4a;
  color: #f0c0c0;
}

.edit-figure.is-picked .edit-photo-frame {
  outline: 2px solid #8cb4ff;
}

.edit-move-dialog {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  padding: 22px 22px 18px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #141414;
  color: var(--ink);
}

.edit-move-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.edit-move-dialog h2 {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 600;
}

.edit-move-field,
.edit-move-check {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
  color: #d8d8d8;
}

.edit-move-check {
  flex-direction: row;
  align-items: center;
}

.edit-move-dialog select,
.edit-move-title {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  background: #1a1a1a;
  color: var(--ink);
  font: inherit;
}

.edit-move-dialog select:disabled,
.edit-move-title:disabled {
  opacity: 0.4;
}

.edit-move-error {
  margin: 0 0 12px;
  color: #f0c0c0;
  font-size: 13px;
}

.edit-move-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.edit-move-actions button {
  padding: 6px 12px;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  background: #222;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.edit-move-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

.edit-album-title,
.edit-album-description,
.edit-photo-title,
.edit-photo-description {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  background: #1a1a1a;
  color: var(--ink);
  font: inherit;
}

.edit-album-title {
  margin: 8px 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 32px;
  font-weight: 600;
}

.edit-album-description {
  min-height: 4.5em;
  resize: vertical;
}

.album-editing .photo-stack figure {
  cursor: default;
}

.edit-photo-frame {
  position: relative;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
}

.edit-figure.is-cover .edit-photo-frame > img,
.edit-figure.is-banner .edit-photo-frame > img {
  cursor: crosshair;
}

.cover-mark {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.cover-crop-rect {
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
}

.cover-crop-rect.is-32 {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1200px rgba(0, 0, 0, 0.4);
}

.cover-crop-rect.is-31 {
  border: 2px dashed #e6d29a;
}

.cover-home {
  width: min(720px, calc(100vw - 32px));
  margin: 24px auto 0;
  display: grid;
  gap: 18px;
}

.cover-focus-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.cover-home-card {
  width: 100%;
}

.cover-home-card.is-32 {
  aspect-ratio: 3 / 2;
}

.cover-home-card.is-31 {
  aspect-ratio: 3 / 1;
}

.photo-stack .cover-home-card img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.cover-home-card:hover img {
  transform: none;
}

.banner-mark {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #8cb4ff;
  background: rgba(140, 180, 255, 0.35);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.banner-crop-rect {
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
}

.banner-crop-rect.is-wide {
  border: 2px solid #8cb4ff;
}

.edit-figure.is-banner:not(.is-cover) .banner-crop-rect.is-wide {
  box-shadow: 0 0 0 1200px rgba(0, 16, 36, 0.4);
}

.banner-crop-rect.is-phone {
  border: 2px dashed #8cb4ff;
}

.crop-focus-mode {
  display: flex;
  gap: 8px;
  width: min(720px, calc(100vw - 32px));
  margin: 16px auto 0;
}

.crop-focus-mode button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.crop-focus-mode button[aria-pressed="true"] {
  background: #1d2a3d;
  border-color: #8cb4ff;
}

.banner-home {
  width: min(720px, calc(100vw - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}

.banner-home > .cover-focus-hint {
  grid-column: 1 / -1;
}

.banner-home-item.is-phone {
  width: min(160px, 28vw);
}

.banner-home-card {
  position: relative;
  overflow: hidden;
  background: #000;
}

.banner-home-card.is-wide {
  aspect-ratio: var(--banner-wide-ratio, 16 / 9);
}

.banner-home-card.is-phone {
  aspect-ratio: 9 / 16;
}

.photo-stack .banner-home-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.banner-home-card:hover img {
  transform: none;
}

.banner-home-copy {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  color: var(--white);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.banner-home-copy h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 0.95;
}

.edit-figure.is-hidden-photo img {
  opacity: 0.38;
}

.edit-tools {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--photo-max);
  padding: 12px 8px 0;
}

.edit-file-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.edit-file-name {
  overflow-wrap: anywhere;
}

.edit-file-duplicate {
  color: #e23b3b;
  font-weight: 700;
}

.edit-file-size.is-large {
  color: #e23b3b;
  font-weight: 700;
}

.edit-photo-title {
  margin-bottom: 8px;
}

.edit-photo-description {
  min-height: 3.2em;
  margin-bottom: 10px;
  resize: vertical;
}

.edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.edit-row button,
.edit-delete {
  padding: 6px 10px;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  background: #222;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.edit-row button:disabled {
  opacity: 0.4;
  cursor: default;
}

.edit-delete {
  margin-left: auto;
  border-color: #8a4a4a;
  color: #f0c0c0;
}

.edit-order {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.edit-order input {
  width: 3.4em;
  padding: 4px 6px;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  background: #1a1a1a;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.edit-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d8d8d8;
  font-size: 13px;
  cursor: pointer;
}

.edit-rating {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  padding: 2px 0 0;
  border: none;
  color: #d8d8d8;
  font-size: 13px;
}

.edit-rating legend {
  float: left;
  width: auto;
  padding: 0 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.edit-rating label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
