/* ============================================================
   WITHDRAW — product page styles.

   Built entirely on the shared design tokens + @font-face rules
   in styles.css (same recipe as footer.css and deposit.css): one
   64rem content column, Suisse Intl display type, hairline rules
   instead of cards, white as the only accent.

   The page reuses site elements directly from styles.css —
   navbar, .stats (baseline system), .products/.flow (the flow
   rail), .cta-connect — and adds only what is new here:
     · the product hero (copy left, live withdraw widget right)
     · the wallet marquee (deposit shows chains IN; withdraw
       shows the wallets & apps money goes OUT to)
     · the flow-rail visuals (payout burst · morphing-coin rail ·
       one-call terminal)
     · the compliance-engine pipeline (the rail's full-width
       finale — outbound stations)
     · the finale (closing couplet + email capture)
   ============================================================ */

/* ---------- Brand wordmark typeface (on the homepage this arrives
   via hero/_shared/widget.css; here we load just the two weights
   the wordmark needs, from the same bundled files) ---------- */
@font-face {
  font-family: "Open Sauce One";
  src: url("hero/_shared/assets/fonts/OpenSauceOne-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sauce One";
  src: url("hero/_shared/assets/fonts/OpenSauceOne-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   Product hero — the homepage hero's language (pill, Suisse title,
   two-tone subhead, email capture) recomposed as two columns:
   the message left, the REAL withdraw widget running on the right.
   ============================================================ */
.phero {
  position: relative;
  padding: 4rem 2.5rem 0;      /* no bottom pad — the next section's top owns the gap */
}
.phero-inner {
  max-width: 64rem;            /* the site grid */
  margin: 0 auto;
}
.phero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  column-gap: 4rem;
  align-items: center;
}
.phero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ---- announcement pill (same construction as the homepage hero:
   ring → fill, with a rotating shine) — here a quiet page badge ---- */
.hero-pill {
  position: relative;
  display: inline-flex;
  margin: 0 0 2.5rem;
  padding: 1px;                       /* the 1px ring */
  border-radius: 999px;
  background: #222;                   /* static ring base */
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
}
.hero-pill::before {                  /* a single bright arc travelling around the ring */
  content: "";
  position: absolute;
  inset: -120%;
  z-index: 0;
  background: conic-gradient(from 0deg, transparent 0 60%, rgba(255, 255, 255, 0.5) 78%, transparent 90% 100%);
  animation: hero-pill-spin 5s linear infinite;
}
.hero-pill_inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #191919;
}
.hero-pill_label { font-size: 15px; line-height: 1.5; color: #fff; }
@keyframes hero-pill-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .hero-pill::before { animation: none; } }

.phero-title {
  margin: 0;
  font-family: "Suisse Intl", Georgia, sans-serif;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--gray-12);
  text-wrap: balance;
}
.phero-sub {
  margin: 1.5rem 0 0;
  max-width: 30rem;
  color: var(--gray-10);
  font-size: clamp(1.0625rem, 1.1vw, 1.1875rem);
  line-height: 1.55;
}
.phero-sub .lead { color: #eee; }    /* bright lead clause — the homepage two-tone */

/* ---- the live widget (scenes/2-withdraw, contain-fit 420×540) ---- */
.phero-media {
  position: relative;
  width: 100%;
  height: 34rem;
}
.phero-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color-scheme: dark;
  pointer-events: none;        /* purely decorative — don't trap clicks/scroll */
}

/* ============================================================
   Wallet marquee — the homepage's token marquee, retuned to the
   WALLETS & APPS payouts land in (withdraw's proof point: to
   anywhere). Same seamless two-pass / translateX(-50%) loop,
   same edge mask. Wallet marks are square-ish, so they get a
   soft corner instead of the coins' full circle.
   ============================================================ */
.wallet-bar {
  margin-top: 5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.wallet-marquee_track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: wallet-scroll 40s linear infinite;
}
.wallet-bar:hover .wallet-marquee_track { animation-play-state: paused; }
.wallet-coin { flex: none; padding: 0 1.25rem; }   /* even gaps → seamless -50% loop */
.wallet-coin img {
  width: 26px; height: 26px;
  display: block;
  border-radius: 6px;
  filter: grayscale(1);              /* unified, muted set — not a rainbow of badges */
  opacity: 0.4;
  transition: opacity 0.2s var(--ease), filter 0.2s var(--ease);
}
.wallet-coin img:hover { filter: grayscale(0); opacity: 1; }
@keyframes wallet-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .wallet-marquee_track { animation: none; } }

/* ============================================================
   Flow-rail visuals — the three payout stories hang off the same
   .flow rail as the homepage products; each media slot here is a
   composed graphic (not an iframe), sized to the rail's rhythm.
   ============================================================ */
.pviz {
  position: relative;          /* paints above the .flow::before rail */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 21rem;           /* same visual rhythm as .flow-media */
}

/* ---- 1 · the payout burst: one Flashi at the center, payouts
   radiating OUT to wallets, each on its own chain. Everything is
   a DISC — on a radial layout only circles keep the gap between
   the core and every spoke identical, whatever the angle. ---- */
