:root {
  color-scheme: light;
  --navy: #152d62;
  --blue: #214bb8;
  --gold: #ffd447;
  --sky: #eaf2ff;
  --header-blue: #bcd3ff;
  --hero-blue: #d5e3ff;
  --paper: #fffdf6;
  --red: #bc303b;
  --muted: #45577a;
  --line: #c9d7f1;
  --control-border: #6a80ae;
  font: 16px/1.55 system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--navy); }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 4rem, 72rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 3; padding: .5rem 1rem; background: white; }
.skip:focus { top: 1rem; }
.masthead { background: linear-gradient(var(--header-blue), var(--hero-blue)); }
.topbar, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.topbar { min-height: 5rem; padding-block: .45rem; }
.topbar a { text-decoration: none; }
.brand { display: inline-flex; flex: 0 0 auto; flex-direction: column; align-items: end; gap: .16rem; line-height: 1.2; }
.brand-logo { display: block; width: clamp(9rem, 20vw, 12rem); height: auto; }
.brand small { color: var(--muted); font-size: .875rem; font-weight: 500; }
nav { display: flex; gap: 1.5rem; font-size: .95rem; }
nav a { padding-block: .35rem; }
.topbar nav a:hover { text-decoration: underline; text-underline-offset: .2em; }
.social-logo { display: block; flex: none; width: 1.5rem; height: 1.5rem; object-fit: contain; }
.twitch-link { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--blue); border-radius: .55rem; padding: .55rem .85rem; font-weight: 700; text-align: center; }
.twitch-link:hover { background: var(--sky); }
.hero { border-bottom: 1px solid var(--line); background: #f6f9ff; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 43.45fr) minmax(0, 56.55fr);
  align-items: center;
  gap: 2.5rem;
  min-height: 27rem;
  padding-top: 4.5rem;
}
.hero-copy { padding-bottom: 4.5rem; }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { position: relative; max-width: 11ch; font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: .98; letter-spacing: -.065em; margin-bottom: 1.25rem; font-weight: 900; }
.hero-copy h1::before {
  content: "";
  position: absolute;
  inset-block-start: -.75rem;
  inset-inline-start: 0;
  width: 2.5rem;
  height: .25rem;
  border-radius: .125rem;
  background: var(--gold);
}
.hero-copy h1 span { color: var(--blue); }
.hero-copy p { max-width: 29rem; color: var(--muted); font-size: 1.1rem; margin-bottom: 1.25rem; }
.button { display: inline-flex; border: 1px solid var(--navy); border-radius: .55rem; background: var(--gold); color: var(--navy); padding: .78rem 1.1rem; text-decoration: none; font: inherit; font-weight: 750; }
.button:hover { background: #f8c630; }
.hero-copy .button { border-radius: .7rem; }
.hero-copy .button:hover { text-decoration: underline; text-underline-offset: .18em; }
.hero-art {
  position: relative;
  top: 4px;
  display: grid;
  grid-template-columns: minmax(0, 46.5fr) minmax(0, 53.5fr);
  align-items: end;
  align-self: end;
  justify-self: center;
  width: min(100%, 44.2rem);
}
.hero-art img { display: block; width: 100%; height: auto; }
.hero-art .hero-lucario { width: 80%; justify-self: end; mix-blend-mode: multiply; transform: scaleX(-1); }
.collection { padding-block: clamp(3rem, 7vw, 5.5rem); }
.collection-heading { margin-bottom: 1.75rem; }
h2 { margin-bottom: .3rem; font-size: clamp(1.75rem, 4.2vw, 2.7rem); line-height: 1.08; letter-spacing: -.045em; }
.collection-heading p { margin: 0; color: var(--muted); }
.next-pack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--sky);
}
.next-pack-status { margin-bottom: .75rem; font-size: .95rem; font-weight: 750; }
.next-pack h3 { margin-bottom: .75rem; font-size: clamp(2.15rem, 5.5vw, 4.25rem); line-height: 1; letter-spacing: -.055em; }
.next-pack-date { margin-bottom: 1.5rem; color: var(--muted); }
.next-pack .pack-art { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: .75rem; background: white; }
.collection-browse { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; }
.collection-browse h3 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.85rem); letter-spacing: -.03em; }
.collection-browse .controls { margin-inline-start: auto; }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; }
.controls label { display: grid; gap: .25rem; font-size: .875rem; font-weight: 700; }
.controls input, .controls select { min-width: 0; max-width: 100%; border: 1px solid var(--control-border); border-radius: .45rem; background: white; color: var(--navy); padding: .5rem .65rem; }
.controls select { appearance: none; padding-right: 2rem; background: linear-gradient(45deg, transparent 50%, var(--navy) 50%) calc(100% - 15px) 52% / 5px 5px no-repeat, linear-gradient(135deg, var(--navy) 50%, transparent 50%) calc(100% - 10px) 52% / 5px 5px no-repeat, white; }
.results { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.results:empty { margin: 0; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 1.5rem; }
.product { min-width: 0; }
.product button { display: grid; align-content: start; width: 100%; height: 100%; border: 0; border-radius: .5rem; padding: 0; color: var(--blue); background: transparent; text-align: left; }
.product button:hover .product-name { color: var(--navy); text-decoration-thickness: 2px; }
.product-name { margin-top: .7rem; font-size: 1rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.product-status {
  justify-self: start;
  margin-top: .35rem;
  padding: .15rem .55rem;
  border-radius: .3rem;
  background: #e9ebef;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}
.pack-art { position: relative; isolation: isolate; display: grid; place-items: center; aspect-ratio: 1.14; overflow: hidden; border-radius: .5rem; background: #f0f4fb; }
.pack-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: inherit; }
.pack-art img[hidden] { display: none; }
.pack-placeholder { display: grid; place-items: center; width: 38%; aspect-ratio: .67; border: 1px solid var(--line); border-radius: .3rem; color: var(--blue); background: var(--hero-blue); font-size: clamp(1.35rem, 4vw, 2.5rem); }
.how { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--control-border); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.steps h3 { margin-bottom: .4rem; }
.steps p { margin-bottom: 0; color: var(--muted); }
footer { padding-block: clamp(2.5rem, 5vw, 4rem) 2.25rem; background: var(--header-blue); color: var(--navy); }
.footer-inner { flex-wrap: wrap; gap: 1rem 1.5rem; }
.social-links { flex-wrap: wrap; gap: .25rem; }
.social-links a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; }
.social-links .social-logo { filter: brightness(0); }
.social-links a:hover .social-logo { opacity: .75; }
.social-links a:focus-visible { outline-offset: 0; }
.photo-source { font-size: .9rem; }
dialog { width: min(44rem, 100% - 2rem); padding: 1.35rem; border: 1px solid var(--line); border-radius: .9rem; color: var(--navy); background: var(--paper); }
dialog::backdrop { background: #152d62d0; }
dialog form { display: flex; justify-content: end; margin-bottom: .5rem; }
.close, .gallery-controls button { border: 1px solid var(--control-border); border-radius: .4rem; background: white; color: var(--navy); padding: .3rem .6rem; }
.close:hover, .gallery-controls button:hover { background: var(--sky); }
.close { font-size: 1.3rem; line-height: 1; }
.detail { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 1.5rem; }
.detail h2 { margin-bottom: 1rem; }
.gallery-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.source { color: var(--blue); }

@media (max-width: 55rem) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2rem); }
  .topbar { flex-wrap: wrap; gap: .6rem 1rem; padding-block: .8rem; }
  .brand-logo { width: min(36vw, 10rem); }
  .topbar nav { order: 1; flex-basis: 100%; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; min-height: unset; padding-top: 3rem; text-align: center; }
  .hero-copy { padding-bottom: 0; }
  .hero-copy h1 { max-width: none; }
  .hero-copy h1::before { inset-inline-end: 0; margin-inline: auto; }
  .hero-copy p { margin-inline: auto; }
  .hero-art { width: min(100%, 36.4rem); }
  .hero-art img { width: min(130%, 19.474rem); justify-self: end; }
  .hero-art .hero-lucario { width: min(104%, 13.5408rem); }
  .next-pack { grid-template-columns: minmax(0, 1fr); }
  .collection-browse { align-items: start; flex-direction: column; gap: .75rem; }
  .collection-browse .controls { margin-inline-start: 0; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem .9rem; }
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-inner { align-items: start; flex-direction: column; gap: 1rem; }
}
@media (max-width: 25rem) {
  .social-links { gap: 0; }
  .detail { grid-template-columns: 1fr; }
  .hero-inner { padding-bottom: 2.75rem; }
  .hero-art { display: none; }
  .controls input { width: 9rem; }
}
