/* ============================================================
   Pai Digital — Redesign layer (Nov 26, 2026)
   Built from REDESIGN-STUDY.md (TinyWow / 123apps / Setapp /
   Raycast Store / Product Hunt / AlternativeTo / itch.io / Linear).
   Additive only: loads after lux2/lux3/menu/alive/lina so it can
   refine them; all colours flow through the theme variables, so
   the four UI themes keep working. No content rules live here —
   layout, typography, spacing, card system, hub tools, motion.
   ============================================================ */

/* ---------- header: quiet shadow once the page scrolls ---------- */
.site-head{transition:box-shadow var(--t-mid) var(--ease)}
html.rd-scrolled .site-head{box-shadow:0 10px 30px -18px rgba(12,16,17,.45)}

/* ---------- type & section rhythm (Linear: restraint) ---------- */
.sec-head h2{letter-spacing:-.015em}
.sec-head .lede{margin-top:6px}
.cat-head{margin:52px 0 20px;padding-top:30px;border-top:1px solid var(--line)}
.cat-head h3{font-family:var(--serif);font-size:1.7rem;font-weight:600;letter-spacing:-.01em;margin-bottom:2px}
.cat-head p{color:var(--muted);margin:0}
.cat-cta{margin:20px 0 4px;font-size:1.02rem}

/* ---------- one card system (Setapp / Raycast / itch.io) ---------- */
.pcard{border-radius:var(--r-lg);box-shadow:var(--sh-1)}
.pcard .pbody,.pcard .cb{display:flex;flex-direction:column;flex:1}
.pcard .pacts,.pcard .cb .row{margin-top:auto}
.gtile{border-radius:var(--r-lg);box-shadow:var(--sh-1)}
@media (hover:hover) and (pointer:fine){
  .pcard{transition:transform var(--t-mid) var(--ease),box-shadow var(--t-mid) var(--ease)}
  .pcard:hover{transform:translateY(-4px);box-shadow:var(--sh-2)}
  .pcard:hover .cover img{transform:scale(1.045)}
  .gtile{transition:transform var(--t-mid) var(--ease),box-shadow var(--t-mid) var(--ease)}
  .gtile:hover{transform:translateY(-3px);box-shadow:var(--sh-2)}
}
/* the access pill: same slot, same shape on every card (Setapp meta slot).
   Colour is a tint only — text colour stays whatever the theme sets. */
.pcard .price{display:inline-flex;align-self:flex-start;align-items:center;gap:6px;
  padding:5px 13px;border-radius:var(--pill);border:1px solid var(--line);
  font:600 .86rem/1.35 var(--sans);margin:2px 0 12px}
.pcard .price b{font:700 .92rem/1.35 var(--sans)}
.pcard[data-access="open"] .price{background:rgba(21,101,52,.10);border-color:rgba(21,101,52,.45)}
.pcard[data-access="open"] .price::before{content:"";width:8px;height:8px;border-radius:50%;background:#1F9D55;flex:none}
.pcard[data-access="email"] .price{background:rgba(122,95,37,.10);border-color:rgba(122,95,37,.40)}
.pcard[data-access="forever"] .price{background:rgba(11,92,173,.10);border-color:rgba(11,92,173,.40)}
/* primary action dominant, details quiet (123apps / Raycast) */
.pcard .pacts .btn-dark,.pcard .cb .row .btn-trial{box-shadow:0 8px 20px -10px rgba(12,16,17,.5)}

/* ---------- Free Hub tools: search + filters (Raycast / itch.io) ---------- */
html:not(.js) .hub-tools,html:not(.js) .hub-empty{display:none}
.hub-tools{position:sticky;top:84px;z-index:30;margin:0 0 24px;padding:14px;
  background:var(--paper);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--sh-1)}
@supports (backdrop-filter:blur(8px)){
  .hub-tools{background:color-mix(in srgb,var(--paper) 88%,transparent);backdrop-filter:blur(10px)}
}
.hub-search{position:relative;display:flex;align-items:center}
.hub-search svg{position:absolute;left:15px;width:19px;height:19px;color:var(--muted);pointer-events:none}
.hub-search input{flex:1;min-width:0;min-height:50px;padding:10px 52px 10px 44px;border-radius:var(--pill);
  border:1.5px solid var(--line);background:transparent;color:var(--text);
  font:400 16px/1.3 var(--sans);appearance:none;-webkit-appearance:none}
.hub-search input::placeholder{color:var(--muted)}
.hub-search input:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,170,109,.28)}
.hub-search kbd{position:absolute;right:14px;font:600 .78rem var(--sans);color:var(--muted);
  border:1px solid var(--line);border-bottom-width:2px;border-radius:6px;padding:2px 8px;background:var(--ivory)}
.hub-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.hchip{min-height:40px;padding:8px 15px;border-radius:var(--pill);cursor:pointer;
  border:1px solid var(--line);background:transparent;color:var(--text);
  font:600 .88rem/1.2 var(--sans);transition:background var(--t-fast),color var(--t-fast),border-color var(--t-fast)}
.hchip:hover{border-color:var(--gold)}
.hchip.is-on{background:var(--text);color:var(--paper);border-color:var(--text)}
.hchip-sep{flex:none;width:1px;background:var(--line);margin:4px 2px}
.hub-count{margin:10px 2px 0;font-size:.88rem;color:var(--muted)}
.hub-empty{margin:0 0 24px;padding:26px 20px;text-align:center;color:var(--muted);
  border:1.5px dashed var(--line);border-radius:var(--r-lg);background:var(--paper)}
.hub-reset{border:0;background:none;padding:0;cursor:pointer;color:var(--gold-ink);
  font:700 .95rem var(--sans);text-decoration:underline;text-underline-offset:3px}
.pcard.rd-hide{display:none}

/* ---------- touch & phone behaviour ---------- */
@media (pointer:coarse){.hchip{min-height:44px}.pcard .pacts .btn,.pcard .cb .row .btn{min-height:44px}}
@media (max-width:760px){
  .hub-tools{position:static;padding:10px;border-radius:var(--r)}
  .hub-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .hub-chips::-webkit-scrollbar{display:none}
  .hchip{flex:none;white-space:nowrap}
  .hchip-sep{display:none}
  .cat-head{margin:38px 0 16px;padding-top:22px}
}
@media (prefers-reduced-motion:reduce){
  .pcard,.gtile,.pcard .cover img,.site-head{transition:none!important}
  .pcard:hover,.gtile:hover{transform:none}
}

/* ---------- free-apps offer vs feedback pill (Nov 26 fix pass) ----------
   The alive layer's .alv-offer card and the store feedback pill
   (.pai-store-fb-btn) are both fixed at left:16px;bottom:16px, and the
   pill's z-index (2147483645) sits it on top of the card's CTA. Lift the
   offer card clear of the pill so both stay fully visible and clickable. */
.alv-offer{bottom:72px}
@media(max-width:640px){.alv-offer{bottom:64px}}
