/* ============================================================================
   HELPERG Ecosystem Timeline — global banner (Premium Light)
   ----------------------------------------------------------------------------
   A single, dependency-free, design-system-level component shared across every
   public page. Rendered in HTML (crawlable links, no JS injection). The banner
   is a FIXED strip that sits above the site header; together they form one
   sticky stack. Height is fixed and reserved via the header offset math, so the
   component introduces no layout shift / no CLS.

   Visual language: Apple WWDC / Google I/O / Linear.app — restrained, no
   gradients, no glow, no glassmorphism, no heavy shadows. Only subtle premium UI.
   ========================================================================== */

:root {
  --eco-h: 52px;                 /* banner height — desktop (spec: 48–54px) */
  --eco-bg: #F5F5F7;             /* banner background */
  --eco-border: #E8EAF1;         /* bottom border + hairlines */
  --eco-ink: #121826;            /* primary text */
  --eco-ink-2: #6B7280;          /* secondary text */
  --eco-line: #E3E5EC;           /* capsule / control borders */
  --eco-line-h: #C7CBD4;         /* border on hover */
  --eco-surface: #FFFFFF;        /* capsules, controls, menus */
  --eco-hover: #EEF0F4;          /* subtle hover fill */
  --eco-dot: #C3C7D1;            /* timeline dot (rest) */
  --eco-radius: 8px;
  --eco-radius-lg: 12px;
  --eco-shadow: 0 2px 8px rgba(18, 24, 38, .08);
  --eco-shadow-pop: 0 12px 32px rgba(18, 24, 38, .12);
  --eco-t: 170ms cubic-bezier(.4, 0, .2, 1);
  --eco-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ---- Shell ------------------------------------------------------------- */
.eco-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--eco-h);
  z-index: 1100;                 /* above site headers (900 / 1000), below cookie modal (99999) */
  background: var(--eco-bg);
  border-bottom: 1px solid var(--eco-border);
  font-family: var(--eco-font);
  -webkit-font-smoothing: antialiased;
  color: var(--eco-ink);
}
.eco-bar *,
.eco-bar *::before,
.eco-bar *::after { box-sizing: border-box; }

.eco-bar__inner {
  height: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(12px, 3vw, 22px);
}

/* ---- Left: brand ------------------------------------------------------- */
.eco-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--eco-ink);
  border-radius: var(--eco-radius);
  padding: 4px 6px 4px 4px;
  margin-left: -4px;
  transition: background var(--eco-t);
}
.eco-brand:hover { background: rgba(18, 24, 38, .04); }
.eco-brand__icon {
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  border-radius: 7px;
  background: var(--eco-surface);
  border: 1px solid var(--eco-border);
  color: var(--eco-ink);
  display: grid;
  place-items: center;
}
.eco-brand__icon svg { width: 15px; height: 15px; display: block; }
.eco-brand__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
  min-width: 0;
}
.eco-brand__title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--eco-ink);
}
.eco-brand__sub {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--eco-ink-2);
  white-space: nowrap;
}

/* Divider hairlines (desktop only) */
.eco-brand::after,
.eco-apps::before {
  content: '';
  align-self: center;
  width: 1px;
  height: 24px;
  background: var(--eco-border);
  flex-shrink: 0;
}
.eco-brand::after { margin-left: 14px; margin-right: 0; }
.eco-apps::before { margin-right: 12px; }

/* ---- Center: horizontal timeline -------------------------------------- */
.eco-time {
  flex: 1 1 auto;
  min-width: 0;                  /* allow the scroller to shrink */
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;                    /* Firefox */
  -ms-overflow-style: none;                 /* legacy Edge */
  -webkit-overflow-scrolling: touch;        /* momentum on iOS */
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.eco-time::-webkit-scrollbar { display: none; }   /* Chrome/Safari */
.eco-time > li { flex: 0 0 auto; scroll-snap-align: start; }

.eco-cap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--eco-line);
  border-radius: var(--eco-radius);
  background: var(--eco-surface);
  color: var(--eco-ink);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -.005em;
  white-space: nowrap;
  text-decoration: none;
  transition: transform var(--eco-t), border-color var(--eco-t),
              box-shadow var(--eco-t), background var(--eco-t);
}
.eco-cap__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--eco-dot);
  flex-shrink: 0;
  transition: background var(--eco-t), transform var(--eco-t);
}
.eco-cap:hover {
  transform: translateY(-1px);
  border-color: var(--eco-line-h);
  box-shadow: var(--eco-shadow);
}
.eco-cap:hover .eco-cap__dot { background: var(--eco-ink); transform: scale(1.15); }

