/* Styles for the /play/<slug> and /games landing pages. Colors and fonts match src/styles/main.scss. */

:root {
  --purple-main: #8360f8;
  --purple-hover: #9678fa;
  --purple-dark: #442f87;
  --text-color: #eae6fb;
  --text-muted: #b5abd9;
  --bg: #150f27;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-border: rgba(234, 230, 251, 0.12);
  --primary-font: 'FF-Unit-Pro', sans-serif;
  --display-font: 'hydrophilia-liquid', sans-serif;
  --slogan-font: 'hydrophilia-iced', sans-serif;

  /* Same as main.scss (generateHSL), used by the "How it works" rules copied from the homepage */
  --primary-h: 253.8157894737deg;
  --primary-s: 91.5662650602%;
  --primary-l: 67.4509803922%;
  --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
  --secondary: hsl(252.3076923077deg, 63.9344262295%, 88.0392156863%);
  --secondary-font-liquid: 'hydrophilia-liquid', sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

html {
  font-family: var(--primary-font);
  color: var(--text-color);
  /* bg.svg has no fixed size, so the browser scales it to the page height. The app's <html> is one
     screen tall, so pin the tiles to the screen height to get the same pattern size as the homepage. */
  background: var(--bg) url('/assets/Background/bg.svg') center top / auto 100vh;
}

body {
  margin: 0;
  line-height: 1.5;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.lp-section h2,
.lp-hero__title,
.lp-games h1 {
  line-height: 1.1;
  font-weight: 600;
}

/* Header: centered logo with the slogan callout, same as the homepage (LogoSection.vue) */

.lp-header {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 2rem 2rem 81px;
}

.lp-logo {
  position: relative;
  display: block;
}

.lp-logo img {
  width: 250px;
  height: auto;
}

.lp-logo__callout {
  position: absolute;
  top: 97%;
  right: -15%;
  font-family: var(--slogan-font);
  font-size: 0.9rem;
  text-align: center;
  white-space: pre; /* the slogan text has its own line break */
  rotate: -15deg;
  animation: lp-callout 2s ease-in-out infinite;
}

@keyframes lp-callout {
  0%,
  100% {
    scale: 1;
  }
  50% {
    scale: 1.1;
  }
}

.lp-header__nav {
  position: absolute;
  top: 2rem;
  inset-inline-end: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Language picker: a link to every language version of the page */
.lp-lang {
  position: relative;
}

.lp-lang summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(234, 230, 251, 0.25);
  border-radius: 999px;
  color: var(--text-color);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.lp-lang summary::-webkit-details-marker {
  display: none;
}

.lp-lang summary::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.15rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -0.15rem;
}

.lp-lang img {
  width: 20px;
  height: auto;
  border-radius: 2px;
}

.lp-lang ul {
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  z-index: 10;
  min-width: 12rem;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border: 1px solid rgba(131, 96, 248, 0.35);
  border-radius: 0.75rem;
  background-color: #1f1639;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.4);
}

.lp-lang li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--text-color);
}

.lp-lang li a:hover,
.lp-lang li a[aria-current='true'] {
  background-color: rgba(131, 96, 248, 0.25);
}

.lp-header__nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text-muted);
}

.lp-header__nav a:hover {
  color: var(--text-color);
}

/* Layout */

.lp {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.lp-fold .lp {
  padding-bottom: 0;
}

.lp-section {
  margin-top: 4rem;
}

.lp-section h2 {
  font-size: 1.75rem;
  margin: 0 0 1.25rem;
}

/* First screen: header, hero and the "How it works" hint, like the homepage */

.lp-fold {
  position: relative;
  min-height: 100svh;
  padding-bottom: 4rem; /* room for the pinned "How it works" hint */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lp-fold .lp-header {
  align-self: stretch;
}

.lp-fold .lp-hero {
  width: 100%;
  margin-bottom: 2rem;
}

/* Always at the bottom of the first screen, however long the title or card is */
.lp-fold .home-view__scroll-hint {
  position: absolute;
  top: calc(100svh - 3.75rem);
  left: 50%;
  translate: -50% 0;
  margin: 0;
}

/* Hero: centered title, intro and stats, then one card with the thumbnail and the play widget */

.lp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 0.5rem;
}

.lp-hero__title {
  margin: 0 0 1rem;
  font-weight: 400;
}

.lp-hero__pretitle {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--primary-font);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  color: #a78bfa;
}

