/* Pass Store (store.getpassmint.com) and the homepage band that links to it.
   Loaded on top of site.css and pass.css; uses site.css tokens only. */
:root { --scrim: rgba(16, 18, 24, .32); }
:root[data-theme="dark"] { --scrim: rgba(0, 0, 0, .55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --scrim: rgba(0, 0, 0, .55); } }

/* the store's nav sits in the page (the homepage's is fixed over a 3D stage) */
/* the filters hide cards with the hidden attribute; .pt's display must not win */
.pt[hidden], #st-grid[hidden], #st-empty[hidden] { display: none !important; }
.nav.store-nav { position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.store-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sub); padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 7px; white-space: nowrap; margin-right: auto; }

/* the type control marks its selected button itself (no measured thumb) */
.st-tools .seg button[aria-pressed="true"] { background: var(--panel); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.06); }
:root[data-theme="dark"] .st-tools .seg button[aria-pressed="true"] { background: var(--s4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-tools .seg button[aria-pressed="true"] { background: var(--s4); } }
body.sheet-open { overflow: hidden; }
.st-sheet[hidden], .st-scrim[hidden] { display: none; }

/* ---------- store ---------- */
.st-head { padding: clamp(40px, 6vw, 80px) 0 28px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; }
.st-head > div { grid-column: 1 / span 7; }
.st-head > p { grid-column: 9 / span 4; }
.st-head .d2 { margin-top: 20px; }

.st-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.st-search { flex: 1 1 260px; min-width: 0; position: relative; display: flex; align-items: center; }
.st-search svg { position: absolute; left: 14px; width: 17px; height: 17px; color: var(--ter); pointer-events: none; }
.st-search input { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; font-size: 15px; padding: 0 14px 0 40px; outline: none; transition: border-color .2s, box-shadow .2s; }
.st-search input::placeholder { color: var(--ter); }
.st-search input:focus { border-color: var(--mint-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 30%, transparent); }
.st-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 12px; padding-bottom: 2px; }
.st-chips::-webkit-scrollbar { display: none; }
.st-chips button { flex-shrink: 0; height: 34px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--sub); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap; transition: color .25s, border-color .25s, background-color .25s; }
.st-chips button:hover { color: var(--text); border-color: var(--s8); }
.st-chips button[aria-pressed="true"] { background: #56C2FF; border-color: #56C2FF; color: #06243A; }
.st-countrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 14px; }
.st-countrow .st-count { margin: 0; }
/* one column or two: a phone-only choice */
.st-view { display: none; }
.st-count { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--sub); margin: 22px 0 14px; }

.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 14px; }
.pt { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--panel); overflow: hidden; color: inherit; transition: border-color .3s var(--ease), transform .45s var(--spring); }
.pt:hover { border-color: var(--s8); transform: translateY(-2px); }
.pt[aria-current="true"] { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.pt-stage { --bg-page: var(--panel-2); background: var(--panel-2); border-bottom: 1px solid var(--line); padding: 26px 24px 28px; display: flex; align-items: center; justify-content: center; min-height: 390px; }
.pt-card { width: 100%; max-width: 270px; }
.pt-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px 15px; }
.pt-meta strong { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.pt-meta span { display: block; font-size: 13px; color: var(--sub); margin-top: 1px; }
.st-badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #06243A; background: #56C2FF; padding: 4px 7px; border-radius: 6px; }
.st-empty { border: 1px dashed var(--line-2); border-radius: 14px; padding: 48px 24px; text-align: center; color: var(--sub); display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* the pass panel: a side sheet on a computer, a bottom sheet on a phone */
.st-scrim { position: fixed; inset: 0; z-index: 60; border: 0; padding: 0; margin: 0; background: var(--scrim); cursor: pointer; }
.st-sheet { position: fixed; z-index: 61; top: 12px; right: 12px; bottom: 12px; width: min(460px, calc(100% - 24px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.45); display: flex; flex-direction: column; overflow: hidden; }
.st-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 0 18px; }
.st-close { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); color: var(--sub); display: grid; place-items: center; cursor: pointer; }
.st-close:hover { color: var(--text); border-color: var(--s8); }
.st-close svg { width: 16px; height: 16px; }
.st-sheet-scroll { flex: 1; overflow-y: auto; padding: 14px 22px 22px; display: flex; flex-direction: column; gap: 18px; }
.st-sheet-stage { --bg-page: var(--panel-2); position: relative; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); padding: 12px 34px 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.st-sheet-stage .pt-card { max-width: 320px; }
/* the switch sits in its own row above the card, never over it */
.st-sheet-stage .plat-sw { position: static; align-self: flex-end; margin-right: -22px; }
.st-sheet h2 { font-size: 30px; line-height: 1.05; letter-spacing: -0.04em; }
.st-sheet .meta { color: var(--sub); margin-top: 6px; }
.st-sheet .blurb { font-size: 16.5px; line-height: 1.5; color: var(--sub); text-wrap: pretty; }
.st-facts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.st-facts div { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.st-facts svg { width: 16px; height: 16px; margin-top: 3px; color: var(--sub); }
.st-sheet-foot { padding: 14px 22px 22px; border-top: 1px solid var(--line); }
.st-sheet-foot .cta-studio { max-width: none; }
.st-grab { display: none; }

/* ---------- homepage band ---------- */
.hb-stage { position: relative; height: 470px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-2); overflow: hidden; --bg-page: var(--panel-2); }
.hb-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; background-position: center center; opacity: .55; -webkit-mask: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 75%); mask: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 75%); }
.hb-stage .plat-sw { position: absolute; top: 12px; right: 12px; z-index: 6; }
.hb-fan > div { position: absolute; top: 50%; left: 50%; width: 250px; transition: transform .6s var(--spring); }
.hb-fan > div:nth-child(1) { transform: translate(calc(-50% - 470px), -46%) rotate(-9deg); }
.hb-fan > div:nth-child(2) { transform: translate(calc(-50% - 240px), -52%) rotate(-4deg); z-index: 2; }
.hb-fan > div:nth-child(3) { transform: translate(-50%, -50%); z-index: 3; }
.hb-fan > div:nth-child(4) { transform: translate(calc(-50% + 240px), -53%) rotate(4deg); z-index: 2; }
.hb-fan > div:nth-child(5) { transform: translate(calc(-50% + 470px), -45%) rotate(9deg); }
.hb-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 22px; }
.hb-row .mono { color: var(--sub); }

