/* ============================================
   Base Typography & Global Styles
   ============================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* --- Headings --- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tight);
}

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

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

h5 {
  font-size: var(--text-lg);
  font-weight: 600;
}

h6 {
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* --- Body Text --- */

p {
  max-width: 68ch;
  color: var(--ink-dark);
}

p + p {
  margin-top: var(--space-4);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

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

/* --- Links --- */

a {
  transition: color var(--duration-fast) var(--ease-in-out-soft);
}

.text-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-in-out-soft),
              text-decoration-color var(--duration-fast) var(--ease-in-out-soft);
}

.text-link:hover {
  color: var(--color-accent-hover);
}

/* --- Focus Styles --- */

:focus-visible {
  outline: 2px solid var(--vermillion);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Selection --- */

::selection {
  background-color: rgba(194, 58, 43, 0.15);
  color: var(--ink-black);
}

/* --- Horizontal Rule --- */

hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-12) 0;
}

/* --- Images --- */

img {
  height: auto;
}

/* --- Chinese decorative text --- */

.chinese-accent {
  font-family: var(--font-chinese);
  line-height: 1.4;
}

/* --- Section spacing --- */

section {
  padding-block: var(--space-24);
}

@media (max-width: 768px) {
  section {
    padding-block: var(--space-16);
  }
}