.lp-hero__name {
  display: block;
  font-family: var(--display-font);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  color: #fff;
}

.lp-hero__intro {
  max-width: 44rem;
  margin: 0 0 2.5rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* Stats sit in a small bar over the bottom of the thumbnail */
.lp-stats {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  translate: -50% 0;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background-color: rgba(21, 15, 39, 0.8);
  backdrop-filter: blur(6px);
  list-style: none;
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--text-muted);
}

.lp-stats strong {
  color: var(--text-color);
}

.lp-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 41.5rem;
  border: 1px solid rgba(131, 96, 248, 0.25);
  border-radius: 1.5rem;
  overflow: hidden;
  background-color: rgba(6, 1, 24, 0.6);
  backdrop-filter: blur(4px);
  box-shadow: 0 30px 80px -15px rgba(131, 96, 248, 0.35);
  text-align: left;
}

.lp-card__media {
  position: relative;
  aspect-ratio: 1;
  background-color: #fff;
}

.lp-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-card__play {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem; /* reserves the widget's space so the page doesn't jump when it mounts */
  padding: 1.75rem;
  border-left: 1px solid rgba(131, 96, 248, 0.25);
}

.lp-card__play > * {
  width: 100%;
}

/* Links in text */

.lp-more a {
  color: var(--purple-hover);
}

/* Related / all games grid */

.lp-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-related a {
  display: block;
  text-decoration: none;
}

.lp-related img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1rem;
  border: 3px solid transparent;
  transition: border-color 0.15s;
}

.lp-related a:hover img {
  border-color: var(--purple-main);
}

.lp-related__title {
  display: block;
  margin-top: 0.5rem;
  font-weight: 500;
}

.lp-related__meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.lp-more {
  margin-top: 1.25rem;
}

/* "See more at Pixoguess.com" above the footer; the button reuses .how-it-works__play-now */
.lp:has(+ .lp-site-cta) {
  padding-bottom: 0;
}

.lp-site-cta {
  text-align: center;
  padding: 0 1rem 1.5rem;
}

.lp-site-cta p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Footer: the homepage's Discord / Terms links (styles under "How it works" below) */

.lp-footer {
  padding: 1rem 1rem 2rem;
}

/* All games page */

.lp-games-intro {
  max-width: 48rem;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.lp-games h1 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin: 2rem 0 1rem;
}

/* Mobile */

@media (max-width: 800px) {
  .lp-card {
    grid-template-columns: 1fr;
    max-width: 26rem;
  }

  .lp-card__media {
    aspect-ratio: 4 / 3;
  }

  /* On phones the card can't fit the first screen, so the hint follows it instead of covering the play box */
  .lp-fold .home-view__scroll-hint {
    position: static;
    translate: none;
    margin-top: 2rem;
  }

  .lp-card__play {
    min-height: 0;
    padding: 2rem 1.5rem;
    border-left: 0;
    border-top: 1px solid rgba(131, 96, 248, 0.25);
  }

  /* The footer has the same links; on phones the header keeps the logo and the language picker */
  .lp-header__nav > a {
    display: none;
  }

  .lp-header {
    flex-direction: column;
    align-items: center;
    padding: 1rem 1rem 3rem;
  }

  .lp-header__nav {
    position: static;
    order: -1; /* above the logo */
    align-self: flex-end;
    margin-bottom: 0.75rem;
  }

  .lp-section {
    margin-top: 3rem;
  }
}

/* How it works: copied from the homepage (Home.vue) so both look the same.
   If you change the homepage section, update this and the markup in play.html. */

/* main.scss base styles the homepage section relies on */
.how-it-works {
  line-height: normal;
}

:where(.how-it-works) h3 {
  font-family: var(--primary-font);
  font-weight: 600;
}

:where(.how-it-works) p {
  font-family: var(--primary-font);
  font-weight: 400;
}

.home-view__scroll-hint {
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-family: var(--secondary-font-liquid);
  animation: bounce 2s infinite;
  margin-bottom: 1rem;
  text-decoration: none;
}

