/* Project Rebirth site styles: light pages, Pokémon blue banner, yellow calls to action. */

@font-face { font-family: "M PLUS Rounded 1c"; font-weight: 400; font-display: swap; src: url("./assets/fonts/mplus-rounded-400.woff2") format("woff2"); }
@font-face { font-family: "M PLUS Rounded 1c"; font-weight: 500; font-display: swap; src: url("./assets/fonts/mplus-rounded-500.woff2") format("woff2"); }
@font-face { font-family: "M PLUS Rounded 1c"; font-weight: 700; font-display: swap; src: url("./assets/fonts/mplus-rounded-700.woff2") format("woff2"); }
@font-face { font-family: "M PLUS Rounded 1c"; font-weight: 800; font-display: swap; src: url("./assets/fonts/mplus-rounded-800.woff2") format("woff2"); }

:root {
  --red: #e3350d;
  --yellow: #ffcb05;
  --blue: #2a75bb;
  --blue-light: #3f93e4;
  --blue-dark: #1b5aa0;
  --sky: #30a7d7;
  --green: #4dad5b;
  --purple: #9a5fc9;
  --navy: #0f1f3a;
  --ink: #232a3b;
  --gray: #5d6678;
  --line: #e2e7ef;
  --page: #f3f6fa;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "M PLUS Rounded 1c", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

/* Keep the page's light canvas visible while same-origin pages crossfade. */
html { background: var(--page); }

@view-transition { navigation: auto; }

::view-transition { background: var(--page); }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: ease-in-out;
}

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

[hidden] { display: none !important; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font: 500 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3 { margin: 0; color: var(--navy); font-weight: 800; line-height: 1.2; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  --bg: var(--blue);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .16);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .16); }

.btn svg { width: 20px; height: 20px; flex: none; fill: currentColor; }

.btn--yellow { --bg: var(--yellow); --fg: var(--navy); }
.btn--white { --bg: #fff; --fg: var(--navy); }
.btn--white svg { fill: #5865f2; }
.btn--discord { --bg: #5865f2; --fg: #fff; }

.btn--lg { height: 60px; padding: 0 30px; border-radius: 14px; font-size: 19px; }
.btn--sm { height: 42px; padding: 0 18px; border-radius: 10px; font-size: 15px; }

/* ---------- Header ---------- */

.hdr {
  position: sticky;
  z-index: 50;
  top: 0;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(15, 31, 58, .25);
}

.hdr-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: min(1320px, 100% - 2 * var(--gutter));
  height: 76px;
  margin-inline: auto;
}

.hdr-logo { justify-self: start; }
.hdr-logo img { width: auto; height: 58px; }

.hdr-end { display: flex; justify-content: flex-end; }

.nav {
  display: flex;
  align-self: stretch;
}

/* Each section owns a color, shown as the bar under its tab. */
.nav-item {
  --c: var(--red);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  color: var(--gray);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.nav-item svg { width: 20px; height: 20px; fill: var(--c); }

.nav-item::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--c);
  transform: scaleY(.75);
  transform-origin: bottom;
  transition: transform .15s ease;
  content: "";
}

.nav-item:hover { background: #f4f7fb; color: var(--navy); }
.nav-item:hover::after,
.nav-item[aria-current="page"]::after { transform: scaleY(1.5); }
.nav-item[aria-current="page"] { color: var(--navy); }
.nav-item[aria-disabled="true"] { cursor: default; }

.nav-item--home { --c: var(--red); }
.nav-item--play { --c: var(--yellow); }
.nav-item--pokedex { --c: var(--sky); }
.nav-item--locations { --c: var(--green); }
.nav-item--information { --c: var(--purple); }
.nav-item--coming-soon { cursor: default; }
.nav-item--coming-soon:hover { background: transparent; color: var(--gray); }
.nav-item--coming-soon::after { display: none; }
.nav-item--coming-soon > span { line-height: 1.1; }
.nav-item--coming-soon small {
  display: block;
  margin-top: 3px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Banner ---------- */

.banner {
  position: relative;
  z-index: 1;
  overflow: clip;
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue) 55%, var(--blue-dark) 100%);
  color: #fff;
}

/* Sunburst, the classic Pokémon title-card backdrop. It lives inside
   .banner-art so it always radiates from behind the Pokémon. */
.rays {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 2000px;
  aspect-ratio: 1;
  translate: -50% -50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .09) 0deg 6deg, rgba(255, 255, 255, 0) 6deg 12deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 15%, transparent 70%);
          mask-image: radial-gradient(closest-side, #000 15%, transparent 70%);
  animation: spin 180s linear infinite;
}

/* The sunburst and glow are much bigger than the art and spill over the buttons;
   let clicks pass through them. */
.rays,
.banner-glow { pointer-events: none; }

.banner-glow {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(900px, 130%);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0));
}

.banner-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  width: min(1320px, 100% - 2 * var(--gutter));
  min-height: min(600px, calc(100svh - 76px));
  margin-inline: auto;
  padding-block: 40px 48px;
}

