/* =====================================================================
   home.css — the hub homepage (index.html), rebuilt 2026-10-03 on the
   "Metora" reference layout the user supplied:
     giant wordmark + mascot bust + side copy, a ruled word strip,
     an about split, a dark "worlds" grid with filter chips and
     folded-corner cards, a FAQ carousel of notched cards, and a dark
     footer with a notch, a second wordmark and the mascot.
   Colours are Merpy's tokens from /ui-kit.css (cream paper, ink,
   red-orange accent), so light/dark mode follows chamali_theme.
   Motion uses Merpy's numbers: 26px travel, 680ms, cubic-bezier(.22,1,.36,1).
   ===================================================================== */

.hm, footer.hm-foot {
  --hm-dark: #1c130e;
  --hm-dark-2: #2a1d16;
  --hm-on-dark: #fbeee0;
  --hm-on-dark-muted: #c8ae9b;
  --hm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hm-spring: cubic-bezier(0.34, 1.2, 0.5, 1);
  --hm-pixel: "Inter", "SukhumvitSet", var(--font-body);   /* big display type (was Pixelify Sans) */
  --hm-ws: clamp(52px, 19.2vw, 330px);           /* wordmark size */
  color: var(--text);
  overflow-x: clip;
  min-width: 0; max-width: 100%; width: 100%;
}
html[data-theme="dark"] .hm,
html[data-theme="dark"] footer.hm-foot {
  --hm-dark: #0b0705;
  --hm-dark-2: #221913;
}
.hm section { padding: 0; }                       /* style.css pads every <section> */
.hm h1, .hm h2, .hm h3, .hm p { margin: 0; }
.hm img, footer.hm-foot img { display: block; max-width: 100%; height: auto; }   /* height:auto: the width/height attributes must never stretch an image */
.hm-in { width: min(1240px, 100% - 40px); margin-inline: auto; }

/* ---------- shared bits ---------- */
.hm-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
html[lang="th"] .hm-eyebrow { letter-spacing: .02em; }
.hm-h2 {
  font-size: clamp(32px, 4.6vw, 58px); font-weight: 900; line-height: 1.02; letter-spacing: -0.03em;
  text-transform: uppercase;
}
html[lang="th"] .hm-h2 { line-height: 1.25; letter-spacing: 0; }
.hm-pill {
  display: inline-flex; align-items: center; gap: 12px; padding: 7px 7px 7px 20px;
  border: 2px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--text);
  font-size: 13.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  box-shadow: var(--hard-sm); cursor: pointer; font-family: inherit;
  transition: transform 140ms var(--hm-ease), box-shadow 140ms var(--hm-ease), background 200ms var(--hm-ease);
}
html[lang="th"] .hm-pill { letter-spacing: 0; }
.hm-pill i {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: #fff; font-style: normal; font-size: 17px; font-weight: 900;
  transition: transform 420ms var(--hm-spring);
}
.hm-pill:hover i { transform: rotate(-45deg); }
.hm-pill:active { transform: translateY(3px); box-shadow: none; }
.hm-pill.on-dark { background: var(--hm-dark); color: var(--hm-on-dark); border-color: rgba(255, 228, 200, .4); box-shadow: none; }
.hm-pill.on-dark:hover { background: var(--hm-dark-2); }

/* scroll reveal (home.js adds .in) */
[data-rv] { opacity: 0; transform: translateY(26px); transition: opacity 680ms var(--hm-ease), transform 680ms var(--hm-ease); transition-delay: var(--d, 0ms); }
[data-rv].in { opacity: 1; transform: none; }

/* =====================================================================
   1. HERO — wordmark, mascot bust, side copy
   ===================================================================== */
.hm-hero { position: relative; padding-top: clamp(14px, 2.4vw, 30px) !important; }
.hm-word {
  font-family: var(--hm-pixel); font-weight: 900; font-size: var(--hm-ws); line-height: .84;
  letter-spacing: -0.055em; text-align: center; color: var(--text); white-space: nowrap;
  user-select: none;
}
.hm-word span { display: inline-block; }
.hm-word .z { color: var(--accent); }
.hm-word .ltr { opacity: 0; transform: translateY(.35em); animation: hmLetter 820ms var(--hm-spring) forwards; animation-delay: calc(80ms + var(--i) * 55ms); }
@keyframes hmLetter { to { opacity: 1; transform: none; } }

.hm-stage {
  display: grid; grid-template-columns: 1fr minmax(250px, 40vw) 1fr; align-items: end; gap: clamp(12px, 3vw, 40px);
  position: relative;
}
.hm-mascot-wrap { position: relative; z-index: 2; width: min(500px, 37vw); justify-self: center; margin-top: calc(var(--hm-ws) * -0.5); }
.hm-mascot {
  width: 100%; margin-inline: auto; margin-bottom: -3%;
  filter: drop-shadow(0 14px 0 color-mix(in srgb, var(--ink) 12%, transparent));
  opacity: 0; transform: translateY(60px) scale(.96); animation: hmRise 1000ms var(--hm-spring) 260ms forwards;
}
@keyframes hmRise { to { opacity: 1; transform: none; } }
.hm-mascot-wrap::before {                         /* soft accent halo behind Mali */
  content: ""; position: absolute; left: 50%; top: 52%; width: 86%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 66%);
}

