/* ==========================================================================
   Batomon Showdown — official site
   Palette sampled from promo/press_kit/keyart.png + logo.png so the page and
   the game read as the same product.
   ========================================================================== */

/* Fredoka (SIL OFL), variable 400-700, latin subset - self-hosted so the
   page still makes zero third-party requests on load. */
@font-face {
  font-family: "Display";
  src: url("/assets/fonts/display.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ink */
  --ink:        #14141b;
  --ink-2:      #1b1b25;
  --panel:      #232331;
  --panel-2:    #2c2c3d;
  --line:       #0d0d13;

  /* brand — straight off the logo + key art */
  --pink:       #ED67FA;
  --cyan:       #43F9F5;
  --violet:     #5C45DA;
  --rose:       #BE508D;
  --orange:     #F0933C;
  --coral:      #E46774;
  --gold:       #FFBD08;
  --red:        #EF426B;

  --text:       #F4F4F8;
  --muted:      #A6A6BE;

  --wrap:       1120px;
  --pad:        clamp(16px, 4vw, 32px);
  --radius:     10px;

  --font-display: "Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Every asset on this page is pixel art. Never let the browser smear it. */
.px { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--pink); }

h1, h2, h3 { line-height: 1.2; margin: 0; }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--cyan); color: var(--line);
  padding: 10px 16px; font-weight: 700; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Present for screen readers and search engines, painted nowhere. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ------------------------------------------------------------- topbar -- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(20, 20, 27, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--line);
}

.topbar__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 10px var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.topbar__brand { display: block; flex: none; line-height: 0; }
.topbar__brand img { width: 150px; }

.topbar__nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  margin-right: 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}
.topbar__nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}
.topbar__nav a:hover { color: var(--text); border-bottom-color: var(--pink); }

/* ------------------------------------------------------- social icons -- */

/* The game's own 24x24 title-screen marks, so the site and the title menu
   show the identical icon. White on transparent, so they are dimmed with
   opacity rather than recoloured. */
.social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.social a {
  display: block;
  padding: 6px;
  line-height: 0;
  opacity: .62;
  transition: opacity .15s, transform .08s steps(2);
}
.social a:hover { opacity: 1; transform: translateY(-2px); }
.social img { width: 24px; height: 24px; }

/* --------------------------------------------------------- top menu -- */

/* The button is created by main.js, which also puts .has-menu on the bar - so
   everything below is scoped to .has-menu and a no-JS visitor keeps the plain
   wrapped nav instead of a hamburger that could never open. */
.topbar__menu {
  display: none;
  place-items: center;
  width: 38px; height: 38px;
  margin-left: auto;
  padding: 0;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
}
.topbar__menu:hover { background: var(--panel-2); }
.topbar__menu img { width: 17px; height: auto; opacity: .85; }

@media (max-width: 840px) {
  .topbar__inner { gap: 10px 16px; }

  /* no JS: the nav simply wraps onto its own centred second row */
  .topbar__nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin: 0;
    gap: 20px;
    font-size: 15px;
  }
  .social { margin-left: auto; }

  /* JS: collapse to the hamburger, and drop the icons */
  .topbar.has-menu .topbar__menu { display: grid; }
  .topbar.has-menu .social { display: none; }

  .topbar.has-menu .topbar__nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 4px;
    border-top: 3px solid var(--line);
    font-size: 16px;
  }
  .topbar.has-menu.is-open .topbar__nav { display: flex; }
  .topbar.has-menu .topbar__nav a {
    padding: 11px 4px;
    border-bottom: 0;
  }
  .topbar.has-menu .topbar__nav a:hover { color: var(--text); }
}
@media (max-width: 380px) {
  .topbar__brand img { width: 118px; }
  .social { gap: 6px; }
}

/* ------------------------------------------------------------ buttons -- */

.btn {
  --btn-bg:     var(--panel-2);
  --btn-edge:   var(--line);
  --btn-text:   var(--text);

  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;

  padding: 14px 26px;
  border: 3px solid var(--btn-edge);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 5px 0 var(--btn-edge);

  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .01em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;

  transition: transform .08s steps(2), box-shadow .08s steps(2), filter .15s;
}
.btn:hover  { color: var(--btn-text); filter: brightness(1.08); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--btn-edge); }

