/* ============================================
   Panduan DTSEN — Stylesheet
   Palet: Hijau toska + cream | Mobile-first
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Warna utama */
  --teal-900: #0a3a3a;
  --teal-800: #134e4a;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;
  --teal-50: #f0fdfa;

  /* Cream & netral */
  --cream-50: #fdfbf5;
  --cream-100: #faf5e9;
  --cream-200: #f3ead2;
  --cream-300: #e8d9b0;

  /* Aksen & teks */
  --ink: #1a2e2e;
  --ink-soft: #3d5151;
  --ink-mute: #6b7a7a;
  --terracotta: #c2562d;
  --gold: #c89933;
  --gold-soft: #e6c068;

  /* Sistem */
  --shadow-sm: 0 1px 2px rgba(15, 118, 110, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 118, 110, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 118, 110, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Tipografi */
  --font-display: 'Fraunces', 'Lora', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'Source Sans 3', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream-50);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--teal-800); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--teal-900);
}
h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.875rem); margin: 2.5rem 0 1rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); margin: 1.75rem 0 0.75rem; color: var(--teal-800); }
h4 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; font-weight: 700; color: var(--teal-800); }

p { margin-bottom: 1rem; }
strong { color: var(--teal-900); font-weight: 700; }

/* --- Layout dasar --- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Header --- */
.site-header {
  background: var(--teal-900);
  color: var(--cream-100);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--cream-100);
  flex-shrink: 0;
}

.site-header__logo {
  width: 42px;
  height: 42px;
  background: #ffffff;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
  padding: 4px;
  box-shadow: 0 0 0 2px var(--gold);
}

.site-header__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.site-header__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-header__subtitle {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-100);
  font-weight: 500;
}

/* Menu toggle */
.menu-toggle {
  background: transparent;
  border: 1.5px solid var(--teal-100);
  color: var(--cream-100);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}
.menu-toggle:hover { background: var(--teal-800); }
.menu-toggle__icon {
  display: inline-block;
  width: 18px;
  height: 14px;
  position: relative;
}
.menu-toggle__icon::before,
.menu-toggle__icon::after,
.menu-toggle__icon span {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cream-100);
  border-radius: 2px;
}
.menu-toggle__icon::before { top: 0; }
.menu-toggle__icon span { top: 6px; }
.menu-toggle__icon::after { bottom: 0; }

/* Drawer navigation */
.site-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(85%, 320px);
  height: 100vh;
  background: var(--cream-50);
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  padding: 5rem 1.5rem 2rem;
  overflow-y: auto;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}
.site-nav.is-open { right: 0; }

.site-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 58, 58, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 98;
}
.site-nav__overlay.is-open { opacity: 1; pointer-events: auto; }

.site-nav__list { list-style: none; }
.site-nav__item { border-bottom: 1px solid var(--cream-200); }
.site-nav__link {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.95rem 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 500;
  transition: color 0.15s;
}
.site-nav__link:hover { color: var(--teal-700); }
.site-nav__link.is-active { color: var(--teal-700); font-weight: 700; }
.site-nav__num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--terracotta);
  font-weight: 700;
  font-style: italic;
  width: 22px;
  flex-shrink: 0;
}

/* --- Hero / Page Header --- */
.page-hero {
  background: linear-gradient(180deg, var(--cream-100) 0%, var(--cream-50) 100%);
  padding: 2.5rem 0 2rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--cream-200);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, var(--teal-100) 0%, transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.page-hero__inner { position: relative; z-index: 1; }

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 1rem;
}
.page-hero__eyebrow::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--terracotta);
}

.page-hero__lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-top: 1rem;
  max-width: 60ch;
}

.page-hero__meta {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--ink-mute);
  flex-wrap: wrap;
}
.page-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.page-hero__meta-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
}

/* --- Main content --- */
main { padding: 2.5rem 0 4rem; }

.prose p { color: var(--ink-soft); }
.prose p strong { color: var(--ink); }
.prose ul, .prose ol { margin: 1rem 0 1.25rem 1.5rem; }
.prose li { margin-bottom: 0.5rem; color: var(--ink-soft); }
.prose li strong { color: var(--ink); }

/* --- Custom Cards --- */
.callout {
  background: var(--cream-100);
  border-left: 4px solid var(--teal-600);
  padding: 1.25rem 1.25rem 1rem;
  margin: 1.75rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}
