@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root { color-scheme: light; --ink: #202f28; --green: #285c44; --paper: #f8f9f4; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'DM Sans', sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #94bba0; outline-offset: 4px; }
.site-header { max-width: 1180px; margin: auto; padding: 32px 40px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.5px; }
.brand-icon { display: grid; place-items: center; width: 38px; height: 38px; background: var(--green); color: white; border-radius: 12px; font-size: 27px; }
.text-button { border: 0; background: transparent; color: var(--ink); font-size: 14px; }
.text-button span { margin-left: 20px; }
main { max-width: 1100px; margin: auto; padding: 0 40px; }
.hero { padding: 76px 0 82px; text-align: center; background: radial-gradient(ellipse at center, #e8eedf90, transparent 67%); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.dot { width: 7px; height: 7px; background: #5b8251; border-radius: 50%; }
h1 { font-family: 'Manrope', sans-serif; font-size: clamp(48px, 7vw, 84px); font-weight: 500; line-height: 1.12; letter-spacing: -5px; margin: 25px 0; }
h1 em { font-family: Georgia, serif; font-weight: 400; color: #658156; }
.hero > p { max-width: 460px; margin: 0 auto 30px; font-size: 16px; line-height: 1.8; color: #6b746c; }
.primary-button { display: inline-flex; gap: 38px; padding: 17px 23px; background: var(--green); color: white; border: 0; border-radius: 9px; font-size: 14px; }
.primary-button:hover, .chat-toggle:hover { background: #1e4935; }
.hero-note { display: block; margin-top: 14px; color: #868d82; font-size: 12px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding: 35px 0 45px; border-top: 1px solid #dce1d6; }
.number { color: #828c7c; font-size: 10px; letter-spacing: 1.6px; }
.features h2 { font-size: 17px; font-weight: 500; margin: 18px 0 10px; }
.features p { color: #788073; font-size: 13px; line-height: 1.8; max-width: 255px; margin: 0; }
footer { max-width: 1020px; margin: auto; padding: 22px 0 32px; border-top: 1px solid #dce1d6; display: flex; justify-content: space-between; color: #8a9085; font-size: 11px; }
.chat-toggle { position: fixed; bottom: 24px; right: 24px; width: 60px; height: 60px; display: grid; place-items: center; background: var(--green); color: white; border: 0; border-radius: 50%; box-shadow: 0 6px 24px #23473530; z-index: 10; }
.chat-panel { position: fixed; right: 24px; bottom: 98px; width: 370px; height: min(510px, calc(100dvh - 122px)); background: white; border: 1px solid #e0e5dc; border-radius: 18px; box-shadow: 0 16px 60px #23352b26; display: flex; flex-direction: column; overflow: hidden; z-index: 10; }
[hidden] { display: none !important; }
.chat-header { background: var(--green); color: white; padding: 21px; display: flex; justify-content: space-between; align-items: center; }
.chat-header h2 { font-size: 17px; margin: 0 0 5px; }
.chat-header p { font-size: 12px; margin: 0; opacity: .75; }
.close-button { border: 0; background: transparent; color: white; font-size: 28px; padding: 0 6px; }
.messages { flex: 1; overflow-y: auto; padding: 18px; }
.message { width: fit-content; max-width: 90%; padding: 12px 15px; border-radius: 13px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; }
.bot { background: #f0f3ec; }
.user { background: var(--green); color: white; margin-left: auto; }
.chat-status { font-size: 12px; color: #6c7468; margin: 0; padding: 0 18px 8px; }
#chat-form { display: flex; gap: 10px; padding: 12px 15px; border-top: 1px solid #edf0e9; }
#chat-input { min-width: 0; flex: 1; border: 0; background: transparent; padding: 8px; font-size: 14px; }
#send-button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--green); color: white; font-size: 23px; }
#send-button:disabled { opacity: .5; cursor: wait; }
.chat-caption { text-align: center; color: #92988e; font-size: 10px; padding-bottom: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
    .site-header { padding: 22px; } .brand { font-size: 14px; } main { padding: 0 24px; }
    .hero { padding: 55px 0; } h1 { letter-spacing: -3px; } .hero > p { font-size: 14px; }
    .features { grid-template-columns: 1fr; gap: 26px; } .features p { max-width: none; }
    footer { margin: 0 24px; padding-bottom: 100px; } footer span { display: none; }
    .chat-panel { right: 12px; width: calc(100% - 24px); } .chat-toggle { right: 18px; }
}

.header-actions { display: flex; align-items: center; gap: 20px; }
.language-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid #dce1d6; border-radius: 9px; }
.language-switch button { border: 0; border-radius: 6px; padding: 6px 10px; background: transparent; color: var(--ink); font-size: 13px; }
.language-switch button[aria-pressed="true"] { background: var(--green); color: white; }
.text-button [data-i18n] { margin-left: 0; }
html[lang="th"] body, html[lang="th"] h1, html[lang="th"] h1 em { font-family: 'Noto Sans Thai', sans-serif; }
html[lang="th"] h1 { letter-spacing: -1px; line-height: 1.45; font-size: clamp(38px, 6vw, 70px); }
html[lang="th"] .eyebrow, html[lang="th"] .number { letter-spacing: 0; }
@media (max-width: 600px) {
    .site-header { flex-wrap: wrap; gap: 16px; }
    .header-actions { margin-left: auto; gap: 12px; }
    .text-button span[aria-hidden] { margin-left: 8px; }
}

/* Thai traditional medicine: parchment, botanical ink, and brass accents. */
:root { --ink: #354131; --green: #435c3d; --paper: #f7f1e4; }
body { background: radial-gradient(ellipse at 80% 5%, #e5d8b650, transparent 65%), var(--paper); }
.site-header { max-width: 1240px; border-bottom: 1px solid #daceb5; padding: 26px 40px; }
.brand { font-size: 19px; letter-spacing: -.3px; }
.brand-icon { background: transparent; border: 1px solid #a58a54; border-radius: 50%; color: #7d7548; width: 44px; height: 44px; flex-shrink: 0; }
.brand-icon svg { width: 30px; height: 30px; }
main { max-width: 1240px; }
.hero { padding: 60px 0 54px; background: none; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 56px; text-align: left; }
.hero-copy { min-width: 0; }
.eyebrow { color: #8b7140; font-size: 10px; letter-spacing: 2px; line-height: 1.8; }
.dot { background: #a58a54; flex-shrink: 0; }
h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(42px, 5.1vw, 67px); font-weight: 400; letter-spacing: -2px; line-height: 1.17; margin: 26px 0; }
h1 em { color: #8c7042; }
.hero-copy > p { color: #68715f; font-size: 15px; line-height: 1.9; max-width: 490px; margin: 0 0 28px; }
.primary-button { gap: 24px; border-radius: 5px; line-height: 1.6; background: #435c3d; box-shadow: 0 5px 18px #435c3d15; }
.hero-note { font-size: 11px; color: #7e7c68; line-height: 1.8; }
.apothecary-art { background: #eee4cc; padding: 24px 10px 26px; border: 1px solid #cdbc94; outline: 1px solid #cdbc9480; outline-offset: -9px; border-radius: 130px 130px 8px 8px; overflow: hidden; text-align: center; }
.art-heading { display: block; margin-top: 20px; font-size: 9px; letter-spacing: 3px; color: #8c7548; }
.apothecary-art svg { width: 100%; height: auto; display: block; }
.apothecary-art > p { font-family: Georgia, serif; font-size: 21px; color: #6c6945; margin: -18px 0 0; position: relative; }
.elements { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; padding: 23px 0; border-top: 1px solid #daceb5; border-bottom: 1px solid #daceb5; }
.elements > span { margin-right: auto; font-size: 11px; color: #86734e; }
.elements > div { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #5b694f; }
.elements > div > span:first-child { color: #9f854d; font-size: 24px; }
.features { grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0; gap: 24px; padding: 38px 0 50px; }
.features article { background: #fffdf560; padding: 30px; border: 1px solid #daceb5; border-radius: 8px; position: relative; }
.features article::before { content: ''; display: block; width: 35px; height: 3px; background: #a88a4d; margin-bottom: 23px; }
.number { font-size: 10px; color: #907647; letter-spacing: 1.4px; }
.features h2 { font-family: Georgia, serif; color: #435c3d; font-size: 28px; margin: 17px 0 14px; }
.features p { max-width: none; font-size: 14px; line-height: 1.95; color: #68715f; }
footer { max-width: 1160px; border-color: #daceb5; gap: 15px; color: #7e7c68; }
.language-switch { border-color: #cfc09f; }
.chat-panel { background: #fffdf5; border-color: #daceb5; }
.bot { background: #efeadb; }
html[lang="th"] h1 { font-size: clamp(35px, 4.5vw, 57px); line-height: 1.55; letter-spacing: -.5px; }
html[lang="th"] .features h2, html[lang="th"] .apothecary-art > p { font-family: 'Noto Sans Thai', sans-serif; }
@media (max-width: 900px) {
    .hero { gap: 28px; }
    footer { margin: 0 40px; }
    .elements { gap: 18px 24px; }
    .elements > span { width: 100%; }
}
@media (max-width: 700px) {
    .site-header { flex-wrap: wrap; gap: 16px; padding: 22px 24px; }
    .brand { font-size: 16px; }
    .header-actions { gap: 14px; }
    .hero { grid-template-columns: 1fr; padding: 40px 0 30px; gap: 32px; }
    h1 { font-size: clamp(42px, 9vw, 59px); }
    .hero-copy > p { font-size: 14px; }
    .apothecary-art { max-width: 390px; width: 100%; margin: auto; }
    .elements { justify-content: space-between; gap: 18px; }
    .features { grid-template-columns: 1fr; gap: 18px; padding: 28px 0 38px; }
    .features article { padding: 25px; }
    footer { margin: 0 24px; flex-wrap: wrap; padding-bottom: 100px; }
    footer > span[data-i18n="brand"] { display: inline; }
}