.hm-side { padding-bottom: clamp(24px, 4vw, 54px); display: grid; gap: clamp(22px, 4vw, 48px); align-content: end; }
.hm-side p { font-size: 15.5px; font-weight: 600; line-height: 1.55; color: var(--text); max-width: 27ch; }
.hm-side.r { justify-items: end; text-align: right; }
.hm-side.r p { color: var(--muted); }

/* rotating round badge */
.hm-badge {
  position: relative; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; border: 2px solid var(--edge); box-shadow: var(--hard-sm);
  text-decoration: none; transition: transform 200ms var(--hm-ease);
}
.hm-badge:hover { transform: scale(1.05); }
.hm-badge svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); animation: hmSpin 16s linear infinite; }
.hm-badge text { font: 800 10.5px var(--font-body); letter-spacing: .2em; fill: #fff; }
.hm-badge b { font-size: 26px; line-height: 1; transition: transform 420ms var(--hm-spring); }
.hm-badge:hover b { transform: translateY(4px); }
@keyframes hmSpin { to { transform: rotate(360deg); } }

/* fanned app cards */
.hm-fan { position: relative; width: 236px; height: 150px; }
.hm-fan a {
  position: absolute; top: 8px; width: 104px; height: 136px; border-radius: 16px; overflow: hidden;
  background: var(--hm-dark); border: 2px solid var(--edge); box-shadow: var(--hard-sm);
  display: grid; grid-template-rows: 1fr auto; text-decoration: none;
  transition: transform 520ms var(--hm-spring), z-index 0s;
}
.hm-fan a img { width: 100%; height: 100%; object-fit: contain; padding: 8px 6px 0; background: var(--t3); }
.hm-fan a:nth-child(1) img { background: var(--t2); }
.hm-fan a:nth-child(3) img { background: var(--t5); }
.hm-fan a span { font-size: 11px; font-weight: 800; color: var(--hm-on-dark); text-align: center; padding: 6px 4px; letter-spacing: .02em; }
.hm-fan a:nth-child(1) { left: 0;   transform: rotate(-12deg) translateY(10px); }
.hm-fan a:nth-child(2) { left: 66px; z-index: 2; transform: translateY(-4px); }
.hm-fan a:nth-child(3) { left: 132px; transform: rotate(12deg) translateY(10px); }
.hm-fan:hover a:nth-child(1) { transform: rotate(-16deg) translate(-18px, 8px); }
.hm-fan:hover a:nth-child(3) { transform: rotate(16deg) translate(18px, 8px); }
.hm-fan a:hover { z-index: 3; }
.hm-fan a:nth-child(2):hover { transform: translateY(-12px); }
.hm-fan::before {                                  /* the red sparkle */
  content: ""; position: absolute; left: 58px; top: -10px; width: 22px; height: 22px; z-index: 4;
  background: var(--accent); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: hmTwinkle 2.4s ease-in-out infinite;
}
@keyframes hmTwinkle { 50% { transform: scale(.7) rotate(45deg); } }

/* =====================================================================
   2. WORD STRIP — ruled cells
   ===================================================================== */
.hm-strip { border-top: 2px solid var(--edge); position: relative; z-index: 3; background: var(--bg); }
.hm-row { display: flex; border-bottom: 2px solid var(--edge); }
.hm-row span {
  flex: 1 1 auto; text-align: center; padding: .04em .28em 0;
  font-family: var(--hm-pixel); font-weight: 900; font-size: clamp(22px, 3.6vw, 56px); line-height: 1.2; letter-spacing: -0.03em;
  text-transform: uppercase; white-space: nowrap; color: var(--text);
  transition: background 260ms var(--hm-ease), color 260ms var(--hm-ease);
}
html[lang="th"] .hm-row span { font-size: clamp(20px, 3.2vw, 50px); line-height: 1.55; letter-spacing: 0; padding-top: .06em; }
.hm-row span + span { border-left: 2px solid var(--edge); }
.hm-row span:hover { background: var(--accent); color: #fff; }

/* =====================================================================
   3. MALI TODAY (signed-in glance)
   ===================================================================== */
.hm-today { padding-top: clamp(36px, 5vw, 60px) !important; }
.hm-today-card {
  background: var(--surface); border: 2px solid var(--edge); border-radius: 22px; box-shadow: var(--hard);
  padding: 18px 22px;
}
.hm-today-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hm-today-head img { width: 30px; height: 30px; }
.hm-today-head h2 { font-size: 17px; font-weight: 900; }
.hm-today-head a { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--accent); text-decoration: none; }
.mali-today-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mali-today-chip {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-decoration: none;
  background: var(--surface-soft); border: 2px solid var(--edge); color: var(--text);
  transition: transform 140ms var(--hm-ease), box-shadow 140ms var(--hm-ease);
}
.mali-today-chip:hover { transform: translateY(-2px); box-shadow: var(--hard-sm); }
.mali-today-chip .mt-icon img { width: 30px; height: 30px; }
.mali-today-chip .mt-text strong { display: block; font-size: 14px; font-weight: 800; }
.mali-today-chip .mt-text span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* =====================================================================
   4. ABOUT split
   ===================================================================== */
.hm-about { padding-block: clamp(64px, 9vw, 120px) !important; }
.hm-about .hm-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hm-about p.hm-body { font-size: 16px; font-weight: 600; line-height: 1.65; color: var(--muted); max-width: 46ch; margin: 22px 0 30px; }
.hm-about-img {
  position: relative; aspect-ratio: 1 / .92; border-radius: 28px; overflow: hidden;
  background: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1.2px, transparent 1.4px) 0 0 / 16px 16px, var(--t3);
  border: 2px solid var(--edge); box-shadow: var(--hard);
  display: grid; place-items: center;
}
.hm-about-img img { width: 78%; transition: transform 900ms var(--hm-spring); }
.hm-about-img:hover img { transform: translateY(-10px) rotate(-3deg); }
.hm-about-img .hm-tag {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 8px; border-radius: 999px; background: var(--surface); border: 2px solid var(--edge);
  font-size: 13px; font-weight: 800;
}
.hm-about-img .hm-tag img { width: 22px; }

