/* ==========================================================================
   POKÉRIP — Set landing page styles. Layered on top of styles.css.
   ========================================================================== */

.set-page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 28px 80px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 22px;
}
.breadcrumbs a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color var(--t-fast);
}
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { color: var(--ink-faint); opacity: 0.6; }
.breadcrumbs .current { color: var(--ink); font-weight: 600; }

/* Hero */
.set-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 380px);
  gap: 40px;
  align-items: center;
  /* A dark gradient fades over the LEFT (text) area so the H1/lede stay
     readable on bright themes (base, hgss, col, sm). The theme color
     remains untouched on the right where the set logo sits. */
  background:
    linear-gradient(95deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 35%, rgba(0, 0, 0, 0.05) 60%, transparent 75%),
    var(--set-hero-bg, linear-gradient(135deg, #2b3a8e 0%, #08081e 100%));
  border: 1px solid var(--panel-line);
  border-radius: 22px;
  padding: 40px;
  overflow: hidden;
  margin-bottom: 36px;
}
.set-hero::before {
  /* foil shimmer */
  content: "";
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg,
    rgba(255,128,255,0.06), rgba(128,192,255,0.06), rgba(128,255,192,0.06),
    rgba(255,224,128,0.06), rgba(255,128,192,0.06), rgba(255,128,255,0.06));
  animation: foilSpin 12s linear infinite;
  mix-blend-mode: color-dodge;
  pointer-events: none;
}
.set-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  pointer-events: none;
}
.set-hero-content { position: relative; z-index: 2; }
.set-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.set-h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #c1c8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.set-lede {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-dim);
  margin-bottom: 22px;
  max-width: 56ch;
}
.set-cta-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 24px;
}
.set-hero-logo {
  position: relative;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  min-height: 240px;   /* reserve space so logo loading doesn't shift the hero */
}
.set-hero-logo img {
  max-width: 100%;
  max-height: 240px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
}

/* Quick stats row */
.set-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-md);
  padding: 18px 20px;
}
.stat-card .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.stat-card .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}
.stat-card .symbol-row { display: flex; align-items: center; gap: 10px; }
/* Show the symbol at its natural colors. A subtle light panel behind it
   gives contrast for both filled symbols (TCG Pocket "ASC" letterforms)
   and transparent dark-icon symbols (older sets). */
.stat-card .symbol-row img {
  width: 28px; height: 28px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 5px;
  object-fit: contain;
}

/* Section blocks */
.set-section {
  margin-bottom: 40px;
}
.set-section h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.set-section .lead {
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin-bottom: 22px;
  max-width: 70ch;
}

/* Legal/policy body copy — wider line length than .lead, with proper styling
   for the lists, links, code blocks, and emphasis those pages use. */
.legal-prose {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.7;
}
.legal-prose p { margin: 0 0 14px; }
.legal-prose strong { color: var(--ink); }
.legal-prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color var(--t-fast);
}
.legal-prose a:hover { border-bottom-color: var(--accent); }
.legal-prose ul, .legal-prose ol {
  padding-left: 22px;
  margin: 8px 0 18px;
  line-height: 1.7;
}
.legal-prose li { margin-bottom: 6px; }
.legal-prose code {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--ink);
}

/* Pull rate / breakdown grid */
.pulls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.pull-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.pull-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--pull-color, var(--accent-2));
}
.pull-card.r-common   { --pull-color: var(--rare-common); }
.pull-card.r-uncommon { --pull-color: var(--rare-uncommon); }
.pull-card.r-rare     { --pull-color: var(--rare-rare); }
.pull-card.r-ultra    { --pull-color: var(--rare-ultra); }
.pull-card.r-secret   { --pull-color: var(--rare-secret); }
.pull-card.r-chase    { --pull-color: var(--rare-chase); }
.pull-card .tier-label {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700;
  color: var(--pull-color, var(--ink-dim));
  margin-bottom: 6px;
}
.pull-card .pct {
  font-size: 28px; font-weight: 800;
  color: var(--ink);
}
.pull-card .pct small { font-size: 16px; color: var(--ink-faint); margin-left: 4px; }
.pull-card .desc {
  font-size: 13px; color: var(--ink-dim);
  margin-top: 6px;
  line-height: 1.5;
}

