/* WENUP microsite (design: "WENUP Microsite" 1a). Tokens mirror src/ui/theme.ts so the site and the app are one brand. */
:root {
  --bg: #F7F8F9;
  --surface: #FFFFFF;
  --alt: #EDEFF2;
  --cell: #F2F4F7;
  --border: #DCE0E5;
  --hair: #EDEFF2;
  --text: #14171A;
  --muted: #42474D;
  --faint: #63696F;
  --accent: #1E6FD9;
  --accent-ink: #FFFFFF;
  --sky: #6FA8FF;
  --kram: #1B2660;
  --kram-ink: #C3DAF6;
  --pro-bg: #FFF6E0;
  --pro-border: #F0DCA8;
  --pro-ink: #5A4406;
  --off: #2E7D32;
  --ot: #C62828;
  --badge: #14171A;
  --badge-ink: #FFFFFF;
  --shadow: 0 24px 60px rgba(20, 23, 26, 0.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0D10;
    --surface: #14171C;
    --alt: #1C2027;
    --cell: #1C2027;
    --border: #272C34;
    --hair: #1C2027;
    --text: #EDEFF2;
    --muted: #C9CED6;
    --faint: #8B929B;
    --accent: #6FA8FF;
    --accent-ink: #0B0D10;
    --kram-ink: #C3DAF6;
    --pro-bg: #2B2306;
    --pro-border: #4C3F0C;
    --pro-ink: #F5D877;
    --badge: #EDEFF2;
    --badge-ink: #0B0D10;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

/* Thai first: English shows only when html.lang-en is set (lang.js, ?lang=en, or the toggle).
   The root class must not be .en itself, or the hide rule below would hide the whole page. */
.en { display: none; }
html.lang-en .th { display: none; }
html.lang-en .en { display: revert; }

.wrap { max-width: 1280px; margin: 0 auto; padding-inline: 48px; }
.narrow { max-width: 856px; }
@media (max-width: 720px) { .wrap { padding-inline: 20px; } }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; gap: 12px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.12em; font-size: 16px; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 15px; }
.top nav a.link { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.top nav a.link:hover { background: var(--alt); color: var(--text); }
.lang { font-size: 13px; font-weight: 600; background: var(--alt); border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; margin-left: 6px; }
.get { font-size: 14px; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 9px 18px; margin-left: 6px; text-decoration: none; }
@media (max-width: 760px) { .top nav a.link { display: none; } }
@media (max-width: 380px) { .get { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-block: 64px 56px; display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; color: var(--accent); }
.hero h1 { font-size: clamp(38px, 5.2vw, 54px); line-height: 1.25; font-weight: 700; text-wrap: balance; margin-block: 20px; }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
/* Official store badges, unmodified (Apple and Google artwork from their badge tools). Both require
   clear space around the badge: a quarter of the badge height for Apple (the 12px gap), and Google's
   PNG carries its own, so it is set taller to match the App Store badge's visible height and never
   cropped or overlapped. */
.badges { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-top: 20px; }
.badges a { display: block; line-height: 0; }
.badges img { height: 48px; width: auto; }
.badges .gp img { height: 70px; }
.soon { margin-top: 12px; font-size: 14px; color: var(--faint); }
.trust { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 20px; }
.trust > span::before { content: '✓ '; color: var(--off); font-weight: 700; }

/* Live demo calendar: tap a shift, then days */
.demo { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.demo-head { display: flex; align-items: baseline; gap: 8px; }
.demo-head b { font-size: 24px; }
.demo-head span { font-size: 18px; color: var(--faint); }
.demo-head button { margin-left: auto; font-size: 13px; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 4px; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; min-height: 28px; }
.pill { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pill.hours { background: var(--alt); color: var(--text); font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { font-size: 12px; color: var(--faint); text-align: center; }
.cal .d {
  height: 76px; border-radius: 10px; background: var(--cell); border: 0; padding: 5px;
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; text-align: left;
}
.cal .d:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal .d.pad { background: transparent; cursor: default; }
.cal .n { font-size: 12px; font-weight: 600; color: var(--muted); padding-left: 2px; }
.chip { height: 20px; border-radius: 5px; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.brushes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--hair); padding-top: 4px; }
.brushes .hint { font-size: 14px; color: var(--faint); padding-top: 10px; margin-right: 4px; }
.brush {
  margin-top: 10px; height: 40px; min-width: 52px; padding: 0 14px; border-radius: 10px; border: 0;
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.brush[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-block: 40px; }
}
@media (max-width: 560px) {
  .demo { padding: 14px; gap: 12px; }
  .cal { gap: 3px; }
  .cal .d { height: 58px; padding: 3px; gap: 2px; border-radius: 8px; }
  .cal .n { font-size: 11px; }
  .chip { height: 17px; font-size: 11px; border-radius: 4px; }
  .brush { height: 38px; min-width: 44px; padding: 0 10px; font-size: 15px; }
  .brushes .hint { flex-basis: 100%; }
}

/* ---------- Screenshots ---------- */
.shots { padding-block: 8px 64px; display: flex; gap: 20px; justify-content: space-between; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shot { flex: 1 0 200px; display: flex; flex-direction: column; gap: 10px; align-items: center; scroll-snap-align: center; }
.frame { width: 200px; height: 415px; border-radius: 36px; background: #14171A; padding: 8px; }
.frame img { display: block; width: 184px; height: 399px; border-radius: 28px; object-fit: cover; }
.shot figcaption { font-size: 14px; color: var(--muted); text-align: center; }
.shots figure { margin: 0; }

/* ---------- Features ---------- */
.features { padding-block: 56px; background: var(--surface); border-block: 1px solid var(--border); }
.features h2, .pricing h2, .faq h2 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 700; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.fcard { background: var(--bg); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.fcard h3 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fcard p { font-size: 16px; line-height: 1.6; color: var(--muted); text-wrap: pretty; margin-top: 6px; }
.art { min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.art .b { height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 700; display: flex; align-items: center; }
.art .b.sel { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.stat { display: flex; gap: 28px; align-items: flex-end; }
.stat small { display: block; font: 500 11px 'IBM Plex Mono', ui-monospace, monospace; color: var(--faint); }
.stat b { display: block; font-size: 28px; font-weight: 700; line-height: 1.1; }
.strip { display: grid; grid-template-columns: 64px repeat(7, 22px); gap: 3px; align-content: center; }
.strip i { display: block; height: 16px; border-radius: 5px; }
.strip i.hd { height: 10px; background: var(--alt); align-self: center; }
.strip i.hd.lbl { background: var(--border); }
.alarm { height: 44px; padding: 0 14px; border-radius: 14px; background: #14171A; color: #FFFFFF; display: flex; align-items: center; gap: 10px; }
.alarm .c { height: 22px; padding: 0 8px; border-radius: 5px; font-size: 13px; font-weight: 700; display: flex; align-items: center; }
.alarm .t { font: 500 18px 'IBM Plex Mono', ui-monospace, monospace; }
.art .note { font-size: 14px; color: var(--muted); }
.pro {
  font: 500 11px/20px 'IBM Plex Mono', ui-monospace, monospace;
  padding: 0 8px; border-radius: 999px; background: var(--pro-bg); border: 1px solid var(--pro-border); color: var(--pro-ink); letter-spacing: 0;
}
.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 24px; }
.more div { padding-top: 14px; border-top: 1px solid var(--border); }
.more h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.more p { font-size: 14px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
@media (max-width: 820px) {
  .fgrid, .more { grid-template-columns: 1fr; }
  .fcard { padding: 22px; }
}

/* ---------- Privacy band ---------- */
.band { background: var(--kram); color: #FFFFFF; }
.band .wrap { padding-block: 64px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: end; }
.band h2 { font-size: clamp(30px, 3.8vw, 40px); font-weight: 700; text-wrap: balance; }
.band p { font-size: 17px; line-height: 1.65; color: var(--kram-ink); text-wrap: pretty; }
.band a { color: #FFFFFF; }
@media (max-width: 820px) { .band .wrap { grid-template-columns: 1fr; gap: 16px; padding-block: 48px; } }

/* ---------- Pricing ---------- */
.pricing { padding-block: 64px; display: flex; flex-direction: column; gap: 24px; }
.pricing .sub, .faq .sub { font-size: 17px; color: var(--muted); margin-top: 8px; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.plan.best { border: 2px solid var(--accent); padding: 23px; }
.plan .name { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.plan .tag { font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 1px 9px; }
.plan .price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan .price b { font-size: 34px; font-weight: 700; line-height: 1.3; }
.plan .price span { font-size: 15px; color: var(--faint); }
.plan .note { font-size: 14px; line-height: 1.55; color: var(--muted); }
.compare { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px 24px; }
.compare .r { display: grid; grid-template-columns: minmax(0, 1fr) 180px 180px; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--hair); align-items: center; font-size: 16px; }
.compare .r:last-child { border-bottom: 0; }
.compare .r > :not(:first-child) { text-align: center; }
.compare .h { font-size: 15px; font-weight: 600; color: var(--muted); padding-block: 14px; border-bottom-color: var(--border); }
.compare .y { font-weight: 600; }
.compare .x { color: #A8AEB6; }
.pricing .fine { font-size: 14px; line-height: 1.6; color: var(--faint); text-wrap: pretty; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .plans { grid-template-columns: 1fr; }
  .compare { padding: 4px 14px; }
  .compare .r { grid-template-columns: minmax(0, 1fr) 72px 96px; gap: 8px; font-size: 15px; }
}

/* ---------- FAQ ---------- */
.faq { padding-block: 0 64px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; }
.faq details { border-top: 1px solid var(--border); padding-block: 18px; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; font-size: 20px; color: var(--faint); width: 24px; text-align: center; }
.faq details[open] summary::after { content: '−'; }
.faq details p { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 640px; text-wrap: pretty; margin-top: 8px; }
@media (max-width: 820px) { .faq { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Closing call to action ---------- */
.cta { margin-bottom: 48px; }
.cta > div { padding: 40px; border-radius: 16px; background: var(--sky); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta img { width: 64px; height: 64px; border-radius: 14px; }
.cta h2 { font-size: clamp(24px, 2.8vw, 30px); font-weight: 700; color: #14171A; flex: 1 1 300px; }
.cta .badges { margin-top: 0; }
.cta-soon { color: #14171A; margin-top: 0; flex-basis: 100%; }
@media (max-width: 560px) { .cta > div { padding: 28px 22px; } }

/* ---------- Legal documents ---------- */
.doc { padding-block: 40px 64px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); font-weight: 700; margin-bottom: 6px; }
.doc .meta { color: var(--faint); font-size: 15px; margin-bottom: 28px; }
.doc h2 { font-size: 22px; font-weight: 700; margin: 36px 0 10px; }
.doc h3 { font-size: 18px; font-weight: 600; margin: 22px 0 6px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 10px 0; }
.doc li + li { margin-top: 6px; }
.summary { background: var(--alt); border-radius: 16px; padding: 18px 20px; margin-bottom: 8px; }
.summary ul { margin: 6px 0 0; }
.tablewrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted); background: var(--alt); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); }
footer .wrap { padding-block: 24px 36px; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; color: var(--faint); }
footer a { color: var(--muted); text-decoration: none; }
footer .grow { flex: 1 1 200px; }
footer .tm { flex-basis: 100%; font-size: 12px; margin: 0; }
