/* ---------------------------------------------------
   Project detail page — mirrors the structural pattern of
   a cinematic "product" page: full-bleed hero visual, title
   + synopsis, a metadata strip, a primary CTA, an action bar,
   a highlight callout, and a credits section.
--------------------------------------------------- */

.project-back {
  position: fixed;
  top: 24px;
  /* lines up with the text's left edge: the .u-container-wide content starts
     at 40px in from the container, itself centred once the viewport exceeds
     the 1680px max-width — this mirrors that same offset exactly. */
  left: max(40px, calc((100vw - 1680px) / 2 + 40px));
  z-index: 90;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--fg);
  transition: color 0.3s var(--ease);
}

.project-back:hover {
  color: var(--fg-muted);
}

.project-back svg {
  width: 20px;
  height: 20px;
}

/* ---------------------------------------------------
   Hero — text overlays the visual (anchored to its bottom
   edge), instead of sitting in normal flow below it.
--------------------------------------------------- */

.project-hero {
  position: relative;
}

.project-hero__background {
  position: relative;
  height: 60vh;
  min-height: 420px;
  max-height: 720px;
  overflow: hidden;
}

.project-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero__media.tone-1 { background: linear-gradient(150deg, #baff29, #4f8a10); }
.project-hero__media.tone-2 { background: linear-gradient(150deg, #ff8a3d, #7a1f8f); }
.project-hero__media.tone-3 { background: linear-gradient(150deg, #3dd6ff, #1a2a8f); }
.project-hero__media.tone-4 { background: linear-gradient(150deg, #ff3d8a, #2a0a3a); }
.project-hero__media.tone-5 { background: linear-gradient(150deg, #6a6a6a, #101010); }
.project-hero__media.tone-6 { background: linear-gradient(150deg, #f5d33d, #8f2a1a); }

/* Camma-only overrides: taller, dimmed hero video + semi-bold title.
   Compound selectors (not bare .camma-hero-*) so these reliably win over
   the base .project-hero__* rules regardless of source order. */

.project-hero__background.camma-hero-background {
  height: 110vh;
  min-height: 110vh;
  max-height: none;
}

.project-hero__media.camma-hero-video {
  opacity: 0.75;
}

.project-hero__header.camma-hero-title {
  font-weight: 600;
  text-transform: none;
}

/* tighter rhythm between the subline, the metadata strip and the CTA */

.camma-hero-content .project-hero__description {
  margin-bottom: 16px;
}

.camma-hero-content .project-data {
  padding: 14px 0;
  margin-bottom: 20px;
  row-gap: 20px;
}

.camma-hero-content .project-hero__ctas {
  margin-bottom: 16px;
}

.camma-hero-content .project-data__item p {
  color: var(--fg-muted);
}

.project-hero__background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0) 45%, var(--bg) 100%);
}

.project-hero__content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 8px;
  padding-bottom: 56px;
}

.project-hero__content > * {
  max-width: 640px;
}

.project-hero__header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 20px 0 24px;
}

.project-hero__description {
  font-size: 18px;
  color: var(--fg-muted);
  margin-bottom: 40px;
}

/* ---------------------------------------------------
   Metadata strip
--------------------------------------------------- */

.project-data {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 36px;
  padding: 28px 0;
  margin-bottom: 40px;
}

.project-data__item h3 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.project-data__item p {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}

/* ---------------------------------------------------
   CTA + action bar
--------------------------------------------------- */

.project-hero__ctas {
  margin-bottom: 24px;
}

/* frosted, non-interactive stand-in for an unavailable link */
.btn-unavailable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 22px 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  cursor: default;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 80px;
}

.project-actions__btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.3s var(--ease);
}

/* a vertical divider centred in the gap before every button but the first */
.project-actions__btn:not(:first-child)::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: var(--border);
}

.project-actions__btn:hover,
.project-actions__btn.is-copied {
  color: var(--fg);
}

.project-actions__btn svg {
  width: 13px;
  height: 13px;
}

.project-actions__btn.is-liked {
  color: var(--accent);
}

.project-actions__btn.is-liked svg {
  fill: currentColor;
}

/* ---------------------------------------------------
   Highlight callout
--------------------------------------------------- */

.project-highlight {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 80px;
}

.project-highlight__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-highlight__icon svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.project-highlight h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-highlight p {
  color: var(--fg-muted);
  max-width: 60ch;
}

/* ---------------------------------------------------
   Credits (additional details)
--------------------------------------------------- */

.project-credits {
  padding-bottom: 100px;
}

.project-credits h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  text-transform: uppercase;
  margin-bottom: 40px;
}

/* matches the weight/casing of the Camma hero title */
.project-credits h2.camma-credits-title {
  font-weight: 600;
  text-transform: none;
}

.project-credits__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-credits__item h3 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.project-credits__item li {
  padding: 8px 0;
  font-size: 15px;
}

/* ---------------------------------------------------
   Gallery — full-bleed stack of stills/clips, with grouped
   shots (thumb_04_01, _02, …) laid out as a grid instead of
   stacked full-width.
--------------------------------------------------- */

.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 100px;
}

.project-gallery__media {
  display: block;
  width: 100%;
  height: auto;
}

.project-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

@media (max-width: 900px) {
  .project-data {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-credits__grid {
    grid-template-columns: 1fr;
  }

  .project-highlight {
    flex-direction: column;
  }

  .project-gallery__grid {
    grid-template-columns: 1fr;
  }
}
