/* ==========================================================================
   Takszu — collections page (Figma node 3:86, "takszu-collections")
   Values verified against get_design_context on 3:96 and 3:102.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Intro (3:96)
   The frame sits below a 120px spacer (3:87) that clears the absolutely
   positioned header, and adds 160px of its own top padding on top of that.
   -------------------------------------------------------------------------- */

.collections-intro {
  background-color: var(--color-surface);
  padding-block: calc(var(--header-clearance) + var(--space-160)) var(--space-80);
}

.collections-intro__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-24);
}

.collections-intro__title {
  max-width: 800px;
  font-size: var(--fs-display);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-snug);
  overflow-wrap: break-word;
}

.collections-intro__lede {
  max-width: 680px;
  font-size: var(--fs-lede);
  font-weight: var(--weight-regular);
  line-height: var(--lh-normal);
  opacity: var(--opacity-body);
}

/* --------------------------------------------------------------------------
   Collection entries (3:102)

   Each entry is a single link wrapping its whole card, as in the design.
   Two layouts alternate:
     --wide  : full-width 16:9 image with the copy beneath it.
     --split : a fixed 720px square image beside a flexible copy column,
               vertically centred, with 96px above and below.
   -------------------------------------------------------------------------- */

.collections { background-color: var(--color-surface); }

.collection { display: flex; }

.collection--wide {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-32);
}

.collection--split {
  align-items: center;
  gap: var(--space-80);
  padding-block: var(--space-96);
}

.collection__figure {
  margin: 0;
  overflow: hidden;
}

.collection--wide .collection__figure { width: 100%; }

.collection--split .collection__figure {
  flex: 0 0 auto;
  width: 720px;
  max-width: 100%;
}

.collection__image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.collection--split .collection__image { aspect-ratio: 1 / 1; }

.collection__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
}

.collection--wide .collection__content { width: 100%; }

.collection--split .collection__content {
  flex: 1 1 0;
  min-width: 0;
}

.collection__index {
  color: var(--color-clay);
  font-size: var(--fs-label);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  line-height: normal;
}

.collection__name {
  font-size: var(--fs-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-tight);
  overflow-wrap: break-word;
}

/* The materials line and the description share one style in the design. */
.collection__materials,
.collection__text {
  font-size: var(--fs-body-lg);
  font-weight: var(--weight-medium);
  line-height: var(--lh-normal);
  opacity: var(--opacity-body);
  overflow-wrap: break-word;
}

/* CTA (20:11) — 8px of padding on top of the 16px stack gap, so 24px total.
   NOTE: the label text in Figma already ends in an arrow ("VER PIEZAS →")
   AND is followed by a separate 16x16 arrow-right icon, so the design shows
   two arrows. Reproduced as designed; flagged in CLAUDE.md for the designer. */
.collection__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding-block-start: var(--space-8);
  font-size: var(--fs-label);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-cta);
  line-height: normal;
}

.collection__cta-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.collection:hover .collection__cta-icon,
.collection:focus-visible .collection__cta-icon { transform: translateX(4px); }

@media (max-width: 1024px) {
  .collections-intro {
    padding-block: calc(var(--header-clearance) + var(--space-64)) var(--space-48);
  }

  .collection--split {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-32);
    padding-block: var(--space-48);
  }

  .collection--split .collection__figure { width: 100%; }
}
