/* ==========================================================================
   Fortleit Group — Home "Ecosystem" hero (single-viewport, no-scroll)
   Loaded ONLY on index.html / index-en.html, after styles-home.css.
   Reuses tokens/classes from styles-home.css; adds new scoped rules only.
   ========================================================================== */

html, body.page-ecosystem {
  height: 100%;
}
body.page-ecosystem {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.page-ecosystem .site-header { flex: none; }

.ecosystem-hero {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 22px 0 16px;
}

.eco-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  position: relative;
  z-index: 1;
}

.eco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  width: 100%;
}

.eco-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.eco-copy .eyebrow-lines {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
  line-height: 1.6;
}
.eco-copy h1 {
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.eco-copy h1 em {
  font-style: italic;
  color: var(--gold-bright);
}
.eco-copy p.eco-lede {
  max-width: 420px;
  font-size: 0.94rem;
  margin-bottom: 22px;
}

.eco-visual {
  position: relative;
  height: 100%;
  min-height: 460px;
}

.eco-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 264px;
  height: 264px;
  border-radius: 50%;
  background-image: url("hub-globe.png?v=3");
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 4px rgba(224, 188, 77, 0.95), 0 0 70px rgba(201, 162, 39, 0.45),
    0 0 130px rgba(91, 139, 255, 0.18);
  z-index: 3;
}

/* Elliptical orbit guides — plain ellipses (unequal width/height +
   border-radius:50%), sized to match the badges' orbit-ellipse-path. */
.eco-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(224, 188, 77, 0.2);
  border-radius: 50%;
}
.eco-ring.ring-outer { width: 584px; height: 388px; }
.eco-ring.ring-inner { width: 378px; height: 252px; border-color: rgba(224, 188, 77, 0.13); }

/* Full-width cinematic Earth horizon — spans the entire hero banner
   (not just the ecosystem/orbit column), anchored to the bottom edge. */
.eco-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 300px;
  background-image: url("horizon-band.png?v=2");
  background-size: cover;
  background-position: center 30%;
  -webkit-mask-image: linear-gradient(to top, black 50%, transparent 100%);
  mask-image: linear-gradient(to top, black 50%, transparent 100%);
  opacity: 0.92;
  pointer-events: none;
  z-index: 0;
}

/* ---- Orbit motion: each item travels a precomputed elliptical path
   (plain translate() keyframes — no rotation involved, so the logo/text
   inside never tilts). All 9 share one keyframe + duration; a negative
   animation-delay (set per item as --phase, 0 to 1) staggers each one to
   its own starting point on the ellipse so they stay evenly spaced. ---- */
