/* ============================================================
   Hab SMS — landing (index.html)
   Corak sama dengan hab Games (topbar navy, hero, grid kad), guna
   token jenama SMS (tokens.css).
   ============================================================ */

body.hub {
  font-size: 15px;
  background: var(--color-bg);
}
.hub h1, .hub h2, .hub h3 { text-wrap: balance; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.spacer { flex: 1; }
:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 2px; }

/* Warna aksen setiap unit (dipadan melalui data-unit, bukan gaya sebaris) */
[data-unit="kurikulum"]   { --accent: #0268C6; --accent-bg: #E6F0FB; }
[data-unit="hem"]         { --accent: #0E8074; --accent-bg: #E3F4F1; }
[data-unit="kokurikulum"] { --accent: #C2610C; --accent-bg: #FDF0E3; }
[data-unit="pentadbiran"] { --accent: #5646B8; --accent-bg: #EEECFA; }
[data-unit="pdpr"]        { --accent: #0369A1; --accent-bg: #E0F2FE; }
[data-unit="sesi"]        { --accent: #B45309; --accent-bg: #FEF3C7; }
[data-unit="ppki"]        { --accent: #BE185D; --accent-bg: #FCE7F3; }
[data-unit="prasekolah"]  { --accent: #15803D; --accent-bg: #DCFCE7; }
[data-unit="pibg"]        { --accent: #475569; --accent-bg: #E2E8F0; }

/* ---- Butang hab ---- */
.hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 0.95rem/1.2 var(--font-body);
  padding: 0.72em 1.25em;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--color-blue);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hbtn:hover { text-decoration: none; background: #0157A6; }
.hbtn.gold { background: var(--color-gold); color: var(--color-navy); }
.hbtn.gold:hover { background: #F5AD22; }
.hbtn.ghost { background: var(--color-surface); color: var(--color-navy); border-color: var(--color-border); }
.hbtn.ghost:hover { border-color: var(--color-navy); }
.hbtn.outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.hbtn.outline:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }
.hbtn.small { font-size: 0.84rem; padding: 0.48em 0.9em; border-radius: 7px; }

/* ---- Pil status ---- */
.hpill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 0.22em 0.75em;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--color-neutral-bg);
  color: var(--color-neutral);
}
.hpill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
.hpill.ok   { background: var(--color-success-bg); color: var(--color-success); }
.hpill.gold { background: #FFF1D6; color: #8A5A00; }
.hpill.lock { background: #EEF0F4; color: #4B5263; }
.hpill.lock::before { border-radius: 1px; width: 7px; height: 7px; }
.hpill.mute { background: transparent; color: var(--color-muted); box-shadow: inset 0 0 0 1px var(--color-border); }

/* ---- Topbar ---- */
.hub-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--color-navy);
  color: #fff;
}
.hub-top .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding-block: 8px;
}
.hub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font: 600 1.05rem var(--font-display);
  line-height: 1.15;
}
.hub-brand:hover { text-decoration: none; }
.hub-brand img { height: 32px; width: auto; }
.hub-brand small {
  display: block;
  font: 500 0.74rem var(--font-body);
  opacity: 0.7;
}
.hub-auth-row { display: flex; align-items: center; gap: 8px; }
.hub-who {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hub-top .hbtn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.hub-top .hbtn.ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }

/* ---- Hero ---- */
.hub-hero {
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(232, 156, 10, 0.2) 0 16%, transparent 44%),
    linear-gradient(160deg, var(--color-navy) 0%, #0A2F6E 62%, #0D4A9E 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  padding-block: 56px 64px;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.hub-hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  margin-bottom: 16px;
}
.lead {
  font-size: 1.08rem;
  max-width: 54ch;
  opacity: 0.9;
  margin: 0 0 24px;
}
.hero-actions-row { display: flex; flex-wrap: wrap; gap: 10px; }

.access-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 18px;
}
.flow { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; }
.flow li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 2px 12px;
}
.flow li::before {
  content: counter(s);
  grid-row: span 2;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--color-gold);
  color: var(--color-navy);
  display: grid;
  place-items: center;
  font: 700 1rem var(--font-display);
}
.flow b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.flow span { opacity: 0.82; font-size: 0.9rem; }

.access-status { display: grid; gap: 6px; justify-items: start; }
.access-label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.access-main { margin: 0; font: 600 1.35rem/1.2 var(--font-display); }
.access-sub { margin: 0 0 6px; opacity: 0.82; font-size: 0.9rem; }
.access-facts {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 18px;
}
.access-facts dt { font-size: 0.74rem; opacity: 0.7; }
.access-facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Seksyen ---- */
.hub-section { padding-block: 40px 8px; }
.hub-section:last-of-type { padding-bottom: 56px; }
.sechead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sechead h2 { font-size: 1.55rem; color: var(--color-navy); margin: 0; }
.sechead p { margin: 0; }

/* ---- Kad pakej penuh ---- */
.bundlecard {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: 0 10px 28px rgba(1, 25, 72, 0.06);
  position: relative;
  overflow: hidden;
}
.bundlecard::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #0268C6, #0E8074, #C2610C, #5646B8);
}
.bundlecard[data-state="owned"] { border-color: #86EFAC; }
.bundle-copy { display: grid; gap: 8px; justify-items: start; }
.bundle-copy h3 { font-size: 1.45rem; color: var(--color-navy); margin: 4px 0 0; }
.bundle-copy p { margin: 0; color: var(--color-muted); max-width: 60ch; }
.bundle-copy .bundle-note { color: var(--color-ink); font-weight: 500; margin-top: 4px; }
.bundle-copy .hbtn { margin-top: 6px; }

.bundle-units {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bundle-units li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--color-ink);
  font-weight: 600;
  font-size: 0.9rem;
}
.chip-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font: 700 0.85rem var(--font-display);
  flex: none;
}

