/* ========================================================================
   03 — BRAND ECOSYSTEM DESIGN (triptych + interactive Method)
   ======================================================================== */

.section-brand-ecosystem {
  background: var(--color-black);
  color: var(--color-white);
  padding-bottom: var(--space-6);
}

.triptych {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 36px);
  width: 100%;
  background: var(--color-black);
  padding: clamp(20px, 2.4vw, 36px) clamp(20px, 2.4vw, 36px) 0;
}

.triptych__item {
  position: relative;
  overflow: hidden;
}

.triptych__item img {
  width: 100%;
  aspect-ratio: 6 / 7;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* The connecting line/arrow is one continuous graphic baked across all
   three source photos (dot in frame 1 → bar through frame 2 → arrowhead
   in frame 3), so the light travels the full row in one pass rather than
   being confined to a single tile. A crisp streak (soft accent aura +
   bright white core) drifts left to right, then holds off-frame before
   repeating — "forward motion", not a constant shimmer. Drawn at full
   opacity (no blend mode) so it reads clearly even against the arrow's
   own bright accent-purple fill, not just against the darker photo. */
.triptych::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(100deg, transparent 40%, rgba(122, 129, 255, 0.55) 50%, transparent 60%),
    linear-gradient(100deg, transparent 48.3%, rgba(255, 255, 255, 0.95) 50%, transparent 51.7%);
  background-size: 300% 100%, 300% 100%;
  background-position: 155% 0, 155% 0;
  pointer-events: none;
  animation: triptych-sweep 7s ease-in-out infinite;
}

/* background-position % is resolved against (container - bg-size), which is
   negative here (bg-size > container) — so a HIGHER percentage places the
   gradient further left, not right. Start high (155%, off-frame past the
   left edge) and animate down to -55% (off-frame past the right edge) so
   the streak visibly travels left to right, matching the arrow's own
   direction, not backwards against it. */
@keyframes triptych-sweep {
  0% { background-position: 155% 0, 155% 0; }
  32% { background-position: -55% 0, -55% 0; }
  100% { background-position: -55% 0, -55% 0; }
}

/* Mobile-only replacement for the 3-tile triptych: one wide pre-designed
   image (the arrow/growth motif is already baked into it), hidden on
   desktop and swapped in at the same breakpoint the triptych collapses
   at. Gets the same light-sweep animation as the desktop triptych so the
   "forward motion" idea carries over rather than being lost. */
.triptych-mobile {
  display: none;
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--color-black);
}

.triptych-mobile img {
  width: 100%;
  display: block;
}

.triptych-mobile::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(100deg, transparent 40%, rgba(122, 129, 255, 0.55) 50%, transparent 60%),
    linear-gradient(100deg, transparent 48.3%, rgba(255, 255, 255, 0.95) 50%, transparent 51.7%);
  background-size: 300% 100%, 300% 100%;
  background-position: 155% 0, 155% 0;
  pointer-events: none;
  animation: triptych-sweep 7s ease-in-out infinite;
}

.brand-ecosystem__intro {
  padding-block: var(--space-6) var(--space-5);
}

.brand-ecosystem__title {
  color: var(--color-accent);
  text-align: left;
  margin-bottom: var(--space-3);
  display: block;
}

/* Compact — hugs its own label text, not a full-width button. */
.brand-ecosystem__cta {
  margin-bottom: var(--space-4);
  padding: 0.6em 1.3em;
  font-size: var(--fs-small);
}

.brand-ecosystem__text {
  max-width: 56rem;
  margin-inline: auto;
  text-align: center;
  /* Same intro body-text scale as BRANDS (css/brands.css) — see profile.css.
     This is a long descriptive paragraph, not a short lead/CTA line, so it
     belongs with the other body-text blocks brought down to that scale. */
  font-size: clamp(0.92rem, 0.83rem + 0.42vw, 1.2rem);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: rgba(255,255,255,0.95);
}

/* ---- Interactive Method ---- */
.method {
  padding-top: var(--space-4);
}

.method__list {
  border-top: 1px solid var(--color-border-inverse);
}

.method__row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--space-4);
  align-items: center;
  padding-block: clamp(1.3rem, 1.8vw, 2rem);
  border-bottom: 1px solid var(--color-border-inverse);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.method__title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}

.method__marker {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
  color: rgba(255,255,255,0.35);
  width: 1.1em;
  opacity: 1;
  transition: opacity var(--dur-base) var(--ease-editorial);
}

.method__row.is-active .method__marker { opacity: 0; }

.method__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-display-md);
  color: var(--color-white);
  transition: color var(--dur-base) var(--ease-editorial);
}

.method__row.is-active .method__title,
.method__row:hover .method__title {
  color: var(--color-accent);
}

.method__desc {
  /* Same intro body-text scale as BRANDS (css/brands.css) — see profile.css. */
  font-size: clamp(0.92rem, 0.83rem + 0.42vw, 1.2rem);
  line-height: var(--lh-relaxed);
  color: rgba(255,255,255,0.65);
  transition: color var(--dur-base) var(--ease-editorial), opacity var(--dur-base) var(--ease-editorial);
  opacity: 0.85;
}

.method__row.is-active .method__desc {
  color: var(--color-accent);
  opacity: 1;
}

.method__desc-inner {
  display: inline-block;
  animation: method-fade var(--dur-base) var(--ease-editorial);
}

@keyframes method-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .triptych { display: none; }
  .triptych-mobile { display: block; }
  .method__row { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ========================================================================
   LAPTOP / LOW-HEIGHT DESKTOP — see profile.css for the breakpoint's
   rationale. Resolved sizes only (~10-15%); --fs-heading/--fs-display-md
   are shared with Films/direction pages, so overridden here directly
   rather than at the token, which stays untouched for those pages.
   ======================================================================== */
@media (min-width: 1100px) and (max-width: 1440px) and (max-height: 900px) {
  .section-brand-ecosystem { padding-bottom: 4.9rem; }
  .triptych { gap: clamp(18px, 2.1vw, 32px); padding: clamp(18px, 2.1vw, 32px) clamp(18px, 2.1vw, 32px) 0; }
  .triptych img { aspect-ratio: 6 / 6.3; }
  .brand-ecosystem__intro { padding-block: 4.8rem 3.1rem; }

  .method { padding-top: 2rem; }
  .method__row { padding-block: clamp(1.15rem, 1.6vw, 1.75rem); }
  .method__title { font-size: clamp(1.7rem, 1.15rem + 2.1vw, 2.8rem); }
}