/* =====================================================================
   5. WORLDS — dark grid, filter chips, folded cards
   ===================================================================== */
.hm-worlds {
  background: var(--hm-dark); color: var(--hm-on-dark); text-align: center;
  padding-block: clamp(64px, 8vw, 110px) !important;
}
.hm-worlds .hm-h2 { font-family: var(--hm-pixel); font-weight: 900; letter-spacing: -0.03em; color: var(--hm-on-dark); }
html[lang="th"] .hm-worlds .hm-h2 { font-family: var(--font-body); font-weight: 900; }
.hm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 40px; }
.hm-chips button {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid rgba(255, 228, 200, .28);
  background: transparent; color: var(--hm-on-dark-muted); font: 700 13.5px var(--font-body); cursor: pointer;
  transition: background 260ms var(--hm-ease), color 260ms var(--hm-ease), border-color 260ms var(--hm-ease);
}
.hm-chips button:hover { color: var(--hm-on-dark); border-color: rgba(255, 228, 200, .6); }
.hm-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); text-align: left; }
.hm-card { display: block; text-decoration: none; color: var(--hm-on-dark); }
.hm-card[hidden] { display: none; }
.hm-card-art {
  --fold: 44px;
  position: relative; aspect-ratio: 1 / .86; background: var(--hm-dark-2);
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
  border-radius: 6px; overflow: hidden;
  display: grid; place-items: center;
  background-image: radial-gradient(rgba(255, 230, 205, .06) 1.2px, transparent 1.4px);
  background-size: 16px 16px;
}
.hm-card-art::after {                               /* the folded corner */
  content: ""; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold);
  background: linear-gradient(225deg, transparent 50%, #4a372b 50%);
}
.hm-card-art img { width: 70%; max-height: 82%; object-fit: contain; transition: transform 700ms var(--hm-spring); }
.hm-card-art img.sticker { width: 46%; }
.hm-card:hover .hm-card-art img { transform: translateY(-8px) scale(1.04); }
.hm-card-art .num {
  position: absolute; left: 16px; top: 12px; font-family: var(--hm-pixel); font-weight: 900; font-size: 30px;
  color: var(--accent); line-height: 1;
}
.hm-card-art .glow { position: absolute; inset: 20% 15%; border-radius: 50%; background: radial-gradient(circle, var(--c, rgba(255,75,43,.28)), transparent 70%); }
.hm-card-meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 12px 2px 0; }
.hm-card-meta b { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hm-card-meta small { font-size: 12.5px; color: var(--hm-on-dark-muted); font-weight: 600; text-align: right; }
html[lang="th"] .hm-card-meta b { letter-spacing: 0; }
.hm-card.enter { animation: hmCardIn 620ms var(--hm-ease) backwards; animation-delay: var(--d, 0ms); }
@keyframes hmCardIn { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.hm-viewall { margin-top: 44px; }

/* =====================================================================
   6. FAQ carousel — notched dark cards
   ===================================================================== */
.hm-faq { padding-block: clamp(64px, 9vw, 120px) clamp(90px, 11vw, 150px) !important; overflow: hidden; }
.hm-faq-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: clamp(34px, 5vw, 56px); }
.hm-faq-head .hm-h2 { max-width: 15ch; }
.hm-arrows { display: flex; gap: 8px; flex: none; }
.hm-arrows button {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--edge); cursor: pointer;
  background: var(--surface); color: var(--text); font-size: 18px; font-weight: 900; line-height: 1;
  transition: background 200ms var(--hm-ease), transform 140ms var(--hm-ease);
}
.hm-arrows button:last-child { background: var(--text); color: var(--bg); }
.hm-arrows button:active { transform: translateY(2px); }
.hm-arrows button:disabled { opacity: .35; cursor: default; }

.hm-faq-view { position: relative; height: var(--ah); --w: 210px; --aw: 300px; --h: 180px; --ah: 240px; --gap: 16px; }
.hm-faq-track {
  position: absolute; left: 0; top: 0; height: 100%; display: flex; align-items: center; gap: var(--gap);
  transition: transform 720ms var(--hm-ease); touch-action: pan-y;
}
.hm-q {
  position: relative; flex: none; width: var(--w); height: var(--h); padding: 18px 18px 16px;
  border-radius: 14px; background: var(--hm-dark); color: var(--hm-on-dark); border: none; text-align: left;
  font-family: inherit; cursor: pointer; display: flex; flex-direction: column;
  transition: width 720ms var(--hm-ease), height 720ms var(--hm-ease), background 300ms var(--hm-ease);
}
html[data-theme="dark"] .hm-q { background: var(--surface); outline: 2px solid var(--edge); outline-offset: -2px; }
.hm-q + .hm-q::before {                              /* the notch joining two cards */
  content: ""; position: absolute; left: calc(var(--gap) * -.5 - 7px); top: 50%; width: 14px; height: 14px;
  background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 2px;
}
.hm-q h3 { font-size: 15.5px; font-weight: 800; line-height: 1.25; text-transform: uppercase; letter-spacing: .01em; }
html[lang="th"] .hm-q h3 { text-transform: none; font-size: 16px; line-height: 1.4; }
.hm-q p {
  font-size: 13.5px; line-height: 1.55; color: var(--hm-on-dark-muted); font-weight: 500; margin-top: 12px !important;
  opacity: 0; max-height: 0; overflow: hidden; transition: opacity 360ms var(--hm-ease);
}
.hm-q .go {
  margin-top: auto; align-self: flex-end; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 900; text-decoration: none;
  transition: transform 420ms var(--hm-spring);
}
.hm-q.on { width: var(--aw); height: var(--ah); cursor: default; }
.hm-q.on p { opacity: 1; max-height: 12em; transition-delay: 260ms; }
.hm-q.on .go { transform: rotate(-45deg); }
.hm-q:not(.on):hover .go { transform: translate(2px, -2px); }