/* ---- Right: applications ---------------------------------------------- */
.eco-apps { position: relative; flex-shrink: 0; display: flex; align-items: center; }

.eco-apps__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--eco-line);
  border-radius: var(--eco-radius);
  background: var(--eco-surface);
  color: var(--eco-ink);
  font-family: var(--eco-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--eco-t), border-color var(--eco-t),
              box-shadow var(--eco-t), background var(--eco-t);
}
.eco-apps__btn svg { display: block; }
.eco-apps__btn .eco-apps__grid { width: 14px; height: 14px; }
.eco-apps__btn .eco-apps__caret {
  width: 12px; height: 12px; color: var(--eco-ink-2);
  transition: transform var(--eco-t);
}
.eco-apps__btn:hover {
  transform: translateY(-1px);
  border-color: var(--eco-line-h);
  box-shadow: var(--eco-shadow);
}
.eco-apps.is-open .eco-apps__btn { border-color: var(--eco-line-h); background: #fff; }
.eco-apps.is-open .eco-apps__caret { transform: rotate(180deg); }

/* Panel */
.eco-apps__panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 306px;
  padding: 6px;
  background: var(--eco-surface);
  border: 1px solid var(--eco-border);
  border-radius: var(--eco-radius-lg);
  box-shadow: var(--eco-shadow-pop);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--eco-t), transform var(--eco-t), visibility var(--eco-t);
  z-index: 20;
}
/* Open on click (touch/keyboard) and on hover/focus (pointer) */
.eco-apps.is-open .eco-apps__panel,
.eco-apps:hover .eco-apps__panel,
.eco-apps:focus-within .eco-apps__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.eco-apps__panel-title {
  padding: 8px 10px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--eco-ink-2);
}
.eco-app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px 7px 10px;
  border-radius: var(--eco-radius);
  transition: background var(--eco-t);
}
.eco-app:hover { background: var(--eco-hover); }
.eco-app__name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--eco-ink);
  white-space: nowrap;
}
.eco-app__name svg { width: 15px; height: 15px; color: var(--eco-ink-2); flex-shrink: 0; }
.eco-app__links { display: inline-flex; gap: 4px; flex-shrink: 0; }
.eco-app__links a {
  font-size: 11px;
  font-weight: 600;
  color: var(--eco-ink-2);
  text-decoration: none;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color var(--eco-t), background var(--eco-t), border-color var(--eco-t);
}
.eco-app__links a:hover {
  color: var(--eco-ink);
  background: #fff;
  border-color: var(--eco-line);
}

/* ---- Focus visibility (keyboard) -------------------------------------- */
.eco-brand:focus-visible,
.eco-cap:focus-visible,
.eco-apps__btn:focus-visible,
.eco-app__links a:focus-visible {
  outline: 2px solid var(--eco-ink);
  outline-offset: 2px;
  border-radius: var(--eco-radius);
}

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
  .eco-brand__sub { display: none; }
}
@media (max-width: 768px) {
  :root { --eco-h: 44px; }                  /* spec: 44px mobile */
  .eco-bar__inner { gap: 10px; padding: 0 12px; }
  .eco-brand::after, .eco-apps::before { display: none; }   /* drop dividers when tight */
  .eco-brand__title { font-size: 12px; }
  .eco-cap { height: 28px; font-size: 12px; padding: 0 11px; }
  .eco-apps__btn { height: 28px; }

  /* Panel becomes a full-width sheet anchored under the stack */
  .eco-apps__panel {
    position: fixed;
    top: var(--eco-h);
    left: 0;
    right: 0;
    width: auto;
    border-radius: 0 0 var(--eco-radius-lg) var(--eco-radius-lg);
    border-top: none;
    max-height: min(70vh, 460px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* On touch, don't open on hover — require an explicit tap (is-open) */
  .eco-apps:hover .eco-apps__panel { opacity: 0; visibility: hidden; transform: translateY(-4px); }
  .eco-apps.is-open .eco-apps__panel { opacity: 1; visibility: visible; transform: translateY(0); }
}
@media (max-width: 520px) {
  .eco-brand__text { display: none; }        /* icon-only brand on very small screens */
  .eco-apps__btn .eco-apps__label { display: none; }  /* icon-only apps trigger */
  .eco-apps__btn { padding: 0 8px; }
}

/* ---- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .eco-bar :where(.eco-cap, .eco-apps__btn, .eco-apps__panel, .eco-cap__dot,
                   .eco-app, .eco-app__links a, .eco-brand, .eco-apps__caret) {
    transition: none !important;
  }
  .eco-cap:hover, .eco-apps__btn:hover { transform: none; }
  .eco-time { scroll-behavior: auto; }
}
