/*
  ETP Blog Component Library
  ─────────────────────────────────────────────────────────
  Load once in your CMS theme or blog template.
  All classes are namespaced .etp-* to avoid CMS conflicts.
  No colors, no fonts — inherits everything from your theme.
  ─────────────────────────────────────────────────────────
*/


/* ── CALLOUT ──────────────────────────────────────────────
   Usage: Expert Insight, Pro Tip, Warning, Note
   Markup:
     <div class="etp-callout">
       <span class="etp-callout__label">Expert Insight</span>
       <p>Text here.</p>
     </div>
*/
.etp-callout {
  border-left: 4px solid currentColor;
  padding: 0.75rem 1.25rem;
  margin: 1.75rem 0;
  opacity: 0.85;
}
.etp-callout__label {
  display: block;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.etp-callout p {
  margin: 0;
  font-style: italic;
}


/* ── NUMBERED TRAIL ───────────────────────────────────────
   Usage: Sequential causes, reasons, or problems (3–6 items)
   Markup:
     <ol class="etp-trail">
       <li class="etp-trail__item">
         <div class="etp-trail__spine"><span class="etp-trail__num">1</span></div>
         <div class="etp-trail__body">
           <h3>Title</h3>
           <p>Description.</p>
         </div>
       </li>
     </ol>
*/
.etp-trail {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
}
.etp-trail__item {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 1rem;
  position: relative;
}
.etp-trail__item:not(:last-child) .etp-trail__spine::after {
  content: "";
  display: block;
  width: 2px;
  background: currentColor;
  opacity: 0.15;
  position: absolute;
  top: 2.5rem;
  left: 1.2rem;
  bottom: 0;
}
.etp-trail__spine {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 0.15rem;
}
.etp-trail__num {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background: #fff;
}
.etp-trail__body {
  padding-bottom: 1.75rem;
}
.etp-trail__body h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1rem;
}
.etp-trail__body p  { margin: 0 0 0.5rem; }
.etp-trail__body ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.etp-trail__body ul li { margin-bottom: 0.25rem; font-size: 0.95rem; }


/* ── STAT BAR ─────────────────────────────────────────────
   Usage: Single dominant percentage or number with a source line
   Markup:
     <div class="etp-statbar">
       <div class="etp-statbar__headline">
         <span class="etp-statbar__figure">20–30%</span>
         <span class="etp-statbar__desc">reduction in logistics costs</span>
       </div>
       <div class="etp-statbar__track"><div class="etp-statbar__fill" style="width:30%"></div></div>
       <span class="etp-statbar__source">Source: McKinsey</span>
     </div>
   Note: Set --fill-width inline on .etp-statbar__fill to match the actual percentage.
*/
.etp-statbar { margin: 1.75rem 0 2rem; }
.etp-statbar__headline {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.etp-statbar__figure {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.etp-statbar__desc {
  font-size: 1rem;
  line-height: 1.4;
  max-width: 28ch;
}
.etp-statbar__track {
  height: 6px;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.12;
  margin-bottom: 0.35rem;
  position: relative;
  overflow: hidden;
}
.etp-statbar__fill {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: currentColor;
  opacity: 1;
}
.etp-statbar__source { font-size: 0.78rem; opacity: 0.55; }


/* ── PILL ROW ─────────────────────────────────────────────
   Usage: 2–4 short qualitative outcomes or tags below a stat
   Markup:
     <div class="etp-pill-row">
       <span class="etp-pill-row__item">↑ Improved speed</span>
       <span class="etp-pill-row__item">↑ Better utilisation</span>
     </div>
*/
.etp-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.75rem;
}
.etp-pill-row__item {
  border: 1px solid currentColor;
  border-radius: 2rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  opacity: 0.8;
}


/* ── VS SPLIT ─────────────────────────────────────────────
   Usage: Before/after, old/new, problem/solution comparisons
   Markup:
     <div class="etp-vs">
       <div class="etp-vs__col">
         <p class="etp-vs__heading">Before</p>
         <ul class="etp-vs__list"><li>...</li></ul>
       </div>
       <div class="etp-vs__divider"><span class="etp-vs__badge">vs</span></div>
       <div class="etp-vs__col">
         <p class="etp-vs__heading">After</p>
         <ul class="etp-vs__list"><li>...</li></ul>
       </div>
     </div>
*/
.etp-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  border: 1px solid;
  border-radius: 8px;
  overflow: hidden;
  margin: 1.5rem 0 2rem;
}
.etp-vs__col { padding: 1.25rem 1.1rem; }
.etp-vs__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
  border-left: 1px solid;
  border-right: 1px solid;
  opacity: 0.5;
}
.etp-vs__badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.etp-vs__heading {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
  opacity: 0.6;
}
.etp-vs__list { list-style: none; padding: 0; margin: 0; }
.etp-vs__list li {
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 0.3rem 0;
  border-bottom: 1px solid;
  opacity: 0.85;
}
.etp-vs__list li:last-child { border-bottom: none; }
@media (max-width: 520px) {
  .etp-vs { grid-template-columns: 1fr; }
  .etp-vs__divider {
    border-left: none; border-right: none;
    border-top: 1px solid; border-bottom: 1px solid;
    padding: 0.5rem;
  }
  .etp-vs__badge { writing-mode: horizontal-tb; }
}