/* =====================================================================
   7. FOOTER — notch, wordmark, mascot
   ===================================================================== */
html body > footer.hm-foot {
  position: relative; background: var(--hm-dark); color: var(--hm-on-dark); border: 0; text-align: left;
  padding: 0; margin: 0; overflow: hidden; font-family: var(--font-body);
}
html[data-theme="dark"] body > footer.hm-foot { --hm-dark: #0b0705; }
.hm-notch { position: absolute; left: 50%; top: -1px; width: 220px; height: 46px; transform: translateX(-50%); color: var(--bg); z-index: 2; }
.hm-foot-top { display: flex; justify-content: flex-end; gap: 16px; padding: 26px 0 0; font-size: 12.5px; color: var(--hm-on-dark-muted); font-weight: 600; }
.hm-foot-top .heart { color: var(--accent); }
.hm-foot-main {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; align-items: end;
  padding-top: clamp(40px, 6vw, 70px);
}
.hm-foot-word { position: relative; }
.hm-ready { font-size: clamp(18px, 2.4vw, 28px); font-weight: 900; color: var(--accent); text-transform: uppercase; letter-spacing: -.01em; }
.hm-foot-word .hm-word2 {
  font-family: var(--hm-pixel); font-weight: 900; font-size: clamp(64px, 12.5vw, 200px); line-height: .84; letter-spacing: -0.055em;
  color: var(--hm-on-dark); white-space: nowrap; margin-top: 6px; user-select: none;
}
.hm-foot-word .hm-word2 .z { color: var(--accent); }
.hm-foot-word img {
  position: absolute; left: 46%; bottom: 0; width: clamp(160px, 25vw, 350px); transform: translate(-50%, 6%);
  filter: drop-shadow(0 0 1.5px rgba(251, 238, 224, .9)) drop-shadow(0 0 28px rgba(255, 75, 43, .22));
}
.hm-foot-side { padding-bottom: clamp(36px, 5vw, 64px); }
.hm-foot-side h3 { font-size: 20px; font-weight: 900; line-height: 1.15; text-transform: uppercase; }
html[lang="th"] .hm-foot-side h3 { text-transform: none; }
.hm-socials { display: flex; gap: 10px; margin: 16px 0 22px; }
.hm-socials a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--hm-dark-2); border: 1.5px solid rgba(255, 228, 200, .25);
  transition: transform 320ms var(--hm-spring), background 200ms var(--hm-ease);
}
.hm-socials a:hover { transform: translateY(-4px); background: var(--accent); }
.hm-socials img { width: 26px; height: 26px; }
.hm-foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hm-foot-links a { font-size: 13px; font-weight: 700; color: var(--hm-on-dark-muted) !important; text-decoration: none; }
.hm-foot-links a:hover { color: var(--hm-on-dark) !important; }
/* the tool row (2026-10-10): every tool by what it does, above the site links */
.hm-foot-tools { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 228, 200, .14); }
.hm-foot-tools a { color: var(--hm-on-dark) !important; font-size: 13.5px; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 960px) {
  .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-about .hm-in { grid-template-columns: 1fr; }
  .hm-about-img { max-width: 520px; }
  .hm-foot-main { grid-template-columns: 1fr; }
  .hm-foot-side { padding-bottom: 40px; }
}
@media (max-width: 760px) {
  .hm-stage { grid-template-columns: 1fr 1fr; }
  .hm-mascot-wrap { grid-column: 1 / -1; order: -1; width: min(82vw, 420px); margin-inline: auto; margin-top: calc(var(--hm-ws) * -0.38); }
  .hm-side { padding-bottom: 26px; }
  .hm-side p { font-size: 14px; }
  .hm-badge { width: 92px; height: 92px; }
  .hm-fan { width: 150px; height: 112px; }
  .hm-fan a { width: 74px; height: 98px; border-radius: 12px; }
  .hm-fan a:nth-child(2) { left: 38px; }
  .hm-fan a:nth-child(3) { left: 76px; }
  .hm-fan a span { font-size: 9px; padding: 4px 2px; }
  .hm-fan::before { left: 30px; }
  .hm-side { min-width: 0; }
  .hm-faq-head { flex-direction: column; align-items: flex-start; }
  .hm-faq-view { --w: 180px; --aw: 260px; --h: 170px; --ah: 250px; --gap: 14px; }
  .hm-foot-word img { left: 62%; }
}
@media (max-width: 520px) {
  .hm-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hm-card-meta { flex-direction: column; gap: 2px; }
  .hm-card-meta small { text-align: left; }
  .hm-card-art { --fold: 30px; }
  .hm-card-art .num { font-size: 22px; left: 10px; top: 8px; }
  .hm-foot-top { flex-direction: column; gap: 4px; padding-top: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm *, .hm *::before, .hm *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  [data-rv] { opacity: 1; transform: none; }
}
/* style.css paints every footer span/link accent; keep the top line muted */
html body > footer.hm-foot .hm-foot-top > span { color: var(--hm-on-dark-muted); font-weight: 600; }
html body > footer.hm-foot .hm-foot-top > span span { color: var(--accent); font-weight: 700; }
html body > footer.hm-foot .hm-foot-word span { font-weight: inherit; }

/* ---------- Hero without the mascot (2026-10-03): copy left, cards right ---------- */
.hm-stage { grid-template-columns: 1fr 1fr; align-items: end; margin-top: clamp(18px, 3vw, 40px); }
.hm-side { padding-bottom: clamp(36px, 5vw, 64px); }

/* ---------- Logo band, after butter.video ----------
   A quiet caption, then the worlds as monochrome "logos" gliding past
   (two identical sets, the track slides -50% and loops). Hover a logo for
   its colours; hover the band to pause it. */
.hm-band { --band-bg: var(--bg); padding: clamp(40px, 6vw, 72px) 0 clamp(44px, 6vw, 80px) !important; border-block: 1.5px solid var(--line); background: var(--bg); }
.hm-band-cap { text-align: center; font-size: clamp(15px, 1.6vw, 19px); font-weight: 500; color: var(--muted); letter-spacing: -0.005em; margin-bottom: clamp(26px, 4vw, 44px) !important; }
.hm-marquee { position: relative; overflow: hidden; contain: paint; }
/* edge fades as overlays, not a mask: a mask on moving content is re-applied every frame */
.hm-marquee::before, .hm-marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.hm-marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.hm-marquee::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.hm-track { display: flex; width: max-content; animation: hmMarquee 46s linear infinite; will-change: transform; }
.hm-marquee:hover .hm-track { animation-play-state: paused; }
.hm-set { display: flex; align-items: center; gap: clamp(44px, 6vw, 92px); padding-right: clamp(44px, 6vw, 92px); }
@keyframes hmMarquee { to { transform: translateX(-50%); } }
.hm-logo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap;
  color: var(--text); opacity: .78;
  font: 800 clamp(19px, 2.1vw, 26px)/1 "Inter", sans-serif; letter-spacing: -0.03em;
  transition: opacity 400ms var(--hm-ease), transform 500ms var(--hm-spring);
}
.hm-logo img { width: 30px; height: 30px; filter: grayscale(1) contrast(1.3) brightness(.55); transition: filter 400ms var(--hm-ease); }
html[data-theme="dark"] .hm-logo img { filter: grayscale(1) invert(1) brightness(1.1); }
.hm-logo:hover { opacity: 1; transform: translateY(-3px); }
.hm-logo:hover img { filter: none; }
@media (prefers-reduced-motion: reduce) { .hm-track { animation: none; } .hm-marquee { overflow-x: auto; } }
@media (max-width: 760px) {
  .hm-stage { grid-template-columns: 1fr; }
  .hm-side.r { justify-items: start; text-align: left; }
  .hm-side { padding-bottom: 18px; }
  .hm-fan { transform-origin: left bottom; }
}

