/* ==========================================================================
   Portal page
   ========================================================================== */

.portal-page {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(203, 184, 248, 0.55), transparent 60%),
    radial-gradient(900px 620px at 5% 10%, rgba(255, 214, 232, 0.85), transparent 62%),
    linear-gradient(180deg, #fff8fc 0%, #fff2f9 45%, #f4efff 100%);
}

.bg-blobs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%;
  filter: blur(2px);
  opacity: 0.5;
}

.blob-a {
  top: 420px;
  left: -180px;
  width: 420px;
  height: 420px;
  background: linear-gradient(145deg, #ffd8ea, #ffc0de);
  animation: drift 18s ease-in-out infinite;
}

.blob-b {
  top: 980px;
  right: -220px;
  width: 520px;
  height: 520px;
  background: linear-gradient(145deg, #e6dcff, #d3c2ff);
  animation: drift 22s ease-in-out infinite reverse;
}

.blob-c {
  top: 1750px;
  left: -160px;
  width: 380px;
  height: 380px;
  background: linear-gradient(145deg, #d8f2ff, #bfe6ff);
  opacity: 0.4;
  animation: drift 26s ease-in-out infinite;
}

.spark {
  position: absolute;
  color: #e78abe;
  opacity: 0.6;
  font-size: 1.6rem;
  animation: twinkle 4s ease-in-out infinite;
}

.spark-a { top: 210px; right: 8%; }
.spark-b { top: 760px; left: 6%; font-size: 2rem; animation-delay: 1.2s; }
.spark-c { top: 1480px; right: 12%; font-size: 1.1rem; animation-delay: 2.1s; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(24px, -36px, 0) rotate(6deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 0.8; transform: scale(1.1) rotate(12deg); }
}

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

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--plum-900);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(150deg, #fff, #ffe1f0);
  border: 2px solid #ffd0e6;
  box-shadow: 0 10px 18px -12px rgba(180, 40, 110, 0.6);
  transform: rotate(-4deg);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
}

.brand-text em {
  font-style: normal;
  color: var(--pink-600);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--plum-700);
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--plum-900);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero-copy h1 {
  font-size: clamp(2.9rem, 6.2vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.squiggle {
  position: relative;
  display: inline-block;
  color: var(--pink-600);
}

.squiggle::after {
  content: "";
  position: absolute;
  left: 2%;
  right: -1%;
  bottom: -0.1em;
  height: 0.16em;
  border-radius: 999px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M2 8c10-8 20 4 30-1s20-5 30 1 20 3 30-2 18 1 26 0' stroke='%23FF86C0' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 34rem;
  margin-top: 1.35rem;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--plum-700);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.9rem;
}

.hero-facts {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin: 2.4rem 0 0;
  padding: 1.1rem 1.4rem;
  list-style: none;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.52);
  width: fit-content;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px -34px rgba(84, 27, 62, 0.7);
}

.hero-facts li {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--plum-600);
}

.hero-facts strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--plum-900);
}

/* ---------- Hero art ---------- */

.hero-art {
  position: relative;
  min-width: 0;
}

.art-frame {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 6px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 40px 80px -40px rgba(84, 27, 62, 0.55), 0 0 0 1px rgba(255, 174, 214, 0.6);
  transform: rotate(1.4deg);
  background: #ffe4f1;
  transition: transform 260ms ease;
}

.hero-art:hover .art-frame {
  transform: rotate(0.2deg) translateY(-4px);
}