/* ── TICK STRIP ───────────────────────────────────────────
   Usage: 2–4 short guarantee/outcome statements in a horizontal row
   Markup:
     <ul class="etp-tick-strip">
       <li>From the right location</li>
       <li>At the lowest possible cost</li>
     </ul>
*/
.etp-tick-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  padding: 0.9rem 0 0;
  margin: 0 0 1.5rem;
  border-top: 2px solid currentColor;
}
.etp-tick-strip li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.etp-tick-strip li::before { content: "✔"; font-size: 0.85em; }


/* ── VERTICAL STEPS ───────────────────────────────────────
   Usage: Ordered how-to framework or process (3–7 steps)
   Markup:
     <ol class="etp-steps">
       <li class="etp-steps__item">
         <div class="etp-steps__marker"><span class="etp-steps__badge">1</span></div>
         <div class="etp-steps__content">
           <h3>Step title</h3>
           <p>Description.</p>
         </div>
       </li>
     </ol>
*/
.etp-steps { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.etp-steps__item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 0.875rem;
  position: relative;
}
.etp-steps__item:not(:last-child) .etp-steps__marker::after {
  content: "";
  display: block;
  width: 2px;
  background: currentColor;
  opacity: 0.15;
  position: absolute;
  top: 2rem;
  left: 1.45rem;
  bottom: 0;
}
.etp-steps__marker {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 0.1rem;
}
.etp-steps__badge {
  width: 2rem;
  height: 2rem;
  border-radius: 4px;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background: #fff;
}
.etp-steps__content { padding-bottom: 1.5rem; }
.etp-steps__content h3 { margin: 0.1rem 0 0.4rem; font-size: 1rem; }
.etp-steps__content p  { margin: 0 0 0.35rem; font-size: 0.95rem; }
.etp-steps__content ul { margin: 0.25rem 0 0; padding-left: 1.1rem; font-size: 0.95rem; }
.etp-steps__content ul li { margin-bottom: 0.2rem; }


/* ── OUTCOME BAR ──────────────────────────────────────────
   Usage: Case study result — one hero number + 2 supporting outcomes
   Markup:
     <div class="etp-outcome-bar">
       <div class="etp-outcome-bar__main">
         <span class="etp-outcome-bar__figure">25%</span>
         <span class="etp-outcome-bar__label">reduction in fulfilment costs</span>
       </div>
       <div class="etp-outcome-bar__track"><div class="etp-outcome-bar__fill" style="width:25%"></div></div>
       <div class="etp-outcome-bar__supporting">
         <span>Faster delivery timelines</span>
         <span>Improved customer satisfaction</span>
       </div>
     </div>
*/
.etp-outcome-bar { margin: 1.25rem 0 2rem; }
.etp-outcome-bar__main {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.etp-outcome-bar__figure {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}
.etp-outcome-bar__label { font-size: 1rem; line-height: 1.35; max-width: 22ch; }
.etp-outcome-bar__track {
  height: 8px;
  border-radius: 4px;
  background: currentColor;
  opacity: 0.1;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.etp-outcome-bar__fill {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: currentColor;
  opacity: 1;
}
.etp-outcome-bar__supporting {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid currentColor;
  opacity: 0.8;
}
.etp-outcome-bar__supporting span {
  flex: 1 1 50%;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.etp-outcome-bar__supporting span::before { content: "↑"; font-weight: 700; }


/* ── RULED LIST ───────────────────────────────────────────
   Usage: Editorial conclusions, strategic takeaways, key principles
   Markup:
     <ul class="etp-ruled">
       <li>Takeaway one</li>
       <li>Takeaway two</li>
     </ul>
*/
.etp-ruled {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 2rem;
  border-top: 1px solid currentColor;
}
.etp-ruled li {
  padding: 0.75rem 0;
  border-bottom: 1px solid currentColor;
  font-size: 0.975rem;
  line-height: 1.5;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  opacity: 0.85;
}
.etp-ruled li::before {
  content: "→";
  flex-shrink: 0;
  font-weight: 700;
  margin-top: 0.05rem;
}