/* The CHAMIZ wordmark is the brand, not text to translate: it must look the
   same in EN and TH. style.css sets html[lang="th"] h1 { font-weight: 600 },
   which thinned it in Thai; pin the EN look in both languages. */
html .hm .hm-word,
html[lang="th"] .hm .hm-word,
html[lang] footer.hm-foot .hm-word2 {
  font-family: "Inter", sans-serif !important; font-weight: 900 !important; letter-spacing: -0.055em !important;
}

/* =====================================================================
   PHONE APP HOME (2026-10-03) — at ≤700px the homepage is an app home
   screen instead of the marketing page. The .ap-* components live in
   ui-kit.css ("PHONE APP KIT"), shared with MaliBills and MaliTrip;
   this block only decides what the homepage shows.
   ===================================================================== */
@media (max-width: 700px) {
  main.hm { display: flex; flex-direction: column; gap: 22px; padding: 6px 16px 8px; }
  .hm > .hm-hero, .hm > .hm-band, .hm > .hm-about, .hm > .hm-worlds, .hm > .hm-faq { display: none !important; }
  .hm > .ap { display: grid; gap: 14px; padding: 0 !important; margin: 0; }
  .ap-top { order: 1; } .hm > .hm-today { order: 2; } .ap-rest { order: 3; }
  /* Mali Today (signed-in glance) in the same soft style */
  .hm > .hm-today { padding: 0 !important; }
  .hm > .hm-today .hm-in { padding: 0; }
  .hm-today-card { padding: 16px; }
}

/* =====================================================================
   APP LANDINGS (2026-10-04) — /malitools/bills/ and /malitools/trips/ reuse this file
   with <main class="hm" data-app="bills|trip">. Each app keeps the layout
   and swaps in its own accent (--app, from /ui-kit.css): MaliBills gold,
   MaliTrip blue. Buttons stay the site's red-orange.
   ===================================================================== */