@media (max-width: 900px) {
  .st-head > div, .st-head > p { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .store-tag { display: none; }
  .st-head { padding-top: 28px; gap: 12px; }
  .st-tools .seg { width: 100%; order: 3; }
  .st-tools .seg button { padding: 0 6px; font-size: 13px; }
  .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .st-view { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); }
  .st-view button { width: 34px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--ter); display: grid; place-items: center; cursor: pointer; }
  .st-view button svg { width: 16px; height: 16px; }
  .st-view button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
  .pt-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .pt-grid.is-list .pt { border-radius: var(--r-tile); }
  .pt-grid.is-list .pt-stage { padding: 44px 32px 26px; }
  .pt-grid.is-list .pt-card { max-width: 300px; }
  .pt-grid.is-list .pt-meta { padding: 12px 16px 14px; }
  .pt-grid.is-list .pt-meta strong { font-size: 16px; }
  .pt-grid.is-list .pt-meta span { font-size: 13px; }
  .pt-grid.is-list .st-badge { top: 12px; left: 12px; font-size: 10.5px; padding: 4px 7px; }
  .pt { border-radius: 14px; }
  .pt-stage { min-height: 0; padding: 16px 12px 18px; }
  .pt-meta { padding: 9px 10px 11px; }
  .pt-meta strong { font-size: 14px; }
  .pt-meta span { font-size: 12px; }
  .st-badge { top: 6px; left: 6px; font-size: 9px; padding: 3px 5px; }
  .st-sheet { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 86%; border-radius: 22px 22px 0 0; border-bottom: 0; transition: transform .32s var(--ease); }
  .st-sheet.dragging { transition: none; }
  /* the grab bar: a tall invisible hit area around a small visible bar; drag it down to close */
  .st-grab { display: block; position: relative; height: 22px; margin: 0 auto; width: 100%; touch-action: none; cursor: grab; }
  .st-grab::before { content: ""; position: absolute; left: 50%; top: 8px; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--line-2); }
  .st-scrim { transition: opacity .32s var(--ease); }
  .st-sheet-top { padding-top: 0; }
  .st-sheet-stage { padding: 26px 40px 28px; }
  .st-sheet h2 { font-size: 26px; }
  .hb-stage { height: 340px; }
  .hb-fan > div { width: 170px; }
  .hb-fan > div:nth-child(1), .hb-fan > div:nth-child(5) { display: none; }
  .hb-fan > div:nth-child(2) { transform: translate(calc(-50% - 112px), -50%) rotate(-6deg); }
  .hb-fan > div:nth-child(4) { transform: translate(calc(-50% + 112px), -50%) rotate(6deg); }
  .hb-row .btn { width: 100%; justify-content: center; }
}

/* back to the homepage, as in the Pass Studio's top bar */
.store-home { gap: 8px; padding: 4px 10px 4px 4px; margin-left: -4px; border-radius: 10px; transition: background-color .2s; }
.store-home:hover { background: var(--panel); }
.store-home .bk { width: 16px; height: 16px; color: var(--sub); flex-shrink: 0; }
