:root {
  --bg: #faf6ec;
  --card: #ffffff;
  --ink: #241c0d;
  --muted: #7a6d55;
  --line: #e8dcc0;
  --accent: #a8741a;
  --accent-ink: #2a1d05;
  --gold-1: #e6bb55;
  --gold-2: #c08a25;
  --ok: #2ea56b;
  --shadow: 0 1px 2px rgba(60, 40, 5, .06), 0 8px 24px rgba(60, 40, 5, .07);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100d08;
    --card: #1a1610;
    --ink: #f4ecd8;
    --muted: #a99c82;
    --line: #2e271a;
    --accent: #e2b552;
    --accent-ink: #2a1d05;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  padding: 48px 16px 32px;
}

.page {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Ganti bahasa ───────────────────── */
.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 5;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  background: var(--card);
  box-shadow: var(--shadow);
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }

/* ── Profil ─────────────────────────── */
.head { display: flex; flex-direction: column; align-items: center; }

.logo {
  width: 196px;
  height: 196px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(192, 138, 37, .28));
}

h1 {
  margin-top: 14px;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: .02em;
  text-align: center;
  text-wrap: balance;
}
h1 span { font-weight: 400; color: var(--accent); }
.tagline {
  margin-top: 6px;
  color: var(--muted);
  text-align: center;
  max-width: 34ch;
}
.status {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: .82rem;
  color: var(--muted);
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(46, 165, 107, .5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(46, 165, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 165, 107, 0); }
}

/* ── Tombol tautan ──────────────────── */
.links {
  width: 100%;
  margin-top: 28px;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.link:hover { transform: translateY(-2px); border-color: var(--accent); }
.link:active { transform: translateY(0); }
.link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.link .ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.link .ico svg { width: 22px; height: 22px; }
.link .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link .name { font-weight: 650; }
.link .sub { font-size: .82rem; color: var(--muted); }
.link .go { flex: none; color: var(--muted); }
.link .go svg { width: 18px; height: 18px; display: block; }

.link.primary {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  border-color: var(--gold-2);
  color: var(--accent-ink);
}
.link.primary .ico { background: rgba(255, 255, 255, .32); color: currentColor; }
.link.primary .sub, .link.primary .go { color: currentColor; opacity: .82; }
.link.primary:hover { border-color: var(--gold-2); filter: brightness(1.05); }

.link.featured { border-color: var(--gold-2); }

/* Dua tombol berdampingan (Daftar + Login) */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.link.tile {
  flex-direction: column;
  text-align: center;
  gap: 10px;
  padding: 16px 10px;
}
.link.tile .txt { align-items: center; }

.divider {
  margin: 8px 0 -2px;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* ── Tentang ────────────────────────── */
.about { margin-top: 32px; text-align: center; }
.about h2 { font-size: .95rem; letter-spacing: .02em; }
.about p { margin-top: 8px; font-size: .85rem; color: var(--muted); }

/* ── Footer ─────────────────────────── */
footer {
  margin-top: 36px;
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
}

/* ── Pesan "Segera hadir" ───────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .88rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Animasi masuk ──────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .page > *, .links > li {
    opacity: 0;
    transform: translateY(8px);
    animation: rise .5s ease forwards;
  }
  .page > :nth-child(2) { animation-delay: .05s; }
  .page > :nth-child(3) { animation-delay: .1s; }
  .page > :nth-child(4) { animation-delay: .15s; }
  .links > li:nth-child(1) { animation-delay: .2s; }
  .links > li:nth-child(2) { animation-delay: .26s; }
  .links > li:nth-child(3) { animation-delay: .32s; }
  .links > li:nth-child(4) { animation-delay: .38s; }
  .links > li:nth-child(5) { animation-delay: .44s; }
  .links > li:nth-child(6) { animation-delay: .5s; }
  .links > li:nth-child(7) { animation-delay: .56s; }
  .links > li:nth-child(8) { animation-delay: .62s; }
  .links > li:nth-child(9) { animation-delay: .68s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .status::before { animation: none; }
}