.hm[data-app] { --hm-ws: clamp(44px, 13.4vw, 236px); }
.hm[data-app="trip"] { --hm-ws: clamp(44px, 14.6vw, 258px); }
:is(.hm[data-app], [data-app] .hm) .hm-word .z {
  color: var(--app);
  -webkit-text-stroke: 0.045em var(--ink); paint-order: stroke fill;   /* sticker outline, so gold reads on cream */
}
:is(.hm[data-app], [data-app] .hm) .hm-card-art .num { color: var(--app); }
:is(.hm[data-app], [data-app] .hm) .hm-card-art .glow { background: radial-gradient(circle, color-mix(in srgb, var(--app) 34%, transparent), transparent 70%); }
:is(.hm[data-app], [data-app] .hm) .hm-chips button[aria-pressed="true"] { background: var(--app); border-color: var(--app); color: var(--app-ink); }
:is(.hm[data-app], [data-app] .hm) .hm-row span:hover { background: var(--app); color: var(--app-ink); }
:is(.hm[data-app], [data-app] .hm) .hm-q .go { background: var(--app); color: var(--app-ink); }
:is(.hm[data-app], [data-app] .hm) .hm-fan a:nth-child(2) img { background: color-mix(in srgb, var(--app) 30%, var(--surface)); }
:is(.hm[data-app], [data-app] .hm) .hm-tag { background: var(--app); color: var(--app-ink); }
:is(.hm[data-app], [data-app] .hm) .hm-hero::after {                     /* a soft wash of the app colour behind the wordmark */
  content: ""; position: absolute; inset: 0 0 auto; height: 60%; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 50% 0%, color-mix(in srgb, var(--app) 20%, transparent), transparent 70%);
}
:is(.hm[data-app], [data-app] .hm) .hm-strip { margin-top: 0; }

/* "How it works" numbered steps */
.mb-steps { list-style: none; padding: 0; margin: 22px 0 30px; display: grid; gap: 14px; max-width: 48ch; }
.mb-steps li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; font-size: 15.5px; font-weight: 600; line-height: 1.55; color: var(--muted); }
.mb-steps b {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  background: var(--app, var(--accent)); color: var(--app-ink, #fff); border: 2px solid var(--edge);
  box-shadow: var(--hard-sm); font-size: 16px; font-weight: 900;
}

/* LINE section: a chat mock-up in place of a mascot */
.mb-line .hm-in > div:first-child { order: 0; }
.mb-line-ic { width: 22px; height: 22px; display: inline-block !important; vertical-align: -5px; margin-right: 8px; border-radius: 6px; }
.mb-chat { width: min(420px, 100%); display: grid; gap: 12px; padding: 22px; border: 2px solid var(--edge); border-radius: 22px; background: var(--surface); box-shadow: 0 6px 0 var(--ink-sh, var(--ink)); }
.mb-chat p { margin: 0; max-width: 82%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; font-weight: 600; line-height: 1.45; border: 2px solid var(--edge); }
.mb-chat .bot { justify-self: start; background: var(--t2); border-bottom-left-radius: 4px; }
.mb-chat .me { justify-self: end; background: #06c755; color: #fff; border-bottom-right-radius: 4px; }
@media (max-width: 960px) { .mb-line .hm-about-img { order: 2; } }
.hm-side > .hm-pill { justify-self: start; }
:is(.hm[data-app], [data-app] .hm) .hm-about-img { background-color: var(--app-soft); }

/* Inner app pages that borrow a dark .hm-worlds band (e.g. /malitools/bills/restaurants):
   keep it on phones too, where the homepage hides its marketing sections. */
@media (max-width: 700px) {
  main.hm.hm-page { display: block; padding: 0; gap: 0; }
  .hm.hm-page > .hm-worlds { display: block !important; padding-block: 28px 36px !important; }
}
.rs-worlds { padding-block: clamp(36px, 5vw, 64px) !important; }
.rs-soon { margin-top: 30px !important; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; color: var(--hm-on-dark-muted); font-size: 14px; font-weight: 700; }
.rs-soon span + span { padding: 5px 12px; border-radius: 999px; border: 1.5px dashed rgba(255, 228, 200, .35); }
main.hm.hm-page { padding: 0 !important; max-width: none !important; width: 100%; }
.rs-worlds { margin-bottom: clamp(48px, 7vw, 96px); }


/* MOTION v4 (2026-10-11): reveals start sooner and finish faster; the FAQ
   cards resize (layout) for far less time */
[data-rv] { transform: translateY(12px); transition: opacity 440ms cubic-bezier(.2, .8, .2, 1), transform 440ms cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--d, 0ms) * .3); }
.hm-word .ltr { animation-duration: 560ms; animation-delay: calc(30ms + var(--i) * 35ms); }
.hm-card.enter { animation-duration: 360ms; }
.hm-faq-track { transition: transform 380ms cubic-bezier(.2, .8, .2, 1); }
.hm-q { transition: width 300ms cubic-bezier(.2, .8, .2, 1), height 300ms cubic-bezier(.2, .8, .2, 1), background 200ms ease; }

/* =====================================================================
   HOMEPAGE LAYOUT (moved here from index.html's inline <style> on
   2026-10-21, so the MaliTools hub, which is built the same way
   (main.hm.hm-home.hm-hub), shares it)
   ===================================================================== */
/* =========================================================
   Homepage = the tool directory (2026-10-10 rebrand).
   Order: hero (the one H1) → tools → about → FAQ → footer.
   The H1 and the tool cards show at EVERY width: Google crawls as a
   phone, so nothing that matters may be phone-hidden.
   ========================================================= */
