/* Token brand disalin dari frontend/src/app/globals.css (nama variabel sama).
   Rencana: docs/landing-page-implementation-plan.md §1 */
:root {
  --bg: #fefcfb;
  --surface: #ffffff;
  --surface-muted: #eef5f8;
  --tint: #e4f1f6;
  --border: #dce7ec;
  --text: #0a1128;
  --text-muted: #4a5670;
  --brand: #034078;
  --brand-strong: #001f54;
  --accent: #1282a2;
  --accent-soft: #88bfcf;
  --on-brand: #fefcfb;
  --ok: #15803d;
  --ok-soft: #e8f5ec;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --crit: #b91c1c;
  --crit-soft: #fcebeb;

  --shadow-card: 0 1px 2px rgb(3 64 120 / 0.04), 0 12px 32px -16px rgb(3 64 120 / 0.18);
  --radius-card: 16px;
  --radius-btn: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 19px; }
a { color: var(--brand); }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.icon { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.icon--sm { width: 16px; height: 16px; vertical-align: -3px; }

/* Header */
.header { background: var(--surface); border-bottom: 1px solid var(--border); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; text-decoration: none; }
.brand__ai { color: var(--brand); }
.nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav__link { padding: 10px 14px; font-size: 15px; font-weight: 500; color: var(--text-muted); text-decoration: none; }
.nav__link:hover { color: var(--brand); }

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius-btn); border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--accent-soft); color: var(--brand); }
.btn--sm { padding: 10px 18px; font-size: 15px; }
.btn--block { width: 100%; }

/* Status: selalu ikon + teks */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
}
.badge--aman { background: var(--ok-soft); color: var(--ok); }
.badge--waspada { background: var(--warn-soft); color: var(--warn); }
.badge--kritis { background: var(--crit-soft); color: var(--crit); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.eyebrow--crit { color: var(--crit); }
.eyebrow--frost { color: var(--accent-soft); }
.lead { font-size: 18px; color: var(--text-muted); max-width: 640px; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--surface-muted) 0%, var(--bg) 100%); }
.hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 88px; padding-bottom: 72px; }
.hero__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero__copy h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.hero__visual { flex: 1 1 420px; min-width: 0; }
.pill { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--tint); color: var(--brand); font-size: 13px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hint { font-size: 14px; color: var(--text-muted); }
.hint a { font-weight: 600; text-decoration: none; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-card); overflow: hidden; }
.panel__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--brand-strong); color: var(--on-brand); font-size: 14px; font-weight: 600; }
.panel__tag { font-size: 12px; font-weight: 400; color: var(--accent-soft); }
.panel__body { padding: 8px 20px 20px; display: flex; flex-direction: column; }
.truck { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.truck > div { display: flex; flex-direction: column; gap: 2px; }
.truck__name { font-size: 15px; font-weight: 600; }
.truck__meta { font-size: 13px; color: var(--text-muted); }
.trend { width: 100%; height: 90px; margin-top: 16px; }
.trend__limit { stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 4 4; }
.trend__actual { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.trend__forecast { fill: none; stroke: var(--accent-soft); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 7; }
.trend__now { fill: var(--brand-strong); }
.caption { font-size: 12px; color: var(--text-muted); }

/* Section */
.section { padding: 80px 0; }
.section--muted { background: var(--surface-muted); }
.section--dark { background: var(--brand-strong); color: var(--on-brand); }
.stack { display: flex; flex-direction: column; gap: 40px; }
.stack--center { align-items: center; text-align: center; gap: 24px; }
.heading { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }

.split { display: flex; flex-wrap: wrap; gap: 24px; }
.box { flex: 1 1 440px; min-width: 0; padding: 36px; border-radius: 18px; display: flex; flex-direction: column; gap: 14px; }
.box h2 { font-size: 28px; }
.box p { font-size: 17px; }
.box--light { background: var(--surface-muted); border: 1px solid var(--border); }
.box--light p { color: var(--text-muted); }
.box--dark { background: var(--brand-strong); color: var(--on-brand); }
.box--dark p { color: var(--tint); }

.grid { display: grid; gap: 20px; }
.grid--4, .grid--team { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.card p { font-size: 15px; color: var(--text-muted); }
.card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--accent); display: flex; align-items: center; justify-content: center; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.chips li { padding: 10px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-muted); font-size: 15px; font-weight: 600; }

.member { gap: 16px; }
.member h3 { font-size: 18px; }
.member__role { font-size: 15px; font-weight: 600; color: var(--brand); }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--on-brand); overflow: hidden; }
.avatar--1 { background: var(--brand-strong); }
.avatar--2 { background: var(--brand); }
.avatar--3 { background: var(--accent); }
.avatar--4 { background: var(--accent-soft); color: var(--text); }

/* Minta demo */
.demo { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.demo__copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.demo__copy h2 { font-size: clamp(28px, 4.5vw, 40px); letter-spacing: -0.03em; }
.demo__copy p { font-size: 18px; color: var(--tint); max-width: 480px; }
.form { flex: 1 1 400px; min-width: 0; padding: 36px; background: var(--surface); color: var(--text); border-radius: 20px; display: flex; flex-direction: column; gap: 20px; }
.form__field { display: flex; flex-direction: column; gap: 8px; }
.form label { font-size: 14px; font-weight: 600; }
.form input { padding: 13px 14px; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; transition: border-color 150ms; }
.form input:hover { border-color: var(--accent-soft); }
.form input::placeholder { color: var(--text-muted); }

/* Pop-up */
.dialog { width: min(420px, calc(100% - 32px)); padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); text-align: center; }
.dialog::backdrop { background: rgb(10 17 40 / 0.5); }
.dialog h3 { margin-bottom: 8px; font-size: 20px; }
.dialog p { margin-bottom: 24px; color: var(--text-muted); }
.dialog__icon { width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); display: flex; align-items: center; justify-content: center; }

/* Footer */
.footer { background: var(--surface); border-top: 1px solid var(--border); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; color: var(--text-muted); }
.footer a { font-weight: 600; text-decoration: none; }

@media (max-width: 640px) {
  .nav__link--hide-sm { display: none; }
  .hero__inner { padding-top: 48px; padding-bottom: 48px; gap: 40px; }
  .section { padding: 56px 0; }
  .box, .form { padding: 24px; }
  .card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0ms !important; }
}
