/* ============================================
   KṬP Saikhamakawn — Base Styles
   Reset, Fonts, Typography, Accessibility
   ============================================ */

/* Google Fonts — Poppins (headings) + Inter (body) + Lora (serif notes) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

/* === CSS Reset === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: 
    radial-gradient(ellipse 80% 80% at 20% -20%, var(--bg-glow), transparent),
    radial-gradient(ellipse 60% 60% at 90% 20%, rgba(255, 215, 0, 0.05), transparent),
    radial-gradient(ellipse 80% 80% at 60% 120%, rgba(220, 20, 60, 0.06), transparent),
    radial-gradient(ellipse 100% 100% at -10% 50%, rgba(135, 206, 235, 0.04), transparent);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
  margin-bottom: var(--sp-4);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

strong, b {
  font-weight: var(--fw-semibold);
}

small {
  font-size: var(--fs-sm);
}

/* === Lists === */
ul, ol {
  list-style: none;
}

/* === Images === */
img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

/* === Form Elements === */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, select {
  width: 100%;
}

/* === Tables === */
table {
  border-collapse: collapse;
  width: 100%;
}

/* === Scrollbar (Webkit) === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-tertiary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* === Selection === */
::selection {
  background: var(--brand-sky);
  color: var(--brand-black);
}

/* === Accessibility === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--brand-sky);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Utility Classes === */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--sp-6);
    padding-right: var(--sp-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--sp-8);
    padding-right: var(--sp-8);
  }
}

.section {
  padding: var(--sp-12) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--sp-16) 0;
  }
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.section-header h2 {
  margin-bottom: var(--sp-3);
  display: inline-block;
  position: relative;
  padding-bottom: var(--sp-2);
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-sky), var(--brand-gold));
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--color-text-secondary);
}

.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--brand-sky), var(--brand-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hide scrollbar but keep functionality */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Body scroll lock for modals */
body.modal-open {
  overflow: hidden;
}