/* ---- Kad unit ---- */
.unitgrid-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.unitcard {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--accent);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.unitcard[data-state="soon"] { border-top-color: var(--color-border); }
.unit-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}
.unit-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-bg);
  color: var(--accent);
  display: grid;
  place-items: center;
  font: 700 1.2rem var(--font-display);
}
.unit-mark svg { width: 22px; height: 22px; }
.chip-mark svg { width: 16px; height: 16px; }
.unit-title h3 { font-size: 1.18rem; color: var(--color-navy); margin: 0 0 2px; }
.unit-title p { margin: 0; font-size: 0.86rem; color: var(--color-muted); }

.modlist { display: grid; gap: 8px; }
.mod {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: var(--color-bg);
  border: 1px solid transparent;
}
.mod[data-state="open"] { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.mod[data-state="locked"] { background: #F7F8FA; }
.mod[data-state="locked"] .mod-text strong { color: var(--color-muted); }
.mod-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.mod[data-state="locked"] .mod-icon,
.mod[data-state="soon"] .mod-icon { background: transparent; box-shadow: inset 0 0 0 2px #B6BCC8; }
.mod-text { display: grid; gap: 2px; min-width: 0; }
.mod-text strong { font-size: 0.95rem; color: var(--color-ink); }
.mod-text span { font-size: 0.83rem; color: var(--color-muted); }
.mod-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.unit-empty {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  border: 1px dashed var(--color-border);
  color: var(--color-muted);
  font-size: 0.86rem;
}

.soon-block { display: grid; gap: 8px; }
.soon-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.soonlist { display: flex; flex-wrap: wrap; gap: 6px; }
.soonlist li {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: inset 0 0 0 1px var(--color-border);
  cursor: default;
}

/* ---- Kaki ---- */
.hub-foot { background: var(--color-surface); border-top: 1px solid var(--color-border); }
.hub-foot .wrap { display: flex; gap: 12px; padding-block: 18px; color: var(--color-muted); font-size: 0.86rem; }

/* ---- Responsif ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 36px 40px; }
  .bundlecard { grid-template-columns: 1fr; padding: 22px 20px; }
  .unitgrid-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hub-brand { font-size: 0.95rem; }
  .hub-brand small, .hub-who { display: none; }
  .unitgrid-inner { grid-template-columns: 1fr; }
  .bundle-units { grid-template-columns: 1fr; }
  .access-facts { grid-template-columns: 1fr 1fr; }
  .mod { grid-template-columns: auto 1fr; }
  .mod-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
}
