/* ========================================
   MAN 1 Banggai — Global Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Primary palette — Dark Green from MAN 1 Banggai */
  --primary: #064e3b;
  --primary-dark: #053d2e;
  --primary-mid: #0d9466;
  --primary-light: #34d399;
  --primary-gradient: linear-gradient(135deg, #064e3b 0%, #0d9466 50%, #14b8a6 100%);
  --primary-gradient-alt: linear-gradient(135deg, #053d2e 0%, #064e3b 50%, #0d9466 100%);

  /* Accent — Gold from MAN 1 Banggai */
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);

  /* Neutrals */
  --bg-primary: #ffffff;
  --bg-secondary: #f0fdf4;
  --bg-tertiary: #ecfdf5;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --border-color: #e2e8f0;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06);

  /* Typography */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 9999px;
  --radius-circle: 50%;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Layout */
  --container-max: 1200px;
  --top-bar-height: 36px;
  --header-height: 70px;
  --bottom-nav-height: 65px;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #1a2332;
  --bg-card: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.9);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

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

ul, ol {
  list-style: none;
}

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

/* ---------- Utility Classes ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}

.pill-btn--primary {
  background: var(--primary-gradient);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.3);
}

.pill-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 78, 59, 0.45);
}

.pill-btn--gold {
  background: var(--accent-gradient);
  color: #1a1a1a;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.pill-btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  filter: brightness(1.05);
}

.pill-btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.pill-btn--outline:hover {
  background: var(--primary);
  color: var(--text-inverse);
}

.section-title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-2xl);
  color: var(--text-primary);
}

.section-title span {
  color: var(--accent);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--fs-base);
  margin-top: calc(-1 * var(--space-lg));
  margin-bottom: var(--space-2xl);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--primary-gradient);
  color: var(--text-inverse);
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xl);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 999;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(13, 148, 102, 0.4);
}