.hm-home .hm-intro { display: grid; gap: 14px; }
.hm-h1 { font-size: clamp(26px, 2.7vw, 40px); font-weight: 900; line-height: 1.16; letter-spacing: -0.02em; max-width: 15ch; color: var(--text); }
html[lang="th"] .hm-h1 { line-height: 1.32; letter-spacing: 0; }
.hm-h1-brand { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.hm-home .hm-hero-go, .hm-home .hm-hero-mali { display: none; }   /* phone-only (.hm img would otherwise show the panda) */

/* tool cards: the folded cards, with a fuller caption */
.hm-tools-sub { margin: 14px auto 40px !important; max-width: 46ch; font-size: 15px; font-weight: 600; color: var(--hm-on-dark-muted); }
.hm-tool .hm-card-meta { display: grid; gap: 4px; justify-content: stretch; padding: 14px 2px 0; }
.hm-tool-name { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hm-tool h3 { font-size: 19px; font-weight: 900; line-height: 1.3; color: var(--hm-on-dark); }
.hm-tool p { font-size: 13.5px; font-weight: 500; line-height: 1.55; color: var(--hm-on-dark-muted); }

/* ---------- phones ---------- */
@media (max-width: 700px) {
  .hm.hm-home > .hm-hero, .hm.hm-home > .hm-tools { display: block !important; }
  .hm-home > .hm-hero { order: 1; padding: 0 !important; }
  .hm-home > .cz-today { order: 2; }
  .hm-home > .ap-signin { order: 3; }
  .hm-home > .hm-today { order: 4; }
  .hm-home > .hm-tools { order: 5; }
  .hm-home > .ap-rest { order: 6; }

  /* hero: the orange app card, holding the real H1 */
  .hm-home .hm-word, .hm-home .hm-side.r, .hm-home .hm-badge { display: none !important; }
  .hm-home .hm-hero .hm-in { width: auto; }
  .hm-home .hm-stage { display: block; }
  .hm-home .hm-side.l {
    position: relative; overflow: hidden; display: flex; align-items: flex-end; gap: 4px; padding: 20px 4px 18px 20px;
    border-radius: 26px; border: 2px solid var(--edge); box-shadow: 0 4px 0 var(--ink-sh, var(--ink));
    background: linear-gradient(135deg, var(--accent) 0%, #ff7a2b 60%, var(--accent-2) 100%);
  }
  .hm-home .hm-side.l::before { content: ""; position: absolute; width: 190px; height: 190px; right: -50px; top: -70px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
  .hm-home .hm-intro { position: relative; z-index: 1; flex: 1; min-width: 0; gap: 8px; align-self: center; opacity: 1; transform: none; }
  .hm-home .hm-h1 { font-size: 21px; color: #fff; max-width: none; }
  .hm-home .hm-h1-brand { color: #fff; opacity: .85; font-size: 12px; margin-bottom: 4px; }
  .hm-home .hm-side.l p { font-size: 13px; font-weight: 500; line-height: 1.45; color: #fff; opacity: .92; max-width: none; }
  .hm-home .hm-hero-go {
    justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px 8px 8px 14px;
    border-radius: 999px; background: #fff; color: var(--accent); font-size: 13px; font-weight: 800; text-decoration: none;
  }
  .hm-home .hm-hero-go i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-size: 13px; }
  .hm-home .hm-hero-mali { display: block; position: relative; z-index: 1; width: 104px; height: 104px; flex: none; object-fit: contain; margin-bottom: -18px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .18)); }

  /* sign-in card (guests): Log in / Create account / later */
  .ap-signin .ap-join { margin-top: 0; }
  .ap-join-later { grid-column: 1 / -1; justify-self: center; margin: -2px 0 0; padding: 4px 10px; border: 0; background: none; box-shadow: none !important; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; }

  /* tools: light boxes, two columns */
  .hm-home > .hm-tools { background: none !important; color: var(--text); padding: 0 !important; text-align: left; }
  .hm-home .hm-tools .hm-in { width: auto; }
  .hm-home .hm-tools .hm-h2 { font-family: var(--font-body); font-size: 18px; font-weight: 800; letter-spacing: -0.01em; text-transform: none; color: var(--text); opacity: 1; transform: none; }
  .hm-home .hm-tools-sub { margin: 2px 0 12px !important; font-size: 12.5px; color: var(--muted); opacity: 1; transform: none; }
  .hm-home .hm-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hm-home .hm-tool { color: var(--text); background: var(--surface); border: 2px solid var(--edge); border-radius: 20px; box-shadow: 0 4px 0 var(--ink-sh, var(--ink)); overflow: hidden; }
  .hm-home .hm-tool:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-sh, var(--ink)); }
  .hm-home .hm-tool .hm-card-art { aspect-ratio: 16 / 10; clip-path: none; border-radius: 0; background: var(--t2); background-image: none; border-bottom: 2px solid var(--edge); }
  .hm-home .hm-tool:nth-child(6n+2) .hm-card-art { background: var(--t1); }
  .hm-home .hm-tool:nth-child(6n+3) .hm-card-art { background: var(--t4); }
  .hm-home .hm-tool:nth-child(6n+4) .hm-card-art { background: var(--t5); }
  .hm-home .hm-tool:nth-child(6n+5) .hm-card-art { background: var(--t3); }
  .hm-home .hm-tool:nth-child(6n+6) .hm-card-art { background: var(--t0); }
  .hm-home .hm-tool .hm-card-art::after, .hm-home .hm-tool .num, .hm-home .hm-tool .glow { display: none; }
  .hm-home .hm-tool .hm-card-art img { width: auto; height: 86%; max-height: none; }
  .hm-home .hm-tool .hm-card-meta { padding: 10px 12px 12px; gap: 3px; }
  .hm-home .hm-tool-name { font-size: 10.5px; letter-spacing: .08em; }
  .hm-home .hm-tool h3 { font-size: 15px; line-height: 1.3; color: var(--text); }
  .hm-home .hm-tool p { font-size: 12px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

  /* Mali Today + the About row */
  .hm-today-card { padding: 12px 14px; box-shadow: none; border-width: 1.5px; border-color: var(--line-strong); }
  .hm > .hm-today .hm-in { width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .ap-meet { padding: 8px 12px 8px 8px; box-shadow: none; border-width: 1.5px; border-color: var(--line-strong); }
  .ap-meet img { width: 56px; height: 56px; }
  .ap-meet i { width: 32px; height: 32px; font-size: 18px; }
}

/* =====================================================================
   THE THREE PARTS + THE MALITOOLS HUB (2026-10-21)
   Homepage #tools: MaliTools · MaliWikis · MaliGames side by side, each
   a head (sticker, name, one line, See all) over its compact cards. The
   hub (/malitools/, main.hm-hub) puts the same head over each app's tools.
   Cards come from home.js (CHAMIZ_SITE / CHAMIZ_TOOLS in gnav.js).
   ===================================================================== */
.hm-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 1180px; margin-inline: auto; text-align: left; align-items: start; }
.hm-part { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; min-width: 0; }
:root:root:root body .hm-home .hm-part .hm-grid { min-width: 0; max-width: none; margin: 0; }
.hm-part-head {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 2px 2px 12px; border-bottom: 1px solid var(--line); text-align: left;
}
.hm-part-ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid var(--line); }
.hm-part-ic img { width: 34px; height: 34px; }
.hm-part-t { display: grid; gap: 2px; min-width: 0; }
.hm .hm-part-t :is(h2, h3) { margin: 0; font-family: var(--font-body); font-size: 20px; font-weight: 900; letter-spacing: -0.01em; line-height: 1.2; color: var(--text); text-transform: none; }
.hm .hm-part-t p { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--muted); }
.hm-part-all {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 800; white-space: nowrap;
  transition: border-color 200ms ease, color 200ms ease;
}
.hm-part-all:hover, .hm-part-all:focus-visible { border-color: var(--accent); color: var(--accent); }
.hm-part-all i { font-style: normal; font-size: 17px; line-height: 1; }
.hm-tool.is-soon { opacity: .62; cursor: default; }
.hm-tool.is-soon:hover { transform: none !important; }
.hm-tool.is-soon .hm-tool-name { display: inline-block; justify-self: start; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--muted) !important; }
.hm-tool h4 { margin: 0; font-size: 15.5px; font-weight: 900; line-height: 1.3; color: var(--text); }
@media (max-width: 1023px) { .hm-parts { grid-template-columns: minmax(0, 1fr); gap: 30px; } }

