/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html, body {
  margin: 0;
  padding: 0;
  background: #1A1A1A;
  min-height: 100%;
  overflow-x: hidden;
  font-family: "Ubuntu Sans Mono", monospace;
  color: #fff;
}

.case-study {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
  gap: 2rem;
}

/* Header */
.header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.back-link {
  display: inline-block;
  text-decoration: none;
}

.logo {
  width: auto;
  height: auto;
  max-width: 150px;
  object-fit: contain;
}

.tagline {
  font-family: "Ubuntu Sans Mono", monospace;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  letter-spacing: 0.05em;
}

.tagline-link {
  text-decoration: none;
  color: inherit;
  margin-bottom: 4rem;
}

/* Video Embed */
.video-section {
  width: 100%;
  margin-bottom: 4rem;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #1A1A1A;
  border-radius: 4px;
  overflow: hidden;
}

.video-embed iframe,
.video-embed video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* BTS Section */
.bts-section {
  width: 100%;
}

.bts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.bts-photo {
  overflow: hidden;
  line-height: 0;
}

.bts-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.bts-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.3s ease;
}

.bts-photo-button:hover img,
.bts-photo-button:focus-visible img {
  transform: scale(1.02);
}

.bts-photo-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.86);
  cursor: zoom-out;
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.lightbox-close {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(17, 17, 17, 0.88);
  color: #fff;
  font: inherit;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* Footer */
.footer {
  width: 100%;
  padding-top: 1rem;
  text-align: center;
}

.footer-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 600px) {
  .case-study {
    padding: 1rem 1rem 3rem;
    gap: 1.5rem;
  }

  .logo {
    max-width: 100px;
  }

  .tagline {
    font-size: 0.85rem;
  }

  .bts-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .bts-photo img {
    aspect-ratio: auto;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-panel {
    width: 100%;
    max-height: calc(100vh - 2rem);
  }

  .lightbox-image {
    max-height: calc(100vh - 7rem);
  }
}
