/* ============================================================================
   exotic — managed baskets · css/landing/funds.css
   "Trade like a hedge fund." One centered hand of six cards (five launch
   theses + Start your own): avatar, name, one-liner, the one-click invest.
   Click a card and it takes the LEFT of the stage while the rest tuck into
   a tight stack below it (Interface Craft "Separation of Concerns" pattern);
   the right side becomes the fund's living book — story-kit weight rows
   scrubbed through a small growth-chart timeline. Choreography + data live in funds.js;
   CSS owns the spring, the panel shell and the slot positioner.
   ========================================================================== */
#funds{ margin:clamp(56px,8vw,110px) auto 0;
  /* the app token set (--surface/--hairline/--crisp/--font-display) is global
     now — css/tokens/colors.css owns both vocabularies (round-2 audit, D01), so
     the old per-section aliases here are gone (they would cycle against the
     canonical --line:var(--hairline) aliases). */ }
#funds .lt-board-head{ margin-bottom:12px; }
.fd-sub{ margin:0; max-width:58ch; font-size:clamp(14.5px,1.5vw,16.5px); line-height:1.55;
  color:var(--ink-2); text-wrap:pretty; }
/* one spring for every stage move — slight overshoot, then settle */
.fd-fan{ position:relative; margin-top:clamp(26px,3.6vw,40px); min-height:clamp(430px,50vw,540px);
  --fd-spring:linear(0, 0.0473 3.8%, 0.1601 7.7%, 0.3035 11.5%, 0.4532 15.4%, 0.5937 19.2%,
    0.7162 23.1%, 0.8169 26.9%, 0.8951 30.8%, 0.9527 34.6%, 0.9925 38.5%, 1.0177 42.3%,
    1.0318 46.2%, 1.0377 50%, 1.038 53.8%, 1.0349 57.7%, 1.0299 61.5%, 1.0242 65.4%,
    1.0186 69.2%, 1.0134 73.1%, 1.0091 76.9%, 1.0056 80.8%, 1.003 84.6%, 1.0011 88.5%,
    0.9998 92.3%, 0.999 96.2%, 0.9986 100%); }

.fund-card{ position:absolute; left:50%; top:50%; width:clamp(206px,22vw,250px); height:clamp(318px,35vw,368px);
  background:color-mix(in oklab, var(--card) 58%, transparent);
  backdrop-filter:blur(12px) saturate(1.15); -webkit-backdrop-filter:blur(12px) saturate(1.15);
  border:1px solid var(--line); border-radius:18px; padding:18px 18px 16px;
  display:flex; flex-direction:column; transform-origin:50% 60%; cursor:pointer;
  transform:translate(-50%,-50%) translate(var(--tx,0px), calc(var(--ty,0px) + var(--hty,0px))) rotate(var(--rot,0deg)) scale(calc(var(--sc,1) * var(--hsc,1)));
  box-shadow:var(--elev-2);
  transition:transform .62s var(--fd-spring,cubic-bezier(.16,1,.3,1)), opacity .45s, box-shadow .4s, background .4s; }
.fund-card.focused{ background:var(--card); box-shadow:var(--elev-3); }
/* lying loosely on the table — hovering an unstaged card lifts + grows it a touch */
.fund-card:not(.focused):hover{ --hty:-8px; --hsc:1.03; opacity:1 !important; }

.fund-card .fc-top{ display:flex; align-items:center; justify-content:space-between; }
.fund-card .fc-idx{ font-family:var(--font-num); font-size:11px; letter-spacing:.18em; color:var(--muted); }
.fund-card .fc-ret{ font-family:var(--font-num); font-size:13px; font-weight:600; }
.fund-card .fc-ret.up{ color:var(--up); }
.fund-card .fc-art{ flex:1; display:grid; place-items:center; margin:10px 0 8px; min-height:96px; }
/* fetched avatar in a gradient ring */
.fc-ava{ width:clamp(86px,9vw,104px); aspect-ratio:1/1; border-radius:50%; padding:3px;
  background:var(--grad); display:block; }
.fc-ava img{ width:100%; height:100%; border-radius:50%; object-fit:cover; display:block;
  border:3px solid var(--card); background:var(--paper-2); }
.fc-ava b{ width:100%; height:100%; border-radius:50%; border:3px solid var(--card); background:var(--paper-2);
  display:grid; place-items:center; font-family:var(--font-num); font-size:24px; font-weight:600;
  color:var(--ink-2); }
/* the "start your own" card — dashed, with a quiet plus */
.fund-card.create{ border-style:dashed; }
.fc-ava.add{ background:none; padding:0; border:2px dashed color-mix(in oklab,var(--ink),transparent 72%);
  display:grid; place-items:center; }
