/* hairypopsicles.com: the hub. The game's own look (its fonts, colors, skin
   and cast), served from the game's folder so there's one copy of the art. */
@font-face { font-family: "Rubik Wet Paint"; src: url(the-mmo/fonts/rubik-wet-paint.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url(the-mmo/fonts/patrick-hand.woff2) format("woff2"); font-display: swap; }

:root {
  --ink: #0e0608;
  --text: #f0d9c8;
  --flesh: #e9b9a0;
  --flesh-dim: #c98f7d;
  --blood: #8e2b2f;
  --gold: #e8b04a;
  --panel: rgba(24, 10, 14, 0.78);
  --edge: rgba(138, 74, 92, 0.5);
  --ledge: #3a1219;
  --common: #d9c7b8;
  --uncommon: #a8c66c;
  --rare: #7fb2e5;
  --legendary: #e8b04a;
  --wet: "Rubik Wet Paint", "Patrick Hand", cursive;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font: 19px/1.35 "Patrick Hand", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* The world's skin behind everything, dimmed, with a warm glow up top. */
.skin {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(160, 64, 38, 0.32), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 40%, rgba(5, 2, 3, 0.85) 100%),
    linear-gradient(rgba(14, 6, 8, 0.8), rgba(14, 6, 8, 0.9)),
    url(the-mmo/world/ground.webp) center / 520px repeat;
}

/* ---------- the bar, once you've scrolled past the big button ---------- */

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: rgba(14, 6, 8, 0.82);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(-110%);
  transition: transform 0.3s ease;
}

.bar.on { transform: none; }

.bar-mark {
  font-family: var(--wet);
  font-size: 24px;
  line-height: 1;
  color: var(--flesh);
  text-decoration: none;
  text-shadow: 0 2px 0 #5b2a3a;
}

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

.pill {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.pill:hover { filter: brightness(1.08); transform: translateY(-1px); }
.pill:active { transform: translateY(1px); }

.pill:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.pill-big,
.pill-small {
  font-family: var(--wet);
  color: #fbe3d3;
  background: linear-gradient(180deg, #c4534f, var(--blood) 60%, #5e1a1f);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), inset 0 2px 0 rgba(255, 200, 180, 0.35);
}

.pill-big {
  display: block;
  width: 100%;
  padding: 10px 18px 14px;
  font-size: 32px;
  line-height: 1;
  animation: throb 3.6s ease-in-out infinite;
}

.pill-small {
  padding: 6px 18px 9px;
  font-size: 20px;
}

.pill-ghost {
  padding: 8px 22px;
  font-size: 19px;
  color: var(--text);
  background: rgba(30, 14, 18, 0.7);
  border: 1px solid #6a3344;
}

@keyframes throb {
  50% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 26px rgba(196, 83, 79, 0.45), inset 0 2px 0 rgba(255, 200, 180, 0.35); }
}

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(28px, env(safe-area-inset-top)) 16px 0;
  text-align: center;
  overflow: hidden;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.kicker {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--flesh-dim);
}

.logo {
  position: relative;
  display: inline-block;
  margin: 6px 0 0;
  font-family: var(--wet);
  font-weight: 400;
  font-size: clamp(58px, 17vw, 136px);
  line-height: 0.9;
  color: var(--flesh);
  text-shadow: 0 4px 0 #5b2a3a, 0 0 44px rgba(255, 140, 90, 0.22);
}

/* A few drops gathering under the letters and falling off. */
.drop {
  position: absolute;
  top: 88%;
  width: 0.09em;
  height: 0.12em;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--flesh);
  opacity: 0;
  animation: fall 3.4s ease-in infinite;
}

.drop-1 { left: 17%; animation-delay: 0.4s; }
.drop-2 { left: 52%; animation-delay: 1.7s; background: #c4534f; }
.drop-3 { left: 83%; animation-delay: 2.6s; }

@keyframes fall {
  0% { transform: translateY(0) scale(0.3); opacity: 0; }
  25% { transform: translateY(0.02em) scale(1); opacity: 1; }
  60% { transform: translateY(0.05em) scaleY(1.35); opacity: 1; }
  100% { transform: translateY(1.6em) scaleY(1.1); opacity: 0; }
}

.lead {
  max-width: 26ch;
  margin: 16px auto 0;
  font-size: clamp(21px, 4.6vw, 26px);
  line-height: 1.25;
}

/* What's playing now: the card with the big button. */
.now {
  max-width: 430px;
  margin: 26px auto 0;
  padding: 18px 20px 16px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.now-label {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.now-title {
  margin: 2px 0 0;
  font-family: var(--wet);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  color: var(--flesh);
  text-shadow: 0 3px 0 #5b2a3a;
}

.now-pitch {
  margin: 8px 0 16px;
  font-size: 18px;
  color: var(--text);
}

.now-fine {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--flesh-dim);
}

.live {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--flesh-dim);
}

.live.on::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--uncommon);
  box-shadow: 0 0 8px var(--uncommon);
  vertical-align: 1px;
}