/* Pack composition explainer */
.pack-comp {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-md);
  padding: 22px;
  margin-bottom: 14px;
}
.comp-slot {
  text-align: center;
  padding: 14px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.comp-slot .count {
  font-size: 28px; font-weight: 800;
  color: var(--ink);
}
.comp-slot .what {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 4px;
  font-weight: 600;
}
.comp-slot.highlight { background: linear-gradient(135deg, rgba(255,203,5,0.15), rgba(255,170,0,0.05)); border-color: rgba(255,203,5,0.3); }

/* Chase cards gallery */
.chase-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
@media (max-width: 720px) {
  .chase-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
.chase-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 240 / 336;
  background: var(--panel);
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
}
.chase-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: var(--shadow-deep); }
.chase-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chase-card .pill {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  z-index: 2;
}
.chase-card .pill.chase { background: linear-gradient(135deg, var(--rare-chase), #6a1aff); }
.chase-card .pill.hyper { background: linear-gradient(135deg, #ffd34d, #ff8c00); color: #1a1a1a; }
.chase-card .pill.sir   { background: linear-gradient(135deg, var(--accent-5), #5d3aa2); }
.chase-card .meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  z-index: 2;
}
.chase-card .meta-name { font-size: 13px; font-weight: 700; color: #fff; }
.chase-card .meta-illu { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }

/* Big CTA panel */
.big-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(255,203,5,0.12) 0%, rgba(180,108,255,0.1) 100%);
  border: 1px solid rgba(255,203,5,0.3);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  margin: 36px 0;
}
.big-cta h2 { margin: 0 0 4px; font-size: 22px; }
.big-cta p { color: var(--ink-dim); margin: 0; font-size: 14px; }
@media (max-width: 600px) { .big-cta { grid-template-columns: 1fr; text-align: center; } }

/* ============= Binder empty state ============= */
.binder-empty {
  margin-top: 0;
}
.binder-empty .empty-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-lg);
  padding: 56px 32px;
  text-align: center;
}
.binder-empty .empty-card h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.binder-empty .empty-card p {
  color: var(--ink-dim);
  margin-bottom: 22px;
}

/* ============= Binder collection banner (per-set page) ============= */
.binder-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, rgba(108, 182, 255, 0.1), rgba(180, 108, 255, 0.06));
  border: 1px solid rgba(108, 182, 255, 0.25);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.binder-banner-text {
  display: flex; flex-direction: column; gap: 4px;
}
.binder-banner-text strong { font-size: 14px; }
.binder-banner-text span:not(:first-child) {
  font-size: 13px; color: var(--ink-dim);
}
.binder-banner-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.binder-banner-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--rare-rare), var(--rare-ultra));
  transition: width 600ms var(--ease-out);
}
.binder-banner-cta { font-size: 12px; padding: 8px 14px; white-space: nowrap; }

