/**
 * Dapin47 v2 — Base & Utilities
 * Reset, tipografi global, layout grid modern, dan utilitas responsif.
 * Menggantikan Bootstrap CSS (227 KB) dengan CSS murni yang super ringan (<15 KB).
 */

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

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

body {
  font-family: var(--default-font);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--heading-color);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h4 { font-size: clamp(1.4rem, 2.5vw, 2rem); }

p {
  margin-bottom: 1rem;
}

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

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

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

button, input, select, textarea {
  font: inherit;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Container & Grid Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.container-fluid {
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -12px;
  margin-right: -12px;
}

[class*="col-"] {
  padding-left: 12px;
  padding-right: 12px;
  width: 100%;
}

/* Responsive Columns */
@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .text-md-end { text-align: right; }
  .text-md-start { text-align: left; }
  .text-md-center { text-align: center; }
}

@media (min-width: 992px) {
  .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 1200px) {
  .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
  .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
}

/* Flexbox Utilities */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-none { display: none !important; }
.d-block { display: block !important; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }

.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.align-items-stretch { align-items: stretch; }
.align-self-start { align-self: flex-start; }

.text-center { text-align: center; }
.text-start { text-align: left; }
.text-end { text-align: right; }

.position-relative { position: relative; }
.w-100 { width: 100%; }

/* Spacing Utilities */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2.5rem; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.gy-3 { row-gap: 1rem; }
.gy-4 { row-gap: 1.5rem; }
.gy-5 { row-gap: 2.5rem; }

/* Responsive Visibility */
@media (max-width: 991px) {
  .d-lg-none { display: none !important; }
}

@media (min-width: 992px) {
  .d-none-lg { display: none !important; }
}

@media (max-width: 767px) {
  .d-md-none { display: none !important; }
}

/* ==========================================================================
   Sections & Theming
   ========================================================================== */
.section {
  padding: var(--section-padding);
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: var(--section-padding-mobile);
  }
}

.light-background {
  background-color: var(--light-bg);
}

.dark-background {
  background-color: var(--dark-bg);
  color: var(--text-white);
}

.dark-background h1,
.dark-background h2,
.dark-background h3,
.dark-background h4,
.dark-background .section-title h2 {
  color: var(--text-white);
}

/* Section Title Component */
.section-title {
  text-align: center;
  margin-bottom: 45px;
}

.section-title h2 {
  font-size: 1.25rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--nav-font);
  margin-bottom: 5px;
}

.section-title p {
  font-family: var(--heading-font);
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  color: var(--heading-color);
  line-height: 1.1;
  margin: 0;
}

.section-title .description-title {
  color: var(--primary-color);
}

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