/**
 * =============================================================================
 * CSS DASAR & TEMA (css/base.css)
 * =============================================================================
 * Berisi variabel warna resmi (:root dan dark mode), reset elemen, aksesibilitas
 * fokus keyboard, tipografi dasar, dan reduced motion support.
 * =============================================================================
 */

/* --------------------------------------------------------------------------
   1. CSS Variables & Theme (Dominan Netral, Oranye Aksen, WhatsApp Hijau)
   -------------------------------------------------------------------------- */
:root {
  /* Oranye Resmi Indomobil eMotor (#F77104) */
  --brand: #F77104;
  --brand-hover: #DE6402;
  --brand-active: #BF5500;
  --brand-text: #C2410C; /* Kontras >= 4.5:1 untuk teks oranye di latar terang */
  --brand-strong: #C2410C;
  --brand-soft: #FFF1E8;
  --on-brand: #FFFFFF;

  /* Warna Netral Dominan */
  --color-dark: #1C1917;
  --color-dark-alt: #141211;
  --color-dark-surface: #24201D;
  --color-bg: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F8F8F7;
  --color-border: #E5E5E5;
  --color-border-dark: #2E2926;

  --color-text-main: #1C1917;
  --color-text-muted: #665E58;
  --color-text-light: #F5F5F4;
  --color-text-light-muted: #A8A29E;

  /* WhatsApp Resmi (Hijau Asli #25D366, Teks Kontras) */
  --color-wa: #25D366;
  --color-wa-hover: #1EBE5D;
  --color-wa-shadow: rgba(37, 211, 102, 0.4);

  /* Placeholder Abu-abu Netral */
  --color-placeholder-bg: #F0EFEB;
  --color-placeholder-text: #736B63;
  --color-placeholder-border: #DDD8D0;

  /* Bayangan Netral & Efek */
  --color-shadow: rgba(28, 25, 23, 0.08);
  --color-shadow-lg: rgba(28, 25, 23, 0.16);

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout & Sizing */
  --max-width: 1200px;
  --min-touch-target: 44px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dukungan Mode Gelap (Dark Mode) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #121110;
    --color-surface: #1C1917;
    --color-surface-alt: #24201D;
    --color-border: #2E2926;
    --color-border-dark: #3E3834;

    --color-text-main: #F5F5F4;
    --color-text-muted: #A8A29E;

    --color-placeholder-bg: #24201D;
    --color-placeholder-text: #8C847C;
    --color-placeholder-border: #3A342F;

    --color-shadow: rgba(0, 0, 0, 0.4);
    --color-shadow-lg: rgba(0, 0, 0, 0.6);

    --brand-text: #FB923C; /* Kontras 8.33:1 untuk teks oranye di latar gelap */
  }

  a:hover {
    color: var(--brand-text);
  }
}

/* --------------------------------------------------------------------------
   2. Reset & Aksesibilitas Dasar
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
}

.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background-color: var(--color-dark);
  color: #FFFFFF;
  padding: 12px 24px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-to-content:focus-visible {
  top: 16px;
}

html {
  font-family: var(--font-family);
  color: var(--color-text-main);
  background-color: var(--color-bg);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-text);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}


/* --------------------------------------------------------------------------
   16. Reduced Motion Support
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-poster-track,
  .btn,
  .lightbox-overlay,
  .mobile-menu-overlay {
    transition: none !important;
  }
}