.callout__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-700);
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: block;
}
.callout--warning {
  background: #fef9e7;
  border-left-color: var(--gold);
}
.callout--warning .callout__label { color: #8a6d10; }
.callout--important {
  background: #fdf2ed;
  border-left-color: var(--terracotta);
}
.callout--important .callout__label { color: #a0421f; }

/* --- Step / Numbered Cards --- */
.step-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.step-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.step-card__num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--teal-600);
  font-style: italic;
  line-height: 1;
  flex-shrink: 0;
  width: 2.5rem;
}
.step-card__body h4 { margin-top: 0; color: var(--teal-900); }
.step-card__body p { margin-bottom: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* --- Comparison Table --- */
.compare {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-200);
}
.compare th {
  background: var(--teal-700);
  color: var(--cream-100);
  padding: 0.85rem 0.9rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.compare td {
  padding: 0.8rem 0.9rem;
  border-top: 1px solid var(--cream-200);
  color: var(--ink-soft);
  vertical-align: top;
}
.compare tr:nth-child(even) td { background: var(--cream-50); }

/* --- Case Study Box --- */
.case-study {
  background: var(--teal-900);
  color: var(--cream-100);
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}
.case-study::before {
  content: '"';
  position: absolute;
  top: -2rem;
  right: 1rem;
  font-family: var(--font-display);
  font-size: 8rem;
  color: var(--gold);
  opacity: 0.15;
  font-style: italic;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}
.case-study__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.75rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.case-study h3 {
  color: var(--cream-100);
  font-size: 1.2rem;
  margin: 0.5rem 0 1rem;
  position: relative;
  z-index: 1;
}
.case-study p {
  color: var(--cream-200);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}
.case-study p:last-child { margin-bottom: 0; }
.prose .case-study p strong,
.prose .case-study strong,
.case-study strong {
  color: #ffffff;
  font-weight: 700;
}
.case-study em {
  color: var(--gold-soft, #d4a847);
  font-style: italic;
  font-weight: 500;
}

/* --- Page Navigation Footer --- */
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--cream-200);
}
.page-nav__link {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem;
  background: white;
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
  min-height: 80px;
}
.page-nav__link:hover {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.page-nav__link--next { text-align: right; align-items: flex-end; }
.page-nav__direction {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.3rem;
}
.page-nav__title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--teal-800);
  font-weight: 600;
  line-height: 1.3;
}
.page-nav__placeholder {
  visibility: hidden;
}

/* --- Footer --- */
.site-footer {
  background: var(--teal-900);
  color: var(--cream-200);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.88rem;
}
.site-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.site-footer__credit {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream-100);
  margin-bottom: 0.5rem;
}
.site-footer__org {
  color: var(--teal-100);
  margin-bottom: 1.25rem;
}
.site-footer__disclaimer {
  font-size: 0.78rem;
  color: var(--teal-100);
  opacity: 0.75;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  margin-top: 1.5rem;
  line-height: 1.5;
}

/* --- Beranda khusus --- */
.home-hero {
  padding: 3rem 0 2.5rem;
}
.home-hero__title {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.home-hero__title em {
  color: var(--terracotta);
  font-style: italic;
  font-weight: 500;
}

.home-cards {
  display: grid;
  gap: 0.875rem;
  margin: 2rem 0;
}
.home-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.1rem;
  background: white;
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.home-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal-500);
  box-shadow: var(--shadow-md);
}
.home-card__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-600);
  width: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.home-card__body { flex: 1; }
.home-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--teal-900);
  margin-bottom: 0.2rem;
}
.home-card__desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.home-card__time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

/* --- Stat blocks --- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.stat {
  background: white;
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-md);
  padding: 1rem 1rem;
}
.stat__value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--teal-700);
  line-height: 1;
  font-style: italic;
}
.stat__label {
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* --- Decile visual --- */
.decile-bar {
  display: flex;
  margin: 1.5rem 0 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 42px;
}
.decile-bar__cell {
  flex: 1;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  font-style: italic;
}
.decile-bar__legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* --- Checklist --- */
.checklist {
  list-style: none;
  margin-left: 0 !important;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--cream-300);
}
.checklist li::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--teal-600);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 3px;
}

/* --- FAQ --- */
.faq details {
  background: white;
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-md);
  padding: 0;
  margin-bottom: 0.6rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--teal-900);
  font-family: var(--font-display);
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--teal-600);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--cream-200); }
.faq__answer {
  padding: 1rem 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}
.faq__answer p { margin-bottom: 0.75rem; }
.faq__answer p:last-child { margin-bottom: 0; }

/* --- Glossary --- */
.glossary {
  list-style: none;
  margin-left: 0 !important;
}
.glossary > li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--cream-200);
}
.glossary > li::before { display: none; }
.glossary__term {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal-800);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.3rem;
}
.glossary__def {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* --- Tablet & Up --- */
@media (min-width: 768px) {
  body { font-size: 18px; }
  .container { padding: 0 2rem; }
  .stat-row { grid-template-columns: repeat(4, 1fr); }
  .home-card { padding: 1.5rem 1.5rem; }
  .home-card__title { font-size: 1.2rem; }
  .home-card__desc { font-size: 0.95rem; }
  .site-header__title { font-size: 1.15rem; }
  .page-hero { padding: 3.5rem 0 2.75rem; }
  main { padding: 3.5rem 0 5rem; }
}

/* --- Print Style --- */
@media print {
  .site-header, .site-nav, .site-nav__overlay, .menu-toggle, .page-nav, .site-footer { display: none !important; }
  body { background: white; font-size: 11pt; color: black; }
  .container { max-width: none; padding: 0; }
  .page-hero { padding: 0; background: white; border: none; }
  .page-hero::before { display: none; }
  h1, h2, h3, h4 { color: black; page-break-after: avoid; }
  .step-card, .home-card, .compare, .callout { page-break-inside: avoid; box-shadow: none; }
  .case-study { background: white; color: black; border: 2px solid black; }
  .case-study h3, .case-study p, .case-study strong { color: black; }
  a { color: black; text-decoration: underline; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