.art-sky {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: linear-gradient(180deg, #ffd9ec 0%, #ffc2e2 34%, #e7ccff 68%, #c9e5ff 100%);
}

.art-cloud {
  position: absolute;
  display: block;
  width: 120px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  filter: blur(0.2px);
}

.art-cloud::before,
.art-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.art-cloud::before {
  width: 58px;
  height: 58px;
  top: -26px;
  left: 18px;
}

.art-cloud::after {
  width: 44px;
  height: 44px;
  top: -16px;
  right: 16px;
}

.art-cloud.c1 { top: 16%; left: 8%; transform: scale(0.9); }
.art-cloud.c2 { top: 28%; right: 4%; transform: scale(0.65); opacity: 0.85; }

.art-hill {
  position: absolute;
  bottom: 20%;
  display: block;
  width: 72%;
  height: 44%;
  border-radius: 50% 50% 0 0;
}

.art-hill.h1 {
  left: -18%;
  background: linear-gradient(180deg, #c7f3e2, #a5e6ce);
}

.art-hill.h2 {
  right: -22%;
  bottom: 17%;
  width: 78%;
  height: 38%;
  background: linear-gradient(180deg, #e5d7ff, #cdb8fa);
}

.art-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 21%;
  background: linear-gradient(180deg, #ffd7e9 0%, #ffc1de 30%, #f6a9ce 100%);
  border-top: 6px solid #fff0f7;
}

.art-ground::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -10px;
  right: -10px;
  height: 24px;
  background:
    radial-gradient(circle at 14px 16px, #fff3f9 14px, transparent 14.5px) 0 0 / 48px 24px repeat-x;
}

.art-spike {
  position: absolute;
  bottom: 19%;
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-bottom: 34px solid #b48bf0;
  filter: drop-shadow(0 3px 0 rgba(255, 255, 255, 0.55));
}

.art-spike.s1 { left: 9%; }
.art-spike.s2 { left: 15%; bottom: 18%; transform: scale(0.85); }
.art-spike.s3 { left: 20%; }

.art-coin {
  position: absolute;
  top: 26%;
  left: 68%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff6c9, #ffd45e);
  border: 3px solid #ffb42e;
  color: #c47a00;
  font-size: 1rem;
  box-shadow: 0 6px 0 -2px #e9a521;
  animation: coinFloat 2.8s ease-in-out infinite;
}

@keyframes coinFloat {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-10px) rotate(8deg); }
}

.art-pinky {
  position: absolute;
  left: 41%;
  bottom: 17%;
  width: 172px;
  height: 190px;
  animation: idleFloat 3.4s ease-in-out infinite;
}

@keyframes idleFloat {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-9px) scaleY(1.015); }
}

.art-pinky .ear {
  position: absolute;
  top: 0;
  width: 54px;
  height: 96px;
  border-radius: 50% 50% 44% 44% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, #ffd3e7, #ffabd3);
  border: 4px solid #e273a9;
  transform-origin: bottom center;
}

.art-pinky .ear-l { left: 24px; transform: rotate(-14deg); }
.art-pinky .ear-r { right: 18px; transform: rotate(16deg); }

.art-pinky .ear::after {
  content: "";
  position: absolute;
  inset: 15px 12px 22px;
  border-radius: inherit;
  background: #ff86b9;
  opacity: 0.55;
}

.art-pinky .bow {
  position: absolute;
  z-index: 2;
  top: 44px;
  right: 2px;
  width: 46px;
  height: 32px;
  background: linear-gradient(145deg, #ff7db8, #f24592);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: rotate(12deg);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08);
}

.art-pinky .bow::before,
.art-pinky .bow::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 24px;
  height: 30px;
  margin-top: -15px;
  background: #ff5fa7;
  border-radius: 12px 2px 12px 2px;
}

.art-pinky .bow::before { left: -14px; transform: rotate(10deg); }
.art-pinky .bow::after { right: -12px; transform: rotate(-8deg) scaleX(-1); }

.art-pinky .face {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 156px;
  border-radius: 48% 48% 44% 44% / 52% 52% 46% 46%;
  background: linear-gradient(160deg, #ffd6e9 0%, #ffb3d6 48%, #ff92c4 100%);
  border: 5px solid #e273a9;
  box-shadow: inset -10px -14px 0 rgba(255, 255, 255, 0.18), inset 12px 12px 0 rgba(255, 255, 255, 0.28);
}

.art-pinky .eye {
  position: absolute;
  top: 48px;
  width: 30px;
  height: 36px;
  border-radius: 50%;
  background: #4a2340;
  box-shadow: 0 4px 0 rgba(74, 35, 64, 0.08);
}

.art-pinky .eye::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 12px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}

.art-pinky .eye::after {
  content: "";
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd6e9;
  opacity: 0.9;
}

.art-pinky .eye-l { left: 38px; }
.art-pinky .eye-r { right: 38px; }

.art-pinky .blush {
  position: absolute;
  top: 94px;
  width: 24px;
  height: 13px;
  border-radius: 50%;
  background: #ff5f9e;
  opacity: 0.42;
  filter: blur(0.6px);
}

.art-pinky .blush-l { left: 22px; }
.art-pinky .blush-r { right: 22px; }

.art-pinky .mouth {
  position: absolute;
  top: 96px;
  left: 50%;
  width: 20px;
  height: 12px;
  margin-left: -10px;
  border-bottom: 4px solid #5a2447;
  border-radius: 0 0 50% 50%;
}

.art-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--plum-700);
  background: rgba(255, 252, 254, 0.9);
  border-top: 2px solid rgba(255, 255, 255, 0.9);
}

.art-label .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5fa7;
  box-shadow: 0 0 0 4px rgba(255, 95, 167, 0.18);
}

.sticker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--cream);
  border: 2px solid #ffd0e6;
  box-shadow: var(--shadow-soft);
}