/* Card list cards already owned in the binder — small green check pip */
.cl-card.owned { border-color: rgba(108, 214, 108, 0.4); }
.cl-card.owned::after {
  content: "";
  position: absolute; top: 6px; right: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--rare-uncommon);
  background-image:
    linear-gradient(45deg, transparent 35%, #fff 35% 45%, transparent 45% 55%, #fff 55% 65%, transparent 65%),
    linear-gradient(-45deg, transparent 50%, #fff 50% 60%, transparent 60%);
  background-size: 100% 100%;
  box-shadow: 0 0 0 2px rgba(20, 30, 50, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 3;
}
.cl-card.owned::after {
  content: "✓";
  display: flex; align-items: center; justify-content: center;
  background: var(--rare-uncommon);
  background-image: none;
  color: #062a08;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}

/* ============= Card list (the SEO meat) ============= */
.cl-toolbar {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 4px 0;
}
.cl-search {
  flex: 1 1 260px; min-width: 200px; max-width: 360px;
}
.cl-search input {
  width: 100%;
  padding: 11px 14px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color var(--t-fast);
}
.cl-search input:focus { border-color: var(--accent); }
.cl-filters {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.cl-pill {
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  display: inline-flex; align-items: center; gap: 6px;
}
.cl-pill span {
  font-size: 10px;
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--ink-faint);
}
.cl-pill:hover { background: rgba(255,255,255,0.08); color: var(--ink); }
.cl-pill.active {
  background: linear-gradient(135deg, var(--accent), #ffaa00);
  color: #1a1a1a;
  border-color: transparent;
}
.cl-pill.active span { background: rgba(0,0,0,0.15); color: #1a1a1a; }

.cl-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 720px) {
  .cl-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
.cl-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.cl-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 203, 5, 0.4);
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.6);
}
.cl-card-img {
  aspect-ratio: 240 / 336;
  overflow: hidden;
  /* While the lazy-loaded card image decodes, the user sees the same
     card back as the pack-rip flow. Once the <img> paints, it covers this. */
  background: url('../images/back.webp') center / cover no-repeat, #0a0a18;
  position: relative;
}
.cl-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform var(--t-base);
}
.cl-card:hover .cl-card-img img { transform: scale(1.04); }

.cl-card-meta {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid var(--panel-line);
}
.cl-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.cl-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-rarity {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tier-color, var(--ink-dim));
  font-weight: 700;
  margin-top: 2px;
}
.cl-card.t-common      { --tier-color: var(--rare-common); }
.cl-card.t-uncommon    { --tier-color: var(--rare-uncommon); }
.cl-card.t-rare        { --tier-color: var(--rare-rare); }
.cl-card.t-ultra       { --tier-color: var(--accent-5); }
.cl-card.t-illustration { --tier-color: #58a6ff; }
.cl-card.t-sir         { --tier-color: var(--rare-chase); }
.cl-card.t-hyper       { --tier-color: #ffd34d; }
.cl-card.t-mega        {
  --tier-color: #ffd34d;
  border-color: rgba(255, 211, 77, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 211, 77, 0.2);
}
.cl-card.t-sir   { border-color: rgba(255, 92, 240, 0.25); }
.cl-card.t-mega::before {
  /* faint gold halo on Mega Hyper Rares so the chase pulls stand out in the grid */
  content: "";
  position: absolute; inset: -1px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,211,77,0.15), transparent 60%);
  pointer-events: none;
}

.cl-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-dim);
}

@media (max-width: 600px) {
  /* Card meta stays compact on mobile (column count is set higher up). */
  .cl-card-meta { padding: 8px 10px 10px; }
  .cl-name { font-size: 12px; }
}

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.faq-item {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 15px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  transition: background var(--t-fast);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: rgba(255,255,255,0.03); }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-faint);
  transition: transform var(--t-fast);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer {
  padding: 0 22px 20px;
  color: var(--ink-dim);
  line-height: 1.6;
  font-size: 14px;
}

/* ============= Home-page-only sections ============= */
.how-section { margin-top: 56px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.how-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-md);
  padding: 22px 22px 24px;
  position: relative;
  overflow: hidden;
}
.how-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.how-num {
  position: absolute; top: 8px; right: 16px;
  font-size: 56px;
  font-weight: 800;
  color: rgba(255, 203, 5, 0.14);
  line-height: 1;
  pointer-events: none;
}
.how-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 4px 0 8px;
}
.how-card p {
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.55;
  margin: 0;
}

.featured-sets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.featured-set {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.featured-set:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 203, 5, 0.4);
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.5);
}
.featured-set img {
  width: 90px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.featured-set .featured-meta h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
}
.featured-set .featured-meta p {
  font-size: 12px;
  color: var(--ink-faint);
  margin: 0;
  letter-spacing: 0.04em;
}
.featured-cta {
  margin-top: 22px;
  text-align: center;
}

/* Footer */
.set-footer {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--panel-line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-faint);
}
.set-footer a { color: var(--ink-dim); text-decoration: none; }
.set-footer a:hover { color: var(--ink); }
.set-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Mobile tweaks */
@media (max-width: 720px) {
  .set-hero {
    grid-template-columns: 1fr;
    padding: 28px 24px;
    gap: 24px;
    text-align: center;
  }
  /* Logo above the text on mobile (HTML source order is content -> logo). */
  .set-hero-logo { order: -1; min-height: 160px; }
  .set-hero-logo img { max-height: 160px; }
  .set-cta-row { justify-content: center; }
  .set-lede { margin-left: auto; margin-right: auto; }
}
