/* =====================================================
   PT. HARAPAN MITRA ADV — Base Styles
   Reset, Typography, Global
   ===================================================== */

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-dark-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  border-top: var(--border-width-2) solid var(--color-accent);
}

/* Selection */
::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-white);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
}

h1 {
  font-size: var(--text-5xl);
  text-transform: uppercase;
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-default);
}

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

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

ul, ol {
  list-style: none;
}

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

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

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

.section {
  padding: var(--space-32) 0;
}

.section--surface {
  background-color: var(--color-dark-surface);
}

.section--base {
  background-color: var(--color-dark-base);
}

.section-border {
  border-bottom: var(--border-width) solid var(--color-dark-border);
}

/* ── Section Headers ── */
.section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mega);
  margin-bottom: var(--space-4);
  display: block;
  text-align: center;
}

.section-title {
  font-size: var(--text-5xl);
  font-weight: var(--weight-black);
  color: var(--color-white);
  letter-spacing: var(--tracking-tighter);
  line-height: 1;
  text-align: center;
}

.section-divider {
  width: 4rem;
  height: 4px;
  background: var(--gradient-primary);
  margin-top: var(--space-6);
  border-radius: var(--radius-full);
  margin-left: auto;
  margin-right: auto;
}

.section-divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* ── Text Utilities ── */
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-white { color: var(--color-white); }
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }

.font-serif { font-family: var(--font-serif); }
.font-light { font-weight: var(--weight-light); }
.font-bold { font-weight: var(--weight-bold); }
.font-black { font-weight: var(--weight-black); }

.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-widest { letter-spacing: var(--tracking-widest); }
.tracking-ultra { letter-spacing: var(--tracking-ultra); }

/* ── Spacing Utilities ── */
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }
.mt-6 { margin-top: var(--space-6); }

/* ── Container Utilities ── */
.container--narrow { max-width: var(--max-width-narrow); }

/* ── Layout Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ── Section Title Modifiers ── */
.section-label--center { border-left: none; padding-left: 0; display: block; }
.section-title--center { text-align: center; }
.text-3xl { font-size: var(--text-3xl); }


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

/* ── Line Clamp ── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Scrollbar for horizontal scroll containers ── */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── Custom scrollbar for webkit ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-dark-base);
}

::-webkit-scrollbar-thumb {
  background: var(--color-dark-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-faint);
}

/* ── Loading skeleton ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-dark-border) 25%,
    var(--color-dark-elevated) 50%,
    var(--color-dark-border) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
