/* ============================================================
   Astra Origins — Partnerships (§10) · page-only styles
   Shared shell lives in css/cosmos.css. Loaded globally in
   layouts/newdesign/master.blade.php so it survives pane swaps.

   Base hero/stats/filter/grid/CTA from the reference design, plus:
   - logo image support on .po-avatar
   - partner details modal (.pom-*)
   - "coming soon" popup (.pcs-*)
   - loader / empty / end states
   ============================================================ */

/* ── Hero — constellation of allies ───────────────────── */
.po-hero {
  position: relative; overflow: hidden;
  border-radius: 14px; padding: 26px 24px; margin-bottom: 16px;
  color: white;
  background:
    radial-gradient(ellipse at 85% 25%, oklch(0.4 0.16 200 / 0.7), transparent 55%),
    radial-gradient(ellipse at 12% 88%, oklch(0.4 0.16 265 / 0.7), transparent 55%),
    linear-gradient(135deg, oklch(0.15 0.05 250), oklch(0.07 0.03 245));
}
.po-hero-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 26%, white 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 30% 62%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 30%, white 50%, transparent 51%),
    radial-gradient(2px 2px at 68% 54%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 28%, white 50%, transparent 51%);
  opacity: 0.5;
}
.po-hero-constellation { position: absolute; top: 0; right: 4%; width: 300px; height: 160px; }
.po-node { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: oklch(0.85 0.1 200); box-shadow: 0 0 10px oklch(0.8 0.12 200 / 0.8); animation: po-twinkle 3s ease-in-out infinite; }
.po-node.n1 { top: 36px; left: 36px; } .po-node.n2 { top: 86px; left: 116px; animation-delay: .4s; }
.po-node.n3 { top: 46px; left: 206px; animation-delay: .8s; } .po-node.n4 { top: 116px; left: 256px; animation-delay: 1.2s; }
.po-node.n5 { top: 136px; left: 76px; animation-delay: 1.6s; }
@keyframes po-twinkle { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.po-lines { position: absolute; inset: 0; width: 100%; height: 100%; stroke: oklch(0.8 0.1 200 / 0.35); stroke-width: 1; }
.po-hero-body { position: relative; z-index: 1; max-width: 62%; }
.po-eyebrow { font-size: 9px; letter-spacing: 0.2em; font-weight: 800; color: oklch(0.82 0.08 200); }
.po-hero-title { font-size: 25px; font-weight: 800; letter-spacing: -0.015em; margin: 10px 0 6px; }
.po-hero-sub { font-size: 13px; line-height: 1.55; opacity: 0.85; margin: 0 0 16px; }
.po-hero-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: white; border-radius: 8px; padding: 9px 15px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; }

/* ── Stats ────────────────────────────────────────────── */
.po-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.po-stat { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.po-stat-n { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.po-stat-l { font-size: 8px; color: var(--ink-3); letter-spacing: 0.12em; margin-top: 2px; font-weight: 700; }

/* ── Filter ───────────────────────────────────────────── */
.po-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.po-cat { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--ink-2); }
.po-cat .bi { font-size: 12px; }
.po-cat:hover { border-color: var(--accent-line); color: var(--accent); }
.po-cat.is-on { background: var(--ink); color: white; border-color: var(--ink); }
/* Count badge beside each tab label */
.po-ct { display: inline-grid; place-items: center; min-width: 18px; height: 17px; padding: 0 5px; border-radius: 999px; font-size: 9px; font-weight: 800; line-height: 1; background: var(--surface-2); color: var(--ink-3); }
.po-cat:hover .po-ct { background: var(--accent-soft); color: var(--accent); }
.po-cat.is-on .po-ct { background: oklch(1 0 0 / 0.18); color: white; }

/* ── Section header ───────────────────────────────────── */
.po-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.po-sh-h { font-size: 15px; font-weight: 800; letter-spacing: -0.005em; }
.po-sh-meta { font-size: 9px; color: var(--ink-3); letter-spacing: 0.14em; font-weight: 700; }

/* ── Partner grid ─────────────────────────────────────── */
.po-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.po-card { position: relative; display: flex; flex-direction: column; width: 100%; text-align: left; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; cursor: pointer; }
.po-card:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: 0 12px 28px oklch(0 0 0 / 0.08); }
/* Cover is a fixed band pinned to the very top of the card (never shrinks). */
.po-card-cover { position: relative; flex: 0 0 64px; height: 64px; }
.po-card-stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 25% 35%, white 50%, transparent 51%), radial-gradient(1.5px 1.5px at 60% 55%, white 50%, transparent 51%), radial-gradient(1px 1px at 82% 30%, white 50%, transparent 51%); opacity: 0.6; }
.po-avatar { position: absolute; top: 30px; left: 16px; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: white; font-size: 18px; font-weight: 800; border: 3px solid var(--surface); box-shadow: 0 4px 12px oklch(0 0 0 / 0.2); }
.po-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Logo variant: white plate so brand logos read clearly, with a special
   accent ring around the rounded box. Logos are contained (not cropped). */