.burst {
  position: relative;
  width: 21rem;
  height: 21rem;
}
.burst-spoke {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  width: 9.5rem;               /* the radius */
  /* lift by half our own height BEFORE rotating, so the spoke's
     centerline passes through the container's true center — the
     same point the core disc is centered on — at every angle */
  transform: translateY(-50%) rotate(var(--a));
  transform-origin: left center;
}
.burst-line {
  position: relative;
  flex: 1;
  height: 1px;
  margin-left: 2.125rem;       /* uniform breathing off the round core… */
  margin-right: 0.375rem;      /* …and the same before the wallet disc */
  background-color: var(--border-strong);
}
.burst-dot {                   /* a payout leaving the core */
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  animation: burst-ride 3.2s linear infinite;
  animation-delay: var(--d);   /* spaced at loop/6 → the pulses sweep the hub */
}
@keyframes burst-ride {
  0%   { left: 0%;   opacity: 0; }
  12%  { opacity: 1; }
  86%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .burst-dot { animation: none; opacity: 0; } }
.burst-tile {                  /* a wallet disc, badged with its chain */
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--tile);
  box-shadow: inset 0 0 0 1px var(--border);
  transform: rotate(calc(-1 * var(--a)));   /* stay upright on a rotated spoke */
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.burst-spoke:hover .burst-tile { background-color: var(--card-hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.burst-tile img {
  filter: grayscale(1);
  opacity: 0.75;
  transition: opacity 0.2s var(--ease), filter 0.2s var(--ease);
}
.burst-spoke:hover .burst-tile img { filter: grayscale(0); opacity: 1; }
.burst-wallet { width: 1.375rem; height: 1.375rem; border-radius: 4px; }
.burst-badge {                 /* the chain, riding the wallet's shoulder */
  position: absolute;
  right: -0.125rem;
  bottom: -0.125rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  border: 2px solid var(--gray-1);   /* page-bg ring lifts it off the disc */
  background-color: var(--tile);
}
.burst-badge img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.burst-core {                  /* the center of gravity — drawn last, over the lines */
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--gray-2);
  box-shadow:
    inset 0 0 0 1px var(--border-strong),
    0 0 32px rgba(255, 255, 255, 0.08);
  transform: translate(-50%, -50%);
}
.burst-core svg { width: 1.75rem; height: 1.75rem; color: var(--white); }

/* ---- 2 · the conversion fan-out: ONE treasury currency, many
   recipients — each rail's coin leaves as USDC and crossfades
   into that wallet's preferred token before it lands. One source,
   a distribution bus, three destinations: the logic of
   "auto-converted to THEIR token" drawn literally. ---- */
.fan {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 26rem;
}
.fan-src {                     /* your treasury, one currency */
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.125rem;
  border-radius: 0.75rem;
  background-color: var(--tile);
  box-shadow: inset 0 0 0 1px var(--border);
}
.fan-src img { width: 1.5rem; height: 1.5rem; border-radius: 50%; }
.fan-src span {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gray-12);
}
.fan-stub {                    /* source → bus */
  flex: none;
  width: 1.125rem;
  height: 1px;
  background-color: var(--border-strong);
}
.fan-body {                    /* bus + the three recipient rails */
  position: relative;
  flex: 1;
}
.fan-bus {                     /* the vertical bus the rails branch from */
  position: absolute;
  left: 0;
  top: 1rem;                   /* ≈ first / last rail centers */
  bottom: 1rem;
  width: 1px;
  background-color: var(--border-strong);
}
.fan-rows {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.fan-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.fan-rail {
  position: relative;
  flex: 1;
  min-width: 2.5rem;
  height: 1px;
  background-color: var(--border-strong);
}
.fan-coin {                    /* a payout in flight — USDC out, their token in */
  position: absolute;
  top: 50%;
  left: 0;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--gray-1);   /* page-bg ring lifts it off the rail */
  transform: translate(-50%, -50%);
  animation: fan-ride 5.4s linear infinite;
  animation-delay: var(--d);
  opacity: 0;
}
.fan-coin img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.fan-coin .is-from { animation: fan-from 5.4s linear infinite; animation-delay: var(--d); }
.fan-coin .is-to   { opacity: 0; animation: fan-to 5.4s linear infinite; animation-delay: var(--d); }
@keyframes fan-ride {
  0%   { left: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }   /* fades into the wallet chip */
}
@keyframes fan-from {          /* the crossfade, mid-rail */
  0%, 44%  { opacity: 1; }
  56%, 100% { opacity: 0; }
}
@keyframes fan-to {
  0%, 44%  { opacity: 0; }
  56%, 100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .fan-coin { animation: none; opacity: 0; } }
.fan-chip {                    /* a recipient: their token, their address format */
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  background-color: var(--tile);
  box-shadow: inset 0 0 0 1px var(--border);
}
.fan-chip img { width: 1rem; height: 1rem; border-radius: 50%; }
.fan-chip code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--gray-10);
}

