/* project page styles. Shared colors and type are in visual-system.css. */
/* Base layout */

@layer components {
  .case-page {
    width: min(1000px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 5.4rem 0 7rem;
  }
  .case-page .section-heading {
    max-width: 840px;
    margin-bottom: 3rem;
  }
  .case-page .section-heading h1 {
    font-size: clamp(3rem, 7.5vw, 6.8rem);
    line-height: 0.93;
    letter-spacing: 0;
    text-wrap: balance;
  }
  .case-page .section-heading > p:not(.eyebrow) {
    color: var(--muted);
  }
  .case-gallery {
    display: grid;
    gap: 1.05rem;
  }
  .case-media {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
  }
  .case-media img,
  .case-media video {
    width: 100%;
    max-height: 780px;
    object-fit: cover;
  }
  .case-media figcaption {
    padding: 0.65rem 1rem;
    color: var(--muted);
    font-size: 0.82rem;
  }
  .case-copy {
    max-width: 740px;
    margin: 4rem auto 0;
  }
  .case-copy h2 {
    font-size: 1.75rem;
    letter-spacing: 0;
    text-align: center;
  }
  .case-copy p {
    color: var(--muted);
    white-space: pre-line;
    font-size: 1.03rem;
    margin-top: 0.9rem;
  }
  .empty-media {
    padding: 2rem;
    text-align: center;
    border-radius: 1rem;
    color: var(--muted);
  }
}
@layer utilities {
  @media (max-width: 560px) {
    .case-page {
      width: calc(100% - 2rem);
      padding-top: 3.5rem;
    }
    .case-page .section-heading h1 {
      font-size: clamp(2.8rem, 13vw, 4.7rem);
    }
    .case-copy {
      margin-top: 2.7rem;
    }
    .case-copy h2 {
      font-size: 1.5rem;
    }
  }
}

/* Current appearance */

.case-page .section-heading h1 {
  color: var(--cream);
  text-align: center;
  letter-spacing: 0;
  font-weight: 650;
  line-height: 1.03;
}
.case-page .section-heading h1 {
  letter-spacing: 0;
  word-spacing: 0.02em;
}
.case-media figcaption {
  text-align: center;
}
.case-page .section-heading h1 span {
  color: var(--accent);
}
.case-introduction {
  display: grid;
  gap: 2.1rem;
  width: min(100%, 740px);
  margin: 0 auto 4rem;
}
.case-introduction .case-copy {
  max-width: none;
  margin: 0;
}
.case-end-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  flex-wrap: wrap;
  margin-top: 4rem;
}
.case-archive-link {
  color: var(--cream);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.case-archive-link:hover {
  color: #fff;
  text-decoration-thickness: 2px;
}
.case-page .section-heading,
.case-page .section-heading > p:not(.eyebrow),
.case-introduction,
.case-introduction .case-copy,
.case-introduction .case-copy h2,
.case-introduction .case-copy p {
  text-align: center;
}
.case-page .section-heading > p:not(.eyebrow),
.case-introduction .case-copy p {
  margin-inline: auto;
}
.case-gallery-hint {
  margin: 0 auto 1rem;
  color: var(--cream-dim);
  text-align: center;
  font-size: 0.82rem;
}
.case-media-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.case-media-open img {
  transition: transform 0.35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .case-media-open:hover img {
    transform: scale(1.012);
  }
}
.case-lightbox {
  width: min(96vw, 1320px);
  max-width: none;
  height: min(92svh, 960px);
  max-height: none;
  padding: 0;
  border: 1px solid rgba(255, 244, 231, 0.2);
  border-radius: 1rem;
  background: #151518;
  color: var(--cream);
  overflow: visible;
}
.case-lightbox::backdrop {
  background: rgba(7, 7, 9, 0.91);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.case-lightbox-panel {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 3.7rem 5rem 3.6rem;
}
.case-lightbox-content {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.case-lightbox-content img,
.case-lightbox-content video {
  width: 100%;
  height: 100%;
  max-height: calc(92svh - 8rem);
  object-fit: contain;
  border-radius: 0.3rem;
}
.case-lightbox-content figcaption {
  color: var(--cream-dim);
  text-align: center;
  font-size: 0.86rem;
}
.case-lightbox-count {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--cream-dim);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
.case-lightbox-close,
.case-lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
  text-align: center;
}
.case-lightbox-close::before,
.case-lightbox-nav::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 2.3rem;
  height: 2.3rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 244, 231, 0.3);
  border-radius: 50%;
  background: rgba(255, 244, 231, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.case-lightbox-close:hover::before,
.case-lightbox-nav:hover::before {
  background: rgba(255, 244, 231, 0.17);
  border-color: rgba(255, 244, 231, 0.62);
}
.case-lightbox-close span,
.case-lightbox-nav span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}
.case-lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 1.35rem;
}
.case-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.7rem;
}
.case-lightbox-nav:hover {
  transform: translateY(-50%);
}
.case-lightbox-prev {
  left: 1rem;
}
.case-lightbox-next {
  right: 1rem;
}
.case-lightbox-nav[hidden] {
  display: none !important;
}
.case-lightbox-close:focus-visible,
.case-lightbox-nav:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}
.case-lightbox-open {
  overflow: hidden;
}
@media (max-width: 700px) {
  .case-introduction {
    gap: 1.65rem;
    margin-bottom: 2.7rem;
  }
  .case-end-actions {
    flex-direction: column;
    gap: 1rem;
    margin-top: 2.7rem;
  }
  .case-lightbox {
    width: 100vw;
    height: 100svh;
    border: 0;
    border-radius: 0;
  }
  .case-lightbox-panel {
    padding: 3.6rem 3rem 3.3rem;
  }
  .case-lightbox-content img,
  .case-lightbox-content video {
    max-height: calc(100svh - 8rem);
  }
  .case-lightbox-close {
    top: 0.55rem;
    right: 0.55rem;
    font-size: 1.05rem;
  }
  .case-lightbox-close::before {
    width: 1.95rem;
    height: 1.95rem;
  }
  .case-lightbox-nav {
    font-size: 1.35rem;
  }
  .case-lightbox-nav::before {
    width: 1.95rem;
    height: 1.95rem;
  }
  .case-lightbox-prev {
    left: 0.45rem;
  }
  .case-lightbox-next {
    right: 0.45rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .case-media-open img,
  .case-lightbox-close,
  .case-lightbox-nav,
  .case-lightbox-close::before,
  .case-lightbox-nav::before {
    transition: none !important;
  }
}
