/* GadeinDong — styles.css
 * Token dan komponen mengikuti KONTRAK DESAIN FINAL (Raka, 1 Des 2026).
 * Tema "Emerald & Emas". Font: Plus Jakarta Sans.
 * Perubahan dari v1.0: token primary/kontainer/aksen baru, strip harga masuk
 * ke kartu kalkulator, panel hasil latar primary, chip CAP grid, dropdown Karat.
 */

/* ---------- 1. Token ---------- */
:root {
  --color-primary: #0b3d2e;
  --color-primary-hover: #0f5139;
  --color-accent: #c9a227;
  /* Emas gelap untuk elemen non-teks bermakna (keputusan Bos 1 Des 2026):
     ikon, lencana nomor langkah, garis tepi strip harga, indikator fokus. */
  --color-accent-strong: #7a5c0e;
  --color-accent-text: #7a5c0e;
  --color-bg: #f7f5f0;
  --color-surface: #ffffff;
  --color-text: #1a1f1c;
  --color-text-muted: #5a6660;
  --color-border: #e3e0d8;
  --color-error: #b3261e;
  --color-error-bg: #fdecea;

  --font-main: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container-max: 1120px;
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 3px rgba(26, 31, 28, 0.08);
  --shadow-lift: 0 8px 24px rgba(26, 31, 28, 0.12);
}

/* ---------- Reset & dasar ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 40px; line-height: 1.15; font-weight: 800; }
h2 { font-size: 30px; line-height: 1.25; font-weight: 700; margin-bottom: 0; }
h3 { font-size: 20px; line-height: 1.35; font-weight: 700; }
a { color: var(--color-primary); }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section { padding-top: 96px; padding-bottom: 96px; }
.section-desc { color: var(--color-text-muted); max-width: 720px; margin: 16px 0 0; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin: 0 0 12px;
}
.eyebrow-light { color: var(--color-accent); }

.h2-rule {
  display: block;
  width: 48px;
  height: 4px;
  background: var(--color-accent);
  margin-top: 16px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 16px;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

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

:focus-visible {
  outline: 3px solid var(--color-accent-strong);
  outline-offset: 2px;
}

/* Cincin fokus di atas latar GELAP tetap accent #C9A227 (kontrak §7.1):
   teks hero, panel hasil, footer. Di luar itu (latar terang) berlaku
   accent-strong #7A5C0E dari aturan :focus-visible di atas. */
.hero-text :focus-visible,
.result-panel :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--color-accent);
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-input);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover { background: rgba(11, 61, 46, 0.08); }
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-hitung { width: 100%; min-height: 56px; margin-top: 24px; }
.btn:disabled { background: var(--color-border); color: var(--color-text-muted); cursor: not-allowed; }

/* ---------- 5.1 Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-text { font-size: 20px; font-weight: 800; line-height: 1; }
.logo-gadein { color: var(--color-primary); }
.logo-dong { color: var(--color-accent-text); }
.site-nav { display: flex; gap: 32px; margin-left: auto; }
.site-nav a {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--color-primary); border-bottom-color: var(--color-accent); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-input);
}
.nav-toggle span { display: block; height: 2px; background: var(--color-text); border-radius: 2px; }

/* ---------- 5.2 Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: #fff;
  padding-top: 64px;
  padding-bottom: 64px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: #fff; margin: 0 0 16px; max-width: 640px; }
.hero-sub { font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, 0.92); margin: 0 0 32px; max-width: 560px; }
.trust-points {
  list-style: none;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
}
.trust-points li { display: flex; align-items: center; gap: 8px; }
.trust-points svg { flex-shrink: 0; }

/* ---------- 5.3 Kalkulator ---------- */
.calculator { background: var(--color-bg); }
.calculator-grid {
  display: grid;
  grid-template-columns: 11fr 9fr;
  gap: 32px;
  margin-top: 48px;
  align-items: start;
}
.calc-form {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

/* Strip harga emas — di dalam kartu kalkulator (5.3) */
.price-strip {
  background: var(--color-bg);
  border-left: 6px solid var(--color-accent-strong);
  border-radius: var(--radius-input);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.strip-label { font-size: 15px; font-weight: 600; color: var(--color-text-muted); margin: 0 0 8px; }
.strip-price {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent-text);
  margin: 0 0 8px;
}
.strip-satuan { font-size: 16px; font-weight: 600; color: var(--color-text-muted); }
.strip-updated { font-size: 14px; color: var(--color-text-muted); margin: 0; }
.strip-note { font-size: 13px; color: var(--color-text-muted); margin: 8px 0 0; }
.strip-pending { font-size: 13px; color: var(--color-text-muted); margin: 8px 0 0; }

.field { margin-bottom: 24px; }
.field:last-of-type { margin-bottom: 0; }
.field label,
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 64px 0 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  font-size: 16px;
  color: var(--color-text);
}
.input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.15);
}
.input-wrap input.input-error { border-color: var(--color-error); }
.input-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.field select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  font-size: 16px;
  color: var(--color-text);
}
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.15);
}
.field-hint { font-size: 14px; color: var(--color-text-muted); margin: 8px 0 0; }
.field-error { font-size: 14px; color: var(--color-error); margin: 8px 0 0; }
.form-note { font-size: 13px; color: var(--color-text-muted); text-align: center; margin: 16px 0 0; }

