/* Detail pages for a single project (/projects/:slug) and product (/products/:slug),
   plus the shared media gallery + lightbox. Uses the site tokens from style.css. */

.work-page,
.work-index {
  padding: 120px 48px 0;
  max-width: 1360px;
  margin: 0 auto;
}

/* ------------------------------------------------------------------- header */

.work-head {
  margin-bottom: 40px;
}

.work-back {
  display: inline-block;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.work-back:hover {
  color: var(--accent);
}

.work-title {
  font-family: var(--display);
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 10px 0 18px;
  color: var(--text);
}

.work-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 16px;
  padding: 6px 12px;
  background: var(--accent);
  color: #06070d;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.work-tagline {
  max-width: 680px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
}

/* -------------------------------------------------------------------- cover */

.work-cover {
  position: relative;
  margin-bottom: 64px;
  border: 1px solid var(--border);
  background: var(--bg2);
  overflow: hidden;
}

.work-cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------- body */

.work-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 64px;
  align-items: start;
  margin-bottom: 96px;
}

.work-main .section-tag {
  margin-bottom: 20px;
}

.work-para {
  max-width: 70ch;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  color: #c6cad6;
}

.work-highlights,
.work-gallery {
  margin-top: 56px;
}

.work-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 70ch;
}

.work-list li {
  position: relative;
  padding: 0 0 0 26px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: #c6cad6;
}

.work-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 2px;
  background: var(--accent);
}

.work-list--plain li {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ sidebar */

.work-side {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.work-panel {
  padding: 26px;
  background: var(--bg2);
  border: 1px solid var(--border);
}

.work-panel--cta,
.work-panel--buy {
  border-color: rgba(200, 255, 0, 0.25);
}

.work-panel-title {
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-panel-note {
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
}

.work-details {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
}

.work-details dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.work-details dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  text-align: right;
}

.work-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-chip {
  padding: 6px 11px;
  border: 1px solid var(--border2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #c6cad6;
}

.work-price {
  margin-bottom: 18px;
  font-family: var(--display);
  font-size: 38px;
  line-height: 1;
  color: var(--accent);
}

.work-cta-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
}

/* ------------------------------------------------------------------ gallery */

.media-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.media-item {
  margin: 0;
  border: 1px solid var(--border);
  background: var(--bg2);
  overflow: hidden;
}

.media-shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}

.media-shot img,
.media-video,
.media-embed-poster {
  display: block;
  width: 100%;
  height: auto;
}

.media-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  background: rgba(6, 7, 13, 0.75);
  border: 1px solid var(--border2);
  opacity: 0;
  transition: opacity 0.2s;
}

.media-zoom::before,
.media-zoom::after {
  content: "";
  position: absolute;
  background: var(--accent);
}

.media-zoom::before {
  left: 10px;
  top: 16px;
  width: 14px;
  height: 2px;
}

.media-zoom::after {
  left: 16px;
  top: 10px;
  width: 2px;
  height: 14px;
}

.media-shot:hover .media-zoom,
.media-shot:focus-visible .media-zoom {
  opacity: 1;
}

.media-video {
  background: #000;
}

/* Embeds stay as a poster until clicked: no third-party frame on page load. */
.media-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.media-embed-poster {
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.media-embed-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
}

.media-embed-icon {
  position: relative;
  width: 74px;
  height: 74px;
  background: rgba(6, 7, 13, 0.7);
  border: 1px solid var(--accent);
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
}

.media-embed-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-left: 20px solid var(--accent);
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
}

.media-embed-play:hover .media-embed-icon {
  background: rgba(200, 255, 0, 0.18);
  transform: scale(1.06);
}

.media-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-caption {
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ----------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px;
  background: rgba(3, 4, 8, 0.96);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border: 1px solid var(--border2);
}

.lightbox-caption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: 1px solid var(--border2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-close {
  top: 28px;
  right: 32px;
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  font-size: 30px;
  line-height: 1;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

/* --------------------------------------------------------------- more cards */

.work-more {
  margin-bottom: 96px;
}

.work-more .section-tag {
  margin-bottom: 24px;
}

.work-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.work-card {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.work-card:hover {
  border-color: rgba(200, 255, 0, 0.35);
  transform: translateY(-4px);
}

.work-card-art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.work-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 7, 13, 0.85), transparent 60%);
}

.work-card-body {
  padding: 20px 22px 24px;
}

.work-card-cat {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-card-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.02em;
  color: var(--text);
}

.work-card-tagline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
}

.work-card-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* --------------------------------------------------------- index + foot CTA */

.work-index-hero {
  margin-bottom: 56px;
}

.work-index-hero .section-title {
  margin-bottom: 24px;
}

.work-index-desc {
  max-width: 600px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
}

.mkt-card--link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.work-foot-cta {
  padding: 80px 0 100px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.work-foot-cta .section-tag {
  margin-bottom: 16px;
}

.work-foot-desc {
  max-width: 520px;
  margin: 20px auto 32px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
}

.work-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  .work-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .work-side {
    position: static;
  }

  .work-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .work-page,
  .work-index {
    padding: 100px 20px 0;
  }

  .work-cover {
    margin-bottom: 44px;
  }

  .work-more-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-details dd {
    text-align: left;
  }

  .lightbox {
    padding: 72px 16px;
  }

  .lightbox-nav {
    width: 40px;
    height: 52px;
    font-size: 24px;
  }

  .lightbox-prev {
    left: 8px;
  }

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

/* ------------------------------------------------------------------- parts */

.work-sections {
  margin-top: 72px;
}

.work-section {
  padding-top: 48px;
  margin-top: 48px;
  border-top: 1px solid var(--border);
}

.work-sections .work-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.work-section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 40px);
  letter-spacing: 0.02em;
  color: var(--text);
}

.work-section-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.work-section .media-stack {
  margin-top: 28px;
}
