/* ==========================================================
   Design tokens — palet diadaptasi dari referensi BaruJak
   (teal/emerald + kartu putih), tetap 1 halaman tanpa build tool
   ========================================================== */
:root {
  --brand-dark: #1b3a2f;
  --brand-dark-2: #142e25;
  --brand-teal: #1a9c7f;
  --brand-teal-light: #e6f5f0;
  --brand-amber: #e0a53e;
  --brand-amber-light: #fff6e5;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --text-main: #1b2e28;
  --text-muted: #6b8079;
}

/* ==========================================================
   Base layout — mobile-first, single scrolling page
   ========================================================== */
html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f7f6;
  color: var(--text-main);
  line-height: 1.5;
}

input, button {
  font-size: 16px; /* avoid iOS auto-zoom on focus */
}

section, footer {
  padding: 24px 16px;
  max-width: 640px;
  margin: 0 auto;
}

h1 { font-size: 1.5rem; margin: 0 0 10px 0; }
h2 { font-size: 1.15rem; margin: 0 0 14px 0; }
h3 { font-size: 1rem; margin: 0 0 8px 0; }

/* ==========================================================
   Hero — full-bleed gradient "photo" overlay (gaya BaruJak)
   ========================================================== */
#hero {
  max-width: 100%;
  padding: 56px 16px 40px;
  background:
    linear-gradient(160deg, rgba(19, 46, 37, 0.92) 0%, rgba(27, 58, 47, 0.85) 55%, rgba(26, 156, 127, 0.55) 100%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 40px);
  color: white;
}
.hero-inner { max-width: 640px; margin: 0 auto; }
.hero-eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #bfe3d5;
  margin: 0 0 10px 0;
  font-weight: 700;
}
#hero h1 { color: white; }
.hero-desc { color: #d7e9df; margin: 0; }

/* ==========================================================
   Mode nav — dua kartu, icon-circle (gaya BaruJak audience cards)
   ========================================================== */
#mode-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: -28px auto 0;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}
.mode-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.mode-icon--teal { background: var(--brand-teal-light); }
.mode-icon--amber { background: var(--brand-amber-light); }
.mode-title { font-weight: 700; }
.mode-sub { font-size: 0.85rem; color: var(--text-muted); }

@media (min-width: 560px) {
  #mode-nav { flex-direction: row; }
  .mode-card { flex: 1; }
}

/* ==========================================================
   Progress dots
   ========================================================== */
.progress-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.progress-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d8e2df;
}
.progress-dots .dot.done { background: var(--brand-teal); }

/* ==========================================================
   Kalkulator & formulir — question cards
   ========================================================== */
.question-card, .form-field {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}

.question-text {
  font-weight: 600;
  margin: 0 0 12px 0;
}

.section-intro {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option, .radio-option {
  min-height: 44px;
  text-align: left;
  padding: 10px 14px;
  border: 2px solid #d8e2df;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-family: inherit;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
}
.radio-option input { width: 18px; height: 18px; flex-shrink: 0; }

.option:hover { border-color: #7aab97; }

.option.selected {
  border-color: var(--brand-dark);
  background: var(--brand-teal-light);
  font-weight: 600;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
  cursor: pointer;
}

.checklist-item input { width: 20px; height: 20px; flex-shrink: 0; }

.validation-message {
  color: #b3261e;
  font-weight: 600;
  margin: 8px 0 16px 0;
}

.submit-btn, .reset-btn {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.submit-btn {
  background: var(--brand-dark);
  color: white;
}

.submit-btn:disabled {
  background: #b8c4bf;
  cursor: not-allowed;
}

.reset-btn {
  background: white;
  color: var(--brand-dark);
  border: 2px solid var(--brand-dark);
  margin-top: 12px;
}

/* ==========================================================
   Hasil
   ========================================================== */
.result-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.score-display {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--brand-dark);
}

.score-max {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
}

.category-badge {
  display: inline-block;
  margin: 10px 0 16px 0;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.category-badge.siap { background: #d9f0df; color: #1e6b34; }
.category-badge.cukup { background: #fdf0d0; color: #8a5b00; }
.category-badge.kurang { background: #fbdede; color: #a12a20; }

/* Indicator progress bars — gaya "SCVI Dimensions" BaruJak */
.indicator-bars {
  text-align: left;
  margin: 8px 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.indicator-bar-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.indicator-bar-label { color: var(--text-muted); }
.indicator-bar-track {
  height: 8px;
  background: #e6ece9;
  border-radius: 999px;
  overflow: hidden;
}
.indicator-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-teal);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.indicator-bar-value { font-weight: 700; color: var(--brand-dark); }

.recommendation-list {
  text-align: left;
  padding-left: 20px;
  margin: 0;
}
.recommendation-list li { margin-bottom: 8px; }

.cta-to-doc {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 14px;
  color: var(--text-muted);
}
.cta-to-doc a { color: var(--brand-teal); font-weight: 700; }

/* ==========================================================
   Peta
   ========================================================== */
#map {
  height: 320px;
  width: 100%;
  border-radius: var(--radius);
  margin-top: 8px;
}

.map-disclaimer {
  font-size: 0.85rem;
  color: #6b3a00;
  background: var(--brand-amber-light);
  border-left: 4px solid var(--brand-amber);
  padding: 10px 12px;
  margin: 12px 0;
  border-radius: 4px;
}

.ews-list { padding-left: 20px; }
.ews-list li { margin-bottom: 6px; }
.ews-list li.highlight { font-weight: 700; color: var(--brand-dark); }

/* Leaflet popup, gaya kartu BaruJak */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
}
.ews-popup-title { font-weight: 700; margin: 0 0 4px 0; }
.ews-popup-note { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* ==========================================================
   Formulir dokumentasi lingkungan
   ========================================================== */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  background: var(--brand-teal-light);
  border-radius: var(--radius);
  padding: 14px;
  margin: 8px 0 16px 0;
  cursor: pointer;
}
.consent-row input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.doc-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.doc-status.success { background: #d9f0df; color: #1e6b34; }
.doc-status.error { background: #fbdede; color: #a12a20; }

.contribution-counter {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.contribution-counter #contribution-count {
  font-weight: 800;
  color: var(--brand-teal);
  font-size: 1.1rem;
}

/* ==========================================================
   Transparansi partisipatif — quote card (gaya "Voices" BaruJak)
   ========================================================== */
.quote-card {
  background: var(--card-bg);
  border-left: 4px solid var(--brand-teal);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  font-size: 0.95rem;
}
.quote-card p:first-child { font-style: italic; }
.quote-card p:last-child { margin-bottom: 0; color: var(--text-muted); }

/* ==========================================================
   Footer
   ========================================================== */
#footer {
  background: var(--brand-dark-2);
  color: #d7e9df;
  font-size: 0.85rem;
  max-width: 100%;
}
#footer h3 { color: white; }
#footer a { color: #8fd6bc; }
#footer ul { padding-left: 20px; margin: 0 0 12px 0; }
.limitation-note, .contact-note { margin: 0 0 10px 0; }

/* ==========================================================
   Scroll-reveal (ringan, tanpa library)
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
