/*
 * Caribbean supply ecosystem band (Caribbean module) on /markets/caribbean/.
 * Ecosystem style "antilles": an arc of islands, one per step, over a swell
 * pattern; the drawings stay left to right on RTL pages. Logical properties
 * only. Motion only without prefers-reduced-motion.
 */
.cbx { position: relative; padding-block: clamp(48px, 6vw, 84px); border-block-start: 3px solid var(--red); overflow: hidden; }
.cbx-head { display: flex; flex-direction: column; gap: 14px; max-inline-size: 820px; }
.cbx-head .lede { color: var(--mist); max-inline-size: 66ch; }
.cbx-eco { margin-block-start: clamp(28px, 4vw, 44px); }
.cbx-chain { margin: 0; }
.cbx-chain svg { display: block; inline-size: 100%; block-size: auto; direction: ltr; }
.cbx-chain figcaption { margin-block-start: 10px; font-size: 11.5px; color: var(--mist-2); }
.cbx-sea { opacity: 1; }
.cbx-swell { fill: none; stroke: rgba(143, 160, 182, .14); stroke-width: 1; }
.cbx-route { fill: none; stroke: rgba(195, 205, 218, .55); stroke-width: 2; stroke-dasharray: 6 8; }
.cbx-route-live { stroke: var(--red); stroke-dasharray: 1400; stroke-dashoffset: 0; opacity: .85; }
.cbx-origin rect { fill: var(--red); stroke: var(--white); stroke-width: 2; }
.cbx-origin text { font: 600 13px/1 var(--f-mono, monospace); letter-spacing: .04em; fill: var(--white); }
.cbx-reef { fill: rgba(64, 196, 196, .12); stroke: rgba(120, 220, 214, .35); stroke-width: 1; stroke-dasharray: 2 3; }
.cbx-land { fill: #C9B98F; stroke: #F1E7C8; stroke-width: 1.5; transition: fill .25s; }
.cbx-isle circle { fill: var(--navy-900, #0A1A30); stroke: var(--white); stroke-width: 2; transition: fill .25s; }
.cbx-isle text { font: 700 15px/1 var(--f-display, sans-serif); fill: var(--white); }
.cbx-isle { transition: transform .3s; transform-box: fill-box; transform-origin: center; }
.cbx-ship { display: none; }
.cbx-ship path { fill: var(--white); }
.cbx-ship rect { fill: var(--red); }

.cbx-steps { list-style: none; margin: clamp(18px, 3vw, 28px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .12); }
.cbx-step { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px; padding-inline-start: 66px; background: var(--navy-800, #0E2240); outline: none; transition: background .25s; }
.cbx-step-no { position: absolute; inset-block-start: 20px; inset-inline-start: 20px; display: grid; place-items: center; inline-size: 32px; block-size: 32px; border: 2px solid var(--white); border-radius: 50%; font: 700 15px/1 var(--f-display, sans-serif); color: var(--white); }
.cbx-step h3 { margin: 0; font: 600 19px/1.15 var(--f-display, sans-serif); letter-spacing: var(--tracking-nav, .02em); text-transform: uppercase; color: var(--white); }
.cbx-step p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--mist); }
.cbx-step:hover, .cbx-step:focus-visible { background: #15305A; }
.cbx-step:focus-visible { box-shadow: inset 0 0 0 2px var(--white); }
.cbx-step:hover .cbx-step-no, .cbx-step:focus-visible .cbx-step-no { background: var(--red); border-color: var(--red); }

/* A hovered or focused card lifts its island. */
.cbx-eco:has(.cbx-step[data-step="engineering"]:is(:hover, :focus-visible)) .cbx-isle[data-step="engineering"],
.cbx-eco:has(.cbx-step[data-step="fabrication"]:is(:hover, :focus-visible)) .cbx-isle[data-step="fabrication"],
.cbx-eco:has(.cbx-step[data-step="protection"]:is(:hover, :focus-visible)) .cbx-isle[data-step="protection"],
.cbx-eco:has(.cbx-step[data-step="packing"]:is(:hover, :focus-visible)) .cbx-isle[data-step="packing"],
.cbx-eco:has(.cbx-step[data-step="shipping"]:is(:hover, :focus-visible)) .cbx-isle[data-step="shipping"],
.cbx-eco:has(.cbx-step[data-step="supervision"]:is(:hover, :focus-visible)) .cbx-isle[data-step="supervision"] { transform: translateY(-6px) scale(1.08); }
.cbx-eco:has(.cbx-step[data-step="engineering"]:is(:hover, :focus-visible)) .cbx-isle[data-step="engineering"] circle,
.cbx-eco:has(.cbx-step[data-step="fabrication"]:is(:hover, :focus-visible)) .cbx-isle[data-step="fabrication"] circle,
.cbx-eco:has(.cbx-step[data-step="protection"]:is(:hover, :focus-visible)) .cbx-isle[data-step="protection"] circle,
.cbx-eco:has(.cbx-step[data-step="packing"]:is(:hover, :focus-visible)) .cbx-isle[data-step="packing"] circle,
.cbx-eco:has(.cbx-step[data-step="shipping"]:is(:hover, :focus-visible)) .cbx-isle[data-step="shipping"] circle,
.cbx-eco:has(.cbx-step[data-step="supervision"]:is(:hover, :focus-visible)) .cbx-isle[data-step="supervision"] circle { fill: var(--red); }

.cbx-refs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-block-start: clamp(32px, 5vw, 56px); padding-block-start: clamp(28px, 4vw, 44px); border-block-start: 1px solid rgba(255, 255, 255, .14); }
.cbx-map { margin: 0; }
.cbx-map svg { display: block; inline-size: 100%; block-size: auto; direction: ltr; }
.cbx-map-land { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .5); stroke-width: .3; stroke-linejoin: round; }
.cbx-pin-dot { fill: var(--red); stroke: var(--white); stroke-width: .4; }
.cbx-pin-ring { fill: none; stroke: #FF5A5A; stroke-width: .45; }
.cbx-pin text { font-size: 3.4px; font-weight: 700; letter-spacing: .02em; fill: var(--white); }
.cbx-refs-copy { display: flex; flex-direction: column; gap: 12px; }
.cbx-refs-title { margin: 0; font: 600 24px/1.1 var(--f-display, sans-serif); letter-spacing: var(--tracking-nav, .02em); text-transform: uppercase; color: var(--white); }
.cbx-refs-copy p { margin: 0; color: var(--mist); max-inline-size: 60ch; }
.cbx-note { padding-inline-start: 14px; border-inline-start: 3px solid var(--red); font-size: 14px; }
.cbx-refs-copy .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 6px; }
.cbx-refs-copy .btn { white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .cbx-route-live { stroke-dashoffset: 1400; animation: cbx-draw 3.2s ease-out .2s forwards; }
  .cbx-ship { display: block; offset-path: path("M40 92 C360 18 770 22 940 210"); offset-rotate: auto; animation: cbx-sail 14s linear infinite; }
  .cbx-pin-ring { transform-box: fill-box; transform-origin: center; animation: cbx-ping 2.6s ease-out infinite; }
}
@keyframes cbx-draw { to { stroke-dashoffset: 0; } }
@keyframes cbx-sail { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes cbx-ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(3); opacity: 0; } }

@media (max-width: 1000px) {
  .cbx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cbx-refs { grid-template-columns: minmax(0, 1fr); }
  .cbx-map { max-inline-size: 560px; }
}
@media (max-width: 640px) {
  .cbx-steps { grid-template-columns: minmax(0, 1fr); }
  .cbx-step { padding: 18px 18px 20px; padding-inline-start: 60px; }
  .cbx-step-no { inset-block-start: 16px; inset-inline-start: 16px; }
}
