/* banxers, dark theme matching the cards. Mobile-first. */

:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #0d1017;
  --panel-2: #12161f;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e9edf3;
  --muted: #8b97ab;
  --faint: #5f6c80;
  --gold: #f2c14e;
  --gold-soft: rgba(242, 193, 78, 0.16);
  --purple: #a473ff;
  --purple-soft: rgba(164, 115, 255, 0.16);
  --steel: #9aa8ba;
  --steel-soft: rgba(154, 168, 186, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
p a, li a { color: var(--gold); }
p a:hover, li a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px 64px; }

/* Header */
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
}
.wordmark, .foot-mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.wordmark span, .foot-mark span { color: var(--gold); }
.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  margin-left: 20px;
}
.site-nav a:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 72px 0 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(242, 193, 78, 0.45);
  background: rgba(242, 193, 78, 0.07);
  padding: 7px 15px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(38px, 7.5vw, 78px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero .glow {
  background: linear-gradient(100deg, #ffe9b0, #f2c14e 48%, #e8a93d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(242, 193, 78, 0.35));
}
.hero-sub {
  margin-top: 20px;
  color: var(--muted);
  max-width: 58ch;
  font-size: 17px;
}
.hero-cta {
  margin-top: 28px;
  display: inline-block;
  background: var(--gold);
  color: #101216;
  font-weight: 800;
  font-size: 16px;
  padding: 13px 28px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(242, 193, 78, 0.30);
}
.hero-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#grid { scroll-margin-top: 24px; }

/* Filters */
.filters { padding: 26px 0 10px; }
#q {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  padding: 12px 16px;
  outline: none;
}
#q:focus { border-color: var(--gold); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.filter-row select, .filter-row button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 12px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.filter-row select:focus { border-color: var(--gold); }
.filter-row button { color: var(--muted); }
.filter-row button:hover { color: var(--text); border-color: var(--muted); }
.count { margin-top: 14px; color: var(--muted); font-size: 14px; font-weight: 600; }

/* Gallery grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding-top: 12px;
}
.card-tile {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.tile-link { display: block; overflow: hidden; border-radius: 17px; }
.tile-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.card-tile img { width: 100%; aspect-ratio: 4 / 5; }
.card-tile:hover { transform: translateY(-4px); }
.card-tile[data-tier="legendary"]:hover { border-color: var(--gold); box-shadow: 0 14px 44px rgba(242, 193, 78, 0.16); }
.card-tile[data-tier="rare"]:hover { border-color: var(--purple); box-shadow: 0 14px 44px rgba(164, 115, 255, 0.16); }
.card-tile[data-tier="common"]:hover { border-color: var(--steel); box-shadow: 0 14px 44px rgba(154, 168, 186, 0.14); }

/* Legendary cards breathe. A slow gold pulse so they read as the prize tier. */
.card-tile[data-tier="legendary"] { border-color: rgba(242, 193, 78, 0.38); }
.card-tile[data-tier="legendary"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  box-shadow: 0 0 22px rgba(242, 193, 78, 0.30), 0 0 54px rgba(242, 193, 78, 0.15);
  animation: breathe 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@keyframes hero-breathe {
  0%, 100% { box-shadow: 0 0 40px rgba(242, 193, 78, 0.10); }
  50% { box-shadow: 0 0 74px rgba(242, 193, 78, 0.24); }
}
.card-hero img.t-legendary { animation: hero-breathe 3.4s ease-in-out infinite; }

/* Hover actions: analysis + replicate */
.tile-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 42px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(5, 6, 9, 0.85));
  border-radius: 0 0 17px 17px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}