.btn__kicker { font-size: 12px; font-weight: 600; opacity: .8; letter-spacing: .03em; }
.btn__main   { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }

.btn--lg { padding: 16px 34px; }

.btn--steam {
  --btn-bg: linear-gradient(180deg, var(--pink) 0%, var(--rose) 100%);
  --btn-text: #ffffff;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
/* Deliberately dimmer than --steam: on this page the wishlist is the primary
   ask and the pre-registration is the second one, so it must not out-shout it. */
.btn--play {
  --btn-bg: linear-gradient(180deg, #2E9C7E 0%, #176651 100%);
  --btn-text: #ffffff;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.btn--ghost {
  --btn-bg: var(--panel);
  --btn-text: var(--text);
}
.btn--ghost:hover { --btn-bg: var(--panel-2); }

/* The App Store button is a real disabled <button>, not a styled link, so it
   is genuinely unfocusable and unclickable rather than merely looking it. */
.btn--soon {
  --btn-bg: var(--panel);
  --btn-text: var(--muted);
  cursor: default;
  opacity: .72;
}
.btn--soon:hover { filter: none; }
.btn--soon:active { transform: none; box-shadow: 0 5px 0 var(--btn-edge); }

/* ------------------------------------------------------------ hero art -- */

/* Not used on the landing page - the trailer is its hero. This is the key-art
   banner the sub-pages open with. */
.hero__art {
  position: relative;
  line-height: 0;
  background: var(--ink);
}
.hero__art img { width: 100%; }
/* fade the art into the page instead of cutting it off with a hard edge */
.hero__art::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 46%;
  background: linear-gradient(180deg, transparent 0%, var(--ink) 96%);
  pointer-events: none;
}

/* --------------------------------------------------------------- hero -- */

/* The trailer *is* the hero - there is no key-art band above it, so the
   section only has to give the video some room and a coloured glow behind. */
.hero {
  padding: clamp(20px, 3vw, 34px) 0 clamp(16px, 2.4vw, 28px);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(190, 80, 141, .40) 0%, transparent 62%),
    var(--ink);
}

.hero__copy {
  padding-top: clamp(22px, 3.4vw, 34px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 9px 16px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.4;
}
.eyebrow .dot {
  width: 9px; height: 9px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 189, 8, .22);
}

/* Only the sub-pages use this. The landing page carries no visible heading at
   all - see the README - so do not reach for it there. */
.page__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 18px;
  color: #fff;
  text-shadow: 0 3px 0 var(--violet), 0 6px 0 rgba(0,0,0,.35);
}

.lede {
  max-width: 62ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

/* ----------------------------------------------------------- sections -- */

/* No banded backgrounds any more, so two adjacent sections stack their WHOLE
   padding into one empty gap - read every value here as roughly half the space
   you actually want to see between two blocks. */
.section { padding: clamp(16px, 2.4vw, 28px) 0; }

/* ------------------------------------------------------------ trailer -- */

.video {
  position: relative;
  border: 4px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 0 var(--line);
  aspect-ratio: 16 / 9;
}
.video__poster,
.video iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}

/* Only ever rendered inside <noscript>, so it needs no display toggle. */
.video__nojs {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 19, .72);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(20, 20, 27, .34);
  cursor: pointer;
}
.video__tri {
  display: grid;
  place-items: center;
  width: clamp(72px, 11vw, 104px);
  aspect-ratio: 1;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--pink) 0%, var(--rose) 100%);
  box-shadow: 0 6px 0 var(--line);
  transition: transform .12s steps(2);
}
.video__play:hover .video__tri { transform: scale(1.06); }
.video__tri::after {
  content: "";
  width: 0; height: 0;
  /* a triangle's visual centre sits left of its bounding box - nudge it back */
  margin-left: clamp(4px, .6vw, 7px);
  border-left: clamp(20px, 3vw, 28px) solid #fff;
  border-top: clamp(13px, 1.9vw, 18px) solid transparent;
  border-bottom: clamp(13px, 1.9vw, 18px) solid transparent;
}

/* ---------------------------------------------------------- carousel --- */

.carousel { position: relative; }

/* A scroll-snapped strip rather than a JS-positioned one: swipe on touch and
   the trackpad work natively, and the arrows below are only a convenience. */
.carousel__track {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;            /* the dots are the position indicator */
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }

.carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  min-width: 0;
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 6px 0 var(--line);
  color: var(--text);
  cursor: zoom-in;
  overflow: hidden;
  line-height: 0;
}
.shot img { width: 100%; }

.shot__cap {
  display: block;
  padding: 12px 16px;
  background: var(--panel);
  border-top: 3px solid var(--line);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

/* Arrows sit just outside the frame on wide screens and overlap it on narrow
   ones, where there is no gutter to put them in. */
.carousel__arrow {
  position: absolute;
  top: calc(50% - 28px);
  transform: translateY(-50%);
  z-index: 2;
  width: 46px; height: 56px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 5px 0 var(--line);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, transform .08s steps(2);
}
.carousel__arrow:hover { background: var(--panel-2); }
.carousel__arrow:active { transform: translateY(calc(-50% + 4px)); }
.carousel__arrow[disabled] { opacity: .3; cursor: default; }
.carousel__arrow--prev { left: -14px; }
.carousel__arrow--next { right: -14px; }

@media (min-width: 1220px) {
  .carousel__arrow--prev { left: -60px; }
  .carousel__arrow--next { right: -60px; }
}
@media (max-width: 560px) {
  .carousel__arrow { width: 38px; height: 46px; font-size: 22px; }
  .carousel__arrow--prev { left: -6px; }
  .carousel__arrow--next { right: -6px; }
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.carousel__dot {
  width: 12px; height: 12px;
  padding: 0;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  cursor: pointer;
  transition: background .15s, transform .12s steps(2);
}
.carousel__dot:hover { background: var(--muted); }
.carousel__dot[aria-current="true"] {
  background: var(--pink);
  transform: scale(1.25);
}

.shots__hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ------------------------------------------------------------- store --- */

.store { text-align: center; }

/* The Steam widget lays out at a fixed 980px internally and does not reflow,
   so it is only shown once the container can actually hold its 646px frame.
   The button below it is the narrow-screen substitute - mobile-first, so a
   width the media query never matches still gets a working Steam link. */
.store__widget { display: none; }

/* flex, not the .btn default inline-flex: inline would flow it up beside the
   inline-block section heading instead of onto its own centred line. */
.store__steam {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

@media (min-width: 710px) {
  .store__widget {
    display: block;
    width: 646px;
    margin: 0 auto;
  }
  .store__widget iframe {
    display: block;
    width: 646px;
    height: 190px;
    border: 0;
    border-radius: var(--radius);
    background: var(--panel);
  }
  .store__steam { display: none; }
}

.store__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}
.store__row .btn { flex: 0 1 260px; }

/* ------------------------------------------------------------ footer --- */

.footer {
  padding: clamp(40px, 6vw, 64px) 0 32px;
  background: var(--ink);
  border-top: 3px solid var(--line);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer__brand img { width: 190px; }
.footer__by { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.footer__by strong { color: var(--text); }

.footer__links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 40px;
  font-size: 15px;
}
.footer__links a { color: var(--muted); text-decoration: none; }
.footer__links a:hover { color: var(--cyan); text-decoration: underline; }

.footer__legal {
  max-width: var(--wrap);
  margin: 40px auto 0;
  padding: 22px var(--pad) 0;
  border-top: 2px solid var(--panel);
  color: #6E6E86;
  font-size: 13px;
}

@media (max-width: 560px) {
  .footer__links { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------- lightbox --- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(4px, 2vw, 20px);
  padding: clamp(12px, 4vw, 48px);
  background: rgba(10, 10, 14, .93);
}
.lightbox[hidden] { display: none; }

.lightbox__figure { margin: 0; min-width: 0; }
.lightbox__figure img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: #000;
}
.lightbox__figure figcaption {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.lightbox__close,
.lightbox__nav {
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}
.lightbox__nav {
  padding: 18px 12px;
  font-size: 30px;
}
.lightbox__nav:hover { background: var(--panel-2); }
.lightbox__close {
  position: absolute;
  top: clamp(10px, 3vw, 24px);
  right: clamp(10px, 3vw, 24px);
  width: 44px; height: 44px;
  font-size: 26px;
}

@media (max-width: 620px) {
  .lightbox__nav { padding: 14px 8px; font-size: 22px; }
}

/* ------------------------------------------------------------ motion --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
