/* ScormDeck — tema terang, dominan putih, aksen gradien biru. */
:root {
  --white: #ffffff;
  --bg-subtle: #f8fafc;
  --text: #0f172a;
  --text-2: #64748b;
  --border: #e2e8f0;
  --card-border: #e5e7eb;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --cyan-400: #38bdf8;
  --grad: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #38bdf8 100%);
  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --ok-border: #bbf7d0;
  --bad: #b91c1c;
  --bad-bg: #fef2f2;
  --bad-border: #fecaca;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-blue: 0 8px 24px rgba(37, 99, 235, 0.28);
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1240px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-600); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; border-radius: 6px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Brand & navbar ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
}
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand .deck { color: var(--blue-600); }

.navbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); background: var(--bg-subtle); }
@media (max-width: 480px) { .nav a.hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.2;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease); }
.btn-primary {
  background: var(--grad); background-size: 140% 140%; background-position: 0% 50%;
  color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-blue); background-position: 100% 50%; }
.btn-primary:hover svg.arrow-right { transform: translateX(3px); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn:disabled { cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline:disabled { color: var(--text-2); border-color: var(--border); background: var(--white); opacity: 0.75; }
.btn-primary:disabled { opacity: 0.5; }

/* ---------- Animasi ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes glow-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(3%, -4%, 0) scale(1.06); }
}
.reveal { opacity: 0; animation: fade-up .8s var(--ease) forwards; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .18s; }
.reveal.d3 { animation-delay: .3s; }
.reveal.d4 { animation-delay: .45s; }
.page-enter { animation: fade-up .6s var(--ease) both; }

/* ---------- Landing ---------- */
.landing {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  transition: opacity .32s ease, transform .32s var(--ease);
}
.landing.is-leaving { opacity: 0; transform: translateY(-24px); }
.landing-glow {
  position: absolute; pointer-events: none; z-index: 0;
  border-radius: 50%; filter: blur(80px);
  animation: glow-drift 18s ease-in-out infinite;
}
.landing-glow.g1 { width: 520px; height: 520px; top: -160px; right: -120px; background: rgba(56, 189, 248, 0.16); }
.landing-glow.g2 { width: 600px; height: 600px; bottom: -260px; left: -180px; background: rgba(37, 99, 235, 0.10); animation-delay: -9s; }
.landing-head { position: relative; z-index: 1; padding: 28px 0; }
.landing-main {
  position: relative; z-index: 1; flex: 1;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px 0 140px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue-600); background: var(--blue-50); border: 1px solid var(--blue-100);
  padding: 6px 14px; border-radius: 999px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.landing h1 {
  margin: 28px auto 22px; max-width: 16ch;
  font-size: clamp(2.5rem, 6vw, 4.9rem); line-height: 1.04; letter-spacing: -0.045em; font-weight: 800;
}
.landing h1 .br-lg { display: none; }
@media (min-width: 900px) {
  .landing h1 { max-width: none; }
  .landing h1 .br-lg { display: inline; }
}
.landing .lede {
  margin: 0 auto; max-width: 52ch;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-2);
}
.landing-cta {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: max(40px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 0 16px; pointer-events: none;
}
.landing-cta > * { pointer-events: auto; }
.landing-cta .btn { padding: 16px 28px; font-size: 1rem; }
.landing-cta .hint { font-size: 0.8rem; color: var(--text-2); }
.landing-cta .btn svg.arrow-down { animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 35% { transform: translateY(3px); } }

/* ---------- Catalog ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.15; }
.section-head p { margin: 6px 0 0; color: var(--text-2); }
.kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-600); margin: 0 0 10px; }

.featured {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden; position: relative;
}
.featured::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
}
.featured-media {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 2.4vw, 28px);
  background: radial-gradient(120% 90% at 0% 0%, var(--blue-50) 0%, var(--bg-subtle) 60%);
  border-right: 1px solid var(--border);
}
.featured-media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.featured-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.featured-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-grad {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 12px; border-radius: 999px;
}
.tag {
  display: inline-flex; align-items: center;
  background: var(--blue-50); color: var(--blue-600); font-size: 0.75rem; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--blue-100);
}
.featured h1, .featured h2 { margin: 0; font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.035em; }
.featured p { margin: 0; color: var(--text-2); font-size: 1.02rem; max-width: 52ch; }
.meta-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.meta-list div { min-width: 0; }
.meta-list dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.meta-list dd { margin: 4px 0 0; font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.featured-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
.progress-note { font-size: 0.85rem; font-weight: 600; color: var(--blue-600); }
.featured > .featured-skeleton, .featured > .empty { grid-column: 1 / -1; }
.featured > .empty { border: 0; border-radius: 0; }
.section.section-tight { padding-top: 8px; }
.chips-row { margin-bottom: 24px; }
.featured-skeleton { min-height: 360px; background: linear-gradient(90deg, var(--bg-subtle), #fff, var(--bg-subtle)); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 0.88rem; font-weight: 600; line-height: 1.2;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--white); color: var(--text-2);
  transition: color .2s, border-color .2s, background-color .2s, box-shadow .2s;
}
.chip:hover { color: var(--text); border-color: var(--blue-400); }
.chip[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }
.chip .count { opacity: 0.65; margin-left: 6px; font-weight: 500; }

.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #bfdbfe; }
.card-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg-subtle); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-thumb img { transform: scale(1.03); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-type { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-600); }
.card-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.015em; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 10px; color: var(--text-2); font-size: 0.82rem; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta svg { width: 14px; height: 14px; flex: none; opacity: .8; }
.card-progress { font-size: 0.8rem; font-weight: 700; color: var(--blue-600); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--text-2); padding: 56px 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--bg-subtle); }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0 36px; color: var(--text-2); font-size: 0.85rem; margin-top: 24px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .featured-media { border-right: 0; border-bottom: 1px solid var(--border); }
  .section { padding: 40px 0; }
}
@media (max-width: 420px) {
  .meta-list { grid-template-columns: 1fr 1fr; }
  .featured-actions .btn { width: 100%; }
}

/* ---------- Player ---------- */
.player-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--bg-subtle); }
.player-page .navbar { background: rgba(255, 255, 255, 0.9); }
.player-bar { background: var(--white); border-bottom: 1px solid var(--border); }
.player-bar .container { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 16px; padding-bottom: 16px; }
.player-title { flex: 1 1 260px; min-width: 0; }
.player-title h1 { margin: 0; font-size: 1.15rem; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-title .sub { color: var(--text-2); font-size: 0.82rem; margin-top: 2px; }
.status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 0.82rem; line-height: 1.3;
  background: var(--bg-subtle); border: 1px solid var(--border);
}
.pill .k { color: var(--text-2); }
.pill .v { font-weight: 700; color: var(--text); }
.pill.ok { background: var(--ok-bg); border-color: var(--ok-border); }
.pill.ok .v { color: var(--ok); }
.pill.bad { background: var(--bad-bg); border-color: var(--bad-border); }
.pill.bad .v { color: var(--bad); }
.pill.warn { background: var(--blue-50); border-color: var(--blue-100); }
.pill.warn .v { color: var(--blue-600); }
.player-actions { display: flex; gap: 8px; }
.player-stage { flex: 1; display: flex; padding: 20px 24px 24px; }
.player-stage .frame-wrap {
  flex: 1; max-width: var(--maxw); margin: 0 auto; width: 100%;
  background: var(--white); border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; min-height: 70vh; display: flex;
}
.player-stage iframe { border: 0; width: 100%; flex: 1; min-height: 70vh; display: block; }
.player-msg { margin: auto; padding: 40px 16px; text-align: center; color: var(--text-2); max-width: 52ch; }
.player-msg h2 { color: var(--text); margin: 0 0 8px; letter-spacing: -0.02em; }
.player-msg .btn-primary { margin-top: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 600; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .player-stage { padding: 10px; }
  .player-stage .frame-wrap { border-radius: var(--radius-sm); }
  .player-actions { width: 100%; }
  .player-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}
