html {
  scroll-behavior: smooth;
}

:root {
  --bg: #6f0b09;
  --ink: #f3e8c8;
  --muted: rgba(243, 232, 200, 0.72);
  --line: rgba(243, 232, 200, 0.22);
  --card: rgba(243, 232, 200, 0.9);
  color: var(--ink);
  background: var(--bg);
  font-family: "Euphoria Extra Light", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-weight: 200;
}

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

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

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 24px clamp(20px, 4vw, 68px) 0;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  color: var(--ink);
  font-size: 14px;
  font-weight: 200;
}

.nav-right {
  justify-content: flex-end;
  gap: clamp(18px, 2vw, 30px);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--ink);
}

.social-link svg {
  width: 26px;
  height: 26px;
  display: block;
}

.film-page {
  padding: clamp(58px, 7vw, 92px) clamp(20px, 4vw, 68px) 78px;
}

.film-intro {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto clamp(56px, 7vw, 92px);
  text-align: center;
}

.editable {
  min-width: min(100%, 240px);
  outline: 0;
}

.editable:focus {
  box-shadow: 0 1px 0 var(--ink);
}

h1 {
  margin: 0;
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.film-meta,
.film-description {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.film-description {
  max-width: 520px;
  color: var(--muted);
}

.film-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(18px, 2.8vw, 56px);
  row-gap: clamp(36px, 4vw, 70px);
  width: min(100%, 1040px);
  margin: 0 auto;
}

.film-frame {
  position: relative;
  overflow: hidden;
  background: transparent;
}

.film-frame img {
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  filter: saturate(0.9) contrast(0.96);
  transition: transform 500ms ease, filter 500ms ease;
}

.film-frame:hover img {
  transform: scale(1.018);
  filter: saturate(1) contrast(1);
}

.film-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.change-image {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 5px 7px;
  border: 1px solid rgba(243, 232, 200, 0.45);
  background: rgba(111, 11, 9, 0.55);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 200;
  line-height: 1;
  opacity: 0;
  transition: opacity 160ms ease;
}

.film-frame:hover .change-image,
.film-frame:focus-within .change-image {
  opacity: 1;
}

.status-line {
  min-height: 1.4em;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(34px, 5vw, 72px);
  background: rgba(111, 11, 9, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  width: auto;
  max-width: min(88vw, 1500px);
  max-height: 82vh;
  object-fit: contain;
  cursor: default;
  filter: none;
  image-rendering: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 24px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #f3e8c8;
  cursor: pointer;
}

.lightbox-close::before,
.lightbox-close::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 16px;
  height: 1px;
  background: currentColor;
}

.lightbox-close::before {
  transform: rotate(45deg);
}

.lightbox-close::after {
  transform: rotate(-45deg);
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 52px;
  border: 0;
  background: transparent;
  color: #f3e8c8;
  cursor: pointer;
  font-family: "Euphoria Extra Light", "Helvetica Neue", Arial, sans-serif;
  font-size: 30px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

body.lightbox-open {
  overflow: hidden;
}
@media (max-width: 820px) {
  .site-header {
    min-height: 70px;
    padding-inline: 20px;
  }

  .nav-left {
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .nav-right {
    gap: 12px;
  }

  .film-page {
    padding-inline: 14px;
    padding-top: 46px;
  }

  .film-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 18px;
    width: 100%;
  }

  .change-image {
    opacity: 1;
    font-size: 10px;
  }

  .lightbox {
    padding: 22px;
  }

  .lightbox img {
    max-width: 92vw;
    max-height: 78vh;
  }

  .lightbox-arrow {
    width: 30px;
    height: 44px;
    font-size: 24px;
  }

  .lightbox-prev {
    left: 4px;
  }

  .lightbox-next {
    right: 4px;
  }
}
