/* Shared impact closer — The Referral + The Reach */

.impact-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto 1.1rem;
}

.impact-stage[hidden] { display: none !important; }

.impact-head {
  margin-bottom: 1rem;
}

.impact-head h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 6.5vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0.5rem;
}

.impact-head .lead {
  font-size: 0.98rem;
  color: rgba(255, 248, 239, 0.65);
  max-width: 32ch;
  line-height: 1.45;
}

.impact-reels {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.impact-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
}

.impact-card.is-in {
  animation: impactIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes impactIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.impact-card .ic-kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: rgba(255,248,239,0.45);
}

.impact-card .ic-stat {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.55rem, 6vw, 1.95rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.impact-card .ic-body {
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgba(255,248,239,0.62);
}

.impact-card .ic-bar {
  margin-top: 0.7rem;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.impact-card .ic-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.impact-card[data-tone="stay"] {
  background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(14,165,233,0.08));
  border-color: rgba(52,211,153,0.35);
}
.impact-card[data-tone="stay"] .ic-kicker { color: #6ee7b7; }
.impact-card[data-tone="stay"] .ic-stat { color: #6ee7b7; }
.impact-card[data-tone="stay"] .ic-bar > i {
  background: linear-gradient(90deg, #10b981, #0ea5e9);
}

.impact-card[data-tone="equity"] {
  background: linear-gradient(135deg, rgba(249,115,22,0.18), rgba(251,113,133,0.1));
  border-color: rgba(251,113,133,0.35);
}
.impact-card[data-tone="equity"] .ic-kicker { color: #fda4af; }
.impact-card[data-tone="equity"] .ic-stat { color: #fdba74; }
.impact-card[data-tone="equity"] .ic-bar > i {
  background: linear-gradient(90deg, #f97316, #fb7185);
}

.impact-card[data-tone="relate"] {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(14,165,233,0.1));
  border-color: rgba(167,139,250,0.4);
}
.impact-card[data-tone="relate"] .ic-kicker { color: #c4b5fd; }
.impact-card[data-tone="relate"] .ic-stat { color: #ddd6fe; }
.impact-card[data-tone="relate"] .ic-bar > i {
  background: linear-gradient(90deg, #8b5cf6, #0ea5e9);
}

.impact-card[data-tone="caseload"] {
  background: linear-gradient(135deg, rgba(245,165,36,0.18), rgba(249,115,22,0.1));
  border-color: rgba(251,191,36,0.35);
}
.impact-card[data-tone="caseload"] .ic-kicker { color: #fcd34d; }
.impact-card[data-tone="caseload"] .ic-stat { color: #fde68a; }
.impact-card[data-tone="caseload"] .ic-bar > i {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.impact-thesis {
  text-align: center;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  color: rgba(255,248,239,0.85);
  margin: 0.35rem 0 1rem;
  opacity: 0;
  transform: translateY(10px);
}

.impact-thesis.is-in {
  animation: impactIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* This is the door to the lead form — the only control on the impact stage
   that leads to a name and an email. It was a 6%-white pill with a hairline
   border, i.e. styled exactly like a skip link, so people read the cards and
   left. It is the primary action now, in each demo's own accent (the vars are
   set per demo; the fallbacks are The Referral's orange), and it pulses once
   it becomes active so the eye returns to it after the cards. */
.impact-skip {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, var(--impact-cta-a, #f97316), var(--impact-cta-b, #fb7185));
  color: #fff;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s;
}

.impact-skip.is-on {
  opacity: 1;
  pointer-events: auto;
  animation: impactCtaPulse 3.4s ease-in-out infinite;
}

.impact-skip.is-on:hover { transform: translateY(-1px); }

@keyframes impactCtaPulse {
  0%, 100% {
    box-shadow: 0 8px 24px var(--impact-cta-glow, rgba(249,115,22,0.22));
  }
  50% {
    box-shadow: 0 10px 34px var(--impact-cta-glow, rgba(249,115,22,0.22)),
                0 0 0 6px var(--impact-cta-ring, rgba(249,115,22,0.1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .impact-skip.is-on {
    animation: none;
    box-shadow: 0 10px 30px var(--impact-cta-glow, rgba(249,115,22,0.22));
  }
}

.schoolhouse {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.85rem 0 1rem;
  opacity: 0;
}

.schoolhouse.is-in { animation: impactIn 0.6s ease forwards; }

.schoolhouse span {
  width: 14px;
  height: 28px;
  border-radius: 4px 4px 2px 2px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

.schoolhouse span::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  background: linear-gradient(180deg, #f97316, #fb7185);
  transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.schoolhouse.is-built span:nth-child(1)::after { height: 55%; transition-delay: 0.05s; background: linear-gradient(180deg, #10b981, #34d399); }
.schoolhouse.is-built span:nth-child(2)::after { height: 78%; transition-delay: 0.15s; background: linear-gradient(180deg, #8b5cf6, #a78bfa); }
.schoolhouse.is-built span:nth-child(3)::after { height: 100%; transition-delay: 0.25s; background: linear-gradient(180deg, #f97316, #fb7185); }
.schoolhouse.is-built span:nth-child(4)::after { height: 68%; transition-delay: 0.35s; background: linear-gradient(180deg, #0ea5e9, #38bdf8); }
.schoolhouse.is-built span:nth-child(5)::after { height: 88%; transition-delay: 0.45s; background: linear-gradient(180deg, #f59e0b, #fbbf24); }

/* Bookend: instructional minutes restored (mirrors the exile clock) */
.impact-restore {
  text-align: center;
  margin-bottom: 1.3rem;
  padding: 1.1rem 1rem 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(52,211,153,0.32);
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(14,165,233,0.06));
  opacity: 0;
}
.impact-restore.is-in { animation: impactIn 0.7s cubic-bezier(0.22,1,0.36,1) forwards; }
.restore-eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,248,239,0.5); margin-bottom: 0.5rem;
}
.restore-clock {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(2.6rem, 13vw, 3.6rem); font-weight: 600;
  line-height: 1; letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #6ee7b7, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 44px rgba(52,211,153,0.25);
}
.restore-label { font-size: 0.9rem; color: rgba(255,248,239,0.72); margin-top: 0.5rem; line-height: 1.4; }
.restore-label b { color: #6ee7b7; font-weight: 700; }

/* Equity disparity — a two-bar gap instead of a single fill */
.ic-gap { margin-top: 0.85rem; }
.gap-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.42rem; }
.gap-cap {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.54rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,248,239,0.5); width: 5.4rem; flex-shrink: 0; text-align: right;
}
.gap-track { flex: 1; height: 12px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; }
.gap-bar { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 1.3s cubic-bezier(0.22,1,0.36,1); }
.gap-bar.gap-high { background: linear-gradient(90deg, #f97316, #fb7185); box-shadow: 0 0 16px rgba(251,113,133,0.45); }
.gap-bar.gap-low { background: rgba(255,255,255,0.3); }
.gap-bracket {
  margin-top: 0.4rem; text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fda4af;
}
.gap-bracket span::before { content: "↔ "; }

@media (prefers-reduced-motion: reduce) {
  .impact-card, .impact-thesis, .schoolhouse, .impact-restore { opacity: 1; transform: none; animation: none; }
  .impact-card .ic-bar > i, .gap-bar { transition: none; }
}
