/* Legacy Fund page — scoped to .legacy-fund so theme header/footer/other pages stay intact. */
.legacy-fund{
  --bg:#ffffff;
  --bg-soft:#f6f3f1;
  --card:#141010;
  --line:rgba(12,10,10,0.12);
  --line-soft:rgba(12,10,10,0.08);
  --text:#141010;
  --text-dim:rgba(20,15,15,0.62);
  --text-dimmer:rgba(20,15,15,0.42);
  --on-dark:#faf8f7;
  --on-dark-dim:rgba(250,248,247,0.68);
  --on-dark-dimmer:rgba(250,248,247,0.45);
  --accent:#E64B4B;
  --accent-2:#C5322F;
  --accent-soft:#FF8A7A;
  --radius-xl:32px;
  --radius-lg:24px;
  --radius-md:18px;
  --ease:cubic-bezier(.19,1,.22,1);
  --ease-snap:cubic-bezier(.34,1.56,.64,1);

  position:relative;
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  font-size:16px;
  line-height:normal;
  text-align:left;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
.legacy-fund, .legacy-fund *, .legacy-fund *::before, .legacy-fund *::after{ box-sizing:border-box; }
.legacy-fund *{ margin:0; padding:0; }
.legacy-fund img{ display:block; max-width:100%; }
.legacy-fund a{ color:inherit; text-decoration:none; }
.legacy-fund ul{ list-style:none; }
.legacy-fund h1, .legacy-fund h2, .legacy-fund h3{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  text-transform:none; letter-spacing:-.02em!important; line-height:1.15;
}
.legacy-fund p{ font-family:'Inter',system-ui,-apple-system,sans-serif; }
.legacy-fund ::selection{ background:var(--accent); color:#fff; }
.legacy-fund .wrap{ max-width:1240px; margin:0 auto; padding:0 40px; }

/* ---------- scroll reveal (only hidden when JS is running) ---------- */
.lf-js .legacy-fund .reveal{ opacity:0; transform:translateY(26px); transition:opacity .6s var(--ease), transform .6s var(--ease); }
.lf-js .legacy-fund .reveal.in{ opacity:1; transform:translateY(0); }
.legacy-fund .stagger > *{ transition-delay:calc(var(--i,0) * 80ms); }

/* ---------- photo blocks ---------- */
.legacy-fund .ph{
  position:relative; display:flex; align-items:center; justify-content:center; overflow:hidden;
  background:linear-gradient(135deg,#2a2a30,#17171a);
}
.legacy-fund .ph::before{
  content:''; position:absolute; inset:0;
  background:repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 14px);
}
.legacy-fund .ph img{ position:absolute; inset:0; z-index:0; width:100%; height:100%; object-fit:cover; }
.legacy-fund .ph.warm{ background:linear-gradient(135deg,#3a1418,#180a0a); }
.legacy-fund .ph.cool{ background:linear-gradient(135deg,#241417,#120a0a); }
.legacy-fund .ph.rose{ background:linear-gradient(135deg,#3d1620,#170a0c); }

/* ---------- buttons ---------- */
.legacy-fund .btn{
  display:inline-flex; align-items:center; gap:6px;
  padding:14px 28px; border-radius:999px;
  font-size:13.5px; font-weight:700; line-height:1.2; text-transform:none; letter-spacing:0!important;
  border:1px solid var(--accent); background:var(--accent); color:#fff;
  transition:background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease-snap), border-color .3s var(--ease), box-shadow .3s var(--ease);
  white-space:nowrap; cursor:pointer;
  min-height: 40px;
  min-width: auto;
}
.legacy-fund .btn:hover{
  background:var(--accent-2); border-color:var(--accent-2); color:#fff; transform:translateY(-2px) scale(1.02);
  box-shadow:0 14px 28px -10px rgba(230,75,75,0.55);
}
.legacy-fund .btn:active{ transform:translateY(0) scale(.96); }
.legacy-fund .btn-ghost{ border-color:rgba(255,255,255,0.5); background:transparent; color:#fff; }
.legacy-fund .btn-ghost:hover{ background:rgba(255,255,255,0.14); color:#fff; box-shadow:none; border-color:#fff; }

/* ---------- section head ---------- */
.legacy-fund .section-head{ text-align:center; max-width:640px; margin:0 auto 56px; }
.legacy-fund .section-head .eyebrow{
  display:inline-flex; align-items:center; gap:9px;
  font-size:12.5px; font-weight:700; letter-spacing:.16em!important; text-transform:uppercase;
  color:var(--accent); margin-bottom:14px;
}
.legacy-fund .section-head .eyebrow::before{
  content:''; width:7px; height:7px; border-radius:50%; background:var(--accent);
  animation:lfPulseDot 1.8s ease-in-out infinite;
}
.legacy-fund .section-head .eyebrow::after{ content:''; width:20px; height:2px; border-radius:2px; background:var(--accent); opacity:.4; }
.legacy-fund .section-head h2{ font-weight:800; font-size:clamp(32px,4.6vw,50px); line-height:1.08; letter-spacing:-.02em!important; color:var(--text); }
.legacy-fund .section-head p{ margin-top:14px; color:var(--text-dim); font-size:15px; line-height:1.6; }
@keyframes lfPulseDot{ 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(1.6); opacity:.5; } }
@keyframes lfHeroUp{ to{ opacity:1; transform:translateY(0); } }

/* ================= HERO ================= */
.legacy-fund .lf-hero-section{ padding:0; }
.legacy-fund .lf-hero-frame{
  position:relative; min-height:640px; border-radius:var(--radius-xl); overflow:hidden;
  margin:0 40px; background:var(--card);
  box-shadow:0 18px 40px -22px rgba(20,10,10,0.28);
  display:flex; align-items:center;
}
.legacy-fund .lf-hero-frame .bg-photo{ position:absolute; inset:0; z-index:0; }
.legacy-fund .lf-hero-frame .bg-photo img{ width:100%; height:100%; object-fit:cover; object-position:75% 60%; opacity:.55; }
.legacy-fund .lf-hero-frame .glow{
  position:absolute; inset:0; z-index:1; pointer-events:none;
  background:
    linear-gradient(90deg, rgba(6,4,4,0.94) 0%, rgba(6,4,4,0.8) 32%, rgba(6,4,4,0.4) 54%, rgba(6,4,4,0.1) 72%, rgba(6,4,4,0.15) 100%),
    linear-gradient(0deg, rgba(6,4,4,0.6) 0%, rgba(6,4,4,0.1) 30%, transparent 55%),
    radial-gradient(55% 80% at 82% 15%, rgba(230,75,75,0.28) 0%, rgba(172,50,47,0.12) 38%, transparent 70%);
}
.legacy-fund .lf-hero-frame::after{
  content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
  background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px);
}
.legacy-fund .lf-hero-content{ position:relative; z-index:2; padding:130px 56px 70px; width:100%; }
.legacy-fund .lf-hero-grid{ display:grid; grid-template-columns:1.15fr 0.85fr; gap:50px; align-items:stretch; }

.legacy-fund .hero-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:12.5px; font-weight:700; letter-spacing:.16em!important; text-transform:uppercase;
  color:var(--accent-soft); margin-bottom:18px;
  opacity:0; transform:translateY(16px);
  animation:lfHeroUp .7s var(--ease) .1s forwards;
}
.legacy-fund .hero-eyebrow::before{
  content:''; width:7px; height:7px; border-radius:50%; background:var(--accent);
  animation:lfPulseDot 1.8s ease-in-out infinite;
}
.legacy-fund .lf-hero-copy h1{
  font-weight:800; font-size:clamp(32px,4.6vw,52px); line-height:1.08; letter-spacing:-.02em!important;
  margin-bottom:20px; color:#fff;
  opacity:0; transform:translateY(28px);
  animation:lfHeroUp .8s var(--ease) .22s forwards;
}
.legacy-fund .lf-hero-copy h1 em{ font-style:italic; font-weight:600; color:var(--accent-soft); }
.legacy-fund .lf-hero-copy > p{
  font-size:15.5px; line-height:1.7; color:rgba(255,255,255,0.78); margin-bottom:30px; max-width:520px;
  opacity:0; transform:translateY(22px);
  animation:lfHeroUp .8s var(--ease) .36s forwards;
}
.legacy-fund .lf-hero-actions{
  display:flex; gap:12px; flex-wrap:wrap;
  opacity:0; transform:translateY(22px);
  animation:lfHeroUp .8s var(--ease) .5s forwards;
}

/* hero stat card */
.legacy-fund .lf-hero-statcard{
  position:relative; padding:26px 28px 24px; border-radius:var(--radius-lg);
  background:rgba(20,15,15,0.6); border:1px solid rgba(255,255,255,0.16);
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  box-shadow:0 24px 50px -22px rgba(0,0,0,0.5);
  text-align:center; display:flex; flex-direction:column; justify-content:center;
}
.legacy-fund .lf-hero-statcard-ring{ position:relative; width:148px; height:148px; margin:0 auto 14px; }
.legacy-fund .lf-hero-statcard-ring svg{ width:100%; height:100%; transform:rotate(-90deg); }
.legacy-fund .lf-hero-statcard-ring .track{ fill:none; stroke:rgba(255,255,255,0.16); stroke-width:10; }
.legacy-fund .lf-hero-statcard-ring .fill{
  fill:none; stroke:var(--accent-soft); stroke-width:10; stroke-linecap:round;
  stroke-dasharray:326.73;
  stroke-dashoffset:calc(326.73 * (1 - var(--p) / 100));
  transition:stroke-dashoffset 1.6s var(--ease);
}
.lf-js .legacy-fund:not(.lf-go) .lf-hero-statcard-ring .fill{ stroke-dashoffset:326.73; }
.legacy-fund .lf-hero-statcard-ring-center{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:32px; font-weight:800; color:#fff; letter-spacing:-.02em!important;
}
.legacy-fund .lf-hero-statcard-ring-center small{ font-size:16px; font-weight:700; margin-left:2px; }
.legacy-fund .lf-hero-statcard-label{ font-size:11px; font-weight:700; letter-spacing:.1em!important; text-transform:uppercase; color:rgba(255,255,255,0.5); margin-bottom:6px; }
.legacy-fund .lf-hero-statcard-amt{ font-size:16px; font-weight:700; color:#fff; margin-bottom:18px; }
.legacy-fund .lf-hero-statcard-amt .dim{ font-weight:500; color:rgba(255,255,255,0.5); }
.legacy-fund .lf-hero-bar{ height:8px; border-radius:999px; background:rgba(255,255,255,0.16); overflow:hidden; }
.legacy-fund .lf-hero-bar-fill{
  height:100%; width:calc(var(--p) * 1%); border-radius:999px;
  background:linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-soft));
  transition:width 1.6s var(--ease);
}
.lf-js .legacy-fund:not(.lf-go) .lf-hero-bar-fill{ width:0; }
.legacy-fund .lf-hero-progress-foot{ display:flex; justify-content:space-between; margin-top:10px; font-size:12px; color:rgba(255,255,255,0.5); }

/* ================= PROGRESS / STATS ================= */
.legacy-fund .lf-progress-section{ padding:110px 0 100px; background:var(--bg); }
.legacy-fund .lf-progress-grid{ display:grid; grid-template-columns:340px 1fr; gap:64px; align-items:center; margin-bottom:64px; }
.legacy-fund .lf-ring-wrap{ position:relative; width:300px; height:300px; margin:0 auto; }
.legacy-fund .lf-ring-wrap svg{ width:100%; height:100%; transform:rotate(-90deg); }
.legacy-fund .lf-ring-track{ fill:none; stroke:var(--line); stroke-width:16; }
.legacy-fund .lf-ring-fill{
  fill:none; stroke:url(#lfRingGradient); stroke-width:16; stroke-linecap:round;
  stroke-dasharray:653.45;
  stroke-dashoffset:calc(653.45 * (1 - var(--p) / 100));
  transition:stroke-dashoffset 1.8s var(--ease);
}
.lf-js .legacy-fund:not(.lf-go) .lf-ring-fill{ stroke-dashoffset:653.45; }
.legacy-fund .lf-ring-center{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.legacy-fund .lf-ring-center .pct{ font-size:44px; font-weight:800; letter-spacing:-.02em!important; color:var(--text); }
.legacy-fund .lf-ring-center .label{ font-size:11.5px; font-weight:700; letter-spacing:.12em!important; text-transform:uppercase; color:var(--text-dimmer); margin-top:4px; }

.legacy-fund .lf-stat-cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.legacy-fund .lf-stat-card{ padding:24px 22px; border-radius:var(--radius-md); border:1px solid var(--line-soft); background:var(--bg-soft); }
.legacy-fund .lf-stat-card .k{ font-size:11.5px; font-weight:700; letter-spacing:.1em!important; text-transform:uppercase; color:var(--text-dimmer); margin-bottom:8px; }
.legacy-fund .lf-stat-card .v{ font-size:26px; font-weight:800; letter-spacing:-.01em!important; color:var(--text); }
.legacy-fund .lf-stat-card.accent{ background:var(--card); }
.legacy-fund .lf-stat-card.accent .k{ color:var(--on-dark-dimmer); }
.legacy-fund .lf-stat-card.accent .v{ color:var(--on-dark); }

.legacy-fund .lf-progress-note{
  max-width:760px; margin:0 auto; text-align:center; font-size:14.5px; line-height:1.75; color:var(--text-dim);
  border-top:1px solid var(--line-soft); padding-top:32px;
}

/* ================= PILLARS ================= */
.legacy-fund .lf-pillars-section{ padding:0 0 140px; background:var(--bg); }
.legacy-fund .lf-pillars-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.legacy-fund .lf-pillar-card{
  position:relative; border-radius:var(--radius-lg); background:var(--card); color:var(--on-dark);
  padding:38px 30px 34px; overflow:hidden;
  box-shadow:0 18px 40px -22px rgba(20,10,10,0.4);
  transition:transform .45s var(--ease-snap), box-shadow .45s var(--ease), opacity .6s var(--ease);
}
.legacy-fund .lf-pillar-card:hover{ transform:translateY(-8px); box-shadow:0 28px 56px -20px rgba(20,10,10,0.5); }
.legacy-fund .lf-pillar-card .glow{ position:absolute; inset:0; background:radial-gradient(60% 60% at 85% 0%, rgba(230,75,75,0.3), transparent 70%); pointer-events:none; }
.legacy-fund .lf-pillar-card .icon{
  position:relative; width:52px; height:52px; border-radius:16px; background:rgba(230,75,75,0.14);
  border:1px solid rgba(230,75,75,0.4); display:flex; align-items:center; justify-content:center; margin-bottom:22px;
}
.legacy-fund .lf-pillar-card .icon svg{ width:24px; height:24px; stroke:var(--accent-soft); }
.legacy-fund .lf-pillar-card h3{ position:relative; font-size:19px; font-weight:800; margin-bottom:10px; letter-spacing:-.01em!important; color:var(--on-dark); }
.legacy-fund .lf-pillar-card p{ position:relative; font-size:13.5px; line-height:1.65; color:var(--on-dark-dim); }

/* ================= TIMELINE ================= */
.legacy-fund .lf-timeline-section{ padding:0 0 150px; background:var(--bg); }
.legacy-fund .lf-timeline{ position:relative; margin:0 40px; }
.legacy-fund .lf-timeline-track{ position:absolute; left:0; right:0; top:19px; height:2px; background:var(--line); }
.legacy-fund .lf-timeline-track-fill{ position:absolute; left:0; top:0; height:100%; width:calc(var(--p) * 1%); background:var(--accent); transition:width 1.4s var(--ease); }
.lf-js .legacy-fund:not(.lf-go) .lf-timeline-track-fill{ width:8%; }
.legacy-fund .lf-timeline-items{ position:relative; display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.legacy-fund .lf-t-item{ padding-top:56px; position:relative; }
.legacy-fund .lf-t-dot{
  position:absolute; left:0; top:11px; width:18px; height:18px; border-radius:50%;
  background:var(--bg); border:3px solid var(--line); z-index:2;
}
.legacy-fund .lf-t-item.now .lf-t-dot{ border-color:var(--accent); background:var(--bg); box-shadow:0 0 0 5px rgba(230,75,75,0.16); }
.legacy-fund .lf-t-tag{ font-size:11px; font-weight:700; letter-spacing:.12em!important; text-transform:uppercase; color:var(--accent); margin-bottom:8px; }
.legacy-fund .lf-t-item:not(.now) .lf-t-tag{ color:var(--text-dimmer); }
.legacy-fund .lf-t-date{ font-size:22px; font-weight:800; letter-spacing:-.01em!important; margin-bottom:8px; color:var(--text); }
.legacy-fund .lf-t-desc{ font-size:13.5px; line-height:1.6; color:var(--text-dim); max-width:280px; }

/* ================= VISION QUOTE ================= */
.legacy-fund .lf-vision-section{ position:relative; padding:150px 0; text-align:center; background:var(--bg-soft); overflow:hidden; }
.legacy-fund .lf-vision-glow{
  position:absolute; left:50%; top:50%; width:600px; height:600px; transform:translate(-50%,-50%);
  background:radial-gradient(circle, rgba(230,75,75,0.09), transparent 70%); pointer-events:none;
}
.legacy-fund .lf-vision-text{ position:relative; z-index:2; max-width:760px; margin:0 auto; padding:0 20px; font-size:clamp(24px,3.6vw,38px); line-height:1.45; font-weight:600; color:var(--text-dim); }
.legacy-fund .lf-vision-text b{ color:var(--accent); font-weight:800; }
.legacy-fund .lf-vision-cite{ position:relative; z-index:2; margin-top:26px; font-size:13px; font-weight:700; letter-spacing:.1em!important; text-transform:uppercase; color:var(--text-dimmer); }

.legacy-fund .float-photos{ position:absolute; inset:0; pointer-events:none; z-index:1; }
.legacy-fund .float-photos .fp{
  position:absolute; border-radius:16px; overflow:hidden;
  box-shadow:0 20px 44px -16px rgba(20,10,10,0.32);
  pointer-events:auto;
  transition:transform .5s var(--ease), box-shadow .5s var(--ease);
  will-change:transform;
  animation:lfFpDrift 7s ease-in-out infinite;
}
.legacy-fund .float-photos .fp:hover{ box-shadow:0 26px 54px -16px rgba(20,10,10,0.4); z-index:5; }
.legacy-fund .fp1{ width:290px; height:214px; left:2%; top:2%; transform:rotate(-6deg); animation-delay:0s; }
.legacy-fund .fp2{ width:230px; height:286px; left:-2%; top:44%; transform:rotate(4deg); animation-delay:1.6s; }
.legacy-fund .fp3{ width:290px; height:196px; right:2%; top:-2%; transform:rotate(5deg); animation-delay:.8s; }
.legacy-fund .fp4{ width:230px; height:286px; right:-3%; top:40%; transform:rotate(-4deg); animation-delay:2.3s; }
@keyframes lfFpDrift{ 0%,100%{ margin-top:0; } 50%{ margin-top:-12px; } }
@media (prefers-reduced-motion: reduce){ .legacy-fund .float-photos .fp{ animation:none; } }

/* ================= GIVE CTA ================= */
.legacy-fund .lf-give-section{ padding:0 0 60px; background:var(--bg); }
.legacy-fund .lf-give-section{ padding-top:60px; }
.legacy-fund .lf-give-card{ position:relative; overflow:hidden; margin:0 40px; border-radius:var(--radius-xl); background:var(--card); padding:72px 56px; text-align:center; }
.legacy-fund .lf-give-card .glow{
  position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(55% 90% at 50% 100%, rgba(230,75,75,0.34) 0%, rgba(172,50,47,0.2) 35%, transparent 70%);
}
.legacy-fund .lf-give-card .inner{ position:relative; z-index:2; max-width:600px; margin:0 auto; }
.legacy-fund .lf-give-card h2{ font-size:clamp(28px,3.6vw,40px); font-weight:800; letter-spacing:-.02em!important; color:var(--on-dark); margin-bottom:16px; }
.legacy-fund .lf-give-card p{ font-size:14.5px; line-height:1.7; color:var(--on-dark-dim); margin-bottom:32px; }
.legacy-fund .lf-give-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* ================= RESPONSIVE ================= */
@media (max-width:1360px){
  .legacy-fund .fp1{ width:190px; height:140px; left:-2%; top:1%; }
  .legacy-fund .fp2{ width:165px; height:205px; left:-4%; }
  .legacy-fund .fp3{ width:190px; height:130px; right:-2%; top:-2%; }
  .legacy-fund .fp4{ width:165px; height:205px; right:-4%; }
}
@media (max-width:960px){
  .legacy-fund .wrap{ padding:0 22px; }
  .legacy-fund .section-head{ margin-bottom:40px; padding:0 8px; }
  .legacy-fund .float-photos{ display:none; }
  .legacy-fund .lf-hero-frame{ margin:0 20px; }
  .legacy-fund .lf-hero-content{ padding:120px 26px 64px; }
  .legacy-fund .lf-hero-grid{ grid-template-columns:1fr; gap:36px; }
  .legacy-fund .lf-hero-statcard{ max-width:340px; width:100%; margin:0 auto; }
  .legacy-fund .lf-give-card{ margin:0 20px; padding:56px 26px; }
  .legacy-fund .lf-timeline{ margin:0 22px; }
}
@media (max-width:900px){
  .legacy-fund .lf-progress-grid{ grid-template-columns:1fr; gap:36px; }
  .legacy-fund .lf-stat-cards{ grid-template-columns:1fr 1fr; }
  .legacy-fund .lf-pillars-grid{ grid-template-columns:1fr; }
}
@media (max-width:860px){
  .legacy-fund .lf-timeline-items{ grid-template-columns:1fr; gap:40px; }
  .legacy-fund .lf-timeline-track{ left:9px; top:0; bottom:0; right:auto; width:2px; height:auto; }
  .legacy-fund .lf-timeline-track-fill{ width:2px; height:calc(var(--p) * 1%); }
  .lf-js .legacy-fund:not(.lf-go) .lf-timeline-track-fill{ width:2px; height:8%; }
  .legacy-fund .lf-t-item{ padding-top:0; padding-left:34px; }
  .legacy-fund .lf-t-dot{ top:2px; }
}
@media (max-width:560px){
  .legacy-fund .lf-hero-actions .btn{ width:100%; justify-content:center; white-space:normal; text-align:center; }
  .legacy-fund .lf-give-actions .btn{ width:100%; justify-content:center; white-space:normal; text-align:center; }
  .legacy-fund .lf-stat-cards{ grid-template-columns:1fr; }
  .legacy-fund .lf-ring-wrap{ width:250px; height:250px; }
  .legacy-fund .lf-vision-section{ padding:100px 0; }
  .legacy-fund .lf-progress-section{ padding:80px 0 70px; }
}
