/* Alive brand logo — wordmark lockup + pop-out speech chips */
.brand-logo-alive {
  --bla-line: #0f5f64;
  --bla-chip-bg: rgba(255, 255, 255, 0.96);
  --bla-chip-border: rgba(15, 95, 100, 0.32);
  --bla-chip-text: #0f5f64;
  --bla-mark: #0f5f64;
  --bla-stage: 88px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: none;
  height: auto;
  color: var(--bla-mark);
  line-height: 1;
  text-decoration: none;
  overflow: visible;
}
.brand-logo-alive__stage {
  position: relative;
  width: var(--bla-stage);
  height: var(--bla-stage);
  flex-shrink: 0;
  overflow: visible;
}
.brand-logo-alive--compact {
  --bla-stage: 56px;
  gap: 8px;
}
.brand-logo-alive--icon {
  --bla-stage: 40px;
  gap: 0;
}
.brand-logo-alive__lines {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.brand-logo-alive__line {
  stroke: var(--bla-line);
  stroke-width: 1.5;
  stroke-opacity: 0;
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  fill: none;
  animation: brand-logo-line-pop 10s ease-in-out infinite;
}
.brand-logo-alive__line:nth-child(1) { animation-delay: 0s; }
.brand-logo-alive__line:nth-child(2) { animation-delay: 1.6s; }
.brand-logo-alive__line:nth-child(3) { animation-delay: 3.2s; }
.brand-logo-alive__line:nth-child(4) { animation-delay: 4.8s; }

.brand-logo-alive__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  height: 62%;
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: brand-logo-mark-breath 4.2s ease-in-out infinite;
}
.brand-logo-alive__mark svg,
.brand-logo-alive__lines {
  /* Override marketing-landing `img, svg { max-width:100%; height:auto }` */
  max-width: none;
  width: 100%;
  height: 100%;
  display: block;
}
.brand-logo-alive__lines {
  width: 116%;
  height: 116%;
}
.brand-logo-alive__gold {
  transform-origin: 75.75px 71.75px;
  animation: brand-logo-gold-pulse 3.2s ease-in-out infinite;
}

/* Speech-bubble chips (talebobler) */
.brand-logo-alive__chip {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--bla-chip-bg);
  border: 1px solid var(--bla-chip-border);
  box-shadow: 0 6px 16px rgba(8, 51, 68, 0.12);
  color: var(--bla-chip-text);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.86);
  animation: brand-logo-chip-pop 10s ease-in-out infinite;
}
.brand-logo-alive__chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
  flex-shrink: 0;
}
.brand-logo-alive__chip--nw { left: 4%; top: 6%; animation-delay: 0.25s; }
.brand-logo-alive__chip--ne { left: 96%; top: 10%; animation-delay: 1.85s; }
.brand-logo-alive__chip--sw { left: 6%; top: 94%; animation-delay: 3.45s; }
.brand-logo-alive__chip--se { left: 94%; top: 92%; animation-delay: 5.05s; }

.brand-logo-alive__text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding-block: 2px;
}
.brand-logo-alive__name {
  font-weight: 800;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  letter-spacing: -0.04em;
  color: #083344;
  white-space: nowrap;
}
.brand-logo-alive__name span { color: #155e75; }
.brand-logo-alive__tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5a7a7e;
  white-space: nowrap;
}

/* Marketing header / footer — room for chips + tagline */
.site-header,
.site-header .brand,
.site-footer .brand {
  overflow: visible;
}
.site-header .brand-logo-alive {
  --bla-stage: 78px;
}
.site-footer .brand-logo-alive {
  --bla-stage: 92px;
}
.site-footer .brand-logo-alive__name {
  font-size: 1.2rem;
}

