/* ==========================================================================
   PokeNexus landing — v2 "adventure board" design
   Full-screen pixel world, center crest, five themed cards, RPG-framed footer.
   Original work inspired by a reference mock; uses our own assets.
   ========================================================================== */

:root {
  --void: #070b13;
  --panel: #0d1626;
  --panel-2: #0a1120;
  --txt: #f3f1e7;
  --mut: #aab6c9;
  --stroke: rgba(255, 255, 255, 0.10);

  --gold: #f0c04a;
  --gold-hi: #ffe293;
  --gold-lo: #a9781f;
  --gold-line: rgba(240, 192, 74, 0.55);
  --cyan: #55c7ea;

  /* per-card themes */
  --c-game: #4a86e8;
  --c-regions: #47b45f;
  --c-media: #8f5fe0;
  --c-community: #e0a33f;
  --c-discord: #6b74f0;

  --display: "Barlow Semi Condensed", sans-serif;
  --body: "Inter", sans-serif;
  /* catch orb: two domes split by a band + hollow hub */
  --orb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 0 1 9.95 9H16.9a5 5 0 0 0-9.8 0H2.05A10 10 0 0 1 12 2Zm0 20a10 10 0 0 1-9.95-9H7.1a5 5 0 0 0 9.8 0h4.95A10 10 0 0 1 12 22Z'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3C/svg%3E");
}

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

body {
  font-family: var(--body);
  background: var(--void);
  color: var(--txt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- world backdrop ---------- */
.world {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.world-bg {
  position: absolute;
  inset: -3%;
  background: url("../assets/headerbg.jpg") center 38% / cover no-repeat;
  image-rendering: pixelated;
  filter: saturate(1.02) brightness(0.82);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1.03) translate(0, 0); }
  to   { transform: scale(1.09) translate(-1%, -1.4%); }
}
.world-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(85% 65% at 50% 40%, rgba(7, 11, 19, 0.35), rgba(7, 11, 19, 0.72) 72%, var(--void)),
    linear-gradient(180deg, rgba(7, 11, 19, 0.5), transparent 22% 78%, rgba(7, 11, 19, 0.85));
}
@media (prefers-reduced-motion: reduce) { .world-bg { animation: none; } }

.world-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 54px 22px 30px;
}

/* ---------- hero crest ---------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.hero-logo {
  width: min(560px, 84vw);
  filter: drop-shadow(0 10px 34px rgba(0, 0, 0, 0.85));
}

.tag { display: flex; flex-direction: column; align-items: center; }
.tagline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(12px, 1.6vw, 14px);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #f6cf5a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.45);
}
.tagline i { color: #f6cf5a; font-style: normal; font-size: 8px; opacity: 0.85; transform: translateY(-2px); }

.hero-sub {
  max-width: 40ch;
  font-size: clamp(15px, 2vw, 17px);
  color: #dfe6f0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.5);
}
.hero-sub b { color: var(--gold); font-weight: 600; }

/* ---------- big gold play button ---------- */
.play-big {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 14px 48px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #40290a;
  cursor: pointer;
  border: 0;
  /* #61 Banner - Glossy */
  background: linear-gradient(180deg, #ffe293, #f0c04a 55%, #c69a35);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 0 0 2px rgba(74, 52, 13, 0.55);
  filter: drop-shadow(0 0 0.6px #2a1c07) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.42));
  transition: transform 0.14s ease, filter 0.14s ease;
}
.play-big:hover { transform: translateY(-2px);
  filter: drop-shadow(0 0 0.6px #2a1c07) drop-shadow(0 8px 13px rgba(0, 0, 0, 0.45)) brightness(1.04); }
/* catch orb inside the Play buttons (not the Login/Register or Discord buttons) */
.play-big::before,
.mbtn:not(.mbtn-full):not(.mbtn-discord)::before {
  content: "";
  width: 15px; height: 15px; flex: none;
  background: #3a2606;
  -webkit-mask: var(--orb) center / contain no-repeat;
  mask: var(--orb) center / contain no-repeat;
}

/* ---------- card row ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  width: min(1180px, 100%);
  margin-top: 6px;
}
.card {
  --c: var(--stroke);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 16px 18px;
  text-align: center;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c) 55%, var(--gold-line));
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 45%),
    linear-gradient(180deg, rgba(13, 22, 38, 0.9), rgba(8, 13, 24, 0.94));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 85%, white 5%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), 0 18px 40px rgba(0, 0, 0, 0.6),
    0 0 26px color-mix(in srgb, var(--c) 45%, transparent);
}
/* hex badge floating over the top edge */
.card-badge {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 65%, white 20%), var(--c));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}
.card-badge svg { width: 24px; height: 24px; color: #fff; }
.card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--c) 35%, transparent) 100%);
}
/* brand logo thumbnail (Discord) instead of a screenshot */
.card-thumb-brand {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #5865f2, #4049c0);
}
.card-thumb-brand::after { display: none; }
.card-thumb-brand .brand-logo { width: 46%; height: auto; color: #fff; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35)); }
.card-title {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c) 60%, white 40%);
}
.card-desc { margin-top: 6px; font-size: 13px; color: var(--mut); }
.card-arrow {
  margin-top: 12px;
  color: color-mix(in srgb, var(--c) 60%, white 25%);
  font-size: 16px;
  transition: transform 0.16s ease;
}
.card:hover .card-arrow { transform: translateX(4px); }

