/* ---------- collections tree page ---------- */
.collections-page {
  --collections-dark: #171512;
  --collections-dark-soft: #242019;
  --collections-gold: #b88a36;
  --collections-line: rgba(184, 138, 54, 0.34);
  background: #f7f3eb;
  color: var(--collections-dark);
  overflow: clip;
}

.collections-hero {
  position: relative;
  min-height: min(760px, 88svh);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 9rem 1.25rem 5rem;
  isolation: isolate;
  color: #fffdf8;
  background:
    radial-gradient(circle at 18% 26%, rgba(183, 137, 53, 0.17), transparent 31%),
    radial-gradient(circle at 82% 78%, rgba(183, 137, 53, 0.11), transparent 28%),
    linear-gradient(135deg, #13110e 0%, #201b14 52%, #12100d 100%);
}

.collections-hero::after {
  content: "";
  position: absolute;
  inset: auto 8% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(221, 197, 151, 0.65), transparent);
}

.collections-hero-image {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.collections-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at center, rgba(18, 13, 7, 0.18), rgba(13, 10, 6, 0.5) 68%),
    linear-gradient(180deg, rgba(10, 8, 5, 0.55), rgba(12, 9, 5, 0.68));
  pointer-events: none;
}

.collections-hero-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 76%, transparent);
}

.collections-hero-glow {
  position: absolute;
  z-index: -1;
  width: clamp(15rem, 32vw, 29rem);
  aspect-ratio: 1;
  border: 1px solid rgba(218, 181, 108, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 151, 69, 0.08), transparent 68%);
  pointer-events: none;
}

.collections-hero-glow-one {
  inset: 15% auto auto -9%;
}

.collections-hero-glow-two {
  inset: auto -8% 8% auto;
  width: clamp(12rem, 25vw, 23rem);
}

.collections-hero-inner {
  width: min(100%, 840px);
  text-align: center;
}

.collections-breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 3.25rem;
  color: rgba(255, 253, 248, 0.56);
  font-size: 0.75rem;
}

.collections-breadcrumb a {
  transition: color 220ms ease;
}

.collections-breadcrumb a:hover,
.collections-breadcrumb a:focus-visible {
  color: #e1c58e;
}

.collections-kicker {
  color: #b68631;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.collections-hero .collections-kicker {
  color: #d5b473;
  letter-spacing: 0.24em;
}

.collections-hero h1 {
  margin-top: 1.1rem;
  font-size: clamp(2.9rem, 8vw, 6.7rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.collections-hero-copy {
  max-width: 620px;
  margin: 1.75rem auto 0;
  color: rgba(255, 253, 248, 0.7);
  font-size: clamp(0.95rem, 1.7vw, 1.15rem);
  line-height: 2;
}

.collections-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(214, 183, 123, 0.52);
  color: #ead7b0;
  font-size: 0.78rem;
  transition: color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.collections-scroll-cue svg {
  width: 1.1rem;
  height: 1.1rem;
}

.collections-scroll-cue:hover,
.collections-scroll-cue:focus-visible {
  color: #fff9ed;
  border-color: #e1bd75;
  transform: translateY(2px);
}

.collections-list {
  width: min(100%, 1440px);
  margin-inline: auto;
}

.collection-family {
  position: relative;
  padding: clamp(4.5rem, 9vw, 9rem) clamp(1rem, 5vw, 4.5rem);
}

.collection-family:nth-child(even) {
  background: #fffdf8;
}

.collection-family:not(:last-child)::after {
  content: "";
  position: absolute;
  inset: auto 9% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(93, 76, 43, 0.16), transparent);
}

.collection-family-shell {
  width: min(100%, 1220px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.collection-family-reverse .collection-root-visual {
  order: 2;
}

.collection-family-reverse .collection-family-content {
  order: 1;
}

.collection-root-visual {
  position: relative;
  min-width: 0;
}

.collection-root-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #e9dfce;
  box-shadow: 0 24px 70px rgba(40, 31, 18, 0.12);
}

.collection-root-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20, 17, 12, 0.22), transparent 38%);
}

.collection-root-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.collection-root-visual:hover .collection-root-frame > img {
  transform: scale(1.025);
}

.collection-frame-corner {
  position: absolute;
  z-index: 2;
  width: 3rem;
  height: 3rem;
  pointer-events: none;
}