.po-avatar.has-logo { background: #fff; padding: 7px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent-line), 0 4px 14px oklch(0 0 0 / 0.18); }
.po-avatar.has-logo img { object-fit: contain; border-radius: 50%; }
.po-card-body { padding: 26px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.po-card-name { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.po-verified { color: oklch(0.6 0.16 200); font-size: 13px; }
.po-card-meta { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--ink-3); letter-spacing: 0.08em; margin-top: 4px; }
.po-card-meta .bi { font-size: 11px; color: var(--ink-2); }
.po-card-desc { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin: 8px 0 12px; }
/* Foot sticks to the bottom so cards in a row line up. */
.po-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.po-tag { font-size: 8px; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); padding: 3px 8px; border-radius: 4px; background: var(--accent-soft); }
.po-since { font-size: 9px; color: var(--ink-3); letter-spacing: 0.1em; font-weight: 700; }
.po-readmore { display: inline-flex; align-items: center; gap: 4px; background: transparent; border: none; padding: 0; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; white-space: nowrap; }
.po-readmore .bi { font-size: 11px; }
.po-readmore:hover { text-decoration: underline; }

/* ── Skeleton placeholder cards (fresh load / tab switch) ── */
.po-skel { pointer-events: none; }
.po-sk, .po-sk-cover, .po-sk-avatar {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 200% 100%;
  animation: po-shimmer 1.3s ease-in-out infinite;
}
@keyframes po-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.po-sk-cover { flex: 0 0 64px; height: 64px; }
.po-sk-avatar { position: absolute; top: 30px; left: 16px; width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--surface); }
.po-sk-line { height: 12px; border-radius: 5px; margin-top: 2px; }
.po-sk-line.sm { height: 8px; margin-top: 8px; }
.po-sk-para { height: 9px; border-radius: 5px; margin-top: 10px; }
.po-sk-pill { display: inline-block; height: 14px; width: 80px; border-radius: 6px; }

/* ── States: loader / empty / end ─────────────────────── */
.po-state { text-align: center; color: var(--ink-3); font-size: 11px; letter-spacing: 0.12em; font-weight: 700; padding: 22px 0; }
.po-loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px 0; color: var(--ink-3); font-size: 11px; letter-spacing: 0.12em; font-weight: 700; }
.po-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: po-spin 0.7s linear infinite; }
@keyframes po-spin { to { transform: rotate(360deg); } }
.po-sentinel { height: 1px; }

/* ── CTA ──────────────────────────────────────────────── */
.po-cta {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center;
  margin-top: 16px; padding: 16px 18px;
  background:
    radial-gradient(ellipse at 90% 50%, oklch(0.4 0.14 200 / 0.5), transparent 60%),
    linear-gradient(135deg, oklch(0.16 0.05 250), oklch(0.09 0.03 245));
  border: 1px solid oklch(0.3 0.05 250); border-radius: 12px; color: white;
}
.po-cta-ic { width: 48px; height: 48px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; background: oklch(0.98 0.005 250 / 0.12); }
.po-cta-title { font-size: 15px; font-weight: 800; margin: 0 0 3px; }
.po-cta-desc { font-size: 11px; opacity: 0.8; margin: 0; }
.po-cta-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: white; border-radius: 8px; padding: 10px 16px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-decoration: none; white-space: nowrap; border: none; cursor: pointer; }

