/* ==========================================================================
   Detail pages inside /works — video player and prompt-image gallery.
   Loaded after the site styles with a relative path.
   ========================================================================== */

.detail-page {
  min-height: 100vh;
  background:
    radial-gradient(100% 70% at 72% 0%, rgba(86, 237, 178, 0.08), transparent 52%),
    var(--bg);
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.detail-brand,
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.detail-brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
}

.detail-brand:hover,
.detail-back:hover {
  color: var(--accent);
}

.detail-main {
  padding: clamp(48px, 7vw, 92px) 0 clamp(60px, 8vw, 110px);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.detail-hero .eyebrow {
  margin-bottom: 18px;
}

.detail-hero h1 {
  font-size: clamp(2.6rem, 6.2vw, 6.4rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.detail-hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.detail-hero__intro {
  max-width: 48ch;
  margin-top: 18px;
  font-size: 0.86rem;
  line-height: 1.85;
  color: var(--muted);
}

.detail-count {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--faint);
  white-space: nowrap;
}

.video-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow);
}

.video-shell video {
  display: block;
  width: 100%;
  max-height: 78vh;
  background: #000;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-meta dt {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.detail-meta dd {
  font-size: 0.76rem;
  line-height: 1.65;
  color: var(--muted-strong);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 36px);
}

.gallery-item {
  min-width: 0;
}

.gallery-item--wide {
  grid-column: 1 / -1;
}

.gallery-item a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  transition: border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}

.gallery-item a:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.7s var(--ease-out);
}

.gallery-item a:hover img {
  transform: scale(1.02);
}

.gallery-item figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.05em;
  color: var(--faint);
}

.gallery-item figcaption strong {
  font-weight: 400;
  color: var(--muted-strong);
}

@media (max-width: 720px) {
  .detail-head {
    padding: 14px 20px;
  }

  .detail-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .detail-hero h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

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

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

  .gallery-item--wide {
    grid-column: auto;
  }

  .gallery-item figcaption {
    font-size: 0.5rem;
  }
}