.collection-frame-corner::before,
.collection-frame-corner::after {
  content: "";
  position: absolute;
  background: #e3bd70;
}

.collection-frame-corner::before {
  width: 100%;
  height: 1px;
}

.collection-frame-corner::after {
  width: 1px;
  height: 100%;
}

.collection-frame-corner-top {
  inset: 1.1rem auto auto 1.1rem;
}

.collection-frame-corner-bottom {
  inset: auto 1.1rem 1.1rem auto;
  transform: rotate(180deg);
}

.collection-ordinal {
  position: absolute;
  inset: auto -1.7rem -2.2rem auto;
  color: rgba(118, 87, 35, 0.11);
  font-family: Georgia, serif;
  font-size: clamp(5rem, 10vw, 9rem);
  line-height: 1;
  pointer-events: none;
}

.collection-image-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.9rem;
  color: rgba(135, 96, 34, 0.72);
  background:
    radial-gradient(circle at center, rgba(211, 174, 103, 0.22), transparent 36%),
    linear-gradient(145deg, #f0e6d5, #d8c7a8);
}

.collection-image-fallback svg {
  width: 7.5rem;
}

.collection-image-fallback span,
.collection-node-fallback {
  font-family: Georgia, serif;
  letter-spacing: 0.28em;
}

.collection-family-content {
  min-width: 0;
}

.collection-family-heading h2 {
  margin-top: 0.8rem;
  color: #1b1813;
  font-size: clamp(2.15rem, 4.5vw, 4.35rem);
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.collection-description {
  max-width: 600px;
  margin-top: 1rem;
  color: #6e665a;
  font-size: 0.95rem;
  line-height: 1.95;
}

.collection-primary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.7rem;
  padding: 0.8rem 1.15rem;
  border: 1px solid rgba(139, 99, 34, 0.34);
  color: #76511d;
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.collection-primary-link svg {
  width: 1.2rem;
  height: 1.2rem;
  transform: scaleX(-1);
  transition: transform 220ms ease;
}

.collection-primary-link:hover,
.collection-primary-link:focus-visible {
  color: #fff;
  border-color: #8e6628;
  background: #8e6628;
  transform: translateY(-2px);
}

.collection-primary-link:hover svg,
.collection-primary-link:focus-visible svg {
  transform: scaleX(-1) translateX(3px);
}

.collection-primary-link:active,
.collection-node-card:active {
  transform: scale(0.985);
}

.collection-tree-wrap {
  position: relative;
  margin-top: 3.5rem;
  padding-top: 2rem;
}

.collection-root-line {
  position: absolute;
  inset: 0 50% auto auto;
  width: 1px;
  height: 2rem;
  background: var(--collections-line);
  transform-origin: top;
}

.collection-tree-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.collection-tree-node {
  position: relative;
  min-width: 0;
}

.collection-node-branch {
  position: absolute;
  inset: -2rem 50% auto auto;
  width: 50%;
  height: 2rem;
  border-top: 1px solid var(--collections-line);
  border-right: 1px solid var(--collections-line);
  transform-origin: top right;
  pointer-events: none;
}

.collection-tree-node:nth-child(even) > .collection-node-branch {
  inset-inline: auto 50%;
  border-right: 0;
  border-left: 1px solid var(--collections-line);
  transform-origin: top left;
}

.collection-node-card {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  align-items: center;
  min-height: 6.6rem;
  overflow: hidden;
  border: 1px solid rgba(130, 104, 61, 0.15);
  background: rgba(255, 254, 251, 0.86);
  box-shadow: 0 10px 28px rgba(44, 34, 18, 0.045);
  transition: border-color 260ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.collection-node-card:hover,
.collection-node-card:focus-visible {
  border-color: rgba(158, 111, 35, 0.4);
  box-shadow: 0 18px 38px rgba(44, 34, 18, 0.1);
  transform: translateY(-3px);
}

.collection-node-image {
  align-self: stretch;
  min-height: 6.6rem;
  overflow: hidden;
  color: #88642c;
  background: #e8decc;
}

.collection-node-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.collection-node-card:hover .collection-node-image img,
.collection-node-card:focus-visible .collection-node-image img {
  transform: scale(1.055);
}

.collection-node-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f0e6d5, #d8c7a8);
}

.collection-node-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.9rem 1rem;
}

.collection-node-name {
  color: #272119;
  font-size: 0.88rem;
  font-weight: 750;
}