/* The cast, standing on a fleshy ledge at the bottom of the screen. */
.lineup {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: clamp(190px, 40vw, 330px);
  margin: 26px -16px 0;
}

.lineup::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 22px;
  background: linear-gradient(180deg, #6b2d3b, var(--ledge) 70%);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.45);
}

.l {
  position: relative;
  width: auto;
  margin: 0 -2.2% 12px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6));
  transform-origin: 50% 100%;
  animation: bob 4.8s ease-in-out infinite;
}

.l-toad { height: 46%; animation-delay: -1.1s; z-index: 2; }
.l-leprechaun { height: 82%; animation-delay: -2.3s; }
.l-redeye { height: 62%; animation-delay: -0.4s; z-index: 2; }
.l-droopy { height: 100%; animation-delay: -3.1s; z-index: 1; }
.l-snoot { height: 84%; animation-delay: -1.7s; z-index: 2; }
.l-bricks { height: 78%; animation-delay: -2.8s; }
.l-fairy { height: 76%; animation-delay: -0.9s; z-index: 2; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-3%) rotate(-1.4deg); }
  65% { transform: translateY(-1%) rotate(1.2deg); }
}

/* Goo hanging off the ledge. */
.ooze {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: -1px;
  fill: var(--ledge);
}

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

.mmo,
.cast,
.origin,
.last {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 16px;
}

.section-title {
  margin: 0;
  font-family: var(--wet);
  font-weight: 400;
  font-size: clamp(44px, 10vw, 68px);
  line-height: 1;
  text-align: center;
  color: var(--flesh);
  text-shadow: 0 4px 0 #5b2a3a;
}

.section-lead {
  max-width: 46ch;
  margin: 12px auto 0;
  font-size: 20px;
  text-align: center;
  color: var(--text);
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 12px 16px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 20px;
}

.feature-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.feature-face {
  border-radius: 50%;
  object-fit: cover;
  background: radial-gradient(circle at 50% 40%, rgba(127, 178, 229, 0.35), transparent 70%);
}

.feature h3 {
  margin: 0;
  font-family: var(--wet);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.05;
  color: var(--flesh);
}

.feature p {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.25;
  color: var(--text);
}

/* Screenshots: swipe through on a phone, all in a row on a big screen. */
.shots {
  display: flex;
  gap: 16px;
  margin: 30px -16px 0;
  padding: 6px 16px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  scrollbar-width: thin;
  scrollbar-color: #5b2a3a transparent;
}

.shots:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.shot {
  flex: 0 0 min(62vw, 250px);
  margin: 0;
  scroll-snap-align: center;
}

.shot img {
  width: 100%;
  aspect-ratio: 540 / 919;
  object-fit: cover;
  border: 3px solid #2a1418;
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--edge);
}

.shot figcaption {
  margin-top: 10px;
  font-size: 17px;
  text-align: center;
  color: var(--flesh-dim);
}

/* The cast: a row per rarity (swiped through on a phone); the Legendaries are silhouettes. */
.tier { margin-top: 26px; }

.tier-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.tier-title span {
  margin-left: 6px;
  color: var(--flesh-dim);
  letter-spacing: 0;
}

.cast-list {
  display: flex;
  gap: 10px;
  margin: 0 -16px;
  padding: 0 16px 10px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 16px;
  scrollbar-width: thin;
  scrollbar-color: #5b2a3a transparent;
}

.card {
  flex: 0 0 104px;
  scroll-snap-align: start;
  padding: 8px 8px 10px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover { transform: translateY(-3px); border-color: currentColor; }

.card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, currentColor 30%, transparent), transparent 68%);
}

.card-name {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.1;
  color: var(--text);
}

.r-common { color: var(--common); }
.r-uncommon { color: var(--uncommon); }
.r-rare { color: var(--rare); }
.r-legendary { color: var(--legendary); }