.card-tile:hover .tile-actions,
.card-tile:focus-within .tile-actions {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.tile-btn {
  pointer-events: auto;
  background: rgba(10, 13, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.tile-btn:hover { border-color: var(--gold); color: var(--gold); }
.tile-btn.copied { border-color: var(--gold); color: var(--gold); }

/* On touch screens there is no hover, show the actions under the card */
@media (hover: none) {
  .tile-actions {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    background: none;
    padding: 10px 12px 12px;
  }
  .tile-link { border-radius: 17px 17px 0 0; }
}

.empty { padding: 70px 0; text-align: center; color: var(--muted); }

/* Analysis quick view */
.modal {
  margin: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  max-width: 560px;
  width: calc(100% - 32px);
}
.modal::backdrop { background: rgba(4, 5, 8, 0.72); }
.modal-inner { position: relative; padding: 24px; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}
.modal-close:hover { color: var(--text); }
.modal-hook { margin-top: 14px; }
.modal-meta { margin-top: 12px; color: var(--muted); font-size: 14px; }
.modal-inner h3 {
  margin-top: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.modal-breakdown { margin-top: 10px; font-size: 15.5px; }
.modal-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.modal-link { color: var(--gold); font-size: 14.5px; font-weight: 600; }
.modal-link:hover { text-decoration: underline; }
.modal-hint { margin-top: 12px; color: var(--faint); font-size: 12.5px; }

/* Replicate JSON box */
.replicate-note { color: var(--muted); font-size: 15px; margin-bottom: 12px; max-width: 62ch; }
.json-box {
  background: #0a0d13;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #b7c3d6;
  overflow: auto;
  max-height: 420px;
  white-space: pre;
}
.json-box + .copy-btn { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .card-tile[data-tier="legendary"]::after,
  .card-hero img.t-legendary { animation: none; }
  .card-tile, .tile-actions { transition: none; }
}

/* Detail page */
.crumb { padding: 22px 0 6px; }
.crumb a { color: var(--muted); font-size: 14px; font-weight: 600; }
.crumb a:hover { color: var(--text); }

.detail { max-width: 720px; margin: 0 auto; }
.card-hero img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.card-hero img.t-legendary { box-shadow: 0 0 60px rgba(242, 193, 78, 0.14); }
.card-hero img.t-rare { box-shadow: 0 0 60px rgba(164, 115, 255, 0.14); }
.card-hero img.t-common { box-shadow: 0 0 60px rgba(154, 168, 186, 0.10); }

.detail-head { padding: 26px 0 4px; }
.detail-head h1 {
  font-size: clamp(24px, 4.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  white-space: pre-wrap;
}
.byline { margin-top: 10px; color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.chip.t-legendary { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.chip.t-rare { color: var(--purple); border-color: var(--purple); background: var(--purple-soft); }
.chip.t-common { color: var(--steel); border-color: var(--steel); background: var(--steel-soft); }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 6px; }
.stat-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.stat-num { font-size: clamp(20px, 4vw, 28px); font-weight: 800; letter-spacing: -0.02em; }
.stat-num.t-legendary { color: var(--gold); }
.stat-num.t-rare { color: var(--purple); }
.stat-num.t-common { color: var(--steel); }
.stat-lab { font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }
.stat-exact { font-size: 12.5px; color: var(--faint); margin-top: 5px; font-variant-numeric: tabular-nums; }

.block { padding: 26px 0 2px; }
.block h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}
.hook-quote {
  background: var(--panel);
  border-left: 3px solid var(--gold);
  border-radius: 0 14px 14px 0;
  padding: 18px 20px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-wrap;
}
.hook-quote.t-rare { border-left-color: var(--purple); }
.hook-quote.t-common { border-left-color: var(--steel); }
.copy-btn {
  margin-top: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--gold); }
.copy-btn.copied { border-color: var(--gold); color: var(--gold); }

.post-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  white-space: pre-wrap;
  font-size: 16px;
}
.src-link { margin-top: 12px; font-size: 14.5px; }
.breakdown { color: var(--text); font-size: 16.5px; max-width: 62ch; }
.receipt { border-radius: 14px; border: 1px solid var(--line); }
.receipt-note { margin-top: 10px; color: var(--faint); font-size: 13.5px; }

/* Static pages */
.page { max-width: 680px; margin: 0 auto; padding-top: 34px; }
.page h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 800; letter-spacing: -0.02em; }
.page .lede { margin-top: 14px; font-size: 19px; color: var(--text); font-weight: 600; }
.page p { margin-top: 14px; color: var(--muted); font-size: 16.5px; }
.page h2 { margin-top: 34px; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.page ul { margin: 14px 0 0 20px; color: var(--muted); }
.page li { margin-top: 10px; font-size: 16.5px; }
.page li strong { color: var(--text); }

/* Footer */
.site-foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 16px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
}
.site-foot p { margin-top: 6px; }
.site-foot a { color: var(--gold); }
.site-foot a:hover { text-decoration: underline; }
.foot-mark { font-size: 18px; }
.foot-nav a { color: var(--muted); margin-right: 16px; font-weight: 600; }
.foot-nav a:hover { color: var(--text); }
.foot-note { color: var(--faint); margin-top: 12px; }

/* 404 */
.lost { text-align: center; padding: 90px 0; }
.lost h1 { font-size: 44px; font-weight: 800; }
.lost p { color: var(--muted); margin-top: 12px; }
.lost a { color: var(--gold); }

@media (min-width: 700px) {
  .wrap { padding: 0 24px 80px; }
  .site-head { padding: 20px 24px; }
  .grid { gap: 20px; }
}
