/* The website beside the game (/about, /how-to-play, /press, /cybermon): legal.css's look, plus what those pages add.
   Written by scripts/seo-pages.ts; no page here loads any of the game. */

.wrap { max-width: 960px; }

.play {
  display: inline-block; font-size: 19px; font-weight: 900; letter-spacing: 1px; color: #06241a; text-decoration: none;
  background: linear-gradient(180deg, #8dffc4, #39d98a); padding: 10px 22px; border-radius: 14px;
  box-shadow: 0 0 18px #39d98a55, inset 0 -3px 0 #0003;
}
.play.small { font-size: 15px; padding: 7px 16px; }
.play:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

.hero { display: block; width: 100%; height: auto; border-radius: 16px; border: 1.5px solid var(--edge); margin: 12px 0; box-shadow: 0 10px 26px #0008; }

.crumbs { font-size: 14px; font-weight: 700; color: var(--soft); margin: 0 0 4px; }
.crumbs a { color: var(--soft); }

.jump { font-weight: 800; }
.count { font-size: 14px; color: var(--soft); font-weight: 700; margin-left: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 10px 0 22px; }
.intro { color: var(--soft); margin-top: 0; }
.mon {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text); border-radius: 14px; padding: 8px 8px 0;
  background: linear-gradient(180deg, #141d3d, var(--panel)); border: 1.5px solid var(--edge); box-shadow: 0 6px 16px #0007;
  transition: transform .18s ease, border-color .18s ease;
}
.mon .name { font-weight: 900; padding: 6px 4px 0; line-height: 1.3; }
.mon .meta { font-size: 13px; color: var(--soft); padding: 0 4px; }
.mon .stock { font-size: 12.5px; font-weight: 800; color: var(--cyan); padding: 0 4px 8px; min-height: 1.6em; }
a.mon:hover, a.mon:focus-visible { border-color: var(--cyan); transform: translateY(-3px); }
a.mon:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.mon.rare { border-color: #4aa3ff; }
.mon.epic { border-color: #b46bff; }
.mon.legendary { border-color: var(--gold); box-shadow: 0 0 16px #ffc83d44; }
.mon.limited { border-color: #ff8a2a; box-shadow: 0 0 16px #ff8a2a33; }
.mon.v-dreamscape { border-color: #c9a8ff; }
.mon.v-form { border-color: #ff7ae0; }
.mon.v-glitch { border-color: #22f3ff; }
.mon.v-gold { border-color: #ffc83d; box-shadow: 0 0 16px #ffc83d44; }
.stock.gone, .stock:not([data-stock]) { color: var(--soft); }
.mon[hidden] { display: none; }

/* ------------------------------------------------------------------ the cards and their shine
   Each card is the game's own (scripts/site-cards.ts), in a frame of its shape, with the game's shine laid over it as
   the game does (src/ui/tradingCard.ts): a band of light that crosses it now and then (cybermon-glint), and rainbow foil
   that drifts (cybermon-holo), stronger the rarer the card. A card not drawn yet shows its flat picture (.flat). */
.cardpic {
  --glint: #ffffff8c; --glint-time: 8s; --glint-show: .45; --foil-show: 0; --foil-time: 9s;
  --foil: linear-gradient(115deg, transparent 0%, #ff5ad2 12%, #7ff6ff 24%, #fff36b 36%, transparent 48%, #7ff6ff 60%, #ff5ad2 72%, #b56bff 84%, transparent 100%);
  position: relative; display: block; aspect-ratio: 320 / 452; border-radius: 5.6% / 4%; overflow: hidden; isolation: isolate;
  background: #0b1020; box-shadow: 0 8px 20px #000a;
}
.cardpic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cardpic.flat { border: 1.5px solid var(--edge); }
.cardpic::before, .cardpic::after { content: ""; position: absolute; pointer-events: none; z-index: 1; }
/* Foil: bands of colour that drift across, brightening what is under them. */
.cardpic::before {
  inset: 0; background-image: var(--foil); background-size: 220% 220%; mix-blend-mode: color-dodge; opacity: var(--foil-show);
  animation: site-holo var(--foil-time) linear infinite;
}
/* The band of light that crosses the card now and then. */
.cardpic::after {
  top: -10%; bottom: -10%; left: 0; width: 36%; opacity: var(--glint-show);
  background: linear-gradient(90deg, transparent, var(--glint), transparent);
  transform: translateX(-180%) skewX(-20deg); animation: site-glint var(--glint-time) ease-in-out infinite;
}
@keyframes site-holo { 0% { background-position: 0% 0%; } 100% { background-position: 220% 220%; } }
@keyframes site-glint { 0%, 62% { transform: translateX(-180%) skewX(-20deg); } 100% { transform: translateX(380%) skewX(-20deg); } }
/* Not every card in a row at once. */
.grid > :nth-child(4n+2) .cardpic::after { animation-delay: -2.1s; }
.grid > :nth-child(4n+3) .cardpic::after { animation-delay: -4.3s; }
.grid > :nth-child(4n+4) .cardpic::after { animation-delay: -6.2s; }
.grid > :nth-child(3n+2) .cardpic::before { animation-delay: -3s; }
.grid > :nth-child(3n+3) .cardpic::before { animation-delay: -6s; }

/* Common: a soft sheen. Rare: holo. Epic: stronger holo. Legendary: gold and rainbow, and a glow. */
.cardpic.rare { --glint-time: 6.5s; --glint-show: .6; --foil-show: .16; }
.cardpic.epic { --glint-time: 5.2s; --glint-show: .75; --foil-show: .28; --foil-time: 7s; }
.cardpic.legendary {
  --glint: #fff3b8; --glint-time: 4.2s; --glint-show: .85; --foil-show: .34; --foil-time: 6s;
  --foil: linear-gradient(115deg, transparent 0%, #ffd23f 10%, #ff5ad2 20%, #7ff6ff 30%, #fff36b 40%, transparent 50%, #ffd23f 60%, #b56bff 70%, #7ff6ff 80%, #ffd23f 90%, transparent 100%);
  animation: site-glow 3.6s ease-in-out infinite;
}
@keyframes site-glow { 0%, 100% { box-shadow: 0 8px 20px #000a, 0 0 10px #ffc83d55; } 50% { box-shadow: 0 8px 20px #000a, 0 0 24px #ffc83daa; } }
/* A limited Halloween card: pumpkin orange into midnight purple, as its tag is. */
.cardpic.limited { --glint: #ffd9a8; --foil: linear-gradient(115deg, transparent 0%, #ff8a2a 14%, #b56bff 28%, transparent 44%, #ff8a2a 62%, #7a3cff 78%, transparent 100%); }
.cardpic.limited.rare { --foil-show: .2; }
.cardpic.limited.epic { --foil-show: .3; }
.cardpic.limited.legendary { --foil-show: .34; }
/* The variants: each in its colour, as the game's reveal has them (src/collection/variants.ts, VARIANT_COLOUR). */
.cardpic.v-dreamscape { --glint: #f4edff; --glint-time: 6s; --glint-show: .65; --foil-show: .22; --foil: linear-gradient(115deg, transparent 0%, #c9a8ff 14%, #7ff6ff 28%, #ffb8f0 42%, transparent 56%, #c9a8ff 72%, #fff36b 86%, transparent 100%); }
.cardpic.v-form { --glint: #ffe0f7; --glint-time: 5.6s; --glint-show: .7; --foil-show: .26; }
.cardpic.v-glitch { --glint: #d8fdff; --glint-time: 4.6s; --glint-show: .8; --foil-show: .3; --foil: linear-gradient(115deg, transparent 0%, #22f3ff 16%, transparent 30%, #ff3df2 46%, transparent 60%, #22f3ff 76%, transparent 100%); }
.cardpic.v-gold {
  --glint: #fff6c4; --glint-time: 3.8s; --glint-show: .9; --foil-show: .36; --foil-time: 6s;
  --foil: linear-gradient(115deg, transparent 0%, #ffc83d 12%, #fff6c4 24%, #ff9d2a 36%, transparent 48%, #ffc83d 62%, #7ff6ff 74%, #ffc83d 86%, transparent 100%);
  animation: site-glow 3.2s ease-in-out infinite;
}
.cardpic.flat::before { display: none; }

/* A Cybermon's own page: its card large, beside what it is. */
.cardhero { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 22px; align-items: start; margin: 12px 0; }
.cardhero .panel { margin: 0; }
.showcase { perspective: 1100px; }
.showcase .made { text-align: center; font-weight: 800; margin: 10px 0 0; }
.showcase .made .stock[data-stock] { color: var(--cyan); }
.showcard {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .45s ease; touch-action: pan-y; cursor: grab;
}
.showcard:hover:not(.tilting), .showcard:focus-visible { --rx: 3deg; --ry: -7deg; }
.showcard.tilting { transition: transform .08s linear; }
.showcard:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
/* Under a finger or the mouse the foil and a glare follow it. */
.showcard::before { transition: opacity .3s ease; }
.showcard:hover::before, .showcard.tilting::before { --foil-show: .32; background-position: var(--mx) var(--my); animation-play-state: paused; }
.showcard.common:hover::before, .showcard.common.tilting::before { --foil-show: .14; }
.showcard.legendary:hover::before, .showcard.legendary.tilting::before, .showcard.v-gold:hover::before, .showcard.v-gold.tilting::before { --foil-show: .45; }
.showcard.flat::before { display: none; }
.showcard.tilting::after { animation-duration: 2.4s; }
.grid.variants { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 6px; }
.grid.variants .mon { background: #0b1020; }

@media (max-width: 640px) {
  .cardhero { grid-template-columns: minmax(0, 1fr); }
  .showcase { max-width: 300px; width: 100%; margin: 0 auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .mon { padding: 6px 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cardpic::before, .cardpic::after, .cardpic.legendary, .cardpic.v-gold { animation: none; }
  .cardpic::after { display: none; }
  .showcard, .showcard.tilting, .showcard:hover:not(.tilting) { transform: none; transition: none; }
  a.mon:hover, a.mon:focus-visible { transform: none; }
}

.rarity.rare { color: #6fb6ff; }
.rarity.epic { color: #c99bff; }
.rarity.legendary { color: var(--gold); }

.line { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-left: 20px; font-weight: 800; }

.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0; font-weight: 800; }
