/* ==========================================
 Alam — Landing page stylesheet
 Standalone (tidak bergantung style.css viewer)
 Tema: hutan alpine — lumut hijau, batu, amber
 ========================================== */

:root {
  --primary: #3f6b52;
  --primary-dark: #2f4638;
  --primary-soft: #e8f0ea;
  --accent: #c2761f;
  --accent-soft: #fdf1de;

  --text: #1f2422;
  --text-light: #5d6a63;
  --bg: #f5f6f2;
  --bg-alt: #eceee6;
  --card: #ffffff;
  --border: #dfe3db;
  --ring: rgba(63, 107, 82, 0.35);

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 9px;

  --shadow-sm: 0 1px 2px rgba(31, 36, 34, 0.06);
  --shadow: 0 10px 28px rgba(31, 36, 34, 0.08);
  --shadow-lg: 0 22px 48px rgba(31, 36, 34, 0.14);

  --font: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}

body.dark {
  --primary: #8fc0a1;
  --primary-dark: #a9d3b8;
  --primary-soft: #1e2a24;
  --accent: #e8a94f;
  --accent-soft: #2c2417;

  --text: #eaf0ea;
  --text-light: #a3b0a8;
  --bg: #14181a;
  --bg-alt: #1b2124;
  --card: #1c2225;
  --border: #2c3539;
  --ring: rgba(143, 192, 161, 0.4);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 52px rgba(0, 0, 0, 0.55);
}

/* ===========================
RESET
=========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(63, 107, 82, 0.10), transparent 60%),
    radial-gradient(900px 480px at 92% 4%, rgba(194, 118, 31, 0.09), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 1px 6px;
  border-radius: 6px;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}

/* ===========================
BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(63, 107, 82, 0.28);
}

body.dark .btn-primary {
  color: #10201a;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 12px 24px rgba(63, 107, 82, 0.32);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle .icon-moon {
  display: none;
}

body.dark .theme-toggle .icon-sun {
  display: none;
}

body.dark .theme-toggle .icon-moon {
  display: block;
}

/* ===========================
HEADER
=========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 14px rgba(47, 70, 56, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-light);
  padding: 6px 2px;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: right 0.25s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a:hover::after {
  right: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===========================
HERO
=========================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(40px, 6vw, 76px) 0 clamp(36px, 5vw, 60px);
  height: auto;
  overflow: visible;
  background: none;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
}

body.dark .badge {
  color: var(--primary);
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 5.1vw, 54px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--primary);
  position: relative;
}

.hero-copy h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.22em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  z-index: -1;
}

.hero-lead {
  margin: 0;
  max-width: 52ch;
  font-size: 17px;
  color: var(--text-light);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 0;
}

.hero-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hero-chip strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-chip span {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
}

.skeleton-text {
  min-width: 96px;
  color: transparent;
  animation: pulse 1.4s ease-in-out infinite;
}

/* peta hero */
.hero-map-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.hero-map-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-media {
  min-width: 0;
}

#hero-map {
  height: clamp(280px, 38vh, 400px);
  width: 100%;
  background: var(--bg-alt);
}

.hero-map-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

.hero-map-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.hero-map-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--primary);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

body.dark .hero-map-link {
  color: #10201a;
}

.hero-map-link:hover {
  background: var(--primary-dark);
  transform: translateX(2px);
}

/* ===========================
SECTION
=========================== */
.section {
  padding: clamp(34px, 5vw, 58px) 0;
  scroll-margin-top: 78px;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 28px;
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-head p {
  margin: 0;
  color: var(--text-light);
}

/* ===========================
ROUTE CARDS
=========================== */
.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
  gap: 22px;
}

.route-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.route-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: var(--shadow-lg);
}

.route-card.is-active {
  border-color: var(--primary);
}

.route-map {
  position: relative;
  height: 168px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.route-map-canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.route-map-canvas.is-loaded {
  opacity: 1;
}

.route-map-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 400;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: color-mix(in srgb, var(--primary-dark) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body.dark .route-map-badge {
  color: #0f1b16;
  background: color-mix(in srgb, var(--primary) 80%, transparent);
}

.route-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.route-slug {
  align-self: flex-start;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 9px;
  border-radius: 6px;
}

.route-title {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.route-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-light);
}

.route-meta-ico {
  color: var(--accent);
}

.route-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 0;
  padding: 12px 0 0;
  list-style: none;
  border-top: 1px dashed var(--border);
}

.route-stats li {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.route-stats strong {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-stats span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

.route-go {
  position: absolute;
  top: 18px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--primary) 92%, transparent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.dark .route-go {
  color: #10201a;
}

.route-card:hover .route-go {
  opacity: 1;
  transform: translateX(0);
}

.route-empty {
  margin: 18px 0 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--text-light);
  background: var(--card);
}

/* skeleton */
.route-card--skeleton {
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}

.skeleton {
  display: block;
  background: linear-gradient(90deg, var(--bg-alt) 25%, color-mix(in srgb, var(--bg-alt) 55%, var(--card)) 37%, var(--bg-alt) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ===========================
STATS
=========================== */
.stats {
  padding: 8px 0 clamp(28px, 4vw, 44px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.stat-num {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.stat-label {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* ===========================
FEATURES
=========================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.feature {
  position: relative;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: var(--shadow);
}

.feature:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.feature p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-light);
}

/* ===========================
EMBED
=========================== */
.embed-box {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.embed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 14px;
}

.embed-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 190px;
}

.embed-field > span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

.embed-field select {
  font-family: inherit;
  font-size: 14.5px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.embed-toolbar .btn {
  margin-left: auto;
}

.embed-code {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.8px;
  line-height: 1.6;
  resize: vertical;
}

.embed-code:focus {
  outline: 2px solid var(--ring);
  outline-offset: 0;
}

.embed-status {
  margin: 10px 0 0;
  min-height: 20px;
  font-size: 13.5px;
  color: var(--text-light);
}

/* ===========================
FOOTER
=========================== */
.site-footer {
  margin-top: 40px;
  padding: 40px 0 28px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

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

.footer-col > strong {
  font-family: var(--display);
  font-size: 18px;
}

.footer-col h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
}

.footer-col a {
  width: fit-content;
  font-size: 14px;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-sub {
  margin: 0;
  max-width: 38ch;
  font-size: 13.5px;
  color: var(--text-light);
}

.footer-copy {
  margin: 28px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-light);
}

/* ===========================
REVEAL
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease var(--delay, 0ms), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .skeleton,
  .skeleton-text {
    animation: none;
  }
}

/* ===========================
LEAFLET OVERRIDES
=========================== */
.leaflet-container {
  background: var(--bg-alt);
  font-family: var(--font);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.leaflet-bar a {
  background: var(--card);
  color: var(--text);
  border-bottom-color: var(--border);
}

.leaflet-bar a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ===========================
RESPONSIVE
=========================== */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 34px;
  }

  .hero-media {
    order: 2;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1160px, 100% - 32px);
  }

  .site-nav {
    display: none;
  }

  .header-inner {
    height: 62px;
  }

  .route-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-map {
    height: 190px;
  }

  .embed-toolbar .btn {
    margin-left: 0;
  }

  .footer-grid {
    gap: 22px;
  }
}