.fc-ava.add b{ width:auto; height:auto; border:0; background:none; font-size:32px; font-weight:500;
  color:var(--muted); transition:transform var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.fund-card.create:hover .fc-ava.add b{ transform:rotate(90deg); color:var(--ink); }
.fund-card h3{ margin:0; font-size:17.5px; font-weight:600; letter-spacing:-.02em; line-height:1.15; }
.fund-card p{ margin:7px 0 0; font-size:12.5px; line-height:1.45; color:var(--ink-2);
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* the one click — quiet product voice (ink on paper, hairline); the gradient
   fill is retired: on this brand the ramp is light, never a button surface */
.fc-invest{ position:relative; margin-top:13px; width:100%; display:inline-flex; align-items:center;
  justify-content:center; gap:8px; cursor:pointer; font-family:var(--font-sans); font-size:12.5px;
  font-weight:600; letter-spacing:-.005em; color:var(--ink);
  background:var(--card); border:1px solid var(--line); padding:11px 14px; border-radius:999px;
  transition:transform .15s, background .3s, border-color .15s; white-space:nowrap; }
.fc-invest:hover{ border-color:var(--ink); }
.fc-invest:hover{ transform:translateY(-1px); filter:brightness(1.04); }
.fc-invest:active{ transform:scale(.97); }
.fc-invest:disabled{ cursor:default; }
.fc-invest b{ font-weight:600; font-variant-numeric:tabular-nums; }
.fc-invest.ghost{ background:none; border:1px solid var(--line); color:var(--ink); }
.fc-invest.ghost:hover{ border-color:var(--ink); filter:none; }
@keyframes fdSpin{ to{ transform:rotate(1turn); } }
@keyframes fdPulse{ 0%{ box-shadow:0 0 0 0 oklch(0.99 0 0 / .5); } 70%{ box-shadow:0 0 0 7px oklch(0.99 0 0 / 0); } 100%{ box-shadow:0 0 0 0 oklch(0.99 0 0 / 0); } }


/* ============================================================================
   the book — right half of the stage while a fund is staged left. Story-kit
   .rw cards ride absolute .fd-slot positioners (the slot owns WHERE via a
   transform transition = the "move"; the .rw owns ARRIVING/LEAVING via its
   own .on entrance = the add/remove from talking-history). A small growth chart at the
   bottom is the scrubber for the same clock the autoplay advances.
   ========================================================================== */
.fd-dist{ position:absolute; left:calc(50% + clamp(20px,3.4vw,48px)); right:0; top:2px; bottom:0;
  display:flex; flex-direction:column; gap:8px; z-index:11;
  opacity:0; transform:translateX(18px); pointer-events:none;
  transition:opacity .45s var(--ease-out,ease), transform .62s var(--fd-spring,ease); }
.fd-dist.in{ opacity:1; transform:none; pointer-events:auto; }
.fd-dist-head{ flex:0 0 auto; display:flex; align-items:baseline; justify-content:space-between;
  gap:12px; width:100%; max-width:440px; margin:0 auto; padding:0 6px;
  font-family:var(--font-num); font-size:10.5px;
  letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.fd-dist-head b{ font-weight:500; letter-spacing:.08em; }
/* a transient extra row (a rebalance handoff) melts out at the bottom edge
   instead of clipping hard — same fade idiom as the phone row */
.fd-dist-rows{ flex:1 1 auto; min-height:0;
  mask-image:linear-gradient(180deg, #000 calc(100% - 30px), transparent 100%);
  -webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 30px), transparent 100%); }
/* the slot owns position only — its transform transition is the reorder move */
.fd-slot{ position:absolute; left:0; right:0; top:0; transition:transform .5s var(--ease-emph,ease); }
.fd-dist .rw{ margin:0 auto; }
.fd-dist-foot{ flex:0 0 auto; }
/* the timeline IS the growth chart — a small sparkline of the book's year,
   lit up to a hairline playhead you can grab anywhere (clip wipe, not dash;
   the meridian ramp runs inside the line only). Dates ride below, .xd-style */
.fd-tl{ position:relative; flex:0 0 auto; width:100%; max-width:440px; margin:2px auto 0;
  cursor:ew-resize; touch-action:none; user-select:none; -webkit-user-select:none; }
.fd-tl .cv{ position:relative; height:36px; }
.fd-tl svg{ position:absolute; inset:0; width:100%; height:100%; display:block; overflow:visible; }
.fd-tl .dim{ fill:none; stroke:var(--line); stroke-width:1.4; opacity:.55; vector-effect:non-scaling-stroke; }
.fd-tl .lit{ fill:none; stroke:url(#fdTlRamp); stroke-width:2; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.fd-tl .ph{ position:absolute; top:0; bottom:0; width:1px; margin-left:-.5px;
  background:color-mix(in oklab, var(--ink), transparent 72%); }
.fd-tl .ph i{ position:absolute; left:50%; width:7px; height:7px; margin:-3.5px 0 0 -3.5px;
  border-radius:50%; background:var(--ink); border:1.5px solid var(--card); }
.fd-tl .xd{ display:flex; justify-content:space-between; margin-top:5px; padding:0 2px;
  font-family:var(--font-num); font-size:10px; letter-spacing:.06em; color:var(--muted); }
.fd-tl .xd .r{ font-variant-numeric:tabular-nums; }
.fd-tl .xd .r.up{ color:var(--up); } .fd-tl .xd .r.down{ color:var(--down); }
/* keyboard hand on the same clock — the visual is presentation, not semantics */
.fd-tl .rng{ position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.fd-tl:hover .ph, .fd-tl.scrubbing .ph{ background:color-mix(in oklab, var(--ink), transparent 45%); }
/* the builder story (create card) — same shell, three-move step chips and
   flow rows; the weight wipe rides a width transition on the same bar */
.fd-make-rows{ flex:1 1 auto; min-height:0; }
/* .fd-dist .rw zeroes margins for the slot-positioned book — the make card
   flows normally, so it takes the story-kit 3px back (rows were touching) */
.fd-make .rw{ margin:3px auto; }
.fd-make .steps{ letter-spacing:.1em; }
.fd-make .steps i{ font-style:normal; opacity:.4; transition:opacity .35s, color .35s; }
.fd-make .steps i.on{ opacity:1; color:var(--ink); }
.fd-make .rw .wb i{ transition:transform .6s var(--ease-out,ease) .2s, width .7s var(--ease-out,ease); }

/* the ghost footnote is chrome — space goes to the names first */
@media (max-width:1150px){ .fd-dist-foot{ display:none; } }
@media (max-width:720px){ .fd-dist{ display:none; } }

@media (prefers-reduced-motion:reduce){
  .fund-card{ transition-duration:.15s; }
  .fd-slot{ transition:none; }
  .fd-dist{ transform:none; transition:opacity .2s ease; }
}

/* ============================================================================
   responsive — phones/tablets. The overlapping fan can't fit five readable
   cards below 720px: it flattens into a scroll-snap row of upright cards
   (js/landing/funds.js stops posing/dimming and auto-dealing in this range). Desktop
   above 720px keeps the original fan untouched.
   ========================================================================== */
@media (max-width:720px){
  .fd-fan{ display:flex; gap:12px; min-height:0; margin-top:clamp(18px,3vw,28px);
    padding:8px 6px 26px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-inline:18px;
    scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .fd-fan::-webkit-scrollbar{ display:none; }
  .fund-card{ position:static; flex:0 0 auto; width:min(76vw,250px); height:auto; min-height:300px;
    transform:none; opacity:1 !important; cursor:default; scroll-snap-align:center;
    background:var(--card); backdrop-filter:none; -webkit-backdrop-filter:none; }
  /* soft edges — the row melts out at both sides instead of cutting hard
     (same fade idiom as .mkt-scroll; masked backdrop-blur seams read broken) */
  .fd-fan{ mask-image:linear-gradient(90deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
    -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%); }
  /* position dots — five cards, you're on this one; tap to jump */
  .fd-dots{ display:flex; justify-content:center; gap:4px; margin:-8px 0 2px; }
  .fd-dots button{ width:22px; height:22px; padding:0; border:0; background:none; cursor:pointer;
    display:grid; place-items:center; }
  .fd-dots button::after{ content:""; width:6.5px; height:6.5px; border-radius:50%;
    background:color-mix(in oklab, var(--ink), transparent 80%);
    transition:background .25s, transform .25s; }
  .fd-dots button.on::after{ background:var(--acc); transform:scale(1.35); }
}
/* the dots are carousel chrome — they only exist while the row scrolls */
@media (min-width:720.1px){
  .fd-dots{ display:none; }
}
/* touch — comfortable tap targets (fine pointers / desktop unaffected) */
@media (pointer:coarse){
  .fc-invest{ min-height:44px; }
}

/* per-card return basis tag (+24.7% · 1y) */
.fund-card .fc-ret i{ font-style:normal; font-weight:500; opacity:.6; margin-left:3px; }
