/* The landing page only: glitch diamonds on a night ground, with a neon glow on the two windows people use first.
   Everything is scoped to body.home, so no other page and no puzzle is touched. */
body.home {
  --h-night: #0b1026; --h-panel: #0e1433; --h-line: #3b4786; --h-ink: #e9edff; --h-soft: #b4bde6;
  --h-cyan: #3df5ff; --h-magenta: #ff3df0; --h-lime: #b6ff3d; --h-violet: #9a6bff; --h-amber: #ffb000;
  background: var(--h-night); color: var(--h-ink);
}
body.home .sky, body.home .test-badge, body.home .topbar-tools { display: none !important; }
body.home .page { max-width: 1160px; padding-bottom: 40px; }
body.home h1, body.home h2, body.home h3 { font-family: var(--font-display); font-weight: 600; margin: 0; }
body.home a { color: var(--h-cyan); }
body.home :focus-visible { outline: 3px solid var(--h-amber); outline-offset: 3px; }

/* the diamonds behind the top of the page (the glitch: one cyan and one magenta copy, a few pixels apart, with scanlines) */
.hm-glitch { position: absolute; inset: 0 0 auto 0; height: 760px; opacity: .32; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.hm-glitch svg, .hm-band svg { display: block; width: 100%; height: 100%; }
.hm-band { height: 56px; margin: 40px -16px 0; opacity: .8; }
body.home .page { position: relative; }
body.home .page > * { position: relative; z-index: 1; }
body.home .page > .hm-glitch { position: absolute; }

body.home .topbar { margin-bottom: 8px; }
body.home .logo { color: #fff; text-shadow: -2px 0 var(--h-magenta), 2px 0 var(--h-cyan); }
body.home .logo .mark { background: none; box-shadow: none; width: 40px; height: 40px; }
.hm-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.hm-nav a { color: var(--h-ink); font-weight: 800; text-decoration: none; padding: 11px 16px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; border: 2px solid var(--h-line); border-radius: 10px; background: var(--h-night); }
.hm-nav a:hover { border-color: var(--h-cyan); }
.hm-nav a.hm-signin { background: var(--h-cyan); color: #070b1f; border-color: var(--h-cyan); }

.hm-hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 48px 0 24px; }
.hm-hero-text { flex: 1 1 460px; min-width: 0; display: grid; gap: 20px; justify-items: start; }
.hm-tag { color: var(--h-lime); border: 2px solid var(--h-lime); background: var(--h-night); font-weight: 800; font-size: 14px; padding: 5px 14px; border-radius: 999px; letter-spacing: .5px; }
.hm-hero h1 { font-size: clamp(42px, 6.4vw, 82px); line-height: 1; color: #fff; text-shadow: -3px 0 var(--h-magenta), 3px 0 var(--h-cyan); }
.hm-lead { font-size: 21px; font-weight: 700; line-height: 1.45; margin: 0; max-width: 540px; color: #d3daf7; }
.hm-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hm-btn { font-family: var(--font-display); font-weight: 600; font-size: 21px; text-decoration: none; padding: 15px 26px; min-height: 52px; box-sizing: border-box; border-radius: 12px; border: 2px solid transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hm-btn.amber { background: var(--h-amber); color: #070b1f; box-shadow: 0 0 0 3px #070b1f, 0 0 26px rgba(255, 176, 0, .5); }
.hm-btn.line { background: var(--h-night); color: #fff; border-color: var(--h-cyan); }
.hm-btn.cyan { background: var(--h-cyan); color: #070b1f; box-shadow: 0 0 20px rgba(61, 245, 255, .45); width: 100%; }
.hm-btn:hover { filter: brightness(1.08); }

/* the neon window: the same recipe as the windows in Afropunk Adventures (a glowing edge, a dark gap, a soft halo, a thin ring outside) */
.hm-neon { --n: var(--h-cyan); --n2: var(--h-magenta); position: relative; background: var(--h-panel); border: 2px solid var(--n); border-radius: 18px;
  box-shadow: 0 0 0 3px #070b1f, 0 0 8px var(--n), 0 0 26px color-mix(in srgb, var(--n) 75%, transparent), 0 0 60px color-mix(in srgb, var(--n2) 40%, transparent), inset 0 0 16px color-mix(in srgb, var(--n) 30%, transparent); transition: border-color .2s, box-shadow .2s; }
.hm-neon::after { content: ''; position: absolute; inset: -9px; border-radius: 26px; border: 1px solid color-mix(in srgb, var(--n) 55%, transparent); pointer-events: none; }
.hm-neon.ok { --n: var(--h-lime); --n2: var(--h-cyan); } .hm-neon.no { --n: var(--h-magenta); --n2: var(--h-violet); }
.hm-join { flex: 0 1 420px; min-width: 280px; padding: 28px; display: grid; gap: 14px; }
.hm-join h2 { font-size: 28px; color: #fff; }
.hm-join label { font-weight: 800; color: var(--h-soft); }
.hm-join input { font-family: var(--font-display); font-size: 40px; letter-spacing: 10px; text-align: center; padding: 12px; border-radius: 12px; border: 2px solid var(--h-line); background: var(--h-night); color: #fff; box-sizing: border-box; width: 100%; }
.hm-join input:focus-visible { border-color: var(--h-cyan); }

.hm-section { padding: 36px 0 8px; }
.hm-section > h2 { font-size: 34px; color: #fff; margin-bottom: 18px; line-height: 1.1; }
.hm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.hm-steps li { counter-increment: s; background: var(--h-panel); border: 2px solid var(--h-line); border-radius: 16px; padding: 22px; display: grid; gap: 6px; }
.hm-steps li::before { content: counter(s); font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--h-cyan); }
.hm-steps li:nth-child(2)::before { color: var(--h-magenta); } .hm-steps li:nth-child(3)::before { color: var(--h-lime); }
.hm-steps b { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: #fff; }
.hm-steps span, .hm-card p { color: #d3daf7; font-weight: 600; line-height: 1.5; }
.hm-demo { display: flex; flex-wrap: wrap; gap: 44px; align-items: center; }
.hm-demo-text { flex: 1 1 340px; min-width: 0; display: grid; gap: 10px; }
.hm-demo-text p { margin: 0; color: #d3daf7; font-weight: 700; line-height: 1.5; font-size: 18px; }
.hm-odd { flex: 1 1 400px; min-width: 0; padding: 22px; display: grid; gap: 14px; text-align: center; justify-items: center; }
.hm-odd b { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: #fff; }
.hm-odd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(270px, 100%); }
.hm-cell { background: none; border: 2px solid transparent; border-radius: 12px; padding: 4px; cursor: pointer; aspect-ratio: 1; min-width: 44px; min-height: 44px; }
.hm-cell:hover { border-color: var(--h-line); }
.hm-cell svg { width: 100%; height: 100%; display: block; }
.hm-odd .say { min-height: 26px; margin: 0; font-weight: 800; color: var(--h-soft); }
.hm-odd.ok .say { color: var(--h-lime); } .hm-odd.no .say { color: #ff7ff5; }

.hm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.hm-card { background: var(--h-panel); border: 2px solid var(--h-line); border-radius: 16px; padding: 22px; display: grid; gap: 6px; align-content: start; }
.hm-card h3 { font-size: 24px; } .hm-card p { margin: 0; }
.hm-card.c1 h3 { color: var(--h-cyan); } .hm-card.c2 h3 { color: #ff7ff5; } .hm-card.c3 h3 { color: var(--h-lime); }
.hm-roles a { text-decoration: none; color: inherit; transition: border-color .15s; } .hm-roles a:hover { border-color: var(--h-cyan); }
.hm-roles .go { color: var(--h-cyan); font-weight: 800; }

.hm-adv { padding: 32px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; --n: var(--h-amber); --n2: var(--h-magenta); margin: 30px 8px 0; }
.hm-adv > div { flex: 1 1 400px; display: grid; gap: 8px; }
.hm-adv .kick { color: var(--h-amber); font-weight: 800; font-size: 14px; letter-spacing: .5px; }
.hm-adv h2 { font-size: 38px; color: #fff; line-height: 1.05; } .hm-adv p { margin: 0; color: #d3daf7; font-weight: 700; line-height: 1.5; max-width: 520px; }

.hm-stats { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-around; text-align: center; padding: 40px 0 10px; }
.hm-stats .num { font-family: var(--font-display); font-size: clamp(44px, 8vw, 64px); color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.hm-stats .t b { font-family: var(--font-display); font-size: clamp(30px, 5vw, 42px); color: var(--h-lime); line-height: 1; font-variant-numeric: tabular-nums; font-weight: 600; }
.hm-stats .lbl { color: var(--h-soft); font-weight: 800; }
.hm-time { display: flex; gap: 14px; justify-content: center; } .hm-time .t { display: grid; justify-items: center; }
.hm-sa { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: center; padding: 28px 0 0; color: var(--h-soft); font-weight: 800; }
body.home .hm-sa[hidden] { display: none; }
body.home .sa-flag-canvas { width: clamp(180px, 22vw, 240px); }

body.home .foot-links { color: var(--h-soft); margin-top: 20px; } body.home .foot-links a { color: var(--h-cyan); padding: 8px 6px; display: inline-block; }
.hm-credit { text-align: center; color: var(--h-soft); font-weight: 700; font-size: 14px; margin: 8px 0 0; }
@media (max-width: 520px) { .hm-adv h2 { font-size: 30px; } .hm-join input { font-size: 34px; letter-spacing: 8px; } }

/* the owner's scrolling messages (Site owner page > Home page). Hidden unless switched on. */
.hm-ticker { margin: 6px 0 0; border: 2px solid var(--h-line); border-radius: 12px; background: var(--h-panel); overflow: hidden; color: var(--h-ink); font-weight: 800; }
.hm-ticker[hidden] { display: none; }
.hm-ticker-track { display: flex; width: max-content; max-width: 100%; flex-wrap: wrap; }
.hm-ticker-set { display: flex; flex: none; }
.hm-ticker-set span { padding: 11px 26px; white-space: nowrap; }
.hm-ticker-set span::before { content: '◆'; color: var(--h-magenta); margin-right: 14px; }
.hm-ticker:not(.go) .hm-ticker-track { width: auto; } .hm-ticker:not(.go) .hm-ticker-set { flex-wrap: wrap; } .hm-ticker:not(.go) .hm-ticker-set span { white-space: normal; }
.hm-ticker.go .hm-ticker-track { max-width: none; flex-wrap: nowrap; animation: hm-scroll var(--dur, 40s) linear infinite; }
.hm-ticker.go[data-speed='slow'] { --dur: 70s; } .hm-ticker.go[data-speed='normal'] { --dur: 45s; } .hm-ticker.go[data-speed='fast'] { --dur: 25s; }
.hm-ticker.go:hover .hm-ticker-track, .hm-ticker.go:focus-within .hm-ticker-track { animation-play-state: paused; }
@keyframes hm-scroll { to { transform: translateX(calc(-1 * var(--w, 50%))); } }

/* the home page draws its own mark and band, so the site-wide ones in theme.css step aside */
body.home .logo .mark::before, body.home .foot-links::after { display: none; }
