/* The plan cards and the benefit lists (app/plans.php plan_card(), plan_perks(), plan_both_row()). Loaded on every
   page by fix3_head(), so it stays small: only .f4p-* rules, nothing global.
   fix 5 2.4/2.5 (decided 12 Oct: the motion exactly as the reference): the CSS blocks "the plan card (shared)", the Pro
   block and the pause / reduced-motion rules of bonfium-fix5/reference/plan-cards.html, as is. Only the names change:
   the selectors are in the .f4p- namespace (.plan-wrap → .f4p-card, .plan → .f4p-plan, .art → .f4p-bg, …), the keyframes
   are prefixed f4p-, and the reference's --tx is --f4p-tx (an @property registration is page-wide). The real files
   replace the inlined images (plan-*.webp, the logo sprite, the 1:1 grain tile). The motion: assets/fix5/plans.js. */

/* ===================== the plan card (shared) ===================== */
/* the reference's --rx --ry --lift (the card), --px --py (the art) and --mx --my (the light), with the same defaults,
   registered as not inherited: plans.js sets each on the one layer that reads it, so a frame restyles three elements
   instead of the whole card (its logo's SVG copy included). The look is the same. */
@property --f4p-rx{syntax:'<angle>';inherits:false;initial-value:0deg}
@property --f4p-ry{syntax:'<angle>';inherits:false;initial-value:0deg}
@property --f4p-lift{syntax:'<length>';inherits:false;initial-value:0px}
@property --f4p-px{syntax:'<length>';inherits:false;initial-value:0px}
@property --f4p-py{syntax:'<length>';inherits:false;initial-value:0px}
@property --f4p-mx{syntax:'<percentage>';inherits:false;initial-value:50%}
@property --f4p-my{syntax:'<percentage>';inherits:false;initial-value:30%}
.f4p-card{position:relative;display:block;flex:none;width:var(--pc-w,330px);max-width:100%;perspective:1100px;container-type:inline-size;color:#fff}
.f4p-card--fluid{width:100%;max-width:var(--pc-w,330px)}
.f4p-plan{
  position:relative;display:block;aspect-ratio:1.586;border-radius:22px;overflow:hidden;isolation:isolate;background:#2E4A5E;
  transform:translateY(var(--f4p-lift)) rotateX(var(--f4p-rx)) rotateY(var(--f4p-ry));transform-style:preserve-3d;
  will-change:transform;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none;
  box-shadow:0 1px 0 rgba(255,255,255,.4) inset,0 30px 50px -28px rgba(14,20,23,.55),0 12px 24px -16px rgba(14,20,23,.35);
  transition:box-shadow .4s ease;
}
.f4p-plan .f4p-bg{will-change:transform}   /* the art moves against the tilt every frame: its own layer, never repainted */
.f4p-card--still .f4p-plan,.f4p-card--still .f4p-bg{will-change:auto}
.f4p-plan .f4p-bg{position:absolute;inset:-6%;width:112%;height:112%;max-width:none;object-fit:cover;z-index:0;pointer-events:none;-webkit-user-drag:none;
  transform:translate3d(var(--f4p-px),var(--f4p-py),0)}
/* the universal tile, 1 tile pixel per device pixel (app/visual.php sets --grain-src/--grain-size) */
.f4p-plan .f4p-grain{position:absolute;inset:0;z-index:1;background:var(--grain-src,url(/assets/grain/grain-256.png?v=1791197830)) repeat;
  background-size:var(--grain-size,128px) var(--grain-size,128px);mix-blend-mode:soft-light;pointer-events:none}
/* gloss 1: light that follows the pointer (or drifts by itself) */
.f4p-plan .f4p-spec{position:absolute;inset:0;z-index:3;pointer-events:none;mix-blend-mode:soft-light;
  background:radial-gradient(60% 75% at var(--f4p-mx) var(--f4p-my),rgba(255,255,255,.55),rgba(255,255,255,0) 60%)}
/* gloss 2: a soft sheen band that sweeps across now and then */
.f4p-plan .f4p-sweep{position:absolute;inset:-20%;z-index:3;pointer-events:none;
  background:linear-gradient(115deg,transparent 40%,rgba(255,255,255,.22) 48%,rgba(255,255,255,.06) 52%,transparent 60%);
  transform:translateX(-70%);animation:f4p-sweep 7s cubic-bezier(.45,0,.55,1) infinite}
@keyframes f4p-sweep{0%,62%{transform:translateX(-70%)}100%{transform:translateX(70%)}}
.f4p-plan .f4p-edge{position:absolute;inset:0;z-index:4;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 0 0 1px rgba(255,255,255,.14)}
/* the logo as the reference has it: 5% in, 4.5% down, 10.5% of the card's height high (= 13.83% of its width wide) */
/* fix 8 (private10 Rewards, You): the small tag top right, "Yours now" / "At 24 trades" */
.f4p-plan .f4p-corner{position:absolute;right:6.5%;top:7%;z-index:5;font:600 max(0.75rem,3.4cqw)/1.2 var(--text,'Instrument Sans'),system-ui,sans-serif;color:rgba(255,255,255,.82);pointer-events:none}
.f4p-plan .f4p-logo{position:absolute;left:5%;top:4.5%;height:10.5%;width:13.83%;aspect-ratio:470/225;z-index:5;color:#fff;overflow:visible;pointer-events:none}
/* the name: Standard and Pro the same, 10% of the card's width (the reference's calc(--w * .1); 10cqi is the same size
   before the script has run) */
.f4p-plan .f4p-name{position:absolute;left:6.7%;bottom:6%;z-index:5;margin:0;font-family:var(--display,'Outfit'),system-ui,sans-serif;font-weight:400;
  font-size:calc(var(--w,var(--pc-w,20.625rem)) * .1);font-size:10cqi;line-height:1;letter-spacing:-.035em;color:#fff;white-space:nowrap;
  display:inline-block;padding:0 .1em .04em 0}

/* ===================== Pro only: the special parts ===================== */
.f4p-card--pro .f4p-plan{background:#0E1215;box-shadow:0 1px 0 rgba(255,214,170,.35) inset,0 34px 60px -26px rgba(64,30,10,.6),0 14px 28px -16px rgba(14,20,23,.5)}
.f4p-card--pro .f4p-bg{opacity:.85;-webkit-mask-image:radial-gradient(130% 130% at 100% 100%,#000 15%,transparent 72%);mask-image:radial-gradient(130% 130% at 100% 100%,#000 15%,transparent 72%);
  animation:f4p-ember 14s ease-in-out infinite alternate}
@keyframes f4p-ember{0%{filter:brightness(.95) saturate(1)}100%{filter:brightness(1.18) saturate(1.15)}}
.f4p-card--pro .f4p-grain{opacity:.8}
.f4p-card--pro .f4p-edge{box-shadow:inset 0 1px 0 rgba(255,214,170,.35),inset 0 0 0 1px rgba(255,255,255,.08)}
/* brushed metal: very fine hairlines, like a metal card */
.f4p-plan .f4p-brushed{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:.5;mix-blend-mode:overlay;
  background:repeating-linear-gradient(90deg,rgba(255,255,255,.05) 0 1px,rgba(255,255,255,0) 1px 3px),
             repeating-linear-gradient(90deg,rgba(0,0,0,.06) 0 1px,rgba(0,0,0,0) 1px 5px)}
.f4p-card--pro .f4p-spec{mix-blend-mode:screen;background:radial-gradient(45% 60% at var(--f4p-mx) var(--f4p-my),rgba(255,200,150,.16),rgba(255,200,150,0) 65%)}
.f4p-card--pro .f4p-sweep{background:linear-gradient(115deg,transparent 40%,rgba(255,226,184,.20) 48%,rgba(255,226,184,.05) 52%,transparent 60%);animation-duration:9s}
/* a thin warm light that travels around the rim (SVG stroke, works in every browser) */
.f4p-plan .f4p-rim{position:absolute;inset:0;width:100%;height:100%;z-index:6;pointer-events:none;overflow:visible}
.f4p-rim rect{fill:none;stroke-linecap:round;animation:f4p-rim 6s linear infinite}
.f4p-rim .glow{stroke:rgba(255,190,120,.45);stroke-width:5;stroke-dasharray:10 90;filter:blur(3px)}
.f4p-rim .line{stroke:rgba(255,240,218,.95);stroke-width:1.4;stroke-dasharray:7 93}
@keyframes f4p-rim{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
/* the Pro wordmark: same size as Standard, with light passing through the letters */
.f4p-card--pro .f4p-name{
  background:
    linear-gradient(105deg,rgba(255,255,255,0) 40%,rgba(255,250,235,.95) 50%,rgba(255,255,255,0) 60%) var(--f4p-tx,-150%) 0/250% 100% no-repeat,
    linear-gradient(180deg,#FFE2B8 0%,#F2A65A 55%,#D9692A 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  animation:f4p-wordshine 5.5s cubic-bezier(.45,0,.55,1) infinite}
@property --f4p-tx{syntax:'<percentage>';inherits:false;initial-value:-150%}
@keyframes f4p-wordshine{0%,55%{--f4p-tx:-150%}100%{--f4p-tx:250%}}

/* paused off screen, still with reduced motion */
.f4p-plan.paused,.f4p-plan.paused *{animation-play-state:paused!important}
@media (prefers-reduced-motion:reduce){
  .f4p-plan,.f4p-plan *{animation:none!important;transition:none!important}
  .f4p-plan{transform:none!important}
  .f4p-plan .f4p-sweep{display:none}
}
/* a still card (plan_card(…, ['still' => true])): the reduced-motion look everywhere */
.f4p-card--still .f4p-plan,.f4p-card--still .f4p-plan *{animation:none!important;transition:none!important}
.f4p-card--still .f4p-sweep{display:none}
@media (forced-colors:active){.f4p-card--pro .f4p-name{background:none;color:CanvasText}}

/* ---------- the gradient "Pro" in running text: inline-block + right/bottom padding, so the "o" is never cut ---------- */
.f4p-pro{display:inline-block;padding:0 .1em .04em 0;background:linear-gradient(180deg,#FFE2B8,#F2A65A 55%,#D9692A);
  -webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
@media (forced-colors:active){.f4p-pro{background:none;color:CanvasText;-webkit-text-fill-color:CanvasText}}

/* ---------- benefit lists: Standard light with ink ticks, Pro dark with ember ticks; radius 28, padding 28 ---------- */
.f4p-tick{flex:none;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#E6EAEE;color:#0E1417}
.f4p-tick svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.f4p-perks{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.f4p-perks li{display:flex;align-items:flex-start;gap:14px;font:400 1rem/1.375rem var(--text,'Instrument Sans',system-ui,sans-serif)}
.f4p-perks li>.f4p-tick{margin-top:0}
.f4p-perks--standard li{color:#3B4750}
.f4p-perks--pro li{color:rgba(255,255,255,.88)}
.f4p-perks--pro .f4p-tick{background:rgba(242,166,90,.18);color:#F2A65A}
.f4p-panel{border-radius:28px;padding:28px}
.f4p-panel--standard{background:#F7F8FA;color:#0E1417}
.f4p-panel--pro{background:#14181B;color:#fff}

/* ---------- "On both plans" ---------- */
.f4p-both{display:flex;align-items:center;gap:20px 40px}
.f4p-both-h{flex:none;font:600 1rem/1.4 var(--text,'Instrument Sans',system-ui,sans-serif);color:#0E1417}
.f4p-both ul{display:flex;flex:1;flex-wrap:wrap;justify-content:space-between;gap:12px 28px;margin:0;padding:0;list-style:none}
.f4p-both li{display:flex;align-items:flex-start;gap:12px;font:400 1rem/1.375rem var(--text,'Instrument Sans',system-ui,sans-serif);color:#3B4750}
@media (max-width:900px){
  .f4p-both{flex-direction:column;align-items:flex-start;gap:14px}
  .f4p-both ul{flex-direction:column;gap:12px}
}

.f4p-vh{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* 22 Oct 2026 (Vilius: "make it one family"): the pass is a plan card (app/v5.php pass()): the person's name where the
   plan's name stands, the city and the @handle over it, the QR bottom right; flat at rest like every plan card (the pointer
   still tilts it). The old pass's own coat, scrim and edges are off. */
.v5-pass.f17-pass{background:none;box-shadow:none;border-radius:22px;overflow:visible}
.v5-pass.f17-pass::after{content:none}
.v5-pass.f17-pass>.f4p-card{width:100%;max-width:none}
.f4p-plan .f17-who{position:absolute;left:6.7%;right:30%;bottom:6%;z-index:5;display:flex;flex-direction:column;align-items:flex-start;min-width:0;pointer-events:none}
.f4p-plan .f17-sub{max-width:100%;font:500 max(0.6875rem,3.6cqi)/1.3 var(--text,'Instrument Sans'),system-ui,sans-serif;color:rgba(255,255,255,.86);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.f4p-plan .f17-sub:last-of-type{margin-bottom:.32em}
.f4p-plan .f4p-name.f17-nm{position:static;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.f4p-plan .f17-qr{position:absolute;right:5%;bottom:6.5%;z-index:5;width:19%;aspect-ratio:1;padding:2.2%;border-radius:12%;
  background:rgba(255,255,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.4),inset 0 0 0 1px rgba(255,255,255,.14);pointer-events:none}
.f4p-plan .f17-qr svg{display:block;width:100%;height:100%}
.f7a-passbox .v5-pass3d:has(.f17-pass),.f7p-pass .v5-pass3d:has(.f17-pass){transform:none;filter:none}
.f7a-passbox .v5-pass.f17-pass{box-shadow:none}