.orbit-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}
.orbit-item {
  position: absolute;
  left: 0;
  top: 0;
  animation: orbit-ellipse-path var(--dur, 90s) linear infinite;
  animation-delay: calc(-1 * var(--dur, 90s) * var(--phase, 0));
}
@keyframes orbit-ellipse-path {
  0.0000% { transform: translate(278.00px, 0.00px); }
  2.7778% { transform: translate(273.78px, 31.26px); }
  5.5556% { transform: translate(261.23px, 61.56px); }
  8.3333% { transform: translate(240.76px, 90.00px); }
  11.1111% { transform: translate(212.96px, 115.70px); }
  13.8889% { transform: translate(178.69px, 137.89px); }
  16.6667% { transform: translate(139.00px, 155.88px); }
  19.4444% { transform: translate(95.08px, 169.14px); }
  22.2222% { transform: translate(48.27px, 177.27px); }
  25.0000% { transform: translate(0.00px, 180.00px); }
  27.7778% { transform: translate(-48.27px, 177.27px); }
  30.5556% { transform: translate(-95.08px, 169.14px); }
  33.3333% { transform: translate(-139.00px, 155.88px); }
  36.1111% { transform: translate(-178.69px, 137.89px); }
  38.8889% { transform: translate(-212.96px, 115.70px); }
  41.6667% { transform: translate(-240.76px, 90.00px); }
  44.4444% { transform: translate(-261.23px, 61.56px); }
  47.2222% { transform: translate(-273.78px, 31.26px); }
  50.0000% { transform: translate(-278.00px, 0.00px); }
  52.7778% { transform: translate(-273.78px, -31.26px); }
  55.5556% { transform: translate(-261.23px, -61.56px); }
  58.3333% { transform: translate(-240.76px, -90.00px); }
  61.1111% { transform: translate(-212.96px, -115.70px); }
  63.8889% { transform: translate(-178.69px, -137.89px); }
  66.6667% { transform: translate(-139.00px, -155.88px); }
  69.4444% { transform: translate(-95.08px, -169.14px); }
  72.2222% { transform: translate(-48.27px, -177.27px); }
  75.0000% { transform: translate(-0.00px, -180.00px); }
  77.7778% { transform: translate(48.27px, -177.27px); }
  80.5556% { transform: translate(95.08px, -169.14px); }
  83.3333% { transform: translate(139.00px, -155.88px); }
  86.1111% { transform: translate(178.69px, -137.89px); }
  88.8889% { transform: translate(212.96px, -115.70px); }
  91.6667% { transform: translate(240.76px, -90.00px); }
  94.4444% { transform: translate(261.23px, -61.56px); }
  97.2222% { transform: translate(273.78px, -31.26px); }
  100.0000% { transform: translate(278.00px, -0.00px); }
}

.badge {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 144px;
  margin-left: -72px;
  text-align: center;
  text-decoration: none;
  z-index: 2;
  transform: translate(0, -50%);
}
@media (prefers-reduced-motion: reduce) {
  .orbit-item { animation: none; }
}

.badge .badge-chip {
  background: rgba(12, 19, 35, 0.97);
  border: 1.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.badge:hover .badge-chip {
  border-color: var(--gold-bright);
  transform: scale(1.08);
}
.badge .badge-chip.wide {
  width: 132px;
  height: 64px;
  border-radius: 13px;
  padding: 8px 10px;
}
.badge .badge-chip.round {
  width: 86px;
  height: 86px;
  border-radius: 50%;
}
.badge .badge-chip.tile {
  width: 108px;
  height: 90px;
  border-radius: 15px;
  padding: 9px;
}
.badge .badge-chip.icon {
  width: 65px;
  height: 65px;
  border-radius: 50%;
}
.badge .badge-chip img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.badge .badge-chip svg {
  width: 29px;
  height: 29px;
}
.badge .badge-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #f4f1ea;
  line-height: 1.15;
}
.badge .badge-sub {
  font-size: 0.72rem;
  color: var(--ivory-dim);
  letter-spacing: 0.02em;
}

/* Even spacing around the ellipse (9 items) is set inline on each
   .orbit-item via --phase (0 to 1, i.e. i/9), used as a negative
   animation-delay fraction — declared once in the HTML. */

.eco-side-label {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  text-align: right;
  line-height: 1.7;
  z-index: 1;
}

.eco-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  flex: none;
  background: linear-gradient(to bottom, transparent, rgba(4, 7, 15, 0.55) 40%, rgba(4, 7, 15, 0.75));
}
.eco-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.eco-stats .stat { border-left: 1px solid var(--line); padding: 0 12px; }
.eco-stats .stat:first-child { border-left: none; }
.eco-stats .n { font-family: var(--serif); font-size: 1.4rem; color: #f4f1ea; display: block; }
.eco-stats .n .accent { color: var(--cyan); }
.eco-stats .l { font-size: 0.66rem; letter-spacing: 0.03em; color: var(--ivory-dim); margin-top: 2px; display: block; }

.eco-flow {
  text-align: center;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--ivory-dim);
  text-transform: uppercase;
}
.eco-flow span { color: var(--gold); margin: 0 10px; }