.card.secret img {
  filter: brightness(0) drop-shadow(0 0 10px rgba(232, 176, 74, 0.55));
}

/* The original game. */
.origin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  text-align: center;
}

.origin > div,
.origin-art {
  position: relative;
}

.origin > div {
  max-width: 560px;
  padding: 22px 20px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 24px;
}

.origin-art {
  width: 150px;
  margin-bottom: -40px;
  z-index: 1;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6));
}

.origin-title {
  margin: 4px 0 6px;
  font-family: var(--wet);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  color: var(--flesh);
}

.origin p { margin: 0 0 16px; }
.origin .kicker { margin: 18px 0 0; }

.last {
  max-width: 460px;
  padding-top: 48px;
  padding-bottom: 56px;
  text-align: center;
}

.last-title {
  margin: 0 0 18px;
  font-family: var(--wet);
  font-weight: 400;
  font-size: clamp(40px, 9vw, 54px);
  line-height: 1;
  color: var(--flesh);
  text-shadow: 0 4px 0 #5b2a3a;
}

.foot {
  padding: 22px 16px max(24px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 16px;
  color: var(--flesh-dim);
  border-top: 1px solid rgba(138, 74, 92, 0.3);
}

.foot p { margin: 0; }
.foot-fine { margin-top: 4px !important; font-size: 14px; opacity: 0.75; }

/* The 404 page. */
.lost {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 24px 16px;
  text-align: center;
}

.lost .logo { font-size: clamp(52px, 14vw, 96px); }
.lost-art { width: 140px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6)); }
.lost-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- bigger screens ---------- */

@media (min-width: 760px) {
  .hero { padding-top: 36px; }
  .logo { font-size: clamp(58px, 12vw, 124px); }
  .lineup { height: clamp(190px, 26vw, 280px); }
  .cast-list { display: grid; grid-template-columns: repeat(8, 1fr); margin: 0; padding: 0; overflow: visible; }
  .card { flex: none; }
  .origin { flex-direction: row; justify-content: center; text-align: left; gap: 0; }
  .origin-art { width: 190px; margin: 0 -28px 0 0; }
  .origin > div { padding: 26px 30px 26px 46px; }
}

@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .feature { padding: 18px 16px; }
  .feature-icon { width: 80px; height: 80px; margin-bottom: 8px; }
  .feature p { font-size: 17px; }
  .shots { overflow: visible; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
}

/* On a narrow phone, five of the cast fit. */
@media (max-width: 520px) {
  .l-fairy,
  .l-bricks { display: none; }
  .l { margin-inline: -4%; }
  .now-pitch { display: none; }
  .now-title { margin-bottom: 14px; }
  .lead { margin-top: 12px; }
  .now { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .l,
  .drop,
  .pill-big { animation: none; }
  .drop { display: none; }
  .bar,
  .pill,
  .card { transition: none; }
}

/* ---------- the show, on the hub (and the bar's link to it) ---------- */

.bar-nav { display: flex; flex-shrink: 0; align-items: center; gap: 12px; }
.bar-link { font-size: 18px; color: var(--flesh); text-decoration: none; }
.bar-mark { white-space: nowrap; }
@media (max-width: 420px) {
  .bar-mark { font-size: 20px; }
  .bar-nav { gap: 10px; }
}
.bar-link:hover { text-decoration: underline; }
/* Three links and the mark on a small phone: tighter, and on the narrowest
   the mark gives way (home is the footer's link there). */
@media (max-width: 400px) {
  .bar { gap: 8px; }
  .bar-mark { font-size: 17px; }
  .bar-nav { gap: 9px; }
  .bar-link { font-size: 16px; }
  .bar .pill-small { padding: 5px 13px 8px; font-size: 18px; }
}
@media (max-width: 345px) {
  .bar { justify-content: flex-end; }
  .bar-mark { display: none; }
}

.show-teaser {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 16px;
  text-align: center;
}

.show-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(130px, 1fr);
  gap: 12px;
  margin: 26px 0 24px;
  padding: 0 0 6px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
}

.show-row li { scroll-snap-align: start; }

.show-row a {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.show-row a:hover { transform: translateY(-3px); border-color: var(--gold); }

.show-row img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }

.show-row span {
  display: block;
  padding: 8px 10px 10px;
  font-family: var(--wet);
  font-size: 19px;
  line-height: 1;
  color: var(--flesh);
}
