/* home.css — index.html (v4, LOCK3 §Home). Layout only; the kit lives in nett.css.
   Mirrors the reference home: centred hero, a 2 + 3 bento of live previews, then
   Recent payments (2/3) beside Top recipients (1/3). */

/* ---- Hero: one statement on two lines, two grey lines, two pills, one quiet flow row ----
   The flow row names the rail (coins -> escrow -> nett -> desks -> X Money) so the hero reads
   as infrastructure, not a payment button. Its only motion is a faint glint on each link. */
.ha .nt-hero__title { max-width: 14em; margin-inline: auto; font-size: clamp(36px, 4vw, 56px); }
.ha .nt-hero__sub { max-width: 38em; }
.ha + * { margin-top: 56px; }
.ha-flow { --ha-s: 30px; display: flex; align-items: center; justify-content: center; margin: 36px auto 0; }
.ha-node { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 7px; border: 1px solid var(--nt-border); border-radius: 999px; background: var(--nt-surface); font-size: 14px; line-height: 1; color: var(--nt-text); white-space: nowrap; }
.ha-node .nt-lg, .ha-node .nt-coin { --s: var(--ha-s); }
.ha-node .nt-coin { --nt-coin-ring: var(--nt-surface); }
.ha-coins { display: inline-flex; }
/* Reserve the marks' room before nett.js swaps them in, so the row never shifts. */
.ha-coins:empty { width: var(--ha-s); height: var(--ha-s); }
.ha-mark { display: inline-block; flex: none; width: var(--ha-s); height: var(--ha-s); }
/* USDC on Solana: not live yet, its coin dimmed with the "Soon" tag, after a hairline. */
.ha-soon { display: inline-flex; align-items: center; gap: 8px; margin-left: 2px; padding-left: 12px; border-left: 1px solid var(--nt-border); }
.ha-link { position: relative; flex: none; width: 96px; height: 44px; overflow: hidden; }
.ha-link::before { content: ""; position: absolute; left: 0; right: 1px; top: 50%; height: 1px; background: rgba(255, 255, 255, 0.14); }
.ha-link__tip { position: absolute; right: 1px; top: 50%; width: 5px; height: 5px; margin-top: -2px; border-top: 1px solid rgba(255, 255, 255, 0.32); border-right: 1px solid rgba(255, 255, 255, 0.32); transform: rotate(45deg); transform-origin: 100% 0; }
.ha-link::after { content: ""; position: absolute; top: 50%; height: 1px; left: -40%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent); animation: ha-glint 3.2s cubic-bezier(.45, 0, .25, 1) infinite; }
.ha-link--2::after { animation-delay: 1.2s; }
@keyframes ha-glint { 0% { left: -40%; } 50%, 100% { left: 100%; } }
.ha-link__k { position: absolute; left: 0; right: 0; bottom: calc(50% + 7px); font-family: var(--nt-font-mono); font-size: 10px; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; color: var(--nt-muted); }
@media (min-width: 768px) { .ha-l2 { display: block; } }
@media (prefers-reduced-motion: reduce) { .ha-link::after { animation: none; display: none; } }

/* ---- Payments bento: a wall of token-card tiles that bleeds off both card edges ---------
   Five columns, ~4.5 visible: the first starts 40% off the left edge, the last is cropped by
   the right. No top fade (the card edge crops it); one smooth fade into the footer. */