.banner-copy {
  animation: rise .8s .1s cubic-bezier(.2, .8, .2, 1) both;
}

.banner-logo {
  width: min(340px, 100%);
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(8, 32, 74, .35));
}

.banner-copy p {
  margin: 0;
  text-shadow: 0 2px 12px rgba(10, 40, 90, .3);
}

.banner-copy .banner-title {
  margin-top: 20px;
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.15;
}

.banner-copy .banner-sub {
  margin: 6px 0 28px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.banner-art {
  position: relative;
  isolation: isolate;
  align-self: center;
  animation: rise .9s .25s cubic-bezier(.2, .8, .2, 1) both;
}

.banner-art img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 26px rgba(10, 35, 80, .35));
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 8vw, 96px) 0; }

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }

.section-head p {
  margin: 12px 0 0;
  color: var(--gray);
  font-size: 17px;
}

.places {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.place {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -26px rgba(15, 31, 58, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}

.place:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 0 var(--line), 0 26px 50px -26px rgba(15, 31, 58, .5);
}

.place-media {
  --tone: var(--green);
  position: relative;
  aspect-ratio: 19 / 12;
  overflow: hidden;
  background: var(--tone);
  isolation: isolate;
}

.place-media::before {
  position: absolute;
  z-index: -1;
  top: 60%;
  left: 50%;
  width: 900px;
  aspect-ratio: 1;
  translate: -50% -50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .12) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 14deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 10%, transparent 60%);
          mask-image: radial-gradient(closest-side, #000 10%, transparent 60%);
  content: "";
}

.place-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.place:hover .place-media img { transform: scale(1.04); }

.place--adventure .place-media { --tone: #57b863; }
.place--colosseum .place-media { --tone: #e8553a; }
.place--resort .place-media { --tone: #36aede; }

.place-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px 24px 24px;
}

.place-body h3 { font-size: 22px; }

.place-body p {
  flex: 1;
  margin: 8px 0 20px;
  color: var(--gray);
}

/* ---------- Community band ---------- */

.community {
  background: var(--yellow);
  color: var(--navy);
}

.community-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  padding-block: 48px;
}

.community h2 { font-size: clamp(24px, 2.8vw, 32px); }

.community p {
  max-width: 46ch;
  margin: 8px 0 0;
  font-size: 17px;
}

.community-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.social {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25);
  transition: transform .12s ease, background-color .12s ease;
}

.social svg { width: 19px; height: 19px; fill: currentColor; }
.social:hover { background: #1d3561; transform: translateY(-1px); }

/* Show community destinations only after the admin has supplied a URL. */
.community-actions [data-link]:not([href]),
.community:not(:has(.community-actions a[href])) { display: none; }

/* ---------- Footer ---------- */

.ftr {
  background: var(--navy);
  color: #c9d2e3;
}

.ftr-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: clamp(40px, 7vw, 100px);
  padding-top: 64px;
  padding-bottom: 48px;
}

.ftr-brand img { width: auto; height: 76px; }

.ftr-brand p {
  max-width: 48ch;
  margin: 12px 0 0;
  color: #9fabc2;
  font-size: 13px;
  line-height: 1.5;
}

.ftr-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
}

.ftr-col h2 {
  margin-bottom: 14px;
  color: #fff;
  font-size: 15px;
}

.ftr-col ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
}

.ftr-col a { color: #c9d2e3; text-decoration: none; }
.ftr-col a[href]:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ftr-col a.is-pending { color: #7d8aa5; }

/* Keep unfinished footer entries and empty columns out of view. */
.ftr-col li:not(:has(a[href])),
.ftr-col:not(:has(a[href])) { display: none; }

/* ---------- Links not set in the admin panel yet ---------- */

[data-link][aria-disabled="true"] { cursor: not-allowed; }
.btn[aria-disabled="true"]:hover,
.social[aria-disabled="true"]:hover { filter: none; transform: none; }

/* Play buttons while the game is down or in maintenance. */
.btn[data-link^="play"][aria-disabled="true"] {
  --bg: #cfd5df;
  --fg: #4a5366;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08);
}

/* ---------- Page title banner (Play, Terms, Privacy, Admin) ---------- */

.page-banner {
  position: relative;
  overflow: clip;
  padding: clamp(40px, 6vw, 64px) 0 clamp(88px, 10vw, 112px);
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue) 60%, var(--blue-dark) 100%);
  color: #fff;
  isolation: isolate;
}

.page-banner::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 85%;
  width: 1400px;
  aspect-ratio: 1;
  translate: -50% -50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .08) 0deg 6deg, rgba(255, 255, 255, 0) 6deg 12deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 10%, transparent 65%);
          mask-image: radial-gradient(closest-side, #000 10%, transparent 65%);
  content: "";
}

/* --page-w lines the title up with the white card below it. */
.page-banner .wrap,
.page-wrap > * {
  width: min(var(--page-w, 860px), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.page-banner h1 {
  color: #fff;
  font-size: clamp(32px, 5vw, 48px);
}

.page-banner p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .85);
  font-size: 17px;
}

