:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #121826;
  --muted: #667085;
  --line: #dfe4ec;
  --shadow: 0 14px 34px rgba(15, 23, 42, .08);
  --button: #ffffff;
  --button-hover: #eef3f9;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --status: #16a34a;
}

html[data-theme="dark"] {
  --bg: #0f141d;
  --surface: #171e29;
  --surface-strong: #1d2633;
  --text: #f8fafc;
  --muted: #9aa5b4;
  --line: #2c3747;
  --shadow: 0 14px 34px rgba(0, 0, 0, .26);
  --button: #171e29;
  --button-hover: #202a38;
  --brand: #3b82f6;
  --brand-hover: #60a5fa;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI Variable", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  transition: background .22s ease, color .22s ease;
}

/* Tampilan dibuat solid: tanpa gradient, noise, ambient glow, dan blur berat. */
body::before,
.ambient,
.noise { display: none !important; }

.shell {
  width: min(1240px, calc(100% - 44px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 24px 0 20px;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  animation: reveal .45s cubic-bezier(.22,1,.36,1) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 6px);
  align-items: end;
  gap: 3px;
  height: 24px;
}
.brand-mark span {
  width: 6px;
  border-radius: 9px;
  background: var(--brand);
}
.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 22px; }
.brand-mark span:nth-child(3) { height: 16px; }
.brand-text { font-size: 18px; font-weight: 600; letter-spacing: -.35px; }
.brand-text strong { font-weight: 850; }

.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--button);
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(15, 23, 42, .05);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.icon-button:hover {
  transform: translateY(-2px);
  background: var(--button-hover);
  border-color: var(--brand);
}
.icon-button:active { transform: translateY(0) scale(.97); }
.icon-button .icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
}
.moon-icon, .compress-icon { display: none; }
html[data-theme="dark"] .sun-icon { display: none; }
html[data-theme="dark"] .moon-icon { display: block; }
body.is-fullscreen .expand-icon { display: none; }
body.is-fullscreen .compress-icon { display: block; }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 44px;
  align-items: end;
  min-height: 330px;
  padding: 52px 8px 45px;
}
.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(46px, 6.3vw, 86px);
  line-height: .96;
  letter-spacing: -4.4px;
  font-weight: 900;
  text-wrap: balance;
  animation: reveal .52s .08s cubic-bezier(.22,1,.36,1) both;
}
.hero h1 span { color: var(--brand); }

.hero-pulse {
  width: 112px;
  height: 112px;
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 12px 8px 0;
  animation: reveal .52s .12s cubic-bezier(.22,1,.36,1) both;
}
.pulse-core {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 7px rgba(37, 99, 235, .12);
}
.pulse-ring {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  inset: 18px;
  animation: pulse 3.2s ease-out infinite;
}
.ring-two { inset: 2px; animation-delay: 1.2s; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 4px;
}

.app-card {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 25px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: transform .25s cubic-bezier(.22,1,.36,1), border-color .2s ease, box-shadow .25s ease, background .2s ease;
  animation: cardIn .55s cubic-bezier(.22,1,.36,1) both;
}
.app-card:nth-child(1) { animation-delay: .12s; }
.app-card:nth-child(2) { animation-delay: .18s; }
.app-card:nth-child(3) { animation-delay: .24s; }
.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
}
.app-card:active { transform: translateY(-2px) scale(.995); }

.card-glow { display: none; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.app-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--brand);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .18);
  transition: transform .25s ease, background .2s ease;
}
.app-card:hover .app-icon {
  transform: translateY(-2px);
  background: var(--brand-hover);
}
.app-icon i {
  font-size: 31px;
  line-height: 1;
  color: #ffffff;
}
.open-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  opacity: .78;
  transition: opacity .2s ease, transform .22s ease, border-color .2s ease;
}
.open-icon i {
  font-size: 14px;
  line-height: 1;
  color: var(--text);
}
.app-card:hover .open-icon {
  opacity: 1;
  transform: translate(2px,-2px);
  border-color: var(--brand);
}
.card-copy { position: absolute; left: 25px; bottom: 28px; }
.card-copy h2 {
  margin: 0 0 5px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -1.15px;
  font-weight: 900;
}
.card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.15px;
}
.card-index {
  position: absolute;
  right: 23px;
  bottom: 21px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1.5px;
  color: var(--muted);
  opacity: .62;
}

.footer {
  margin-top: auto;
  min-height: 74px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 28px 7px 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .15px;
}
.status { display: inline-flex; align-items: center; gap: 7px; }
.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 18px);
  max-width: calc(100% - 36px);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
  font-size: 13px;
  font-weight: 700;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0% { transform: scale(.78); opacity: 0; }
  25% { opacity: .55; }
  100% { transform: scale(1.08); opacity: 0; }
}

@media (max-width: 900px) {
  .shell { width: min(100% - 30px, 720px); }
  .hero { min-height: 310px; padding-top: 44px; }
  .hero h1 { letter-spacing: -3.3px; }
  .hero-pulse { width: 96px; height: 96px; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 220px; }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 24px); padding-top: 12px; }
  .topbar { height: 62px; }
  .brand-text { font-size: 16px; }
  .icon-button { width: 42px; height: 42px; border-radius: 13px; }
  .hero { grid-template-columns: 1fr; min-height: 278px; padding: 44px 5px 37px; }
  .hero h1 { font-size: clamp(43px, 14vw, 64px); letter-spacing: -2.7px; }
  .hero-pulse { display: none; }
  .app-grid { gap: 14px; padding: 0; }
  .app-card { min-height: 194px; border-radius: 20px; padding: 20px; }
  .app-icon { width: 62px; height: 62px; border-radius: 18px; }
  .app-icon i { font-size: 27px; }
  .card-copy { left: 20px; bottom: 23px; }
  .card-copy h2 { font-size: 25px; }
  .card-index { right: 19px; bottom: 18px; }
  .footer { min-height: 68px; padding-left: 2px; padding-right: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
