/* Home page (index.html) only. Namespaced .hm-*; guides/legal pages still use landing.css. */
.hm {
  --bg: #2A1250;
  --bg2: #3A1A6B;
  --screen: #1B0B38;
  --panel: #43257F;
  --line: #8E6BE0;
  --pink: #FF6FB1;
  --pink-dk: #D63E88;
  --gold: #FFD866;
  --gold-dk: #D9A91F;
  --mint: #5FF0C4;
  --lav: #C9B6FF;
  --text: #FFF6FF;
  --muted: #D2C2F5;
  --display: 'Fredoka', 'Nunito', sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
}
html:has(.hm) { scroll-behavior: smooth; }
.hm { font-family: var(--body); font-size: 18px; line-height: 1.6; color: var(--text); background: var(--bg); overflow-x: hidden; }
.hm-hero__signin a, .hm-xpsec a, .hm-foot nav a:hover { color: var(--mint); }
.hm h1, .hm h2, .hm h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -.01em; }
.hm-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; }
.hm-tag { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--mint); display: block; margin-bottom: 14px; }

/* Soft bubbly panel with sparkle glow */
.hm-panel {
  background: var(--panel); border: 3px solid var(--line); border-radius: 26px; position: relative;
  box-shadow: 0 7px 0 #1B0B38, 0 0 30px rgba(255,111,177,.18);
}

/* Nav */
.hm-hud { background: rgba(27,11,56,.92); backdrop-filter: blur(8px); border-bottom: 3px solid var(--line); padding: 12px 0; position: sticky; top: 0; z-index: 10; }
.hm-hud .hm-wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.hm-brand { display: block; line-height: 0; }
.hm-brand .hm-mark { height: 52px; width: auto; overflow: visible; }
.hm-brand:hover .hm-mark { transform: rotate(-1deg); }
.hm-mark { transition: transform .15s; }
.hm-hud__r { display: flex; align-items: center; gap: 22px; }
.hm-hud__r a { color: var(--text); text-decoration: none; font-weight: 700; }
.hm-hud__r a:hover { color: var(--gold); }
.hm-score { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--gold); background: var(--screen); border: 2px solid var(--line); border-radius: 99px; padding: 5px 16px; }
.hm-score i { font-style: normal; color: var(--muted); margin-right: 8px; font-weight: 500; }
.hm-hud__r .hm-signin { border: 2px solid var(--lav); border-radius: 99px; padding: 5px 18px; }

.hm-skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: #3B1D00; padding: 8px 16px; font-weight: 700; border-radius: 0 0 8px 0; z-index: 20; }
.hm-skip:focus { left: 0; }
.hm-slot__ic { color: var(--mint); }

/* Buttons */
.hm-btn { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 22px; text-decoration: none; color: #3B1D00; background: var(--gold); padding: 16px 34px; border-radius: 99px; box-shadow: 0 6px 0 var(--gold-dk), 0 0 28px rgba(255,216,102,.4); transition: transform .1s, box-shadow .1s; }
.hm-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--gold-dk), 0 0 38px rgba(255,216,102,.6); }
.hm-btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--gold-dk); }
.hm-btn--pink { background: var(--pink); color: #3A0B24; box-shadow: 0 6px 0 var(--pink-dk), 0 0 28px rgba(255,111,177,.5); }
.hm-btn--pink:hover { box-shadow: 0 8px 0 var(--pink-dk), 0 0 38px rgba(255,111,177,.75); }
.hm-btn--pink:active { box-shadow: 0 0 0 var(--pink-dk); }
.hm-btn--big { font-size: 28px; padding: 20px 44px; }

/* Hero */
.hm-hero { padding: 70px 0 100px; position: relative; overflow: hidden; background: radial-gradient(ellipse at 72% 28%, #5B2AA8 0%, transparent 58%); }
.hm-sp { position: absolute; color: var(--gold); font-size: 26px; animation: twinkle 2.6s ease-in-out infinite; pointer-events: none; }
.hm-sp:nth-of-type(1) { left: 6%; top: 14%; }
.hm-sp:nth-of-type(2) { left: 46%; top: 8%; color: var(--pink); font-size: 20px; animation-delay: -1s; }
.hm-sp:nth-of-type(3) { right: 6%; bottom: 14%; color: var(--mint); animation-delay: -1.8s; }
@keyframes twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .5; } 50% { transform: scale(1.15) rotate(20deg); opacity: 1; } }
.hm-hero .hm-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; z-index: 1; }
.hm-hero__badge { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 16px; background: var(--mint); color: #053B2B; padding: 5px 16px; border-radius: 99px; transform: rotate(-2deg); margin-bottom: 20px; }
.hm-hero h1 { font-size: clamp(46px, 6.8vw, 86px); margin-bottom: 24px; text-shadow: 0 5px 0 #1B0B38; }
.hm-hero h1 .hm-g { color: var(--gold); }
.hm-hero h1 .hm-p { color: var(--pink); }
.hm-hero__sub { max-width: 520px; font-size: 20px; color: var(--muted); margin-bottom: 34px; }
.hm-hero__cta { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.hm-hero__micro { color: var(--mint); font-weight: 700; }
.hm-hero__signin { margin-top: 24px; font-weight: 700; }

/* Pig screen */
.hm-cab { padding: 24px; max-width: 430px; margin: 0 auto; text-align: center; transform: rotate(1.5deg); }
.hm-cab__top { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--gold); margin-bottom: 12px; }
.hm-cab__screen { background: var(--screen); border: 3px solid var(--line); border-radius: 20px; padding: 20px 10px 8px; position: relative; overflow: hidden; background-image: radial-gradient(circle at 50% 60%, rgba(255,111,177,.28), transparent 62%); }
.hm-pig { width: 230px; display: block; margin: 0 auto; animation: hop 1.8s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(255,111,177,.55)); }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-16px) rotate(2deg); } }
.hm-coinrain { position: absolute; top: -24px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); box-shadow: inset 0 -3px 0 var(--gold-dk); animation: fall 3.2s ease-in infinite; }
.hm-coinrain:nth-child(1) { left: 14%; animation-delay: 0s; }
.hm-coinrain:nth-child(2) { left: 46%; animation-delay: -1.3s; }
.hm-coinrain:nth-child(3) { left: 80%; animation-delay: -2.2s; }
@keyframes fall { to { transform: translateY(270px) rotate(300deg); } }
.hm-cab__bank { margin-top: 16px; display: flex; justify-content: space-between; align-items: end; text-align: left; }
.hm-cab__bank span { font-family: var(--display); font-weight: 600; color: var(--muted); font-size: 17px; }
.hm-cab__bank b { font-family: var(--display); font-weight: 700; font-size: 54px; color: var(--gold); line-height: 1; text-shadow: 0 4px 0 var(--pink-dk); }
.hm-xp { margin-top: 14px; text-align: left; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--mint); }
.hm-xp__bar { height: 22px; border-radius: 99px; background: var(--screen); border: 2px solid var(--line); margin-top: 6px; padding: 3px; }
.hm-xp__bar i { display: block; height: 100%; width: 80%; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--gold)); }

