@font-face {
  font-family: "BalooWord";
  src: url("vendor/fonts/baloo2-word.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --ink: #0f2547;
  --muted: #8494ab;
  --bg: #f2f5fa;
  --card: #ffffff;
  --line: #dbe4f0;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #02061a; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #02030a;
  color: var(--ink);
  min-height: 100vh;
}
button { font: inherit; cursor: pointer; }

.hero-lang { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 6; }
.lang-toggle {
  display: flex; border-radius: 999px; padding: 2px;
  background: rgba(10, 20, 45, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.lang-btn { border: 0; background: transparent; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: rgba(219, 234, 254, 0.75); }
.lang-btn.lang-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(2, 6, 26, 0.35); }

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(158deg, #02061a 0%, #071740 36%, #0d2f7d 62%, #1d4ed8 88%, #2563eb 100%);
  color: #fff;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
}
.aurora { position: absolute; border-radius: 50%; z-index: 0; pointer-events: none; }
.a1 { width: 380px; height: 380px; left: -90px; top: -110px; background: radial-gradient(circle, rgba(96, 165, 250, 0.85), rgba(96, 165, 250, 0) 68%); }
.a2 { width: 330px; height: 330px; right: -80px; top: 30px; background: radial-gradient(circle, rgba(34, 211, 238, 0.55), rgba(34, 211, 238, 0) 68%); }
.a3 { width: 250px; height: 250px; right: 16%; bottom: -90px; background: radial-gradient(circle, rgba(245, 163, 1, 0.4), rgba(245, 163, 1, 0) 68%); }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 90% 78% at 50% 38%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 78% at 50% 38%, #000 30%, transparent 78%);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-inner {
  position: relative; z-index: 3;
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: 26px 20px 108px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1;
}
.hero-badge { position: relative; width: 86px; height: 86px; }
.hero-badge img { width: 86px; height: 86px; border-radius: 23px; display: block; box-shadow: 0 14px 34px rgba(2, 10, 40, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.25); }
.hero-badge::after {
  content: ""; position: absolute; inset: -9px; border-radius: 30px;
  border: 2px solid rgba(147, 197, 253, 0.55);
  animation: badge-pulse 2.6s ease-out infinite;
}
@keyframes badge-pulse { 0% { transform: scale(0.92); opacity: 0.9; } 70% { transform: scale(1.13); opacity: 0; } 100% { transform: scale(1.13); opacity: 0; } }
.hero-title {
  font-family: "BalooWord", -apple-system, sans-serif;
  font-size: clamp(50px, 14vw, 80px);
  font-weight: 700; line-height: 1.04; letter-spacing: 0.5px;
  margin-top: 20px;
  text-shadow: 0 4px 26px rgba(2, 10, 40, 0.35);
}
.ht-line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.ht-letter { display: inline-block; will-change: transform; }
.hero-title .gold { color: #f7b733; text-shadow: none; }
.hero-title .gold .ht-letter {
  background: linear-gradient(180deg, #ffe9a8 0%, #ffc93c 55%, #f5a301 100%);
  background-size: 100% 230%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gold-shimmer 3.4s ease-in-out infinite alternate;
}
@keyframes gold-shimmer { from { background-position: 50% 92%; } to { background-position: 50% 0%; } }

.hero-tag { margin-top: 12px; font-size: 15.5px; font-weight: 500; color: rgba(219, 234, 254, 0.92); }
.hero-chips {
  display: inline-flex; align-items: stretch; justify-content: center;
  margin-top: 20px; max-width: 94vw;
  background: rgba(6, 14, 36, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px; padding: 3px;
}
.chip {
  font-family: inherit;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
  color: rgba(203, 225, 255, 0.88);
  background: transparent; border: 0; border-radius: 0;
  padding: 7px 13px; white-space: nowrap;
}
.chip + .chip { border-left: 1px solid rgba(255, 255, 255, 0.12); }
@media (max-width: 380px) {
  .chip { font-size: 9.5px; letter-spacing: 0.1em; padding: 6px 9px; }
}
.hero-cta {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 26px;
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%);
  color: #fff;
  font-size: 16px; font-weight: 800; text-decoration: none;
  padding: 14px 28px; border-radius: 999px;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: cta-breathe 2.6s ease-in-out infinite, cta-glow 2.6s ease-out infinite;
}
.hero-cta::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: cta-shine 3.6s ease-in-out infinite;
}
.hero-cta:active { animation: none; transform: scale(0.96); }
.cta-arrow { display: inline-block; font-weight: 800; animation: cta-nudge 1.6s ease-in-out infinite; }
@keyframes cta-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes cta-glow {
  0% { box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45), 0 0 0 0 rgba(96, 165, 250, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  70% { box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45), 0 0 0 17px rgba(96, 165, 250, 0), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  100% { box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45), 0 0 0 0 rgba(96, 165, 250, 0), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
}
@keyframes cta-shine { 0%, 50% { left: -70%; } 85%, 100% { left: 135%; } }
@keyframes cta-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3.5px); } }
.float-icon {
  position: absolute; z-index: 2;
  width: 47px; height: 47px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 24px rgba(2, 10, 40, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.3);
  will-change: transform;
}
.float-icon img { width: 100%; height: 100%; display: block; }
.fi1 { left: 5%; top: 9%; }
.fi2 { right: 5%; top: 16%; }
.fi3 { left: 2.5%; top: 43%; }
.fi4 { right: 2.5%; top: 41%; }
.fi5 { left: 9%; bottom: 8%; }
.fi6 { right: 9%; bottom: 10%; }
@media (max-width: 380px) { .float-icon { width: 40px; height: 40px; border-radius: 12px; } }


