:root {
  --bg: #fffaf4;
  --surface: #ffffff;
  --surface-2: #fbf1e5;
  --text: #241a12;
  --muted: #5e5146;
  --border: #ead9c6;
  --accent: #9a4d12;
  --accent-strong: #7a3a0a;
  --accent-soft: #f6e3cf;
  --on-accent: #ffffff;
  --focus: #1f5fd1;
  --shadow: 0 1px 2px rgba(60, 35, 10, .06), 0 8px 24px rgba(60, 35, 10, .06);
  --radius: 18px;
  --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120e;
    --surface: #211a14;
    --surface-2: #2a2119;
    --text: #f6ece2;
    --muted: #c9b8a7;
    --border: #3a2e24;
    --accent: #f0a868;
    --accent-strong: #ffc28c;
    --accent-soft: #3a2a1c;
    --on-accent: #1d1209;
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}
html[lang="th"] body {
  font-family: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
  line-height: 1.8;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { line-height: 1.4; letter-spacing: 0; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: .6em 1em; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; }
.brand span { white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; }
@media (min-width: 820px) { .nav-links { display: flex; } }
.nav-links a { display: block; padding: .4em .75em; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.lang-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin-left: 8px; background: var(--surface);
}
.lang-switch a, .lang-switch span {
  display: block; min-width: 40px; text-align: center; padding: .2em .7em; border-radius: 999px;
  font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--muted);
}
.lang-switch span[aria-current] { background: var(--accent); color: var(--on-accent); }
.lang-switch a:hover { color: var(--text); background: var(--surface-2); }

/* Hero */
.hero { padding: 72px 0 56px; }
@media (min-width: 720px) { .hero { padding: 112px 0 88px; } }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 600; color: var(--accent-strong);
  background: var(--accent-soft); padding: .25em .8em; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 700; max-width: 18ch; }
html[lang="th"] .hero h1 { max-width: 20ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 46rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .65em 1.3em; border-radius: 12px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }

/* Sections */
section { padding: 56px 0; scroll-margin-top: 72px; }
@media (min-width: 720px) { section { padding: 80px 0; } }
.section-head { max-width: 44rem; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.section-head p { color: var(--muted); margin: 0; }
.alt { background: var(--surface-2); border-block: 1px solid var(--border); }

/* Product card */
.product {
  display: grid; gap: 28px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
@media (min-width: 860px) { .product { grid-template-columns: 1.1fr 1fr; padding: 40px; gap: 40px; } }
.product-title { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.product-title h3 { font-size: 1.6rem; margin: 0; }
.product-icon {
  flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft);
  display: grid; place-items: center; color: var(--accent);
}
.tag { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px; padding: .15em .7em; }
.product p { color: var(--muted); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.points svg { width: 24px; height: 24px; margin-top: 3px; color: var(--accent); }
.points strong { display: block; }
.points span { color: var(--muted); font-size: .97rem; }
.coming {
  margin-top: 20px; padding: 20px 24px; border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--muted); background: transparent;
}
.coming strong { color: var(--text); }

/* Principles */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card .num { font-size: .85rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; display: block; }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }

/* About / contact */
.about { display: grid; gap: 24px; }
@media (min-width: 860px) { .about { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; } }
.about p { max-width: 40rem; }
.contact-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.contact-box h2 { font-size: 1.5rem; }
.contact-box p { color: var(--muted); }
.email { font-size: 1.15rem; font-weight: 600; word-break: break-all; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.notfound h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.notfound .actions { justify-content: center; }
.notfound-logo { margin: 0 auto 24px; }
.nw { white-space: nowrap; }