.home-view__scroll-hint:hover {
  color: #fffc;
}

.home-view__scroll-hint svg {
  font-size: 0.9rem;
}

@keyframes bounce {
  0%,
  to {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.how-it-works {
  padding: 40px 20px 100px;
  max-width: 1000px;
  margin: 0 auto;
  font-family: var(--secondary-font-liquid);
}

.how-it-works__title {
  text-align: center;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--secondary);
  font-family: var(--secondary-font-liquid);
}

.how-it-works__subtitle {
  text-align: center;
  font-size: 20px;
  color: var(--secondary);
  margin-bottom: 3rem;
}

.how-it-works__stages {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 1rem;
}

.how-it-works__stage {
  text-align: center;
}

.how-it-works__stage-img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 8px;
  display: block;
  border: 2px solid var(--primary);
}

.how-it-works__stage-img--final {
  border-color: #22c55e;
}

.how-it-works__stage-label {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--secondary-font-liquid);
}

.how-it-works__demo-desc {
  text-align: center;
  font-size: 20px;
  color: var(--secondary);
  line-height: 1.5;
  max-width: 500px;
  margin: 1.5rem auto 3.5rem;
}

.how-it-works__modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 4rem;
}

.how-it-works__mode {
  background: hsla(var(--primary-h), var(--primary-s), 5%, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 30px 80px -15px hsla(var(--primary-h), var(--primary-s), calc(var(--primary-l) + 0%), 0.1);
  display: flex;
  flex-direction: column;
}

.how-it-works__mode-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.how-it-works__mode-header h3 {
  font-size: 22px;
  font-weight: 700;
}

.how-it-works__mode-header p {
  font-size: 14px;
  color: #ffffff80;
  width: 100%;
  margin-top: 0;
}

.how-it-works__mode-illustration {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.how-it-works__steps {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-evenly;
}

.how-it-works__step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.how-it-works__step-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-family: var(--secondary-font-liquid);
}

.how-it-works__step-num--trivia,
.how-it-works__step-num--party {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.how-it-works__step-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
  margin-top: 0.1rem;
}

.how-it-works__step-desc {
  font-size: 16px;
  color: #ffffff8c;
  line-height: 1.5;
}

.how-it-works__cta {
  text-align: center;
}

/* The homepage uses @kvass/ui buttons here; these reproduce their computed styles */
.how-it-works__play-now {
  display: inline-block;
  padding: 16px 40px;
  border: 1px solid transparent;
  border-radius: 32px;
  background-color: var(--purple-main);
  color: #fff;
  font-family: var(--primary-font);
  font-size: 1.25rem;
  line-height: 20px;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: filter 0.15s;
}

.how-it-works__play-now:hover {
  filter: brightness(0.9);
}

.how-it-works__footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.how-it-works__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11.2px 16px;
  border: 1px solid transparent;
  border-radius: 32px;
  color: #fff;
  font-family: var(--secondary-font-liquid);
  font-size: 16px;
  line-height: 16px;
  text-decoration: none;
}

.how-it-works__link:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.how-it-works__footer-links a svg {
  color: var(--primary);
  font-size: 1em;
}

.how-it-works__footer-links a:hover svg {
  color: currentColor;
}

@media (max-width: 1350px) {
  .how-it-works__modes {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 1225px) {
  .how-it-works {
    padding: 50px 16px 60px;
  }

  .how-it-works__title {
    font-size: 2.25rem;
  }

  .how-it-works__stages {
    gap: 10px;
  }

  .how-it-works__mode {
    padding: 24px;
  }

  .how-it-works__stage-img {
    width: 75px;
    height: 75px;
    border-radius: 8px;
  }
}

/* Landing pages continue below "Play Now", so close the gap the homepage leaves at its end */
.how-it-works {
  padding-bottom: 0;
}

.how-it-works + .lp-section {
  margin-top: 3.5rem;
}

.lp-section + .faq,
.how-it-works + .faq {
  margin-top: 3.5rem;
}

/* Landing pages drop the homepage subtitle; keep its spacing under the title */
.how-it-works__title {
  margin-bottom: 2.5rem;
}
