/* base.css — Base element styles */

html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-light);
  line-height: var(--line-height-body);
  color: var(--color-primary);
  background-color: var(--color-bg-main);
  overflow-x: hidden;
}

/* Headings — Kanit */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family);
  line-height: var(--line-height-heading);
  font-weight: 600;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.125rem;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }
}

/* English text — DM Sans */
[lang="en"],
.font-en {
  font-family: var(--font-family);
}

/* Paragraphs — Thai body text in Sarabun */
p {
  font-family: var(--font-family);
  margin-bottom: var(--space-md);
  max-width: 65ch;
}

/* Links */
a {
  transition: color var(--transition-base);
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  a {
    transition: none;
  }
}