/* Fonts, reset, element defaults, focus and skip link.
   The family name ShopThai and the 400/600 weights are a contract with
   assets/js/shop-viewer.js, which awaits document.fonts.load('600 90px ShopThai', …). */
@font-face {
  font-family: ShopThai;
  src: url('../fonts/noto-sans-thai-600.woff2') format('woff2');
  font-display: swap;
  font-weight: 500 900;
}

@font-face {
  font-family: ShopThai;
  src: url('../fonts/noto-sans-thai.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
}

:root {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-thai);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 650;
  line-height: 1.3;
}

h2 {
  font-size: clamp(29px, 3.4vw, 48px);
  letter-spacing: -1.25px;
}

p {
  line-height: 1.9;
}

.muted {
  color: #858c7b;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

section {
  scroll-margin-top: 100px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 10;
  padding: 12px;
  background: var(--orange);
}

.skip-link:focus {
  top: 10px;
}

@media (max-width: 600px) {
  h2 {
    font-size: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}
