/**
 * Base Styles - Kanopi Bali
 * Reset + Global Typography (BuildWithAngga style)
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-gray-800);
  background-color: var(--color-background);
  overflow-x: hidden;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem); /* 36px - 60px */
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.875rem, 4vw, 3rem); /* 30px - 48px */
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem); /* 24px - 36px */
  font-weight: var(--font-weight-bold);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.875rem); /* 20px - 30px */
  font-weight: var(--font-weight-semibold);
}

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

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

p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-700);
}

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

.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-600);
  font-weight: var(--font-weight-normal);
}

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

.text-sm {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

/* === Links === */
a {
  color: var(--color-primary-600);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

a:focus {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* === Lists === */
ul, ol {
  list-style: none;
}

ul.styled, ol.styled {
  list-style-position: inside;
  margin-left: var(--space-4);
}

ul.styled {
  list-style-type: disc;
}

ol.styled {
  list-style-type: decimal;
}

/* === Images === */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Selection === */
::selection {
  background-color: var(--color-primary-200);
  color: var(--color-primary-900);
}

::-moz-selection {
  background-color: var(--color-primary-200);
  color: var(--color-primary-900);
}

/* === Focus Visible (Accessibility) === */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* === Scrollbar (Webkit) === */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

/* === Helper Classes === */
.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;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

/* === Color Utilities === */
.text-primary {
  color: var(--color-primary-600);
}

.text-secondary {
  color: var(--color-secondary-600);
}

.text-gray {
  color: var(--color-gray-600);
}

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

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

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

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

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