.collection-node-description {
  margin-top: 0.3rem;
  color: #756d61;
  font-size: 0.7rem;
  line-height: 1.65;
}

.collection-node-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  color: #936824;
  font-size: 0.67rem;
}

.collection-node-link svg {
  width: 0.9rem;
  height: 0.9rem;
  transform: scaleX(-1);
}

.collection-descendants {
  position: relative;
  display: grid;
  gap: 0.65rem;
  margin-top: 0.7rem;
  padding-inline-start: 1.4rem;
}

.collection-descendants::before {
  content: "";
  position: absolute;
  inset: 0.1rem 0 auto auto;
  width: 1px;
  height: calc(100% - 0.8rem);
  background: var(--collections-line);
}

.collection-descendants .collection-tree-node::before {
  content: "";
  position: absolute;
  inset: 2.9rem 0 auto auto;
  width: 1.4rem;
  height: 1px;
  background: var(--collections-line);
}

.collection-descendants .collection-node-branch {
  display: none;
}

.collection-descendants .collection-node-card {
  grid-template-columns: 4.25rem minmax(0, 1fr);
  min-height: 5.2rem;
}

.collection-descendants .collection-node-image {
  min-height: 5.2rem;
}

.collection-leaf-note {
  margin-top: 2rem;
  color: #766e62;
  font-size: 0.82rem;
}

.collections-empty {
  min-height: 520px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 8rem 1rem;
  text-align: center;
}

.collections-empty h2 {
  margin-top: 1rem;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.collections-page :where(a, button):focus-visible {
  outline: 2px solid #b58231;
  outline-offset: 4px;
}

@media (max-width: 1023px) {
  .collection-family-shell {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 2.5rem;
  }

  .collection-tree-grid {
    grid-template-columns: 1fr;
  }

  .collection-root-line {
    inset-inline-start: auto;
    inset-inline-end: 1.15rem;
  }

  .collection-node-branch,
  .collection-tree-node:nth-child(even) > .collection-node-branch {
    inset: -2rem 1.15rem auto auto;
    width: 1px;
    border: 0;
    background: var(--collections-line);
    transform-origin: top;
  }
}

@media (max-width: 767px) {
  .collections-hero {
    min-height: 680px;
    padding-top: 8rem;
  }

  .collections-hero-lines {
    background-size: 54px 54px;
  }

  .collections-breadcrumb {
    margin-bottom: 2.4rem;
  }

  .collections-hero-copy {
    line-height: 1.9;
  }

  .collection-family {
    padding: 4.5rem 1rem;
  }

  .collection-family-shell {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .collection-family-reverse .collection-root-visual,
  .collection-family-reverse .collection-family-content {
    order: initial;
  }

  .collection-root-frame {
    aspect-ratio: 4 / 4.3;
  }

  .collection-ordinal {
    inset-inline-end: -0.25rem;
    bottom: -1.6rem;
  }

  .collection-family-heading h2 {
    font-size: clamp(2rem, 10vw, 3.3rem);
  }

  .collection-tree-wrap {
    margin-top: 3rem;
  }

  .collection-node-card {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .collection-descendants {
    padding-inline-start: 0.8rem;
  }

  .collection-descendants::before,
  .collection-descendants .collection-tree-node::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .collections-page {
    scroll-behavior: auto;
  }

  .collections-page *,
  .collections-page *::before,
  .collections-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .collections-page [data-collections-hero-part],
  .collections-page [data-collection-visual],
  .collections-page [data-collection-heading],
  .collections-page [data-collection-node],
  .collections-page [data-tree-line] {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
  }
}

/* Page-scoped reveal motion; the page remains fully visible without JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  .collections-motion-ready [data-collection-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 620ms ease var(--collection-reveal-delay, 0ms),
      transform 620ms cubic-bezier(0.22, 1, 0.36, 1) var(--collection-reveal-delay, 0ms);
  }

  .collections-motion-ready .collections-hero-glow[data-collection-reveal] {
    transform: scale(0.94);
    transition-duration: 900ms;
  }

  .collections-motion-ready [data-tree-line][data-collection-reveal] {
    transform: scaleY(0);
    transform-origin: top;
    transition-duration: 420ms;
  }

  .collections-motion-ready [data-collection-reveal].is-collection-visible {
    opacity: 1;
    transform: none;
  }
}