.card-game { --c: var(--c-game); }
.card-regions { --c: var(--c-regions); }
.card-media { --c: var(--c-media); }
.card-community { --c: var(--c-community); }
.card-discord { --c: var(--c-discord); }

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 46px);
  background: linear-gradient(180deg, rgba(8, 13, 24, 0.72), rgba(6, 10, 18, 0.92));
  border-top: 1px solid var(--gold-line);
  backdrop-filter: blur(6px);
}
.foot-left { font-size: 11.5px; letter-spacing: 0.02em; color: #93a0b3; text-transform: uppercase; }
.foot-badges { display: flex; align-items: center; justify-content: center; gap: 14px; }
.foot-badges img {
  width: 30px; height: 30px; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.15s ease;
}
.foot-badges img:hover { transform: translateY(-3px) scale(1.08); }
.foot-right { text-align: right; font-size: 12px; color: var(--mut); }
.foot-right button {
  background: none; border: 0; padding: 0; margin: 0 2px; font: inherit;
  color: var(--mut); cursor: pointer; letter-spacing: 0.04em;
}
.foot-right button:hover { color: var(--gold); text-decoration: underline; }
.foot-right .dot { color: #56617a; margin: 0 6px; }

/* ==========================================================================
   MODALS (shared with the card actions + login/legal)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 7, 13, 0.74);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.modal.open { opacity: 1; }
.modal[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .modal { transition: none; } }

.modal-box {
  position: relative;
  width: min(620px, 100%);
  max-height: min(86vh, 900px);
  overflow-y: auto;
  background-color: #0b1220;
  background-image:
    linear-gradient(180deg, rgba(8, 13, 24, 0.80), rgba(8, 13, 24, 0.93)),
    url("../assets/modal-bg.png");
  background-repeat: no-repeat;
  background-position: center, center 40%;
  background-size: cover, auto 140%;
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  padding: 42px 40px 36px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(14px);
  transition: transform 0.22s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 192, 74, 0.4) transparent;
}
.modal.open .modal-box { transform: none; }
.modal-wide { width: min(920px, 100%); }
.modal-box::-webkit-scrollbar { width: 8px; }
.modal-box::-webkit-scrollbar-thumb { background: rgba(240, 192, 74, 0.3); border-radius: 8px; }

/* faint catch-orb watermark in the login/register modal — top-right, behind all UI */
.modal[data-name="account"] .modal-box {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='3'%3E%3Ccircle cx='60' cy='60' r='52'/%3E%3Cline x1='9' y1='60' x2='40' y2='60'/%3E%3Cline x1='80' y1='60' x2='111' y2='60'/%3E%3Ccircle cx='60' cy='60' r='16'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(8, 13, 24, 0.80), rgba(8, 13, 24, 0.93)),
    url("../assets/modal-bg.png");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: right -55px top -55px, center, center 40%;
  background-size: 320px, cover, auto 140%;
}

.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--txt);
  font-size: 15px;
  cursor: pointer;
}
.modal-close:hover { border-color: var(--gold); color: var(--gold); }

.m-kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.m-kicker::before {
  content: "";
  width: 18px; height: 18px; flex: none;
  background: var(--gold);
  -webkit-mask: var(--orb) center / contain no-repeat;
  mask: var(--orb) center / contain no-repeat;
}
.m-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 1.14;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.m-body { color: var(--mut); margin-bottom: 20px; }

.m-features { list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.m-features li { padding: 15px 0; border-top: 1px solid var(--stroke); }
.m-features li:nth-child(-n+2) { border-top: 0; padding-top: 2px; }
.m-features b {
  display: block;
  font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--cyan);
}
.m-features span { color: var(--mut); font-size: 14px; }

.m-regions { list-style: none; }
.m-regions li {
  display: grid;
  grid-template-columns: 52px 128px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--stroke);
}
.m-regions li:last-child { border-bottom: 1px solid var(--stroke); }
.m-regions i {
  position: relative;
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  font-family: var(--display); font-style: normal; font-weight: 700; font-size: 15px;
  color: var(--mut);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}
