/* ============================================================
   frag2 — COST OF FRAGMENTATION, "the fragmentation tax" ledger
   (namespace .frag2-*). Sits inside .hp-frag: heading + lead +
   bottom-line summary on the left; on the right an OPEN editorial
   ledger — four full-width entries stacked on hairline rules (no
   cards, matches the mig2/proof de-boxed light aesthetic). Each
   entry: an oversized gradient sand-blue number on the left (the
   pop is scale, not a box), tax tag + drawing-in hairline + label
   + muted copy on the right. Numbers count up on reveal via
   /marketing/home2/frag.js (IIFE keyed on [data-frag], idempotent,
   reduced-motion aware). Reveal via global .ios (+ .d1–.d4 stagger).
   ============================================================ */

/* --- section grid: head left, ledger right --- */
section.hp-frag {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  grid-template-areas: "head cards";
  column-gap: clamp(24px, 3vw, 52px);
  row-gap: 40px;
  align-items: center;
}
section.hp-frag .hp-h1 { font-size: clamp(30px, 3.1vw, 42px); }
section.hp-frag .hp-lead { max-width: 42ch; }

/* --- left column "bottom line": hairline + accent tick --- */
.frag2-sum {
  position: relative;
  margin: clamp(26px, 3vw, 40px) 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line, #dce0ee);
  font-size: clamp(14px, 1.1vw, 15px);
  line-height: 1.6;
  color: var(--ink-60, #5a6479);
  max-width: 38ch;
}
.frag2-sum::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 36px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, #3d63a4, #5a82c2);
}
.frag2-sum b { color: #3d63a4; font-weight: 600; }

/* --- the ledger (right column): four open entries stacked on
       hairlines. Big number left, text right. No boxes. --- */
.frag2-stats {
  grid-area: cards;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: center;
}

/* one entry = number | (meta + label + copy), on a top hairline */
.frag2-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  column-gap: clamp(18px, 2vw, 30px);
  grid-template-areas: "num meta" "num body";
  align-items: start;
  padding: clamp(20px, 2.2vw, 30px) 0;
  border-top: 1px solid var(--line, #dce0ee);
}
/* accent tick that grows down the hairline on hover/reveal */
.frag2-row::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 34px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, #3d63a4, #5a82c2);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}
.frag2-row.in::before { transform: scaleX(1); }
.frag2-row:hover::before { transform: scaleX(2.1); }

/* the number: oversized, gradient sand-blue, vertically centered
   against the text block — scale is what makes this section pop */
.frag2-num {
  grid-area: num;
  align-self: center;
  margin: 0;
  font-size: clamp(46px, 5.2vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #3d63a4;
  background: linear-gradient(135deg, #2c4a80, #5a82c2 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.frag2-unit {
  font-size: 0.28em;
  font-weight: 600;
  letter-spacing: 0;
  color: #8aa6dd;
  -webkit-text-fill-color: #8aa6dd;
  margin-left: 6px;
}

/* meta row: index + uppercase tax tag + hairline that draws in */
.frag2-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.frag2-idx {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #8aa6dd;
  font-variant-numeric: tabular-nums;
}
.frag2-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #5a82c2;
  white-space: nowrap;
}
.frag2-meta-line {
  flex: 1;
  height: 1px;
  min-width: 18px;
  background: linear-gradient(90deg, #c3d1ec, var(--line, #dce0ee) 55%, transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}
.frag2-row.in .frag2-meta-line { transform: scaleX(1); }

.frag2-body { grid-area: body; min-width: 0; margin-top: 10px; }
.frag2-label {
  display: block;
  font-size: clamp(15px, 1.15vw, 16.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink, #1e2636);
}
.frag2-copy {
  margin: 6px 0 0;
  font-size: clamp(13.5px, 1.05vw, 14.5px);
  line-height: 1.6;
  color: var(--ink-60, #5a6479);
  max-width: 44ch;
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce), (max-width: 700px) {
  .frag2-meta-line { transform: none; transition: none; }
  .frag2-row::before { transform: scaleX(1); transition: none; }
}

/* --- responsive: stack head above ledger --- */
@media (max-width: 1040px) {
  section.hp-frag {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "cards";
    row-gap: 44px;
  }
  section.hp-frag .hp-lead { max-width: 52ch; }
  .frag2-sum { max-width: 46ch; }
}

/* narrow: number stacks above the text */
@media (max-width: 700px) {
  .frag2-row {
    grid-template-columns: 1fr;
    grid-template-areas: "meta" "num" "body";
    row-gap: 6px;
  }
  .frag2-num { align-self: start; white-space: normal; }
  .frag2-copy { max-width: none; }
}