/* Strip */
.hm-strip { background: var(--pink); color: #3A0B24; overflow: hidden; white-space: nowrap; border-block: 3px solid #1B0B38; transform: rotate(-1deg); margin: 0 -20px; }
.hm-strip div { display: inline-block; padding: 12px 0; font-family: var(--display); font-weight: 700; font-size: 22px; animation: scroll 30s linear infinite; }
.hm-strip span { margin: 0 22px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Steps */
.hm-levels { padding: 110px 0 80px; }
.hm-levels h2, .hm-power h2, .hm-xpsec h2 { font-size: clamp(36px, 5.4vw, 62px); margin-bottom: 14px; }
.hm-sub { color: var(--muted); max-width: 560px; margin-bottom: 52px; font-size: 20px; }
.hm-lvls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.hm-lvl { padding: 28px 24px 24px; }
.hm-lvl:nth-child(2) { transform: translateY(22px); }
.hm-lvl__n { position: absolute; top: -22px; left: 22px; width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: #3B1D00; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 25px; box-shadow: 0 4px 0 var(--gold-dk); }
.hm-lvl:nth-child(2) .hm-lvl__n { background: var(--pink); box-shadow: 0 4px 0 var(--pink-dk); color: #3A0B24; }
.hm-lvl:nth-child(3) .hm-lvl__n { background: var(--mint); box-shadow: 0 4px 0 #1BA582; color: #053B2B; }
.hm-lvl h3 { font-size: 28px; margin: 14px 0 10px; }
.hm-lvl p { color: var(--muted); font-size: 16.5px; margin-bottom: 18px; }
.hm-lvl__ui { background: var(--screen); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; font-family: var(--display); font-weight: 600; }
.hm-lvl__ui .hm-q { font-size: 40px; text-align: center; line-height: 1.2; font-weight: 700; }
.hm-lvl__ui .hm-ok { color: var(--mint); text-align: center; font-size: 20px; }
.hm-lvl__ui .hm-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 17px; padding: 2px 0; }
.hm-lvl__ui .hm-row b { color: var(--mint); font-weight: 600; }
.hm-lvl__ui .hm-row.hm-tot { color: var(--gold); border-top: 2px dashed var(--line); margin-top: 6px; padding-top: 8px; font-size: 22px; }
.hm-lvl__ui .hm-row.hm-tot b { color: var(--gold); font-weight: 700; }
.hm-lvl__ui .hm-paid { background: var(--mint); color: #053B2B; text-align: center; padding: 8px; margin-top: 8px; border-radius: 99px; font-size: 18px; }

/* Rules */
.hm-power { background: var(--bg2); border-block: 3px solid var(--line); padding: 96px 0 104px; }
.hm-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.hm-slot { grid-column: span 2; padding: 26px 22px; }
.hm-slot:nth-child(4), .hm-slot:nth-child(5) { grid-column: span 3; }
.hm-slot:nth-child(odd) { transform: rotate(-.8deg); }
.hm-slot:nth-child(even) { transform: rotate(.8deg); }
.hm-slot__ic { width: 50px; height: 50px; border-radius: 16px; background: var(--screen); border: 2px solid var(--line); display: grid; place-items: center; font-size: 25px; margin-bottom: 14px; }
.hm-slot h3 { font-size: 24px; margin-bottom: 8px; }
.hm-slot p { color: var(--muted); font-size: 16px; }

/* Effort */
.hm-xpsec { padding: 110px 0; }
.hm-xpsec .hm-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hm-xpsec p { color: var(--muted); margin-bottom: 14px; }
.hm-xpsec strong { color: var(--text); }
.hm-versus { display: grid; gap: 20px; }
.hm-vs { padding: 24px; }
.hm-vs .hm-lab { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.hm-vs h3 { font-size: 26px; margin: 6px 0 6px; }
.hm-vs p { margin: 0; font-size: 16px; }
.hm-vs--no { opacity: .75; transform: rotate(-1.5deg); }
.hm-vs--no h3 { text-decoration: line-through; text-decoration-color: var(--pink); text-decoration-thickness: 4px; }
.hm-vs--no .hm-lab { color: var(--pink); }
.hm-vs--yes { border-color: var(--mint); transform: rotate(1.2deg) translateX(14px); }
.hm-vs--yes .hm-lab { color: var(--mint); }

/* Note */
.hm-honest { padding: 10px 0 120px; }
.hm-dlg { max-width: 840px; margin: 0 auto; display: grid; grid-template-columns: 110px 1fr; gap: 26px; padding: 32px; border-color: var(--pink); }
.hm-dlg__face { background: var(--screen); border: 3px solid var(--line); border-radius: 50%; display: grid; place-items: center; aspect-ratio: 1; }
.hm-dlg__face svg { width: 78%; }
.hm-dlg .hm-lab { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--pink); display: block; margin-bottom: 8px; }
.hm-dlg h2 { font-size: 34px; margin-bottom: 12px; }
.hm-dlg p { margin-bottom: 12px; }
.hm-dlg__sig { color: var(--gold); font-family: var(--display); font-weight: 600; font-size: 20px; }

/* Close */
.hm-close { text-align: center; padding: 100px 0 110px; background: radial-gradient(ellipse at 50% 100%, #6A2BB5 0%, transparent 65%); border-top: 3px solid var(--line); position: relative; overflow: hidden; }
.hm-close .hm-tag { color: var(--pink); }
.hm-close h2 { font-size: clamp(42px, 7vw, 82px); margin: 8px 0 16px; text-shadow: 0 5px 0 #1B0B38; }
.hm-close h2 span { color: var(--gold); }
.hm-close p { max-width: 520px; margin: 0 auto 36px; color: var(--muted); font-size: 20px; }
.hm-close__micro { margin-top: 28px !important; color: var(--mint) !important; font-size: 17px !important; font-weight: 700; }

.hm-foot { background: var(--screen); border-top: 3px solid var(--line); padding: 36px 0; }
.hm-foot .hm-wrap { display: grid; grid-template-columns: auto 1fr; gap: 14px 40px; align-items: center; }
.hm-foot__tag { grid-column: 1; }
.hm-foot nav { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.hm-foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.hm-foot a { color: var(--text); text-decoration: none; font-weight: 700; }
.hm-foot a:hover { color: var(--gold); }
.hm-foot__mark { display: block; line-height: 0; grid-column: 1; }
.hm-foot__mark .hm-mark { height: 96px; width: auto; }
.hm-foot__tag { color: var(--gold); font-family: var(--display); font-weight: 600; font-size: 20px; max-width: 440px; line-height: 1.3; }
.hm-foot__copy { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }

@media (max-width: 880px) {
  .hm-foot .hm-wrap { grid-template-columns: 1fr; }
  .hm-foot nav { grid-column: 1; grid-row: auto; justify-self: start; }
  .hm-hero .hm-wrap, .hm-xpsec .hm-wrap { grid-template-columns: minmax(0, 1fr); }
  .hm-lvls { grid-template-columns: minmax(0, 1fr); gap: 42px; }
  .hm-lvl:nth-child(2) { transform: none; }
  .hm-slots { grid-template-columns: minmax(0, 1fr); }
  .hm-slot, .hm-slot:nth-child(4), .hm-slot:nth-child(5) { grid-column: auto; }
  .hm-dlg { grid-template-columns: minmax(0, 1fr); }
  .hm-dlg__face { max-width: 96px; }
  .hm-hud__r a:not(.hm-signin) { display: none; }
  .hm-score i { display: none; }
  .hm-vs--yes { transform: rotate(1.2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hm-pig, .hm-coinrain, .hm-strip div, .hm-sp { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 560px) {
  .hm-brand .hm-mark { height: 44px; }
  .hm-score { display: none; }
  .hm-hud__r { gap: 12px; }
  .hm-hud__r .hm-signin { padding: 4px 14px; }
  .hm-cab { transform: none; }
  .hm-btn--big { font-size: 24px; padding: 18px 32px; }
}