/* ── Partner details modal ────────────────────────────── */
.pom { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; }
.pom.is-open { display: flex; }
.pom-backdrop { position: absolute; inset: 0; background: oklch(0.1 0.02 250 / 0.62); backdrop-filter: blur(4px); }
.pom-dialog {
  position: relative; z-index: 1;
  width: min(94vw, 560px); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.4);
}
.pom-cover { position: relative; height: 84px; border-radius: 16px 16px 0 0; }
.pom-cover-stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 40%, white 50%, transparent 51%), radial-gradient(1.5px 1.5px at 55% 60%, white 50%, transparent 51%), radial-gradient(1px 1px at 80% 30%, white 50%, transparent 51%); opacity: 0.6; }
.pom-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: none; background: oklch(0 0 0 / 0.45); color: white; font-size: 16px; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.pom-avatar { position: absolute; left: 22px; top: 50px; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: white; font-size: 20px; font-weight: 800; border: 3px solid var(--surface); box-shadow: 0 4px 12px oklch(0 0 0 / 0.25); }
.pom-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pom-avatar.has-logo { background: #fff; padding: 8px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent-line), 0 4px 14px oklch(0 0 0 / 0.2); }
.pom-avatar.has-logo img { object-fit: contain; border-radius: 50%; }
.pom-body { padding: 30px 22px 22px; }
.pom-name { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 7px; }
.pom-meta { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.pom-meta-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; color: var(--ink-2); }
.pom-meta-row .bi { font-size: 14px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.pom-meta-row a { color: var(--accent); word-break: break-word; text-decoration: none; }
.pom-meta-row a:hover { text-decoration: underline; }
.pom-desc-h { font-size: 9px; font-weight: 800; letter-spacing: 0.16em; color: var(--ink-3); margin: 16px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.pom-desc { font-size: 13px; line-height: 1.7; color: var(--ink); margin: 0; }
.pom-foot { margin-top: 18px; display: flex; justify-content: flex-end; }
.pom-link { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: white; border-radius: 8px; padding: 9px 15px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-decoration: none; }

/* ── "Coming soon" popup (Become a partner) ───────────── */
.pcs { position: fixed; inset: 0; z-index: 2100; display: none; align-items: center; justify-content: center; padding: 24px; }
.pcs.is-open { display: flex; }
.pcs-backdrop { position: absolute; inset: 0; background: oklch(0.1 0.02 250 / 0.66); backdrop-filter: blur(5px); }
.pcs-dialog {
  position: relative; z-index: 1; overflow: hidden;
  width: min(92vw, 440px); text-align: center;
  border-radius: 18px; padding: 34px 28px 28px; color: white;
  background:
    radial-gradient(ellipse at 30% 20%, oklch(0.42 0.16 200 / 0.7), transparent 55%),
    radial-gradient(ellipse at 80% 90%, oklch(0.42 0.16 265 / 0.6), transparent 55%),
    linear-gradient(135deg, oklch(0.16 0.05 250), oklch(0.08 0.03 245));
  border: 1px solid oklch(0.32 0.06 250);
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.45);
}
.pcs-stars { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(1px 1px at 18% 30%, white 50%, transparent 51%), radial-gradient(1.5px 1.5px at 64% 24%, white 50%, transparent 51%), radial-gradient(1px 1px at 82% 70%, white 50%, transparent 51%), radial-gradient(1.5px 1.5px at 35% 80%, white 50%, transparent 51%); opacity: 0.55; }
.pcs-dialog > * { position: relative; z-index: 1; }
.pcs-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; border: none; background: oklch(0.98 0.005 250 / 0.14); color: white; font-size: 15px; display: grid; place-items: center; cursor: pointer; }
.pcs-icon { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: white; background: radial-gradient(circle at 35% 30%, oklch(0.7 0.16 250), oklch(0.4 0.12 260)); box-shadow: 0 0 0 6px oklch(0.6 0.15 250 / 0.14), 0 0 28px oklch(0.6 0.16 250 / 0.5); }
.pcs-pill { display: inline-block; margin-bottom: 12px; font-size: 9px; font-weight: 800; letter-spacing: 0.22em; padding: 5px 12px; border-radius: 999px; background: oklch(0.7 0.14 250 / 0.2); border: 1px solid oklch(0.7 0.14 250 / 0.5); color: oklch(0.88 0.08 240); }
.pcs-title { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 8px; }
.pcs-text { font-size: 13px; line-height: 1.6; opacity: 0.85; margin: 0 0 20px; }
.pcs-btn { background: var(--accent); color: white; border: none; border-radius: 8px; padding: 10px 22px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1100px) { .po-grid { grid-template-columns: 1fr; } .po-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .po-hero-body { max-width: 100%; }
  .po-hero-constellation { display: none; }
  .po-hero-title { font-size: 20px; }
  .po-cta { grid-template-columns: 1fr; text-align: left; }
}