/* ---- 3 · the one-call terminal: a payout is one request ---- */
.term {
  width: 100%;
  max-width: 24rem;
  border-radius: 0.875rem;
  background-color: var(--gray-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px var(--border),
    0 28px 80px -26px rgba(0, 0, 0, 0.85),
    0 8px 22px -14px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border);
}
.term-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--alpha-6); }
.term-url {
  margin-left: 0.5rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--alpha-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  color: var(--gray-10);
}
.term-body {
  padding: 1rem 1.125rem 1.125rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78125rem;
  line-height: 1.8;
}
.term-line { display: block; color: var(--gray-10); white-space: pre; }
.term-method { color: var(--gray-12); font-weight: 600; }
.term-key { color: var(--gray-10); }
.term-val { color: #e8e8e8; }
.term-resp {                   /* the answer, pulsing in on a loop */
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--gray-10);
  animation: term-resp 5.6s linear infinite;
}
.term-resp .term-check {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
}
.term-resp .term-check svg { width: 0.625rem; height: 0.625rem; }
.term-resp b { color: var(--gray-12); font-weight: 600; }
@keyframes term-resp {
  0%, 32%  { opacity: 0; transform: translateY(3px); }
  42%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(3px); }
}
@media (prefers-reduced-motion: reduce) { .term-resp { animation: none; opacity: 1; transform: none; } }

/* ============================================================
   Compliance engine — the rail's full-width finale (the slot the
   homepage gives Orchestration). The outbound pipeline: a payout
   is requested, screened, signed and paid before it leaves. Four
   stations, one travelling pulse — no cards.
   ============================================================ */
.comp {
  --comp-mid: 1.625rem;        /* half the station tile — the rail's y */
  padding: 1.5rem 0 0.5rem;
}
.comp-stages {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-items: center;
}
.comp-stages::before {         /* the rail, threading the station centers */
  content: "";
  position: absolute;
  top: var(--comp-mid);
  left: 12.5%;                 /* first / last column centers */
  right: 12.5%;
  height: 1px;
  background-color: var(--border-strong);
}
.comp-dot {                    /* the payout riding the pipeline */
  position: absolute;
  top: var(--comp-mid);
  left: 12.5%;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gray-12);
  box-shadow: 0 0 0 3px var(--gray-1);   /* page-bg ring seats it on the rail — crisp, no bloom */
  transform: translate(-50%, -50%);
  animation: comp-ride 6.4s linear infinite;
}
@keyframes comp-ride {
  0%   { left: 12.5%; opacity: 0; }
  6%   { opacity: 1; }
  90%  { left: 87.5%; opacity: 1; }
  100% { left: 87.5%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .comp-dot { animation: none; opacity: 0; } }
.comp-stage {                  /* stations paint over the rail + dot */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}
.comp-node {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.75rem;
  background-color: var(--tile);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--icon);
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.comp-stage:hover .comp-node { background-color: var(--card-hover); color: var(--white); }
.comp-node svg { width: 1.5rem; height: 1.5rem; display: block; }
.comp-label {
  font-size: 0.8125rem;
  color: var(--gray-10);
}

/* ============================================================
   Finale — the quiet close: the couplet and an email capture,
   nothing else (fun.xyz's closing register, in our type).
   ============================================================ */
.finale {
  background-color: var(--gray-1);
  padding: 0 2.5rem 7rem;
}
.finale-inner {
  max-width: 64rem;
  margin: 0 auto;
}
.finale-statement {
  margin: 0;
  font-family: "Suisse Intl", Georgia, sans-serif;
  font-size: clamp(2.5rem, 4.8vw, 3.75rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--gray-12);
  text-wrap: balance;
}
.finale-statement_line { display: block; }
.finale .cta-connect { margin-top: 2.5rem; }

/* ============================================================
   Responsive — aligned to the site's existing breakpoints
   (1024 hero · 991 nav · 720 products · 600 small).
   ============================================================ */
@media (max-width: 1024px) {
  .phero { padding: 3.5rem 1.5rem 0; }
  .phero-grid {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }
  .phero-sub { max-width: 40rem; }
  .phero-media { height: 30rem; }
  .wallet-bar { margin-top: 4rem; }
  .finale { padding: 0 1.5rem 5rem; }
}
@media (max-width: 720px) {
  .pviz { min-height: 0; }
  /* the burst folds down but keeps its shape */
  .burst { width: 16.5rem; height: 16.5rem; }
  .burst-spoke { width: 7.5rem; }
  .burst-line { margin-left: 1.625rem; }
  .burst-tile { width: 2.25rem; height: 2.25rem; border-radius: 0.625rem; }
  .burst-tile img { width: 1.125rem; height: 1.125rem; }
  .burst-core { width: 3rem; height: 3rem; border-radius: 0.75rem; }
  .burst-core svg { width: 1.5rem; height: 1.5rem; }
  .comp { --comp-mid: 1.375rem; }
  .comp-node { width: 2.75rem; height: 2.75rem; border-radius: 0.625rem; }
  .comp-node svg { width: 1.25rem; height: 1.25rem; }
  .comp-label { font-size: 0.75rem; }
}
@media (max-width: 600px) {
  .phero { padding: 2.75rem 1.25rem 0; }
  .phero-media { height: 26rem; }
}