.dark-zone {
  background:
    radial-gradient(90% 340px at 50% 0%, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0) 70%),
    linear-gradient(180deg, #02040c 0%, #050b21 34%, #081230 72%, #0a1a42 100%);
}
.dark-zone .about-toggle { color: rgba(191, 219, 254, 0.75); }
.dark-zone .biz-line { color: rgba(148, 180, 230, 0.85); }
.dark-zone .dev-credit { color: #8fc1ff; }

.rv { opacity: 0; transform: translateY(26px); }
.rv-in { opacity: 1; transform: translateY(0); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.7, 0.3, 1); }

.btn {
  border: 0; border-radius: 14px; padding: 13px 18px;
  font-size: 15.5px; font-weight: 600; text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:active { background: var(--blue-dark); }
.action-col { display: flex; flex-direction: column; gap: 9px; margin-top: 20px; }

.dev-footer { margin-top: 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dev-credit { color: var(--blue); font-weight: 600; font-size: 13px; text-decoration: none; }
.about-toggle { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); cursor: pointer; }
.about-p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.65; color: var(--muted); text-align: left; }
.biz-line { font-size: 13px; color: #64748b; font-weight: 600; }

.dialog {
  border: 0; border-radius: 20px; padding: 22px;
  width: min(92vw, 340px); margin: auto;
  background: var(--card); color: var(--ink);
}
.dialog::backdrop { background: rgba(10, 22, 40, 0.5); }
.dialog-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .hero-cta, .hero-cta::after, .cta-arrow { animation: none !important; }
}

/* ---------- Launcher (page 2) ---------- */
.launcher {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) 18px calc(16px + env(safe-area-inset-bottom));
  color: #fff;
  background: radial-gradient(130% 120% at 50% 0%, #0d1f4e 0%, #050c22 55%, #02030a 100%);
}
.launcher::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(147, 197, 253, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(147, 197, 253, 0.05) 1px, transparent 1px);
  background-size: 44px 44px; pointer-events: none;
}
.launcher-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.back-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dbeafe; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.back-btn:active { background: rgba(255, 255, 255, 0.16); }
.launcher-brand { font-family: "BalooWord", -apple-system, sans-serif; font-size: 20px; font-weight: 700; margin-right: auto; margin-left: 11px; white-space: nowrap; }
.launcher-brand .brand-ku { color: #60a5fa; }
.launcher-brand .brand-hub { color: #f5a301; }
.app-name .ku { color: #60a5fa; }
.launcher-clock {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.05em;
  color: #dbeafe; white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 12px; border-radius: 999px;
}
.launcher-clock .clk-s { color: #f5a301; }
.launcher-grid {
  position: relative; z-index: 2; flex: 1;
  display: grid; grid-template-columns: repeat(3, 1fr);
  align-content: start; gap: 27px 10px;
  width: 100%; max-width: 400px; margin: 0 auto; padding: 30px 4px 14px;
}
.app-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: #fff; -webkit-tap-highlight-color: transparent; }
.app-icon { width: 68px; height: 68px; border-radius: 19px; display: block; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12); transition: transform 0.15s ease; }
.app-cell:active .app-icon { transform: scale(0.87); }
.app-name { font-size: 12.5px; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55); }
.launcher .dev-footer { position: relative; z-index: 2; margin-top: 8px; }

/* ---------- App shell lock ---------- */
html, body { height: 100%; }
body { overscroll-behavior: none; }
body.app-locked { position: fixed; inset: 0; width: 100%; overflow: hidden; }
body.app-locked .hero { height: 100vh; height: 100svh; height: 100dvh; height: var(--app-h, 100dvh); min-height: 0; }
body.app-locked .dark-zone { height: 100vh; height: 100svh; height: 100dvh; height: var(--app-h, 100dvh); }
body.app-locked .launcher { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ---------- Launcher footer: install + bisnis ---------- */
.launcher .dev-footer { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 12px; text-align: right; }
.launcher .biz-line { font-size: 11px; }
.install-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dbeafe; border-radius: 999px; padding: 6px 13px 6px 7px;
  font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.install-chip img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.install-chip:active { background: rgba(255, 255, 255, 0.16); }
.install-chip[hidden] { display: none; }
button.app-cell { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
@media (max-height: 740px) {
  .hero-inner { padding-bottom: 84px; }
  .hero-badge, .hero-badge img { width: 66px; height: 66px; }
  .hero-badge img { border-radius: 18px; }
  .hero-title { font-size: clamp(42px, 12vw, 56px); }
}

#install-dialog .about-p { white-space: pre-line; }

.biz-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: #cfe3ff; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 8px 13px; text-decoration: none; }
.biz-chip svg { width: 15px; height: 15px; flex: none; }
.biz-chip:active { background: rgba(255, 255, 255, 0.16); }

.hero-title .kl { position: relative; }
.hero-title .kl-b {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #e0f2fe 0%, #7dd3fc 55%, #38bdf8 100%);
  background-size: 100% 230%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  opacity: 0;
  animation: gold-shimmer 3.4s ease-in-out infinite alternate, kl-fill 9s linear infinite;
  animation-delay: 0s, calc(var(--i, 0) * 0.22s);
}
@keyframes kl-fill {
  0%, 4% { opacity: 0; }
  10%, 76% { opacity: 1; }
  84%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title .kl-b { animation: none; opacity: 0; }
  .hero-title .gold .ht-letter { animation: none; background-position: 50% 92%; }
}

button.chip { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.chip:active { background: rgba(255, 255, 255, 0.09); }
