/* WingZ "How we compare" benchmark section.
   A scroll-pinned split panel: dark text/nav column on the left, light animated
   bar-chart column on the right. Scrolling steps through three topics
   (design quality / generation speed / cost); the chart morphs between them and
   the active tab highlights. Injected right after the project showcase (#wz2-show),
   before the Partners strip. Brand orange = #F96029. */

:root { --wzb-orange: #F96029; }

.wzb {
  position: relative;
  width: 100vw;
  max-width: 100%;
  align-self: stretch;
  box-sizing: border-box;
  background: #0e0e10;
  /* tall outer box; JS sets the exact height inline on desktop so the stage pins */
}
.wzb-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
.wzb-grid {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 38%) 1fr;
}

/* ---------------------------------------------------------------- *
 * LEFT — dark text + topic tabs
 * ---------------------------------------------------------------- */
.wzb-left {
  position: relative;
  background: #0e0e10;
  /* faint warm glow to tie into the hero / showcase header */
  background-image: radial-gradient(120% 80% at 8% 0%, rgba(249, 96, 41, 0.16), rgba(249, 96, 41, 0) 55%);
  box-sizing: border-box;
  padding: clamp(40px, 6vh, 80px) clamp(32px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3.4vh, 34px);
}
.wzb-eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}
.wzb-title {
  margin: 0;
  font-family: "Inter", "Inter Placeholder", sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 3.6vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #fff;
}
.wzb-sub {
  margin: 0;
  max-width: 30ch;
  font-family: "Inter", "Inter Placeholder", sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
}

.wzb-tabs {
  list-style: none;
  margin: clamp(6px, 1.2vh, 16px) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.4vh, 18px);
}
.wzb-tab {
  position: relative;
  padding: 4px 0 4px 18px;
  cursor: pointer;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.4s ease;
}
.wzb-tab::before { /* scroll-progress fill that rides up the active tab's rail */
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: var(--prog, 0%);
  background: var(--wzb-orange);
  box-shadow: 0 0 8px var(--wzb-orange);
  transition: height 0.12s linear;
}
.wzb-tab-name {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(17px, 1.5vw, 22px);
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.34);
  transition: color 0.4s ease;
}
.wzb-tab-desc {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(13px, 0.95vw, 15px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
  max-width: 34ch;
  /* collapsed for inactive tabs */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.4s ease;
}
.wzb-tab.is-active .wzb-tab-name { color: #fff; }
.wzb-tab.is-active .wzb-tab-desc { max-height: 120px; opacity: 1; margin-top: 8px; }

/* ---------------------------------------------------------------- *
 * RIGHT — light animated chart
 * ---------------------------------------------------------------- */
.wzb-right {
  position: relative;
  background: #f5f3ef;
  box-sizing: border-box;
  padding: clamp(36px, 5vh, 64px) clamp(32px, 3.6vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3vh, 34px);
  overflow: hidden;
}

.wzb-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.wzb-chart-title {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(17px, 1.5vw, 23px);
  letter-spacing: -0.01em;
  color: #15130f;
}
.wzb-chart-hint {
  margin-top: 4px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(20, 18, 14, 0.42);
}
.wzb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}
.wzb-leg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(20, 18, 14, 0.62);
  white-space: nowrap;
}
.wzb-leg i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
}

/* plot area — --lblw is the row-label column width, shared by rows/gridlines/axis */
.wzb-plot {
  position: relative;
  flex: 0 1 auto;
  --lblw: 150px;
}
.wzb-gridlines {
  position: absolute;
  left: var(--lblw, 132px);
  right: 0;
  top: 0;
  bottom: 26px;          /* leave room for the axis row */
  pointer-events: none;
}
.wzb-gridline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(20, 18, 14, 0.08);
}
.wzb-gridline:first-child { background: rgba(20, 18, 14, 0.18); } /* zero baseline */

.wzb-rows {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 12px);
}
.wzb-group-label {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(20, 18, 14, 0.34);
  padding-left: 2px;
  margin-top: clamp(4px, 1vh, 10px);
}
.wzb-group-label:first-child { margin-top: 0; }

.wzb-row {
  display: grid;
  grid-template-columns: var(--lblw, 150px) 1fr;
  align-items: center;
  gap: 0;
}
.wzb-row-label {
  display: flex;
  align-items: center;
  height: clamp(30px, 4.2vh, 42px);
  padding-right: 18px;
  justify-content: flex-end;
}
/* logos are pre-trimmed to content; size by height so they read consistently,
   with a per-logo optical multiplier (--ls) for ones whose icon skews the box */
.wzb-row-label img {
  height: calc(clamp(15px, 2.2vh, 19px) * var(--ls, 1));
  max-width: 130px;
  width: auto;
  object-fit: contain;
}
/* Wingz wordmark, recolored from the white svg via a mask */
.wzb-row-label .wzb-wingz-mark {
  width: 92px;
  height: 26px;
  background: var(--wzb-orange);
  -webkit-mask: url("/wingz-logo.svg") no-repeat right center;
  mask: url("/wingz-logo.svg") no-repeat right center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.wzb-track {
  position: relative;
  display: flex;
  align-items: center;
  height: clamp(30px, 4.2vh, 42px);
}
.wzb-bar {
  height: 100%;
  width: var(--w, 0%);
  min-width: 3px;
  border-radius: 0 6px 6px 0;
  background: var(--bar, #b9c1cb);
  transition: width 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.wzb-row.is-wingz .wzb-bar {
  background: linear-gradient(90deg, #f0531c, #ff8052);
  box-shadow: 0 6px 20px rgba(249, 96, 41, 0.28);
}
/* in-bar annotation, e.g. "Agency plan" pinned to the right end of a bar */
.wzb-bartag {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2.5px 9px;
  border-radius: 999px;
  background: rgba(17, 16, 14, 0.5);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.wzb-val {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 500;
  color: #15130f;
  white-space: nowrap;
  padding-left: 10px;
  flex: 0 0 auto;
}
.wzb-row.is-wingz .wzb-val { color: var(--wzb-orange); font-weight: 600; }
.wzb-best {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--wzb-orange);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.wzb-axis {
  position: relative;
  margin-left: var(--lblw, 132px);
  height: 20px;
  margin-top: 6px;
}
.wzb-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  color: rgba(20, 18, 14, 0.4);
  white-space: nowrap;
}
.wzb-tick:first-child { transform: none; }
.wzb-tick:last-child { transform: translateX(-100%); }

/* ---------------------------------------------------------------- *
 * Responsive — stack the panels and stop pinning on narrow screens
 * ---------------------------------------------------------------- */
@media (max-width: 860px) {
  .wzb { height: auto !important; }
  .wzb-stage { position: static; height: auto; }
  .wzb-grid { grid-template-columns: 1fr; }
  .wzb-left { padding: 48px 24px 40px; gap: 18px; }
  .wzb-right { padding: 36px 22px 44px; }
  .wzb-plot { --lblw: 104px; }
  .wzb-row-label { padding-right: 12px; }
  .wzb-row-label img { max-width: 92px; }
  .wzb-row-label .wzb-wingz-mark { width: 72px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .wzb-bar { transition: none; }
}