.sticker-a {
  top: -14px;
  right: 12px;
  color: var(--pink-700);
  transform: rotate(6deg);
}

.sticker-b {
  bottom: 44px;
  left: -18px;
  color: #6c4bb8;
  border-color: #e0d2ff;
  transform: rotate(-5deg);
}

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

.section {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 4.5rem) 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 600;
}

.section-note {
  max-width: 26rem;
  font-size: 0.96rem;
  color: var(--plum-600);
}

/* ---------- Game grid & cards ---------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.6rem;
}

.game-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 254, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-card);
  transition: transform 220ms ease, box-shadow 220ms ease;
  backdrop-filter: blur(10px);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 38px 70px -40px rgba(70, 20, 56, 0.65);
}

.card-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(160deg, #ffd8ea, #d9e6ff);
  border-bottom: 2px solid #ffe1ef;
  text-decoration: none;
}

.card-thumb svg {
  display: block;
  width: 100%;
  height: auto;
}

.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(53, 19, 43, 0.22));
  opacity: 0;
  transition: opacity 200ms ease;
}

.card-thumb:hover::after {
  opacity: 1;
}

.thumb-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 46px;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  background: rgba(255, 252, 254, 0.94);
  color: var(--plum-900);
  font-family: var(--font-display);
  font-weight: 600;
  box-shadow: 0 12px 24px -10px rgba(61, 19, 47, 0.5);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.card-thumb:hover .thumb-play,
.card-thumb:focus-visible .thumb-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink-700);
}

.card-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pink-400);
}

.card-body h3 {
  margin-top: 0.55rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.card-body p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--plum-600);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--pink-100);
  border: 1px solid #ffd5e8;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--pink-700);
}

.card-footer .btn {
  flex: none;
}

/* ---------- How to play ---------- */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.how-card {
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 50px -40px rgba(84, 27, 62, 0.6);
}

.how-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffe3f0, #ffc9e2);
  border: 2px solid #ffcce3;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--pink-700);
}

.how-card:nth-child(2) .how-icon {
  background: linear-gradient(145deg, #f0e9ff, #ddceff);
  border-color: #dccdff;
  color: #6c4bb8;
}

.how-card:nth-child(3) .how-icon {
  background: linear-gradient(145deg, #ffe9f3, #ffd0e6);
  color: var(--pink-700);
}

.how-card h3 {
  font-size: 1.2rem;
}

.how-card p {
  margin-top: 0.45rem;
  font-size: 0.93rem;
  color: var(--plum-600);
}

/* ---------- About ---------- */

.about-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1.8rem, 4vw, 3.2rem);
  border-radius: 36px;
  background:
    radial-gradient(500px 300px at 90% 0%, rgba(255, 200, 228, 0.7), transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(248, 240, 255, 0.85));
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-card);
}

.about-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.about-card p:not(.eyebrow) {
  max-width: 38rem;
  margin-top: 0.9rem;
  color: var(--plum-600);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0;
}

.about-stats div {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #ffe1ef;
}

.about-stats dt {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pink-700);
}

.about-stats dd {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--plum-900);
}

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

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 2.2rem 0 2.8rem;
  border-top: 1px solid rgba(124, 58, 98, 0.15);
  font-size: 0.9rem;
  color: var(--plum-600);
}

.site-footer p:first-child {
  font-family: var(--font-display);
  font-weight: 500;
}

.footer-small {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--plum-500);
}

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

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.8rem;
    padding-top: 2.5rem;
  }

  .hero-copy {
    max-width: 40rem;
  }

  .hero-art {
    width: min(100%, 560px);
    margin: 0 auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .how-grid {
    grid-template-columns: 1fr 1fr;
  }

  .how-card:last-child {
    grid-column: span 2;
  }

  .about-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header {
    width: calc(100% - 28px);
    padding-top: 16px;
  }

  .brand-text {
    font-size: 1.2rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .brand-mark svg {
    width: 30px;
    height: 30px;
  }

  .site-nav .nav-link {
    display: none;
  }

  .hero,
  .section,
  .site-footer {
    width: calc(100% - 28px);
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 12vw, 3.6rem);
  }

  .hero-facts {
    width: 100%;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .sticker-b {
    left: 6px;
    bottom: 40px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .how-card:last-child {
    grid-column: auto;
  }

  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-footer .btn {
    width: 100%;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .spark {
    display: none;
  }
}

@media (max-width: 390px) {
  .brand-text em {
    display: none;
  }

  .hero-facts {
    padding: 0.9rem 1rem;
  }

  .hero-facts strong {
    font-size: 1.3rem;
  }
}
