/* Fabricard precon deck pages - styles on top of landing.css.
   Only the precon-specific parts live here (hero row, gallery strip,
   stats, decklist, zoom dialog); everything else reuses the lp-* classes.

   Layout (owner review round 1, 2026-07-09): everything important fits a
   1080p screen without scrolling. Deck name on top, commander card LEFT,
   CTA button + deck stats to its right, the six highest value cards in one
   horizontal row below, then mana curve / decklist / FAQ. Zoom dialog is
   centered on screen. Font is IBM Plex Sans (the app's default font, same
   self-hosted variable woff2). */

@font-face { font-family:'IBM Plex Sans'; src:url('/fonts/plex/plex-sans-var.woff2') format('woff2'); font-weight:100 700; font-style:normal; font-display:swap; }

body { font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; }

/* Slightly wider page than the text-only landing pages: the hero row and
   the six-card strip need the room. Applies to header/footer too, but only
   on precon pages (this stylesheet is only loaded there). */
.lp-wrap { max-width: 960px; }

/* Breadcrumb */
.pc-breadcrumb { padding: 16px 0 0; font-size: 13px; color: var(--text-muted); }
.pc-breadcrumb a { color: var(--text-secondary); }
.pc-breadcrumb a:hover { color: var(--text-primary); }
.pc-breadcrumb .pc-sep { margin: 0 7px; color: var(--text-muted); }
.pc-breadcrumb span[aria-current] { color: var(--text-primary); }

/* Hero row: deck name spans the full width, commander left, info right */
.pc-hero-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 6px 32px;
  padding: 20px 0 8px;
  align-items: start;
}
.pc-hero-head { grid-column: 1 / -1; margin-bottom: 12px; }
.pc-hero-head h1 { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.pc-hero-head .pc-sub { font-size: 15px; color: var(--text-secondary); }

.pc-hero-info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pc-cta-row { margin-top: 0; }

/* Cards (shared look for commander + gallery).
   Black-bordered cards melt into the obsidian background, so every card
   gets a fine light hairline ring (like a thin silver edge) plus a soft
   drop shadow; on hover the ring turns subtly gold. */
.pc-card { display: block; line-height: 0; transition: transform 0.12s ease; }
.pc-card img {
  width: 100%; height: auto; border-radius: 4.6% / 3.4%;
  box-shadow: 0 0 0 1px rgba(235,236,240,0.18), 0 6px 18px rgba(0,0,0,0.5);
}
.pc-card:hover { transform: translateY(-2px); }
.pc-card:hover img { box-shadow: 0 0 0 1px rgba(200,169,81,0.55), 0 8px 22px rgba(0,0,0,0.55); }

/* Card name caption under every card */
.pc-card-name {
  display: block; line-height: 1.35; margin-top: 8px;
  font-size: 12px; color: var(--text-secondary); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-card:hover .pc-card-name { color: var(--text-primary); }

/* Commander sits on a slightly lighter display plate */
.pc-card-commander {
  width: 100%;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 12px 10px;
}
.pc-card-commander .pc-card-name { font-size: 13px; font-weight: 600; }

/* Stats: 2x2 grid to the right of the commander */
.pc-stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.pc-stat {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.pc-stat dt { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.pc-stat dd { font-size: 17px; font-weight: 600; color: var(--text-primary); margin: 0; }

/* Six highest value cards, one horizontal row under the commander,
   on the same lighter display plate as the commander */
.pc-gallery-row { padding: 10px 0 4px; }
.pc-gallery-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 10px;
}
.pc-gallery-note { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* Mana curve + type/rarity counts */
.pc-analytics { padding: 16px 0 4px; }
.pc-curve { margin: 0 0 14px; }
.pc-curve figcaption { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.pc-curve svg { max-width: 100%; height: auto; }
.pc-counts { font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }

/* Decklist: compact multi-column text */
.pc-decklist .pc-groups { columns: 3 220px; column-gap: 28px; }
.pc-group { break-inside: avoid; margin-bottom: 18px; }
.pc-group h3 { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.pc-group ul { list-style: none; margin: 0; padding: 0; }
.pc-group li { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }

/* Zoom dialog (native <dialog>), CENTERED on screen.
   landing.css resets all margins, which kills the user agent's automatic
   dialog centering (margin: auto) - so the dialog docked to the top left.
   position fixed + inset 0 + margin auto centers it again, always. */
.pc-zoom {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(62vw, 45vh);
  background: transparent;
  border: none;
  padding: 0;
}
.pc-zoom img {
  width: 100%; height: auto; border-radius: 4.6% / 3.4%; cursor: zoom-out;
  box-shadow: 0 0 0 1px rgba(235,236,240,0.2), 0 18px 50px rgba(0,0,0,0.65);
}
.pc-zoom::backdrop { background: rgba(6,7,10,0.82); }

/* Related decks: tiles with a small local thumb of each deck's main card */
.pc-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pc-related-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  min-width: 0;
}
.pc-related-item:hover { background: var(--bg-input); border-color: rgba(200,169,81,0.35); text-decoration: none; }
.pc-related-item img {
  flex: 0 0 auto; width: 56px; height: auto;
  border-radius: 4.6% / 3.4%;
  box-shadow: 0 0 0 1px rgba(235,236,240,0.16), 0 3px 10px rgba(0,0,0,0.45);
}
.pc-related-text { min-width: 0; }
.pc-related-name { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-related-set { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Hub page (/precons/): set groups with compact two-column deck lists */
.pc-hub-hero { padding: 34px 0 10px; }
.pc-hub-set { margin-bottom: 24px; }
.pc-hub-set h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.pc-hub-date { color: var(--text-muted); font-weight: 400; font-size: 13px; }
.pc-hub-list { list-style: none; margin: 0; padding: 0; columns: 2 320px; column-gap: 32px; }
.pc-hub-list li {
  break-inside: avoid;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 14px; line-height: 1.6; padding: 3px 0;
  border-bottom: 1px solid var(--border-light);
}
.pc-hub-list li a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-hub-meta { color: var(--text-muted); font-size: 12.5px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }

/* Mobile: single column. Deck name, commander (left aligned), button +
   stats below it, the six cards as a 3x2 grid, then curve/decklist. */
@media (max-width: 760px) {
  .pc-hero-row { grid-template-columns: 1fr; gap: 16px; }
  .pc-hero-head { margin-bottom: 0; }
  .pc-hero-head h1 { font-size: 27px; }
  .pc-card-commander { max-width: 260px; margin: 0 auto; }
  .pc-cta-row .lp-btn { width: 100%; text-align: center; }
  .pc-gallery-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pc-card-name { font-size: 11px; }
  .pc-decklist .pc-groups { columns: 2 150px; }
  .pc-related-grid { grid-template-columns: 1fr; }
  .pc-zoom { width: min(88vw, 45vh); }
}
