/* =========================================================================
 * ARTIST DETAIL page
 * ========================================================================= */

.artist-hero {
  position: relative;
  min-height: 68vh;
  background-color: var(--card-bg);
  background-image: var(--hero-img);
  background-size: cover;
  background-position: var(--hero-pos, center);
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 80px) var(--pad-x-pc) 60px;
  overflow: hidden;
  /* Page-load fade-in for the hero (background + content) */
  opacity: 0;
  animation: artist-hero-fade-in 4s var(--ease-out) 0.1s forwards;
}

@keyframes artist-hero-fade-in {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .artist-hero {
    opacity: 1;
    animation: none;
  }
}

.artist-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.0) 60%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}

.artist-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}

/* Breadcrumb sits inside artist-hero-inner so it aligns on the same x-axis
 * as the num/meta lines (both rely on the inner's centered max-width box). */
.artist-hero-breadcrumb {
  margin: 32px 0 0 5px;
}

.artist-hero-num {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--text-mute);
  margin-bottom: 16px;
  /* Push 5px right to visually align with Oswald's "A" stem in the name below */
  margin-left: 5px;
}

.artist-hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(65px, 12.6vw, 180px);
  letter-spacing: 0.01em;
  line-height: 0.88;
  word-break: break-word;
}

.artist-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
  margin-left: 5px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-mute);
}

.artist-hero-meta span {
  position: relative;
}

.artist-hero-meta span:not(:last-child)::after {
  content: '/';
  position: absolute;
  right: -16px;
  color: var(--text-mute);
}

@media (max-width: 768px) { /* --bp-sp */
  /* SP: render the hero image as a block at the top, with the name / meta /
   * breadcrumb stacked below it (not overlaid on the image). */
  .artist-hero {
    display: block;
    min-height: 0;
    padding: 64px 0 0; /* clear the fixed header; image is full-bleed below it */
    background: transparent; /* match the page bg below the image (no --card-bg grey) */
    overflow: visible;
  }
  .artist-hero::before {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    background-image: var(--hero-img-sp, var(--hero-img));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--card-bg);
  }
  .artist-hero-overlay {
    display: none; /* no gradient needed once text is below the image */
  }
  .artist-hero-inner {
    padding: 28px var(--pad-x-sp) 4px;
  }
  .artist-hero-meta {
    gap: 4px 16px;
    flex-direction: column;
  }
  .artist-hero-meta span:not(:last-child)::after {
    display: none;
  }
}

/* Artist body */
.artist-body {
  padding-top: 200px;
  padding-bottom: 200px;
}

.artist-body-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  max-width: 1240px;
  margin: 0 auto;
  align-items: start; /* required so sticky on the side column can latch */
}

/* PC — left column stays in view while the right column scrolls */
.artist-body-side {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}

.artist-spec {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  font-size: 12px;
  line-height: 1.6;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.artist-spec dt {
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-mute);
  margin-bottom: 4px;
}

.artist-spec dd {
  letter-spacing: 0.04em;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.artist-spec dd:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Main image — first element of right column */
.artist-main-image {
  margin: 0 0 8px;
  background: var(--ink);
  overflow: hidden;
}

.artist-main-image img {
  display: block;
  width: 100%;
  height: auto;
  /* Bottom → top reveal: image starts fully clipped from above, the clip
   * retracts upward so the bottom edge appears first then the rest grows up.
   * Triggered by IntersectionObserver adding .is-visible to the wrapper. */
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  -webkit-clip-path: inset(100% 0 0 0);
  transition: opacity 1.6s var(--ease-out), clip-path 1.8s var(--ease-out), -webkit-clip-path 1.8s var(--ease-out);
}

.artist-main-image.is-visible img {
  opacity: 1;
  clip-path: inset(0);
  -webkit-clip-path: inset(0);
}

/* Gallery — vertical stack of full-width images, same aspect as main image */
.artist-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 60px;
  list-style: none;
}

.artist-gallery-item {
  overflow: hidden;
  background: var(--ink);
}

.artist-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  -webkit-clip-path: inset(100% 0 0 0);
  transition: transform 0.4s var(--ease-out),
              opacity 1.6s var(--ease-out),
              clip-path 1.8s var(--ease-out),
              -webkit-clip-path 1.8s var(--ease-out);
  transition-delay: 0s, calc(var(--i, 0) * 0.2s), calc(var(--i, 0) * 0.2s), calc(var(--i, 0) * 0.2s);
}

.artist-gallery-item.is-visible img {
  opacity: 1;
  clip-path: inset(0);
  -webkit-clip-path: inset(0);
}

.artist-gallery-item:hover img {
  transform: scale(1.03);
}

.artist-summary {
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.06em;
  margin-bottom: 60px;
  max-width: 720px;
}

.artist-links {
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.artist-links-title {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-mute);
  margin-bottom: 24px;
}

.artist-links-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
}

.artist-links-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--text);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.artist-links-list a:hover,
.artist-links-list a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.artist-link-arrow {
  font-size: 12px;
  color: var(--text-mute);
  transition: transform 0.3s ease, color 0.2s ease;
}

.artist-links-list a:hover .artist-link-arrow,
.artist-links-list a:focus-visible .artist-link-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

@media (max-width: 768px) { /* --bp-sp */
  .artist-body-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .artist-body-side {
    position: static; /* unstick on SP — column flows naturally */
  }
  .artist-summary {
    font-size: 13px;
    margin-bottom: 40px;
  }
}

/* Artist nav (prev/next) */
.artist-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 200px var(--pad-x-pc);
  max-width: 1480px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.artist-nav-prev,
.artist-nav-next {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text);
  transition: color 0.4s ease;
}

.artist-nav-next {
  justify-self: end;
}

.artist-nav-arrow {
  color: var(--text-mute);
  transition: color 0.4s ease, transform 0.4s ease;
}

.artist-nav-prev:hover .artist-nav-arrow {
  color: var(--accent);
  transform: translateX(-4px);
}

.artist-nav-next:hover .artist-nav-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.artist-nav-name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.artist-nav-label {
  color: var(--text-mute);
  transition: color 0.4s ease;
}

.artist-nav-prev:hover .artist-nav-label,
.artist-nav-next:hover .artist-nav-label {
  color: var(--accent);
}

.artist-nav-all {
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  border: 1px solid var(--line);
  padding: 14px 24px;
  border-radius: 999px;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.artist-nav-all:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.is-disabled {
  pointer-events: none;
}

@media (max-width: 768px) { /* --bp-sp */
  .artist-nav {
    /* Single row: PREV | ALL | NEXT. Equal 1fr columns keep the middle
     * (ALL) at the geometric horizontal center regardless of PREV/NEXT
     * label widths. */
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto;
    gap: 16px;
    padding: 100px var(--pad-x-sp);
  }
  .artist-nav-all {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    padding: 12px 18px;
    font-size: 9px;
  }
  .artist-nav-all-suffix {
    display: none;
  }
  .artist-nav-prev {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .artist-nav-next {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
}
