/* ============================================================
   EDL OS · Attio-grade visualizations
   Depends: design-tokens.css
   ============================================================ */

/* ── Hero diagram v2: circle + card-nodes ────────────────── */
.hero-dia {
  width: 100%; max-width: 460px;
  position: relative;
  padding: 40px 0 20px;
}
.hero-dia__svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.hero-dia__svg line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16,1,0.3,1);
}
.hero-dia__svg.is-drawn line { stroke-dashoffset: 0; }
.hero-dia__svg .conn-dot {
  fill: var(--line);
  r: 3;
}

/* Founder circle */
.hd-founder {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--tangerine);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  margin: 0 auto 48px;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 8px rgba(255,107,26,0.06);
}
.hd-founder__label {
  font-size: 0.8125rem; font-weight: var(--fw-bold);
  color: var(--tangerine);
}
.hd-founder__sub {
  font-size: 0.625rem; color: var(--subtle);
  margin-top: 2px;
}

/* Direction card-nodes */
.hd-nodes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  position: relative; z-index: 1;
}
.hd-node {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color .25s, box-shadow .25s;
  cursor: default;
}
.hd-node:hover {
  border-color: var(--tangerine-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.hd-node__head {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.hd-node__name {
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--ink);
}
.hd-node__badge {
  font-size: 0.5625rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-light);
  color: var(--subtle);
}
.hd-node__sub {
  font-size: 0.6875rem;
  color: var(--subtle);
  line-height: 1.3;
}
.hd-caption {
  text-align: center;
  font-size: 0.75rem;
  color: var(--subtle);
  margin-top: 24px;
  opacity: 0;
  transition: opacity .6s .8s;
  position: relative; z-index: 1;
}
.hero-dia__svg.is-drawn ~ .hd-caption { opacity: 1; }

/* ── Graph v2: Attio card-nodes with scores ──────────────── */
.graph-v2 {
  max-width: 720px;
  margin: 0 auto var(--space-16);
  position: relative;
  padding: 40px 0;
}
.graph-v2__svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.graph-v2__nodes {
  position: relative; z-index: 1;
}
/* Founder node centered */
.gv-founder {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--tangerine);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  margin: 0 auto 40px;
  box-shadow: 0 0 0 10px rgba(255,107,26,0.05);
}
.gv-founder__score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--fw-extrabold);
  color: var(--tangerine);
  line-height: 1;
}
.gv-founder__denom {
  font-size: 0.75rem; color: var(--subtle); font-weight: 400;
}
.gv-founder__label {
  font-size: 0.6875rem; color: var(--tangerine);
  font-weight: var(--fw-semibold);
  margin-top: 4px;
}
/* 4 score card-nodes in 2×2 */
.gv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.gv-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex; gap: 16px;
  align-items: center;
  transition: border-color .25s;
}
.gv-card:hover { border-color: #D4D4D8; }
.gv-card__score {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: var(--fw-extrabold);
  line-height: 1;
  min-width: 48px;
}
.gv-card__score--red { color: var(--status-red); }
.gv-card__score--yellow { color: var(--status-yellow); }
.gv-card__score--green { color: var(--status-green); }
.gv-card__info { flex: 1; }
.gv-card__name {
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--ink);
  margin-bottom: 2px;
}
.gv-card__status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.6875rem; font-weight: var(--fw-medium);
}
.gv-card__dot {
  width: 6px; height: 6px; border-radius: 50%;
}

/* Connection lines between cards */
.gv-connections {
  display: flex; justify-content: center;
  gap: var(--space-6);
  margin: 24px 0;
  padding: 16px 0;
}
.gv-conn {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.6875rem; color: var(--subtle);
}
.gv-conn__line {
  width: 32px; height: 2px;
  border-radius: 1px;
}

/* ── Breakdown cards v2: thin left-border ────────────────── */
.breaks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-16);
}
.break-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid;
  border-radius: 12px;
  padding: 28px 24px;
}
.break-card--red { border-left-color: var(--status-red); }
.break-card--yellow { border-left-color: var(--status-yellow); }
.break-card__label {
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.break-card__label--red { color: var(--status-red); }
.break-card__label--yellow { color: var(--status-yellow); }
.break-card__title {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  margin-bottom: 8px;
}
.break-card__desc {
  font-size: 0.8125rem;
  color: var(--subtle);
  line-height: 1.5;
  margin-bottom: 16px;
}
.break-card__num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  line-height: 1;
  margin-bottom: 2px;
}
.break-card__num--red { color: var(--status-red); }
.break-card__num--yellow { color: var(--status-yellow); }
.break-card__unit {
  font-size: 0.6875rem; color: var(--subtle);
}
/* Total */
.break-total {
  text-align: center;
  margin-bottom: var(--space-16);
}
.break-total__num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--fw-extrabold);
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}
.break-total__label {
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ── Steps v2: full-width alternating ────────────────────── */
.step-v2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--line);
}
.step-v2:last-of-type { border-bottom: none; }
.step-v2--reverse .step-v2__text { order: 2; }
.step-v2--reverse .step-v2__visual { order: 1; }
.step-v2__num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: var(--fw-extrabold);
  color: var(--tangerine);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.step-v2__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--ink);
  margin-bottom: var(--space-5);
}
.step-v2__body {
  font-size: var(--fs-body);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}
.step-v2__feats {
  display: flex; flex-direction: column;
  gap: var(--space-3);
}
.step-v2__feat {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  display: flex; align-items: flex-start; gap: var(--space-2);
}
.step-v2__visual {
  border-radius: var(--radius-soft);
  overflow: hidden;
}

/* ── Pilots v2: left-border numbers + growth curve ───────── */
.pilots-v2 {
  position: relative;
  padding: var(--space-8) 0;
}
.pilots-v2__curve {
  position: absolute;
  bottom: 0; right: 0;
  width: 50%; height: 80%;
  pointer-events: none;
  z-index: 0;
}
.pilots-v2__line {
  fill: none;
  stroke: var(--tangerine);
  stroke-width: 2;
  opacity: 0.55;
}
.pilots-v2__area {
  fill: url(#pilotsFill);
  stroke: none;
}
.pilots-v2__dot {
  fill: var(--white);
  stroke: var(--tangerine);
  stroke-width: 2;
  opacity: 0.8;
}
.pilots-v2__dot--last {
  fill: var(--tangerine);
  opacity: 1;
}
.pilots-v2__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-12) var(--space-16);
  position: relative; z-index: 1;
}
.pilot-v2 {
  display: flex; gap: 0;
  flex-direction: column;
}
.pilot-v2__label {
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  color: var(--muted);
  padding-left: 19px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pilot-v2__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: var(--fw-extrabold);
  color: var(--ink);
  line-height: 1;
  padding-left: 16px;
  border-left: 3px solid var(--tangerine);
  margin-bottom: 8px;
}
.pilot-v2__desc {
  font-size: 0.8125rem;
  color: var(--subtle);
  padding-left: 19px;
  line-height: 1.4;
}

/* ── Responsive for v2 components ────────────────────────── */
@media (max-width: 768px) {
  .step-v2 { grid-template-columns: 1fr; gap: var(--space-6); }
  .step-v2--reverse .step-v2__text { order: 1; }
  .step-v2--reverse .step-v2__visual { order: 2; }
  .gv-grid { grid-template-columns: 1fr; }
  .breaks { grid-template-columns: 1fr; }
  .pilots-v2__grid { grid-template-columns: 1fr; }
  .hd-nodes { grid-template-columns: 1fr; }
}
