/* Financial Testament – "The torn page": the homepage hero becomes a pinned, scroll-driven
   journey. Welcome first, then the burgundy page tears open, a paper roll travels along the
   tear, and each category's picture shows through: P2P, Stocks & Bonds, Precious Metals, Crypto.
   Built by roads.js from the .ftr-data list; that list is the fallback for no-JS and reduced motion. */

/* ---------- fallback list (no JS / reduced motion) ---------- */
.ftr-data { background: var(--wine, #4a101a); color: var(--gilt, #d9c09a); padding: 56px 0 64px; }
.ftr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ftr-item a { display: block; height: 100%; padding: 22px 22px 20px; text-decoration: none; color: inherit; border: 1px solid var(--gilt-line, rgba(217, 192, 154, .35)); }
.ftr-item a:hover { background: rgba(217, 192, 154, .08); }
.ftr-num { display: block; font-family: var(--label); letter-spacing: .3em; font-size: .75rem; color: rgba(240, 223, 191, .6); }
.ftr-title { margin: 8px 0 10px; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .12em; line-height: 1.05; color: var(--gilt, #d9c09a); font-size: 1.6rem; }
.ftr-lead { margin: 0 0 16px; color: rgba(240, 223, 191, .8); font-size: .98rem; line-height: 1.55; }
.ftr-go { display: inline-flex; align-items: center; gap: 8px; font-family: var(--label); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--gilt, #d9c09a); }
[dir="rtl"] .ftr-title, [dir="rtl"] .ftr-num, [dir="rtl"] .ftr-go { letter-spacing: 0; }

/* ---------- the pinned journey ---------- */
.ftr { position: relative; height: calc(100svh + var(--n, 4) * 260svh); }
.ftr-on .ftr-data { display: none; }
.ftr > .hero.ftr-stage {
  position: sticky; top: 56px; height: calc(100svh - 56px); min-height: 0;
  padding: 0; overflow: hidden; display: grid; align-content: center;
  --bx: clamp(18px, 6vw, 110px); --by: 9%; --bh: clamp(170px, 40%, 430px); --rw: clamp(30px, 3.6vw, 58px);
}
.ftr-stage > .hero-grid { will-change: opacity, transform; }
/* the pinned stage must hold still: switch off the hero's own scroll parallax on the etching */
.ftr-stage .ft-hero-art { transform: scale(1.06) !important; }
.ftr-stage .ft-coins, .ftr-stage .ft-rosette { transition: opacity .4s; }
.ftr.is-away .ftr-stage .ft-coins, .ftr.is-away .ftr-stage .ft-rosette { opacity: 0; pointer-events: none; }
@media (max-width: 980px), (max-height: 760px) { .ftr-stage .feature-card { display: none; } }
@media (max-height: 760px) and (min-width: 621px) { .ftr-stage h1 { font-size: clamp(2.2rem, 7.2svh, 4.6rem); } .ftr-stage .lead { margin-bottom: 18px; } }
@media (max-width: 620px) {
  .ftr > .hero.ftr-stage { --bx: 16px; --by: 6%; --bh: 34%; --rw: 26px; }
  .ftr-stage h1 { font-size: clamp(2.1rem, 10.5vw, 3rem); }
  .ftr-stage .trust { display: none; }
}

/* ghost of the current picture, sunk into the burgundy wall */
.ftr-ghosts { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ftr-ghost { position: absolute; inset: -3%; background-size: cover; background-position: center; opacity: 0; filter: grayscale(1) sepia(1) saturate(2.2) hue-rotate(-28deg) brightness(.55) contrast(1.15); will-change: opacity; transform: translateZ(0); }

.ftr-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }

/* the tear */
.ftr-band { position: absolute; left: var(--bx); right: var(--bx); top: var(--by); height: var(--bh); }
.ftr-shot { position: absolute; left: 0; right: 0; top: -14px; bottom: -14px; overflow: hidden; visibility: hidden; will-change: transform; backface-visibility: hidden; }
.ftr-inner { position: absolute; left: 0; right: 0; top: 14px; bottom: 14px; will-change: transform; backface-visibility: hidden; }
.ftr-fiber { position: absolute; inset: -7px 0; background: #efe3d1 var(--noise, none); }
.ftr-pic { position: absolute; inset: 3px 6px; overflow: hidden; background: #2a160c; }
.ftr-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.1); filter: sepia(.32) saturate(.88) contrast(1.06) brightness(.94); will-change: transform; }
.ftr-pic::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 16px 22px -10px rgba(24, 4, 8, .8), inset 0 -12px 20px -10px rgba(24, 4, 8, .65);
  background: radial-gradient(120% 140% at 50% 50%, transparent 55%, rgba(30, 8, 6, .45)); }

/* the paper roll */
.ftr-roll {
  position: absolute; left: 0; top: calc(var(--by) - 14px); height: calc(var(--bh) + 28px); width: var(--rw);
  margin-left: calc(var(--rw) / -2); opacity: 0; will-change: transform, opacity;
  border-radius: calc(var(--rw) / 2) / 14px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 5px),
    linear-gradient(90deg, #3a0f16 0%, #7b434c 18%, #b98a91 36%, #d3aab0 44%, #9a6870 62%, #5c2630 84%, #33090f 100%);
  box-shadow: 10px 12px 26px rgba(20, 3, 7, .55), inset 0 0 0 1px rgba(239, 227, 209, .25);
}
.ftr-roll::before, .ftr-roll::after { content: ""; position: absolute; left: -1px; right: -1px; border-radius: 50%; }
.ftr-roll::before { top: -5px; height: 16px; background: linear-gradient(90deg, #8e5a62, #d9b6bb 45%, #8e5a62); border: 2px solid #efe3d1; }
.ftr-roll::after { bottom: -6px; height: calc(var(--rw) * .62);
  background: radial-gradient(ellipse at 52% 48%, #1d0408 0 22%, #6b3a42 23% 30%, #2a080e 31% 44%, #9a6870 45% 52%, #3a0f16 53% 70%, #8e5a62 71%);
  border: 2px solid #efe3d1; }

/* captions under the tear */
.ftr-caps { position: absolute; left: var(--bx); right: var(--bx); top: calc(var(--by) + var(--bh) + clamp(16px, 4.5svh, 52px)); bottom: 0; text-align: center; }
.ftr-cap { position: absolute; left: 0; right: 0; top: 0; display: block; text-decoration: none; color: var(--gilt); opacity: 0; visibility: hidden; pointer-events: auto; will-change: opacity, transform; }
.ftr-cap .ftr-num { color: rgba(240, 223, 191, .62); }
.ftr-cap .ftr-title { margin: 10px 0 12px; font-size: clamp(2rem, 5.4vw, 4.6rem); letter-spacing: .2em; padding-left: .2em; }
.ftr-cap .ftr-lead { max-width: 38em; margin: 0 auto 22px; font-size: clamp(.95rem, 1.25vw, 1.12rem); letter-spacing: .03em; }
.ftr-cap .ftr-go { padding: 11px 22px; border: 1px solid var(--gilt); transition: background .25s, color .25s; }
.ftr-cap:hover .ftr-go, .ftr-cap:focus-visible .ftr-go { background: var(--gilt); color: var(--wine); }
.ftr-cap:focus-visible { outline: none; }
.ftr-cap:focus-visible .ftr-go { outline: 2px solid var(--gilt-hi); outline-offset: 4px; }
[dir="rtl"] .ftr-cap .ftr-title { letter-spacing: 0; padding-left: 0; }
@media (max-width: 620px) {
  .ftr-cap .ftr-title { font-size: clamp(1.6rem, 8.6vw, 2.3rem); letter-spacing: .12em; }
  .ftr-cap .ftr-lead { font-size: .92rem; line-height: 1.5; margin-bottom: 16px; }
  .ftr-cap .ftr-go { padding: 9px 16px; font-size: .74rem; }
}
@media (max-height: 640px) { .ftr-cap .ftr-lead { display: none; } }

/* chapter rail */
.ftr-rail { position: absolute; z-index: 6; inset-inline-end: clamp(10px, 1.8vw, 26px); top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.ftr-rail button { position: relative; width: 30px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.ftr-rail button i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; translate: -50% -50%; border-radius: 50%; border: 1px solid var(--gilt); transition: background .3s, scale .3s; }
.ftr-rail button[aria-current="true"] i { background: var(--gilt); scale: 1.35; }
.ftr-rail button span { position: absolute; inset-inline-end: 100%; top: 50%; translate: 0 -50%; margin-inline-end: 6px; white-space: nowrap; font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; color: var(--gilt-hi); background: var(--wine-deep, #340a12); padding: 4px 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.ftr-rail button:hover span, .ftr-rail button:focus-visible span { opacity: 1; }
.ftr-rail button:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }
@media (max-width: 620px) {
  .ftr-rail { top: auto; bottom: 10px; inset-inline-end: 50%; translate: 50% 0; flex-direction: row; gap: 0; }
  [dir="rtl"] .ftr-rail { translate: -50% 0; }
  .ftr-rail button span { display: none; }
}

/* scroll hint */
.ftr-hint { position: absolute; z-index: 5; left: 50%; bottom: 3svh; translate: -50% 0; font-family: var(--label); font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(240, 223, 191, .6); pointer-events: none; transition: opacity .4s; }
.ftr-hint::after { content: ""; display: block; width: 1px; height: 26px; margin: 8px auto 0; background: linear-gradient(rgba(240, 223, 191, .6), transparent); animation: ftr-drip 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes ftr-drip { 0% { scale: 1 0; } 50% { scale: 1 1; } 100% { scale: 1 1; opacity: 0; } }
.ftr.is-away .ftr-hint { opacity: 0; }
@media (max-width: 620px) { .ftr-hint { display: none; } }

/* Safari keeps a sticky element steady only when no ancestor clips overflow.
   On the journey page, let html/body/main overflow normally and clip each section instead. */
html.ftr-on, html.ftr-on body, html.ftr-on main { overflow: visible; }
.ftr-on main > section { overflow-x: clip; }
.ftr-on .ft-old { display: none; }
.ftr-on main > .ft-calc { rotate: none !important; }