/* ==========================================================================
   BASE — design tokens (warna, radius, bayangan), reset, layout umum, footer
   Ubah tampilan seluruh situs cukup dari variabel di :root di bawah ini.
   ========================================================================== */

:root {
  /* ---- Warna merek: hijau (utama), kuning (aksen), krem (latar) ---- */
  --green-900: #10301b;
  --green-800: #17452a;
  --green-700: #1f6a31;
  --green-600: #2f8f46;
  --green-500: #46aa5f;
  --green-200: #bfe3c8;
  --green-100: #e3f3e7;
  --green-50: #f1f9f3;

  --yellow-700: #8a5d00;
  --yellow-600: #d99a00;
  --yellow-500: #f7b733;
  --yellow-300: #ffd978;
  --yellow-100: #fff1c9;
  --yellow-50: #fff9e6;

  --cream: #fbf8ef;
  --surface: #ffffff;
  --surface-2: #f6f3ea;
  --surface-3: #eeeadf;

  --ink: #1b2a20;
  --ink-2: #47564c;
  --ink-3: #5d6b62;
  --line: #e7e3d6;
  --line-strong: #d3cebc;

  --danger: #c0392b;
  --danger-soft: #fdeceb;
  --whatsapp: #25d366;

  /* ---- Peran warna (dipakai komponen) ---- */
  --bg: var(--cream);
  --primary: var(--green-700);
  --primary-hover: var(--green-800);
  --primary-soft: var(--green-100);
  --on-primary: #ffffff;
  --accent: var(--yellow-500);
  --accent-hover: #eaa71d;
  --on-accent: #3a2900;

  /* ---- Radius ---- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* ---- Bayangan ---- */
  --shadow-xs: 0 1px 2px rgba(23, 48, 31, 0.06);
  --shadow-sm: 0 2px 10px rgba(23, 48, 31, 0.07);
  --shadow-md: 0 8px 26px rgba(23, 48, 31, 0.1);
  --shadow-lg: 0 20px 56px rgba(16, 36, 22, 0.2);
  --shadow-accent: 0 8px 20px rgba(247, 183, 51, 0.32);

  /* ---- Ukuran & layout ---- */
  --gutter: 16px;
  --container: 1200px;
  --tap: 44px; /* area sentuh minimal */
  --header-h: 68px;
  --bn-h: 0px; /* navigasi bawah dihapus */

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }
button { font-size: inherit; }
/* Cegah auto-zoom iOS saat fokus ke input */
input, select, textarea { font-size: 16px; }
:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; }
@media (max-width: 768px) {
  button, .btn, a.btn, .tut-picker-bubble, .menu-card { -webkit-tap-highlight-color: transparent; }
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Tab / view ---------- */
/* PENTING: tab Katalog/Tutorial/Testimoni bergantung pada aturan ini */
.view { display: none; }
.view.active { display: block; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px var(--gutter) 24px;
}
@media (min-width: 769px) {
  :root { --gutter: 28px; }
  .container { padding-top: 20px; }
}

/* ---------- Judul bagian ---------- */
.section-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--ink);
  text-align: left;
}
.section-desc {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--ink-3);
  text-align: left;
}
#view-tutorial > .section-title,
#view-testimoni > .section-title { text-align: center; font-size: 24px; margin-top: 12px; }
#view-tutorial > .section-desc,
#view-testimoni > .section-desc { text-align: center; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Animasi dasar ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Ikon koin (SVG inline, selalu tampil di semua perangkat) ---------- */
.rh-coin { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; flex-shrink: 0; }

/* ---------- Footer ---------- */
footer {
  margin-top: 40px;
  padding: 28px var(--gutter) 32px;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -8px 28px rgba(23, 48, 31, 0.05);
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
footer p { max-width: 640px; margin: 0 auto; line-height: 1.75; }
footer::before {
  content: '';
  display: block;
  width: 44px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--green-600), var(--yellow-500));
}
@media (max-width: 768px) {
  footer { padding-bottom: calc(32px + 76px + env(safe-area-inset-bottom)); } /* ruang untuk tombol melayang */
}
