/* Rolling Fun — home: rolling opening + hero.
   The opening is a grid of rolling squares: split-flap tiles flip through every quarter the
   fund has invested in, and its logos, while the page really loads. They fold into the centre
   square, which opens as a window (the partners, then the mark) and wipes open onto the hero;
   the mark flies home to the nav. The hero's signature is the mark itself, rendered as an
   8×8 ordered dither on a dot matrix inside a quiet dial, stepping round like an instrument. */

/* ==========================================================================
   Opening (html.is-intro, first visit per session)
   ========================================================================== */

.intro,
.intro__fly { display: none; }

html.is-intro { overflow: hidden; }
.is-intro .intro {
  --tile: 76px;
  --gap: 10px;
  display: block;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  overflow: hidden;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
  -webkit-user-select: none;
  user-select: none;
}
@media (max-width: 640px) { .is-intro .intro { --tile: 64px; --gap: 10px; } }

/* Film grain: a static noise plate nudged in hard steps. */
.intro__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.075;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: rf-grain 0.9s steps(5) infinite;
}
@keyframes rf-grain {
  0% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-3%, 2%, 0); }
  40% { transform: translate3d(2%, -4%, 0); }
  60% { transform: translate3d(-4%, -1%, 0); }
  80% { transform: translate3d(3%, 3%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* The squares. The centre one holds the mark (the flying element sits over it). */
.intro__grid {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), var(--tile));
  grid-auto-rows: var(--tile);
  gap: var(--gap);
  transform: translate(-50%, -50%);
}
.itile { position: relative; perspective: 700px; }
.itile__card {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s var(--ease-io);
  will-change: transform;
}
.itile--c { border-radius: 14px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.itile__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.itile__face--b { transform: rotateX(180deg); }
.itile__q {
  display: none;
  font-size: 15px;
  font-weight: 450;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.itile__face img {
  display: none;
  width: 78%;
  height: 78%;
  object-fit: contain;
  border-radius: 8px;
  filter: grayscale(1) contrast(1.08);
  opacity: 0.9;
}
.itile__face.is-q .itile__q,
.itile__face.is-logo img { display: block; }
.motion .itile { animation: rf-tile-in 0.7s var(--ease) both; animation-delay: calc(var(--ring, 0) * 70ms); }
@keyframes rf-tile-in { from { opacity: 0; transform: scale(0.86); } }

/* The window: the centre square opening onto real images, then the page. */
.intro__win {
  position: absolute;
  inset: 0;
  z-index: 2;
  visibility: hidden;
  background: var(--bg-2);
  clip-path: inset(50% 50% 50% 50% round 14px);
}
.intro__win.is-on { visibility: visible; }
.intro__layer {
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
}
.intro__layer.is-on { opacity: 1; }
.intro__field {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle, rgba(237, 235, 228, 0.15) 1px, transparent 1.6px) 50% 50% / 8px 8px;
}
.intro__win.is-mark { background: var(--bg); }
.intro__win.is-mark .intro__field { opacity: 1; }

/* Bottom: a progress hairline driven by real loading, and the ledger totals counting up. */
.intro__base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(26px, env(safe-area-inset-bottom));
  z-index: 3;
}
.intro__line { position: relative; height: 1px; background: var(--line); overflow: hidden; }
.intro__line i {
  position: absolute;
  inset: 0;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.intro__figs {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
.intro__num { color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.intro__lbl { color: var(--muted); }
.motion .intro__base { animation: rf-fade 0.8s ease 0.25s both; }
@keyframes rf-fade { from { opacity: 0; } }

/* The mark: sits on the centre square, turns in quarter steps, then flies to the nav. */
.is-intro .intro__fly {
  display: block;
  position: fixed;
  z-index: 95;
  left: 50%;
  top: 50%;
  width: var(--fly, 150px);
  margin: calc(var(--fly, 150px) * -0.476) 0 0 calc(var(--fly, 150px) * -0.5);
  pointer-events: none;
}
@media (max-width: 640px) { .is-intro .intro__fly { --fly: 120px; } }
.intro__size {
  display: block;
  transform: scale(var(--s, 0.27));
  transition: opacity 0.2s ease;
}
.intro__fly.is-big .intro__size { --s: 1; }
.intro__fly.is-hid .intro__size { opacity: 0; }
.intro__spin {
  display: block;
  transform-origin: 52.44% 50%; /* the ring's true centre inside the logo file */
  transition: transform 0.36s cubic-bezier(0.7, 0, 0.18, 1);
  will-change: transform;
}
.intro__fly .mark { display: block; width: 100%; color: var(--ink); }
.motion .intro__fly .mark { animation: rf-intro-in 0.9s var(--ease) both; }
@keyframes rf-intro-in {
  from { opacity: 0; transform: scale(0.9); }
}

/* Hand-over: the curtain dissolves onto the hero as the window finishes opening. */
.is-opening .intro {
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.is-opening.is-quick .intro { transition-duration: 0.4s; }

/* The nav waits under the curtain, then fades in beneath the landing mark. */
.is-intro .nav { opacity: 0; transition: opacity 0.9s ease; }
.is-intro.nav-in .nav { opacity: 1; }
.is-intro .nav .nav__brand .mark { opacity: 0; }
.is-intro.is-landed .nav .nav__brand .mark { opacity: 1; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--nav-h);
  overflow: hidden;
}
@supports (overflow: clip) { .hero { overflow: clip; } }

.hero__main {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: center;
  padding-top: clamp(24px, 4vh, 60px);
  padding-bottom: clamp(24px, 4vh, 60px);
}
.hero__copy { grid-column: 1 / span 7; grid-row: 1; position: relative; z-index: 1; }
.hero__title {
  margin-top: clamp(22px, 2.4vw, 34px);
  font-size: clamp(44px, 6.05vw, 102px);
  max-width: 11.6em;
}
.hero__lede { margin-top: clamp(22px, 2.4vw, 34px); color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 3vw, 44px); }

/* Detail entrances follow the headline (driven by the hero, not by scroll position,
   so the ledger and ticker at the very bottom of the viewport still arrive). */
.motion .hero [data-in] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 0.8s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.motion .hero.is-entered [data-in] { opacity: 1; transform: none; }
/* The label rises first, then the headline follows it out of its masks. */
.motion .hero__title .w__i { transition-delay: calc(0.12s + var(--i, 0) * 0.03s); }

/* The instrument */
.hero__fig {
  grid-column: 8 / -1;
  grid-row: 1;
  justify-self: end;
  position: relative;
  width: min(100%, calc(100svh - 360px), 660px);
  min-width: 300px;
  margin: 0;
  will-change: transform;
}
.hero__stage { position: relative; aspect-ratio: 1; }
.hero__dial,
.hero__dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__dial { overflow: visible; }
.hero__dial .t { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero__dial .t--minor { stroke: var(--line); }
.hero__dial .t--index { stroke: var(--ink); }
.hero__dial .c { fill: none; stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero__dial .x { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.motion .hero__dial { opacity: 0; transition: opacity 1.2s var(--ease) 0.2s; }
.motion .hero__fig.is-on .hero__dial { opacity: 1; }
.hero__fallback { display: none; position: absolute; left: 50%; top: 50%; width: 62%; transform: translate(-50%, -50%); color: var(--ink); }
.hero__fig.is-fallback .hero__fallback,
html:not(.js) .hero__fallback { display: block; }
/* Caption sits in the stage's empty lower corners, outside the dial. */
.hero__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 0 22px;
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--muted);
}
.hero__cap > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.hero__fig { container-type: inline-size; }
@container (max-width: 470px) { .hero__capx { display: none; } }
.hero__theta { display: inline-block; width: 10ch; text-align: right; contain: layout paint; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.motion .hero__cap { opacity: 0; transition: opacity 1s var(--ease) 0.6s; }
.motion .hero__fig.is-on .hero__cap { opacity: 1; }

/* The ledger row */
.hero__base { position: relative; z-index: 1; }
.hero__index { position: relative; margin-bottom: clamp(16px, 2vw, 22px); border-top-color: transparent; }
.hero__rule { position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--line); pointer-events: none; }
.motion .hero__index .hero__rule { transition-delay: 0.45s; }
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr);
  column-gap: var(--gap);
  row-gap: 22px;
  padding-bottom: clamp(20px, 2.8vh, 30px);
}
.hero__stats dd {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.hero__arrow { color: var(--dim); }

/* The ticker: the latest real investments, slowly, pausable. */
.ticker { position: relative; z-index: 1; border-top: 1px solid var(--line); }
.ticker__bar { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); height: 52px; }
.ticker__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  min-width: 64px;
  height: 44px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
@media (hover: hover) { .ticker__toggle:hover { color: var(--ink); } }
.ticker__icon {
  position: relative;
  width: 8px;
  height: 9px;
  box-shadow: inset 2px 0 0 currentColor, inset -2px 0 0 currentColor;
}
.ticker.is-paused .ticker__icon {
  box-shadow: none;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.ticker__view {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.ticker__track { display: flex; width: max-content; }
.ticker__list { display: flex; }
.ticker__list li {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 28px 0 0;
  margin-right: 28px;
  white-space: nowrap;
  font-size: 13.5px;
  line-height: 1.3;
}
.ticker__list li::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 3px;
  height: 3px;
  margin-top: -1px;
  background: var(--dim);
}
.ticker__q { font-family: var(--sans); font-size: 13.5px; font-variant-numeric: tabular-nums lining-nums; color: var(--muted); }
.ticker__list b { font-weight: 500; color: var(--ink); }
.ticker__d { color: var(--muted); }
.ticker__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
@media (hover: hover) { .ticker__all:hover { color: var(--ink); } }

.ticker.is-live .ticker__track { animation: rf-tick var(--dur, 90s) linear infinite; }
.ticker.is-paused .ticker__track,
.ticker.is-off .ticker__track { animation-play-state: paused; }
@media (hover: hover) { .ticker.is-live .ticker__view:hover .ticker__track { animation-play-state: paused; } }
@keyframes rf-tick { to { transform: translate3d(-50%, 0, 0); } }
/* Without motion the list simply scrolls sideways. */
html:not(.motion) .ticker__toggle { display: none; }
html:not(.motion) .ticker__view {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
html:not(.motion) .ticker__view::-webkit-scrollbar { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) and (min-width: 901px) {
  .hero__title { font-size: clamp(44px, 5.4vw, 102px); }
  .hero__fig { min-width: 0; }
}
/* Short laptop screens: keep the ledger and ticker on the first screen. */
@media (min-width: 901px) and (max-height: 800px) {
  .hero__main { padding-top: 16px; padding-bottom: 16px; }
  .hero__title { font-size: clamp(44px, min(6.05vw, 9.4vh), 102px); }
  .hero__title, .hero__lede { margin-top: 18px; }
  .hero__actions { margin-top: 24px; }
  .hero__index { margin-bottom: 12px; }
  .hero__stats { padding-bottom: 16px; }
}
@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero__main { grid-template-columns: minmax(0, 1fr); padding-top: clamp(40px, 9vw, 72px); padding-bottom: 8px; }
  .hero__copy { grid-column: 1; }
  .hero__fig {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: min(100%, 480px);
    min-width: 0;
    margin-top: clamp(40px, 9vw, 72px);
  }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__stats > div:last-child { grid-column: 1 / -1; }
  .hero__base { margin-top: clamp(40px, 8vw, 64px); }
  .hero__cap { position: static; margin-top: 12px; padding: 0; }
}
@media (max-width: 560px) {
  
  .ticker__all { display: none; }
}
@media (max-width: 440px) {
  .hero__actions { display: grid; grid-template-columns: minmax(0, 1fr); }
}
