/* Project page template. Builds on the home page tokens in home-redesign.css (coral, sun, outline, brush shapes, wordmark). */

.td-project {
  display: flex;
  flex-direction: column;
  gap: clamp(30px, 5vw, 56px);
  padding-top: clamp(28px, 5vw, 48px);
}


/* Hero */
.td-hero {
  display: grid;
  justify-items: center;
  gap: clamp(26px, 4vw, 44px);
  text-align: center;
}
.td-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}



/* Project titles are plain text: no script font, gradient or outline */
.td-hero h1 {
  max-width: 100%;
  margin: 0 0 clamp(4px, 1vw, 10px);
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.td-summary {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* Tools sit under role and project type, centred */
.td-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: -8px;
}
.td-tag {
  max-width: 100%;
  padding: 0.35em 1em;
  border: 2px solid var(--coral);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.td-hero-media {
  width: min(100%, 760px);
  margin: 0;
}
.td-hero-media img,
.td-feature img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(18px, 3vw, 30px);
  box-shadow: clamp(8px, 1.4vw, 14px) clamp(8px, 1.4vw, 14px) 0 var(--coral);
}

/* Role / project type */
.td-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px clamp(28px, 7vw, 80px);
}
.td-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.td-meta-label {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.td-meta-value { font-size: 1.1rem; font-weight: 600; }

/* Sections */
.td-section {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.td-section h2 {
  align-self: flex-start;
  margin: 0;
  padding: 0.5em 1.7em 0.6em;
  font-family: var(--bubble);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--brush-pink) center / 100% 100% no-repeat;
  transform: rotate(-2deg);
}

.td-copy {
  max-width: 70ch;
  font-size: 1rem;
  line-height: 1.8;
}

.td-feature { margin: 8px 0 0; }
.td-feature figcaption,
.td-comparison figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.td-responsibilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px clamp(24px, 4vw, 48px);
}
.td-responsibilities div {
  position: relative;
  padding-left: 28px;
  font-weight: 500;
  line-height: 1.6;
}
.td-responsibilities div::before {
  content: "";
  position: absolute;
  top: 0.4em;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 3px 3px 0 var(--sun);
}

/* Gallery */
.td-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}
.td-gallery a {
  display: block;
  aspect-ratio: 1.48 / 1;
  overflow: hidden;
  border-radius: clamp(12px, 1.8vw, 18px);
  box-shadow: 6px 6px 0 var(--coral);
  background: #eee;
  transition: transform .25s ease, box-shadow .25s ease;
}
.td-gallery a:hover,
.td-gallery a:focus-visible {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 var(--sun);
}
.td-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.td-comparison > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.td-comparison a { border-radius: 16px; overflow: hidden; aspect-ratio: 1.35 / 1; }
.td-comparison img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Previous / next project */
.td-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  padding-top: 8px;
}
.td-pagination a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 24px;
  border: 2px solid var(--coral);
  border-radius: 26px;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.td-pagination a:last-child { text-align: right; }
.td-pagination a:hover,
.td-pagination a:focus-visible {
  background: var(--sun);
  border-color: var(--sun);
  transform: translateY(-3px);
}
.td-pagination-label {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color .25s ease;
}
.td-pagination a:hover .td-pagination-label,
.td-pagination a:focus-visible .td-pagination-label { color: var(--outline); }
.td-pagination-name { font-size: 1.05rem; font-weight: 700; }

/* Image viewer (same behaviour as before) */
.td-lightbox { max-width: min(96vw, 1800px); max-height: 96vh; padding: 0; border: 0; background: transparent; }
.td-lightbox::backdrop { background: rgb(29 26 33 / 88%); }
.td-lightbox img { display: block; max-width: 96vw; max-height: 96vh; width: auto; height: auto; border-radius: 16px; }
.td-lightbox button {
  position: fixed;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  place-items: center;
}
.td-lightbox button:hover { background: var(--sun); color: var(--outline); }
.td-lightbox-close { top: 18px; right: 22px; }
.td-lightbox-prev, .td-lightbox-next { top: 50%; transform: translateY(-50%); }
.td-lightbox-prev { left: 22px; }
.td-lightbox-next { right: 22px; }

@media (max-width: 1050px) {
  .td-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .td-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-responsibilities { grid-template-columns: 1fr; }
  .td-pagination { grid-template-columns: 1fr; }
  .td-pagination a:last-child { text-align: left; }
  .td-comparison > div { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .td-gallery { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .td-gallery a, .td-pagination a { transition: none; }
}

/* Project overview: label and text centred */
.td-section:has(> .td-copy) {
  align-items: center;
  text-align: center;
}
.td-section:has(> .td-copy) > h2 { align-self: center; }
.td-section:has(> .td-copy) > .td-copy { margin-inline: auto; }
.td-section:has(> .td-copy) > .td-feature { width: 100%; }

/* Responsibilities: plain centred heading (no brush stroke); the list below stays as it is */
.td-section:has(> .td-responsibilities) > h2 {
  align-self: center;
  padding: 0;
  background: none;
  transform: none;
  color: var(--ink);
  font-size: 1.5rem;
}

/* Galleries: two columns by default, four for Gucci Town */
.td-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.td-gallery a { aspect-ratio: 1.35 / 1; }
.td-gallery--gucci { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.td-gallery--gucci a { aspect-ratio: 1.48 / 1; }
@media (max-width: 1050px) {
  .td-gallery--gucci { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .td-gallery { grid-template-columns: 1fr; }
  .td-gallery--gucci { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .td-gallery--gucci { grid-template-columns: 1fr; }
}

/* Videos, credits and lists used on the other project pages */
.td-feature video,
.td-gallery video,
.td-givenchy-videos video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(18px, 3vw, 30px);
  background: #eee;
}
.td-feature video { box-shadow: clamp(8px, 1.4vw, 14px) clamp(8px, 1.4vw, 14px) 0 var(--coral); }
.td-feature:has(video) { margin-bottom: 14px; }

.td-givenchy-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  width: 100%;
}
.td-givenchy-videos video { aspect-ratio: 1.35 / 1; object-fit: cover; border-radius: 18px; }
@media (max-width: 720px) { .td-givenchy-videos { grid-template-columns: 1fr; } }

.td-summary a,
.td-concept-credit {
  color: var(--coral);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.td-concept-credit { margin: -6px 0 6px; font-size: 0.85rem; }
.home-redesign .td-summary a:hover,
.home-redesign .td-concept-credit:hover { color: var(--outline); }

.td-copy ul { margin: 0 0 1.2em; padding-left: 0; list-style-position: inside; }
.td-copy li + li { margin-top: 0.45em; }

/* Sections nested inside the overview (Givenchy, Nook n Go) keep the same layout as on Gucci Town */
.td-section .td-section { width: 100%; text-align: left; }
.td-responsibilities { text-align: left; }

.td-copy > p:first-child { margin-top: 0; }
.td-copy > p:last-child { margin-bottom: 0; }

/* Clickable images open the enlarged viewer, so show the zoom cursor */
.td-gallery a,
.td-comparison a { cursor: zoom-in; }

/* Captions under videos: clear the pink offset shape with room to spare */
.td-feature figcaption { margin-top: clamp(24px, 3vw, 32px); }