.page-wrap {
  position: relative;
  margin-top: -64px;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.page-card {
  padding: clamp(20px, 4vw, 48px);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 24px 50px -30px rgba(15, 31, 58, .4);
}

/* ---------- Play page ---------- */

.play-hero .banner-inner {
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  min-height: min(540px, calc(100svh - 76px));
}

.play-title {
  margin: 18px 0 10px;
  color: #fff;
  font-size: clamp(36px, 4.4vw, 54px);
  line-height: 1.06;
  text-shadow: 0 3px 0 rgba(10, 40, 90, .28);
}

.play-hero .banner-sub { margin-bottom: 30px; }

.play-hero .btn--white .icon-roblox { fill: var(--navy); }

.banner-copy .play-note {
  margin-top: 16px;
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
  font-weight: 500;
}

/* Server status: a pill in the hero, coloured by state. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 16px 8px 14px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--gray);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  box-shadow: 0 10px 22px -14px rgba(8, 32, 74, .8);
}

.banner-copy .status { text-shadow: none; }

.status::before {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status--online { background: #e5f5e8; color: #1d6b2b; }
.status--online::before { animation: ping 2s ease-out infinite; }
.status--maintenance { background: #fff4cc; color: #6f5300; }
.status--down { background: #fde6e0; color: #a3230a; }

/* Place cards: a label over the picture and a full-width Play button. */
.place-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 14px -8px rgba(8, 32, 74, .6);
}

.place-play { align-self: stretch; }
.place-play svg { width: 18px; height: 18px; fill: currentColor; }

.play-community { padding-top: 0; }

.play-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.play-link {
  --c: var(--blue);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(15, 31, 58, .5);
  transition: transform .15s ease, box-shadow .15s ease;
}

.play-link[href]:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 var(--line), 0 24px 44px -26px rgba(15, 31, 58, .55);
}

.play-link.is-pending { opacity: .55; }

.play-link-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--c);
  color: #fff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .16);
}

.play-link-icon svg { width: 26px; height: 26px; fill: currentColor; }

.play-link strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.play-link small {
  display: block;
  color: var(--gray);
  font-size: 14px;
}

.play-link-arrow { width: 18px; height: 18px; fill: var(--gray); }

.play-link--discord { --c: #5865f2; }
.play-link--group { --c: var(--red); }
.play-link--verify { --c: #2e8b3d; }

/* ---------- Loading placeholders ---------- */

/* Shimmering stand-ins in the shape of the content, shown until it arrives. */
.skel {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #e6ecf4;
}

.skel::after,
.place-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, 0) 80%);
  transform: translateX(-100%);
  animation: shimmer 1.4s ease-in-out infinite;
  content: "";
}

/* Picture cards shimmer underneath the image until it has loaded. */
.place-media::after { z-index: -1; opacity: .45; }

.skel-stack { display: grid; gap: 12px; }
.skel--line { width: 100%; height: 14px; }
.skel--title { width: 60%; height: 30px; border-radius: 10px; }
.skel--pill { width: 120px; height: 26px; border-radius: 999px; }
.skel--w20 { width: 20%; }
.skel--w40 { width: 40%; }
.skel--w60 { width: 60%; }
.skel--w80 { width: 80%; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .nav-item { padding-inline: 12px; }
  .nav-item svg { display: none; }
  .places { grid-template-columns: 1fr 1fr; }
  .place--resort { grid-column: 1 / -1; }
  .place--resort .place-media { aspect-ratio: 19 / 8; }
  .ftr-inner { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .hdr-inner {
    grid-template-columns: 1fr auto;
    height: auto;
    padding-top: 10px;
    row-gap: 8px;
  }
  .hdr-logo img { height: 48px; }
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-inline: calc(-1 * var(--gutter));
  }
  .nav-item {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 6px 0 10px;
    font-size: 12.5px;
  }
  .nav-item svg { display: block; width: 18px; height: 18px; }
  .nav-item--coming-soon > span { text-align: center; }
  .nav-item--coming-soon small { font-size: 9px; }

  .banner-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 0;
    padding-block: 32px 40px;
    text-align: center;
  }
  .banner-logo { width: min(300px, 70%); margin-inline: auto; }
  .banner-copy .banner-sub { font-size: 17px; }
  .banner-actions { justify-content: center; }
  .play-hero .banner-inner { grid-template-columns: 1fr; min-height: 0; }
  .play-hero .banner-copy { display: flex; flex-direction: column; align-items: center; }
  .play-links { grid-template-columns: 1fr; }
  .community-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .places { grid-template-columns: 1fr; }
  .place--resort .place-media { aspect-ratio: 19 / 12; }
  .banner-actions .btn--lg { width: 100%; }
  .banner-actions .btn:not(.btn--lg) { flex: 1; padding-inline: 12px; }
  .ftr-cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- Motion ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { rotate: 360deg; } }

@keyframes shimmer { to { transform: translateX(100%); } }

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(29, 107, 43, .45); }
  100% { box-shadow: 0 0 0 9px rgba(29, 107, 43, 0); }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }

  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 0ms; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
