/* ==========================================================================
   ThunderboltX — Section 03: Strategic Collaborations
   Pinned editorial card over oversized repeated typography.
   Motion lives in js/collaborations.js; this file holds the settled layout.
   ========================================================================== */

.tbx-collab {
  --tbx-collab-bg: #080909;
  --tbx-collab-copper: #C58A4B;
  --tbx-collab-copper-deep: #9E735B;
  --tbx-collab-ink: #0D0F12;
  --tbx-collab-ink-muted: #4B5058;
  --tbx-collab-header-h: 80px;

  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--tbx-collab-bg);
  background: var(--tbx-collab-bg);
  z-index: 10;
  margin: 0;
  overflow: hidden;
  font-family: 'Lausanne', sans-serif;
  box-sizing: border-box;
}

.tbx-collab-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background-color: var(--tbx-collab-bg);
  background: var(--tbx-collab-bg);
}

/* --------------------------------------------------------------------------
   Oversized repeated background typography (rows are generated in JS)
   -------------------------------------------------------------------------- */
.tbx-collab-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--tbx-collab-header-h) - 1vh) 0 0;
  pointer-events: none;
  user-select: none;
}

.tbx-collab-bg-row {
  display: flex;
  gap: 0.28em;
  white-space: nowrap;
  font-family: 'Venera', 'Venara', sans-serif;
  font-size: 8.6vh;
  font-weight: 800;
  line-height: 1.12;
  text-transform: uppercase;
  will-change: transform;
}

.tbx-collab-bg-row:nth-child(even) {
  margin-left: -1.6em;
}

.tbx-collab-bg-word {
  color: #7A5A45;
  opacity: 0;
}

.tbx-collab-bg-row:nth-child(even) .tbx-collab-bg-word {
  color: #3F3129;
}

/* --------------------------------------------------------------------------
   Intro (eyebrow + title left, description right)
   -------------------------------------------------------------------------- */
.tbx-collab-intro {
  position: absolute;
  top: calc(var(--tbx-collab-header-h) + 6vh);
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end;
  gap: 4vw;
  padding: 0 5vw;
}

.tbx-collab-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  font-family: 'Venera', 'Venara', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--tbx-collab-copper);
}

.tbx-collab-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--tbx-collab-copper);
}

.tbx-collab-title {
  max-width: 18ch;
  margin: 0;
  font-family: 'Venera', 'Venara', sans-serif;
  font-size: clamp(1.6rem, 2.7vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: #F2F2F2;
}

.tbx-collab-title span {
  display: block;
}

.tbx-collab-title .tbx-collab-title-gradient {
  background: linear-gradient(90deg, #e0916a, #f5be98 55%, #e0916a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.tbx-collab-desc {
  max-width: 52ch;
  margin: 0;
  font-family: 'Lausanne', sans-serif;
  font-size: clamp(0.95rem, 1vw, 1.1rem);
  line-height: 1.65;
  color: #A3A6AA;
}

/* --------------------------------------------------------------------------
   Editorial card: image left, content right
   -------------------------------------------------------------------------- */
.tbx-collab-card {
  position: absolute;
  top: calc(50% + var(--tbx-collab-header-h) / 2);
  left: 50%;
  z-index: 3;
  display: grid;
  grid-template-columns: 49% minmax(0, 1fr);
  width: min(88vw, 1600px);
  height: calc(100vh - var(--tbx-collab-header-h) - 7vh);
  padding: 12px;
  box-sizing: border-box;
  border-radius: 18px;
  background-color: #FFFFFF;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
  will-change: transform;
}

.tbx-collab-media {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: #080909;
}

.tbx-collab-media-track {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tbx-collab-copy-track {
  display: flex;
  flex-direction: column;
  height: 100%;
  will-change: transform;
}

.tbx-collab-media-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  will-change: transform;
}

.tbx-collab-media-slide img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.tbx-collab-dots {
  position: absolute;
  top: 50%;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 9px 6px;
  border-radius: 9999px;
  background-color: rgba(8, 9, 9, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(-50%);
  z-index: 20;
}

.tbx-collab-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.55);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.tbx-collab-dots span.is-active {
  background-color: #FFFFFF;
  transform: scale(1.7);
}

.tbx-collab-copy {
  position: relative;
  overflow: hidden;
}

.tbx-collab-copy-slide {
  display: flex;
  flex: 0 0 100%;
  flex-direction: column;
  justify-content: center;
  padding: 0 6% 0 9%;
  box-sizing: border-box;
}

.tbx-collab-index {
  margin: 0 0 1.4rem;
  font-family: 'Venera', 'Venara', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #9CA3AF;
}

.tbx-collab-index span {
  color: var(--tbx-collab-copper-deep);
  font-weight: 700;
}

.tbx-collab-heading {
  margin: 0 0 1.25rem;
  font-size: clamp(1.25rem, 1.95vw, 2.35rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--tbx-collab-ink);
}

.tbx-collab-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.tbx-collab-partners li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid #E4DED6;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tbx-collab-ink);
}

.tbx-collab-partners li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--tbx-collab-copper);
}

.tbx-collab-text {
  max-width: 38ch;
  margin: 0;
  font-size: clamp(0.95rem, 1.1vw, 1.12rem);
  line-height: 1.6;
  color: var(--tbx-collab-ink-muted);
}

/* --------------------------------------------------------------------------
   Mobile: image on top, content below
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .tbx-collab-intro {
    grid-template-columns: 1fr;
    gap: 1rem;
    top: calc(var(--tbx-collab-header-h) + 3vh);
  }

  .tbx-collab-eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    margin-bottom: 0.9rem;
  }

  .tbx-collab-desc {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .tbx-collab-bg-row {
    font-size: 6vh;
  }

  .tbx-collab-title {
    font-size: 1.3rem;
  }

  .tbx-collab-card {
    grid-template-columns: 1fr;
    grid-template-rows: 44% minmax(0, 1fr);
    width: 92vw;
    height: calc(100vh - var(--tbx-collab-header-h) - 4vh);
    padding: 8px;
    border-radius: 14px;
  }

  .tbx-collab-copy-slide {
    justify-content: flex-start;
    padding: 1.4rem 1rem 1rem;
  }

  .tbx-collab-index {
    margin-bottom: 0.8rem;
  }

  .tbx-collab-heading {
    font-size: 1.1rem;
    margin-bottom: 0.9rem;
  }

  .tbx-collab-partners {
    margin-bottom: 1rem;
  }

  .tbx-collab-partners li {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }
}

/* Fallback when GSAP is unavailable: stack intro and first card in flow. */
.tbx-collab.is-static .tbx-collab-stage {
  height: auto;
  padding: calc(var(--tbx-collab-header-h) + 4rem) 0 4rem;
}

.tbx-collab.is-static .tbx-collab-intro,
.tbx-collab.is-static .tbx-collab-card {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin: 0 auto 3rem;
}

.tbx-collab.is-static .tbx-collab-bg {
  display: none;
}