@keyframes brand-logo-line-pop {
  0%, 3% { stroke-opacity: 0; stroke-dashoffset: 48; }
  10%, 42% { stroke-opacity: 0.6; stroke-dashoffset: 0; }
  52%, 100% { stroke-opacity: 0; stroke-dashoffset: 48; }
}
@keyframes brand-logo-chip-pop {
  0%, 4% { opacity: 0; transform: translate(-50%, -50%) scale(0.82); }
  12%, 44% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  54%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
}
@keyframes brand-logo-mark-breath {
  0%, 100% { opacity: 0.94; }
  50% { opacity: 1; }
}
@keyframes brand-logo-gold-pulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* Tablet / mobile: same PC lockup (hex + chips + lines + wordmark + tagline), scaled */
@media (max-width: 980px) {
  .site-header .brand {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(100%, calc(100vw - 112px));
    overflow: visible;
  }
  .site-header .brand-logo-alive {
    --bla-stage: 64px;
    --bla-gap: 10px;
    gap: var(--bla-gap);
    max-width: 100%;
    /* Grid centers the whole lockup; wordmark sits in the RIGHT half of that
       box, so shift LEFT by half (icon+gap) to put eCommerceLogic on the
       viewport midpoint. Icon hangs further left — never use +/2 here. */
    transform: translateX(calc((var(--bla-stage) + var(--bla-gap)) / -2));
  }
  /* Keep desktop mark ratio (62%) — do not enlarge into a different mark */
  .site-header .brand-logo-alive__mark {
    width: 62%;
    height: 62%;
  }
  .site-header .brand-logo-alive__chip {
    display: inline-flex;
    gap: 4px;
    padding: 3px 6px;
    font-size: 0.55rem;
    box-shadow: 0 4px 12px rgba(8, 51, 68, 0.12);
  }
  .site-header .brand-logo-alive__chip-dot {
    width: 5px;
    height: 5px;
  }
  .site-header .brand-logo-alive__lines {
    display: block;
  }
  .site-header .brand-logo-alive__line {
    stroke-width: 1.25;
  }
  .site-header .brand-logo-alive__text {
    min-width: 0;
    gap: 3px;
  }
  .site-header .brand-logo-alive__name {
    font-size: clamp(1.05rem, 3.8vw, 1.28rem);
    letter-spacing: -0.04em;
  }
  .site-header .brand-logo-alive__tag {
    display: block;
    font-size: clamp(0.48rem, 1.6vw, 0.56rem);
    letter-spacing: 0.1em;
    color: #5a7a7e;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-footer .brand-logo-alive {
    --bla-stage: 56px;
    gap: 8px;
    max-width: 100%;
  }
  .site-footer .brand-logo-alive__chip {
    font-size: 0.52rem;
    padding: 3px 6px;
  }
  .site-footer .brand-logo-alive__name {
    font-size: clamp(1rem, 4.2vw, 1.12rem);
  }
  .site-footer .brand-logo-alive__tag {
    white-space: normal;
    max-width: min(16rem, 58vw);
    letter-spacing: 0.08em;
    line-height: 1.35;
  }
}

/* Phone: tighter scale, still full PC composition */
@media (max-width: 520px) {
  .site-header .brand-logo-alive {
    --bla-stage: 52px;
    --bla-gap: 8px;
    gap: var(--bla-gap);
  }
  .site-header .brand-logo-alive__mark {
    width: 62%;
    height: 62%;
  }
  .site-header .brand-logo-alive__chip {
    padding: 2px 5px;
    font-size: 0.48rem;
    gap: 3px;
  }
  .site-header .brand-logo-alive__chip-dot {
    width: 4px;
    height: 4px;
  }
  .site-header .brand-logo-alive__tag {
    display: block;
    font-size: 0.44rem;
    letter-spacing: 0.08em;
  }
  .site-header .brand-logo-alive__name {
    font-size: clamp(0.98rem, 4.2vw, 1.15rem);
  }
  .site-footer .brand-logo-alive {
    --bla-stage: 48px;
    gap: 7px;
  }
  .site-footer .brand-logo-alive__chip {
    display: none;
  }
  .site-footer .brand-logo-alive__tag {
    white-space: normal;
    max-width: min(14rem, 55vw);
    letter-spacing: 0.08em;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo-alive__line,
  .brand-logo-alive__chip,
  .brand-logo-alive__mark,
  .brand-logo-alive__gold {
    animation: none !important;
  }
  .brand-logo-alive__line {
    stroke-opacity: 0.45;
    stroke-dashoffset: 0;
  }
  .brand-logo-alive__chip {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1);
  }
}