/* the hub: a section per app, the head as a band over its cards */
.hm-hub { --hm-ws: clamp(44px, 12.4vw, 220px); }
:root:root:root .hm-hub .hm-word { font-size: clamp(44px, 7.6vw, 132px) !important; }
@media (min-width: 701px) { :root:root:root main.hm-hub .hm-hero-mali { top: 3%; right: clamp(12px, 4vw, 80px); width: clamp(96px, 9vw, 140px); } }
.hm-group .hm-part-head { max-width: 1180px; margin: 0 auto 14px; }
.hm .hm-group .hm-part-t h2 { font-size: clamp(22px, 2.2vw, 28px); }
@media (min-width: 701px) {
  :root:root:root body main.hm-hub > section.hm-group { padding-block: 28px !important; scroll-margin-top: 90px; }
  :root:root:root body main.hm-hub > section.hm-group:last-child { padding-bottom: clamp(48px, 6vw, 88px) !important; }
}
.hm-group { scroll-margin-top: 90px; }
.hm-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hm-jump a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 800; transition: border-color 200ms ease, color 200ms ease;
}
.hm-jump a:hover, .hm-jump a:focus-visible { border-color: var(--accent); color: var(--accent); }
@media (max-width: 700px) {
  .hm-hub > .hm-group { order: 5; padding: 0 !important; }
  .hm-group .hm-part-head { margin-bottom: 10px; }
  .hm-part-head { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; }
  .hm-part-ic { width: 44px; height: 44px; border-radius: 13px; }
  .hm-part-ic img { width: 30px; height: 30px; }
  .hm .hm-part-t :is(h2, h3) { font-size: 18px !important; }
  .hm .hm-part-t p { font-size: 12px; }
  .hm-part-all { height: 30px; padding: 0 11px; font-size: 12.5px; }
  .hm-hub .hm-jump { justify-content: flex-start; gap: 6px; margin-top: 4px; }
  .hm-hub .hm-jump a { height: 30px; padding: 0 12px; font-size: 13px; color: #fff3e4; border-color: rgba(255, 243, 228, .35); }
}
.hm-home .hm-tools > .hm-in > .hm-tools-sub { max-width: 62ch; }
