/* =========================================================
   GM Furniture — base.css
   Design tokens, typography system, reset, utilities, buttons.
   Load order on every page: base → header → footer → style
   ========================================================= */

:root {
  /* Colours */
  --bg: #fbfaf7;
  --white: #ffffff;
  --panel: #f3efe7;
  --panel-2: #ebe5d9;
  --ink: #1a1713;
  --ink-2: #4a443c;
  --stone: #958c80;
  --line: #e5dfd3;
  --gold: #b8955a;
  --gold-d: #93723d;
  --gold-l: #e6d3ac;

  /* Fonts — Kanit for everything (Thai + Latin) */
  --f-sans: "Kanit", system-ui, sans-serif;
  --f-serif: "Kanit", system-ui, sans-serif;   /* italic accents (.it) */
  --f-logo: "Kanit", system-ui, sans-serif;

  /* Typography — sizes */
  --fs-h1: clamp(32px, 3.8vw, 60px);   /* page / section display title */
  --fs-h2: clamp(28px, 3vw, 46px);     /* section heading */
  --fs-h3: clamp(19px, 1.5vw, 23px);   /* card / item title */
  --fs-h4: 18px;
  --fs-h5: 16px;
  --fs-h6: 13px;
  --fs-p: 15px;                        /* body text */
  --fs-small: 12.5px;                  /* captions, meta */

  /* Typography — weights & leading */
  --fw-heading: 300;
  --fw-body: 400;
  --fw-strong: 500;
  --lh-heading: 1.15;
  --lh-body: 1.7;

  /* Typography — colours (headings & paragraphs inherit the section colour,
     so text on photos stays white; use these tokens in components) */
  --c-heading: var(--ink);
  --c-text: var(--ink-2);
  --c-muted: var(--stone);
  --c-strong: var(--gold-d);
  --c-accent: var(--gold);

  /* Layout & motion */
  --pad: clamp(16px, 3.4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --hdr-h: 92px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--c-heading);
  font-family: var(--f-sans); font-size: var(--fs-p); font-weight: var(--fw-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--gold); color: #fff; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--fw-heading); line-height: var(--lh-heading); text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }
p { margin: 0; font-size: var(--fs-p); }
strong { font-weight: var(--fw-strong); color: var(--c-strong); }

/* ---------- Utilities ---------- */
.wrap { width: 100%; max-width: 1640px; margin-inline: auto; padding-inline: var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.it { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--c-accent); letter-spacing: 0; }
.small { font-size: var(--fs-small); color: var(--c-muted); }
.ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.ln > span { display: inline-block; will-change: transform; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: 13px; font-weight: 400; white-space: nowrap; transition: color .5s var(--ease), box-shadow .4s;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink::before { background: var(--gold); }
.btn-line { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.btn-line::before { background: var(--ink); }
.btn-line:hover { color: #fff; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 12.5px; }

.circ {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); transition: background .3s, color .3s, box-shadow .3s;
}
.circ svg { width: 15px; height: 15px; }
.circ:hover { background: var(--ink); color: #fff; box-shadow: none; }
.circ.prev svg { transform: rotate(180deg); }
.circ:disabled { opacity: .35; pointer-events: none; }

