/* ==========================================================================
   Kompas Fit - Design System: "Gerak Tropis"
   base.css: Tokens, Reset, Typography, Accessibility & Dev Mode
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg: #f5f7f2;       /* Lumut terang */
  --ink: #0f2a22;      /* Pinus gelap */
  --lime: #b8f04a;     /* Energi utama, teks di atasnya harus --ink */
  --coral: #ff6b4a;    /* Aksen & penekanan lembut */
  --sand: #e7ecdf;     /* Kartu & permukaan kontras rendah */
  --line: #c9d4bd;     /* Garis pemisah & batas kartu */
  --white: #ffffff;
  --muted: #4a6359;    /* Teks sekunder dengan kontras AA */

  /* Typography */
  --font-heading: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-base: 17px;
  --line-height-base: 1.6;

  /* Elevation & Geometry */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  --shadow-subtle: 0 8px 24px rgba(15, 42, 34, 0.08);
  --shadow-elevated: 0 14px 36px rgba(15, 42, 34, 0.12);

  /* Layout */
  --container-max: 1200px;
  --touch-target-min: 48px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: var(--line-height-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
}

/* Accessibility & Focus */
:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

/* Mode Dev & Placeholder Rule (Bagian 0 & 2 ТЗ) */
.todo {
  display: none;
}

body.dev .todo {
  display: inline-block;
  background-color: #fff3cd;
  color: #856404;
  border: 1px dashed #ffeeba;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
  font-weight: 600;
}

/* Utilitas Tata Letak */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.muted-text { color: var(--muted); }
.text-sm { font-size: 0.9rem; }
.text-xs { font-size: 0.8rem; }
.hidden { display: none !important; }

/* Micro-animations disable on user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