.nt-bcard--wide:has(.hm-wall)::after { display: none; }
.hm-wall.nt-wall {
  --nt-wall-gap: 10px;
  position: absolute; top: 0; bottom: 0; left: -9%; width: 116%; height: auto; padding: 0; gap: var(--nt-wall-gap);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 45%, rgba(0, 0, 0, 0.55) 68%, rgba(0, 0, 0, 0.15) 82%, transparent calc(100% - 36px));
  mask-image: linear-gradient(to bottom, #000 0, #000 45%, rgba(0, 0, 0, 0.55) 68%, rgba(0, 0, 0, 0.15) 82%, transparent calc(100% - 36px));
}
.hm-wall .nt-wall__track, .hm-wall .nt-wall__group { gap: var(--nt-wall-gap); }
.hm-wall .nt-wall__col:nth-child(2n) .nt-wall__track { margin-top: -64px; }
.hm-wall .nt-wall__col:nth-child(3n) .nt-wall__track { margin-top: -28px; }
.hm-tile { padding: 6px 6px 10px; border-radius: 16px; background: #1B1B1B; }
.hm-tile__art { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; }
/* Light grain + a hairline, so the art reads as an image, not a placeholder. */
.hm-tile__art::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' 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 .55 0'/%3E%3C/filter%3E%3Crect width='96' height='96' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 96px 96px; mix-blend-mode: overlay; opacity: 0.35;
}
.hm-tile__time { position: absolute; top: 6px; right: 6px; z-index: 1; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--nt-r-pill); background: rgba(10, 10, 10, 0.72); font-size: 11px; font-weight: var(--nt-w-medium); color: var(--nt-text-strong); font-variant-numeric: tabular-nums; }
.hm-tile__pill { position: absolute; left: 6px; bottom: 6px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 12px); height: 26px; padding: 0 9px 0 3px; border-radius: var(--nt-r-pill); background: rgba(10, 10, 10, 0.72); font-size: 12px; font-weight: var(--nt-w-medium); color: var(--nt-text-strong); white-space: nowrap; }
.hm-tile__pill > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hm-tile__pill .nt-avatar { --nt-av-size: 20px; }
.hm-tile__amt { display: flex; align-items: baseline; gap: 5px; margin-top: 9px; padding: 0 4px; font-size: 14px; line-height: 1.2; font-weight: var(--nt-w-bold); color: var(--nt-text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-tile__amt > span { font-size: 11px; font-weight: var(--nt-w-regular); color: var(--nt-muted); }

/* ---- How it works bento: three flow rows, like the reference's "Fees ⇄ Recipient" --------- */
.hm-flow { padding: 12px 16px 0; }
/* Until home.js fills them, the payout and recipient lists hold their six rows. */
#hm-prows:empty, #hm-trows:empty { min-height: 560px; }
/* One quiet line names the three marks the rows use (logos README: the name beside the mark). */
.hm-flow__legend { margin: 0 2px 8px; font-size: 11px; line-height: 1.4; color: #8A8A8A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-flow__arrow { color: #5A5A5A; }
.hm-flow .nt-frows { gap: 6px; }
.hm-flow .nt-frow { min-height: 54px; padding-block: 6px; }

/* ---- Analytics bento: rolling total, sparkline pinned above the footer -------------- */
.hm-an__spark { position: absolute; left: 0; right: 0; bottom: 52px; --nt-spark-h: 84px; }
.hm-an__spark::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; border-top: 1px solid rgba(255, 255, 255, 0.05); }

/* ---- Pay bento: a mini payout setup ("TOKEN SETUP") --------------------------- */
.hm-pay { display: flex; flex-direction: column; align-items: flex-start; }
.hm-pay__who { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 14px; background: #0F0F0F; }
.hm-pay__name { display: flex; flex-direction: column; min-width: 0; font-size: 14px; line-height: 1.3; }
.hm-pay__name b { font-weight: var(--nt-w-bold); color: var(--nt-text-strong); }
.hm-pay__name span { font-size: 13px; color: var(--nt-muted); }
.hm-pay__amt { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 24px; line-height: 1.15; letter-spacing: -0.02em; font-weight: var(--nt-w-bold); color: var(--nt-text-strong); font-variant-numeric: tabular-nums; }
.hm-pay__unit { align-self: flex-end; margin: 0 0 2px -2px; font-size: 13px; letter-spacing: 0; font-weight: var(--nt-w-regular); color: var(--nt-muted); white-space: nowrap; }
.hm-pay .nt-field__ok { margin-top: 12px; font-size: 13px; }
.hm-pay__rails { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 16px; }
.hm-pay__rail { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 14px; background: #0F0F0F; font-size: 14px; font-weight: var(--nt-w-medium, 500); color: var(--nt-text-strong); white-space: nowrap; }
.hm-pay__to { margin-top: 14px; font-size: 13px; color: var(--nt-muted); }
/* Real mode with too little data: the real tiles without the scrolling wall, or a calm empty state. */
.hm-wall-static { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 20px; align-content: start; }
.hm-wall-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.hm-wall-empty > .nt-empty { min-height: 0; }
.hm-fsteps { list-style: none; margin: 14px 0 0; padding: 0; }
.hm-fstep { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 14px; line-height: 1.35; color: var(--nt-text-strong); }
.hm-fstep:first-child { border-top: 0; }
.hm-fstep__n { font-family: var(--nt-mono, "Geist Mono", monospace); font-size: 12px; color: var(--nt-muted); letter-spacing: 0.06em; }
.hm-an__note { margin-top: 6px; font-size: 13px; color: var(--nt-muted); }

/* ---- Desks bento: the top desk's profile card, trimmed to fit ------------------------- */
.hm-desk .nt-dcard { height: 100%; border: 0; border-radius: 0; background: transparent; }
.hm-desk .nt-dcard__banner { height: 96px; flex: none; }
.hm-desk .nt-dcard > .nt-avatar { top: 60px; left: 20px; --nt-av-size: 60px; box-shadow: 0 0 0 3px var(--nt-surface), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.hm-desk .nt-dcard__body { padding: 32px 20px 0; }
.hm-desk .nt-dcard__name { font-size: 17px; }
.hm-desk .nt-dcard__handle { font-size: 14px; }
.hm-desk .nt-dcard__chip, .hm-desk .nt-dcard__sub { display: none; }
.hm-desk .nt-dcard__stats { margin-top: 8px; }
.hm-desk .nt-dcard__stat { font-size: 14px; }
.hm-desk .nt-dcard__stat b { font-size: 15px; }

/* ---- Lists ---------------------------------------------------------------------------- */
.hm-lists { margin-top: 64px; }
/* Real mode: an intentional empty state in place of the rows (one quiet line, one action);
   Top recipients gets the same card beside it, so both columns read as one state. */
.hm-empty { list-style: none; }
.hm-empty > .nt-empty { min-height: 260px; }
.hm-note { padding-top: 4px; }
/* Beside the upgrade notice or a load error: one quiet line in the notice's row style. */
.hm-sidenote { margin-top: 4px; color: var(--nt-muted); }
/* Top recipients' head keeps its pager on the title's line (so both lists start at the same
   height); where the column is too narrow for all three, "via X Money" steps aside. */
.hm-top { container: hmtop / inline-size; }
.hm-lists .nt-section__head { flex-wrap: nowrap; }
.hm-lists .nt-section__title { white-space: nowrap; }
/* One column (below 1024px) has no second list to line up with: a head too narrow for the title,
   the "Demo data" chip and the pager (390px in demo mode) lets the pager drop to a second line. */
@media (max-width: 1023px) {
  .hm-lists .nt-section__head { flex-wrap: wrap; }
}
@container hmtop (max-width: 420px) {
  .nt-section__head:has(> .nt-section__end:not([hidden])) > .nt-section__via { display: none; }
}

/* "Example": a bento preview that is illustrative, not the network's own data (real mode only). */
.hm-ex { margin-left: 8px; vertical-align: 1px; }
/* "Demo data" chip beside the list title (demo mode only; nett.data fills it). */
.hm-demochip { display: inline-flex; }

@media (max-width: 767px) {
  /* Hero on phones: the title and sub wrap naturally; the flow row keeps its marks and drops
     the mono labels and the nett name so it fits a 360px screen. */
  .ha-br { display: none; }
  .ha + * { margin-top: 48px; }
  .ha-flow { --ha-s: 26px; margin-top: 32px; }
  .ha-node { height: 38px; gap: 8px; padding: 0 12px 0 5px; font-size: 13px; }
  .ha-node--nett { padding: 0 5px; }
  .ha-node--nett .ha-node__name { display: none; }
  /* Phones: the live rail only (USDG); "USDC on Solana soon" is in the line above. */
  .ha-soon { display: none; }
  .ha-link { width: 18px; height: 38px; }
  .ha-link__k { display: none; }
  /* Phones: four columns, two whole and one half-cropped at each edge (reference mobile wall). */
  .hm-wall.nt-wall { --nt-wall-cols: 4 !important; --nt-wall-gap: 8px; left: -15%; width: 130%; }
  .hm-wall .nt-wall__col:nth-child(n) { display: block; }
  .hm-wall .nt-wall__col:nth-child(5) { display: none; }
  .hm-flow { padding: 12px 12px 0; }
  /* Three flow rows need a taller card on phones, so "How it works · Open" sits on a clean edge. */
  .hm-bento > .nt-bcard--narrow { height: 292px; }
  .hm-lists { margin-top: 48px; }
}
@media (max-width: 374px) {
  .ha-flow { --ha-s: 24px; }
  .ha-node { height: 34px; gap: 6px; padding: 0 10px 0 4px; font-size: 12px; }
  .ha-node--nett { padding: 0 4px; }
  .ha-link { width: 12px; height: 34px; }
}