/* Toggle CAP / Karat */
.segmented {
  display: flex;
  background: var(--color-bg);
  border-radius: var(--radius-input);
  padding: 4px;
  margin-bottom: 16px;
}
.segment {
  flex: 1;
  min-height: 44px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.segment-active {
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 700;
  box-shadow: var(--shadow-card);
}
.kadar-panel[hidden] { display: none; }

/* Chip kadar CAP — grid 4 kolom desktop */
.chip-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 6px 8px;
  border-radius: var(--radius-input);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}
.chip small { font-size: 12px; font-weight: 400; opacity: 0.75; }
.chip:hover { border-color: var(--color-primary); }
.chip-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.konversi {
  font-size: 14px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0 0;
}
.konversi:empty { display: none; }

/* Panel hasil — latar primary, angka putih (kontrak final §2) */
.result-panel {
  position: sticky;
  top: 96px;
  background: var(--color-primary);
  color: #fff;
  border-top: 4px solid var(--color-accent);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
}
.result-empty { text-align: center; padding: 32px 0; }
.result-empty svg { margin: 0 auto 16px; }
.result-empty p { color: rgba(255, 255, 255, 0.75); margin: 0; }
.result-blocked .blocked-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.result-blocked .blocked-text { color: rgba(255, 255, 255, 0.75); font-size: 15px; margin: 0; }
.result-berat {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 16px;
}
.result-berat strong { color: #fff; }
.result-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 4px;
}
.result-angka { font-variant-numeric: tabular-nums; color: #fff; margin: 0 0 16px; }
.result-taksiran { font-size: 40px; font-weight: 800; line-height: 1.2; }
.result-gadai { font-size: 26px; font-weight: 700; line-height: 1.25; }
.result-divider { border: none; border-top: 1px solid var(--color-accent); margin: 8px 0 16px; }
.result-rincian { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; }
.result-rincian li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.75);
}
.result-rincian strong { color: #fff; text-align: right; }
.result-catatan { font-size: 13px; color: rgba(255, 255, 255, 0.75); margin: 0 0 24px; }

/* ---------- 5.4 Cara kerja ---------- */
.steps-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 48px 0 0;
  padding: 0;
}
.step-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent-strong);
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 18px; margin: 0 0 8px; }
.step-card p { color: var(--color-text-muted); font-size: 15px; margin: 0; }

/* ---------- 5.5 Tentang ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: start;
}
.about-text p { color: var(--color-text-muted); }
.about-text p + p { margin-top: 16px; }
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.value-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.value-card svg { margin-bottom: 12px; }
.value-card h3 { font-size: 18px; margin: 0 0 8px; }
.value-card p { font-size: 15px; color: var(--color-text-muted); margin: 0; }
.pill-row {
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 48px 0 0;
  padding: 0;
}
.pill-row li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 15px;
  color: var(--color-text-muted);
}
.pill-row strong { color: var(--color-text); }

/* ---------- 5.8 FAQ ---------- */
.faq-list { margin-top: 48px; display: grid; gap: 16px; }
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; }
.faq-question::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--color-primary);
  border-bottom: 2.5px solid var(--color-primary);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.faq-item[open] .faq-question::after { transform: rotate(225deg); }
.faq-answer { padding: 0 24px 20px; }
.faq-answer p { color: var(--color-text-muted); margin: 0; }

/* ---------- 5.6 Disclaimer ---------- */
.disclaimer { padding-bottom: 64px; }
.disclaimer-inner {
  max-width: 760px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--color-text-muted);
}
.disclaimer-inner svg { flex-shrink: 0; margin-top: 2px; }
.disclaimer-inner p { font-size: 14px; margin: 0; }

/* ---------- 5.7 Footer ---------- */
.site-footer { background: var(--color-primary); color: #fff; padding-top: 64px; }
.site-footer .logo-dong { color: var(--color-accent); }
.footer-grid {
  display: grid;
  grid-template-columns: 5fr 3fr 4fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-col p { color: rgba(255, 255, 255, 0.75); font-size: 15px; margin: 16px 0 0; }
.footer-heading {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
}
.footer-col nav, .footer-col a { display: block; }
.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 15px;
  padding: 4px 0;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
  padding-bottom: 24px;
}
.footer-bottom p { color: rgba(255, 255, 255, 0.75); font-size: 13px; margin: 0; }
.footer-bottom a { color: rgba(255, 255, 255, 0.75); }
.footer-bottom a:hover { color: #fff; }

/* ---------- 6. Responsif ---------- */
@media (max-width: 899px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .calculator-grid { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 639px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  h3 { font-size: 18px; }
  .header-inner { height: 64px; gap: 16px; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 20px 16px;
    margin-left: 0;
  }
  .site-nav.nav-open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--color-border); }
  .site-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-small { display: none; }
  .hero { padding-top: 48px; padding-bottom: 48px; }
  .hero-sub { font-size: 17px; }
  .calc-form, .result-panel { padding: 24px; }
  .price-strip { padding: 20px; }
  .result-taksiran { font-size: 34px; }
  .result-gadai { font-size: 24px; }
  .steps-grid { grid-template-columns: 1fr; }
  .chip-group { grid-template-columns: repeat(3, 1fr); }
  .about-values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .strip-price { font-size: 22px; }
  .disclaimer { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
