/* ==========================================================================
   CSS SYSTEM - YAYASAN RUMAH YATIM ARRAHIMAH ABU HURAIRAH INDRAMAYU
   BASE.CSS - CSS Variables, Custom Reset, Typography
   ========================================================================== */

/* DESIGN TOKENS — Emerald + Gold Palette */
:root {
  /* Gold Accent (CTA utama — menggantikan lime) */
  --lime: #C8973E;
  --lime-hover: #B07E2A;
  --lime-light: #FDF4E0;

  /* Fresh Emerald Green — lebih vibrant, tidak sumpek */
  --green: #1B6B44;          /* Fresh emerald — segar & trustworthy */
  --green-hover: #155836;    /* Hover state */
  --green-dark: #0D4A2E;     /* Hero, footer, stats — deep anchor */

  /* Neutrals */
  --white: #FFFFFF;
  --cream: #F8FAF8;          /* Hint hijau sangat tipis — cohesive */
  --ink: #111827;            /* Deep dark charcoal black */
  --muted: #4B5563;          /* Slate neutral gray for subtext */
  --text: #1F2937;           /* Dark gray for main text body */

  /* Gold Scale */
  --gold-light: #FDF4E0;
  --gold-mid: #E8C47A;
  --gold-dark: #9A6E1A;
  
  /* Gray Scale (warm tinted) */
  --gray-100: #F8FAF9;
  --gray-200: #EEF2F0;
  --gray-300: #DDE5E1;
  --gray-400: #BCC9C3;
  --gray-600: #6B7F77;
  --gray-800: #2D3A35;

  /* Shadows (emerald-tinted) */
  --shadow-sm: 0 1px 3px rgba(15, 61, 38, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 61, 38, 0.1), 0 2px 4px -1px rgba(15, 61, 38, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 61, 38, 0.12), 0 4px 6px -2px rgba(15, 61, 38, 0.07);
  --shadow-xl: 0 20px 25px -5px rgba(15, 61, 38, 0.15), 0 10px 10px -5px rgba(15, 61, 38, 0.08);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  
  /* Border Radius Shapes */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CUSTOM RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Pastikan tidak ada elemen yang overflow horizontal */
  min-width: 0;
}

/* Cegah section/wrapper overflow keluar viewport */
section, header, footer, nav, main, aside {
  max-width: 100%;
  overflow-x: hidden;
}


html {
  font-family: var(--font-sans);
  font-size: 16px;
  scroll-behavior: smooth;
  color: var(--ink);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip tidak membatalkan scrollbar-gutter, berbeda dengan hidden */
  overflow-x: clip;
  max-width: 100%;
  /* Selalu reservasi ruang untuk scrollbar agar navbar tidak geser */
  scrollbar-gutter: stable;
}

/* Desktop sedang (1024px+) */
@media (min-width: 1024px) {
  html { font-size: 17px; }
}

/* Desktop besar (1280px+) — ukuran seperti gambar 2 */
@media (min-width: 1280px) {
  html { font-size: 18px; }
}

/* Desktop sangat lebar (1600px+) */
@media (min-width: 1600px) {
  html { font-size: 19px; }
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
  background-color: var(--white);
  /* Cegah content melebihi viewport width */
  position: relative;
}

/* HTML5 ELEMENT DEFAULTS */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  background: none;
}

ul, ol {
  list-style: none;
}

/* BASE TYPOGRAPHY */
h1, h2 {
  color: #111827;
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h3, h4, h5, h6 {
  color: #111827;
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.3;
}

p {
  color: var(--muted);
  font-weight: 400;
}