.m-regions li:not(.m-soon) i { color: transparent; }
.m-regions li:not(.m-soon) i::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 28px; height: 28px;
  background: var(--badge) center / contain no-repeat;
}
.m-regions li:nth-child(1) i { --badge: url("../assets/kanto.png"); }
.m-regions li:nth-child(2) i { --badge: url("../assets/johto.png"); }
.m-regions li:nth-child(3) i { --badge: url("../assets/hoenn.png"); }
.m-regions li:nth-child(4) i { --badge: url("../assets/sinnoh.png"); }
.m-regions li:nth-child(5) i { --badge: url("../assets/unova.png"); }
.m-regions b {
  font-family: var(--display); font-weight: 700; font-size: 20px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.m-regions span { color: var(--mut); font-size: 14px; }
.m-soon i, .m-soon b { color: #8a93a2; }

.m-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 14px; }
.m-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-shot { padding: 0; background: none; border: 0; border-radius: 8px; cursor: zoom-in; overflow: hidden; }
.m-shot img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--stroke); transition: transform 0.2s ease, border-color 0.2s ease;
}
.m-shot:hover img { transform: scale(1.04); border-color: var(--gold-line); }
@media (prefers-reduced-motion: reduce) { .m-shot img { transition: none; } .m-shot:hover img { transform: none; } }

.m-discord { border: 1px solid var(--stroke); border-radius: 12px; }

/* buttons inside modals */
.mbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 14px;
  letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  color: #40290a; padding: 13px 28px; margin-top: 20px;
  border: 2px solid #6f4f16; border-radius: 8px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 52%, var(--gold-lo));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 10px 26px rgba(240, 192, 74, 0.24);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.mbtn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.mbtn-full { width: 100%; }
.mbtn-discord {
  color: #fff; border-color: #3a41a8;
  background: linear-gradient(180deg, #7b86ff, #5865f2 60%, #4049c0);
  box-shadow: 0 10px 26px rgba(88, 101, 242, 0.3);
}

/* login / register */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; }
.account-form:last-child { border-left: 1px solid var(--stroke); padding-left: 44px; }
.account-form h4 {
  font-family: var(--display); font-weight: 700; font-size: 18px;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; color: var(--cyan);
}
.account-form label { display: block; font-size: 13px; font-weight: 500; color: var(--mut); margin: 14px 0 6px; }
.account-form input {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--txt);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke);
  border-radius: 10px; padding: 12px 14px;
}
.account-form input::placeholder { color: #6d7686; }
.account-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 192, 74, 0.16); }
.account-aux { display: block; margin-top: 14px; text-align: center; font-size: 13px; color: var(--mut); }
.account-aux:hover { color: var(--txt); }
.account-tos { margin-top: 14px; font-size: 12px; color: var(--mut); }
.account-tos a { color: var(--gold); }
.account-tos .tos-link {
  background: none; border: 0; padding: 0; margin: 0; font: inherit;
  color: var(--gold); text-decoration: underline; cursor: pointer;
}
.account-tos .tos-link:hover { color: #ffe293; }

/* legal */
.m-legal { padding-top: 10px; }
.m-legal + .m-legal { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--stroke); }
.m-legal h3 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.m-legal h4 { color: var(--txt); font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
.m-legal p { color: var(--mut); font-size: 14px; margin-bottom: 12px; }
.m-legal ul { margin: 0 0 12px 20px; color: var(--mut); font-size: 14px; }
.m-legal li { margin-bottom: 8px; }
.m-legal a { color: var(--gold); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 92px; background: rgba(3, 4, 6, 0.9); backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; border: 1px solid var(--stroke); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); }
.lb-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke); border-radius: 12px; color: var(--txt); font-size: 16px; cursor: pointer; }
.lb-close:hover { border-color: var(--gold); color: var(--gold); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; display: grid; place-items: center; background: rgba(14, 16, 20, 0.85); border: 1px solid var(--stroke); border-radius: 50%; color: var(--txt); cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease; }
.lb-nav svg { width: 26px; height: 26px; }
.lb-nav:hover { border-color: var(--gold); color: var(--gold); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: 0.24em; color: var(--mut); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card-discord { grid-column: 2 / 3; }
}
@media (max-width: 720px) {
  .world-inner { gap: 26px; padding: 40px 16px 24px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 26px 12px; }
  .card-discord { grid-column: auto; }
  .foot { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  .foot-left, .foot-right { text-align: center; }
  .modal { padding: 12px; }
  .modal-box { padding: 32px 20px 26px; }
  .m-features { grid-template-columns: 1fr; }
  .m-features li:nth-child(2) { border-top: 1px solid var(--stroke); padding-top: 15px; }
  .m-regions li { grid-template-columns: 40px 1fr; }
  .m-regions i { width: 34px; height: 34px; }
  .m-regions span { grid-column: 1 / -1; }
  .account-grid { grid-template-columns: 1fr; }
  .account-form:last-child { border-left: 0; padding-left: 0; border-top: 1px solid var(--stroke); margin-top: 26px; padding-top: 22px; }
  .m-shots { grid-template-columns: repeat(2, 1fr); }
  .lightbox { padding: 70px 14px; }
  .lb-nav { width: 44px; height: 44px; } .lb-prev { left: 10px; } .lb-next { right: 10px; }
}
@media (max-width: 460px) {
  .cards { grid-template-columns: 1fr; }
}