/* Mobile: the ecosystem visual IS the hero — the left-column copy steps
   aside so the orbit is what people see first on a phone. Same elliptical
   motion, scaled down to a smaller matching ellipse. */
@keyframes orbit-ellipse-path-mobile {
  0.0000% { transform: translate(132.00px, 0.00px); }
  2.7778% { transform: translate(129.99px, 17.02px); }
  5.5556% { transform: translate(124.04px, 33.52px); }
  8.3333% { transform: translate(114.32px, 49.00px); }
  11.1111% { transform: translate(101.12px, 62.99px); }
  13.8889% { transform: translate(84.85px, 75.07px); }
  16.6667% { transform: translate(66.00px, 84.87px); }
  19.4444% { transform: translate(45.15px, 92.09px); }
  22.2222% { transform: translate(22.92px, 96.51px); }
  25.0000% { transform: translate(0.00px, 98.00px); }
  27.7778% { transform: translate(-22.92px, 96.51px); }
  30.5556% { transform: translate(-45.15px, 92.09px); }
  33.3333% { transform: translate(-66.00px, 84.87px); }
  36.1111% { transform: translate(-84.85px, 75.07px); }
  38.8889% { transform: translate(-101.12px, 62.99px); }
  41.6667% { transform: translate(-114.32px, 49.00px); }
  44.4444% { transform: translate(-124.04px, 33.52px); }
  47.2222% { transform: translate(-129.99px, 17.02px); }
  50.0000% { transform: translate(-132.00px, 0.00px); }
  52.7778% { transform: translate(-129.99px, -17.02px); }
  55.5556% { transform: translate(-124.04px, -33.52px); }
  58.3333% { transform: translate(-114.32px, -49.00px); }
  61.1111% { transform: translate(-101.12px, -62.99px); }
  63.8889% { transform: translate(-84.85px, -75.07px); }
  66.6667% { transform: translate(-66.00px, -84.87px); }
  69.4444% { transform: translate(-45.15px, -92.09px); }
  72.2222% { transform: translate(-22.92px, -96.51px); }
  75.0000% { transform: translate(-0.00px, -98.00px); }
  77.7778% { transform: translate(22.92px, -96.51px); }
  80.5556% { transform: translate(45.15px, -92.09px); }
  83.3333% { transform: translate(66.00px, -84.87px); }
  86.1111% { transform: translate(84.85px, -75.07px); }
  88.8889% { transform: translate(101.12px, -62.99px); }
  91.6667% { transform: translate(114.32px, -49.00px); }
  94.4444% { transform: translate(124.04px, -33.52px); }
  97.2222% { transform: translate(129.99px, -17.02px); }
  100.0000% { transform: translate(132.00px, -0.00px); }
}

@media (max-width: 720px) {
  .eco-grid { grid-template-columns: 1fr; }
  .eco-copy { display: none; }
  .eco-side-label { display: none; }

  .eco-visual { min-height: 340px; }
  .orbit-item { animation-name: orbit-ellipse-path-mobile; }
  .eco-hub { width: 116px; height: 116px; }
  .eco-ring.ring-outer { width: 296px; height: 216px; }
  .eco-ring.ring-inner { width: 190px; height: 140px; }
  .eco-horizon { height: 170px; }

  .badge { width: 92px; margin-left: -46px; gap: 3px; }
  .badge .badge-chip.wide { width: 82px; height: 42px; border-radius: 9px; padding: 5px 6px; }
  .badge .badge-chip.round { width: 54px; height: 54px; }
  .badge .badge-chip.tile { width: 64px; height: 54px; border-radius: 10px; padding: 5px; }
  .badge .badge-chip.icon { width: 42px; height: 42px; }
  .badge .badge-chip svg { width: 20px; height: 20px; }
  .badge .badge-name { font-size: 0.6rem; }
  .badge .badge-sub { font-size: 0.56rem; }
}
