/* WENUP microsite. Tokens mirror src/ui/theme.ts so the site and the app are one brand. */
:root {
  --bg: #F7F8F9;
  --surface: #FFFFFF;
  --alt: #EDEFF2;
  --border: #DCE0E5;
  --text: #14171A;
  --muted: #42474D;
  --faint: #63696F;
  --accent: #1E6FD9;
  --accent-ink: #FFFFFF;
  --sky: #6FA8FF;
  --kram: #1B2660;
  --pro-bg: #FFF6E0;
  --pro-border: #F0DCA8;
  --pro-ink: #5A4406;
  --cha: #F5C542;
  --bai: #FF8A65;
  --duek: #3949AB;
  --off: #2E7D32;
  --ot: #C62828;
  --leave: #455A64;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0D10;
    --surface: #14171C;
    --alt: #1C2027;
    --border: #272C34;
    --text: #EDEFF2;
    --muted: #C9CED6;
    --faint: #8B929B;
    --accent: #6FA8FF;
    --accent-ink: #0B0D10;
    --pro-bg: #2B2306;
    --pro-border: #4C3F0C;
    --pro-ink: #F5D877;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
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.4; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }

/* Thai first: English blocks show 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: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* 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: 60px; }
.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; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 10px; }
.top nav a:hover { background: var(--alt); color: var(--text); }
.lang {
  font: 600 13px/1 'Sarabun', system-ui, sans-serif;
  color: var(--text);
  background: var(--alt);
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
}
@media (max-width: 560px) { .top nav a.hide-sm { display: none; } }

/* Hero */
.hero { padding-block: 64px 40px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow { font: 600 13px/1 'Sarabun', sans-serif; letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; }
.hero h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 700; margin: 14px 0 16px; line-height: 1.3; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 14px;
  background: var(--text); color: var(--bg);
  text-decoration: none; font-weight: 600; font-size: 15px;
}
.badge small { display: block; font-weight: 400; font-size: 12px; opacity: 0.75; line-height: 1.2; }
.badge[aria-disabled='true'] { opacity: 0.55; cursor: default; }
.soon { margin-top: 12px; font-size: 14px; color: var(--faint); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: 14px; color: var(--muted); }
.trust > span::before { content: '✓ '; color: var(--off); font-weight: 700; }

/* Month illustration (the app's grid, drawn in CSS) */
.phone {
  justify-self: center;
  width: min(340px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 20px 16px 22px;
  box-shadow: 0 24px 60px rgba(20, 23, 26, 0.14);
}
.phone .mhead { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 12px; }
.phone .mhead b { font-size: 22px; }
.phone .mhead span { color: var(--faint); font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.grid .wd { font-size: 11px; color: var(--faint); text-align: center; padding-bottom: 2px; }
.day { background: var(--bg); border-radius: 8px; min-height: 52px; padding: 3px; display: flex; flex-direction: column; gap: 2px; }
.day i { font-style: normal; font-size: 10px; color: var(--faint); padding-left: 2px; }
.chip { border-radius: 4px; font-size: 10px; font-weight: 600; text-align: center; line-height: 16px; color: #14171A; }
.c-cha { background: var(--cha); }
.c-bai { background: var(--bai); }
.c-duek { background: var(--duek); color: #FFF; }
.c-off { background: var(--off); color: #FFF; }
.c-ot { background: var(--ot); color: #FFF; }
.countbar { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 12px 4px 0; }

/* Sections */
section { padding: 48px 0; }
section h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; margin-bottom: 10px; }
section .sub { color: var(--muted); max-width: 40em; margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.card .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--alt); display: grid; place-items: center; font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.card h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.card p { color: var(--muted); font-size: 15px; }
.pro-pill { display: inline-block; font: 700 11px/20px ui-monospace, 'IBM Plex Mono', monospace; padding: 0 8px; border-radius: 999px; background: var(--pro-bg); border: 1px solid var(--pro-border); color: var(--pro-ink); vertical-align: 2px; margin-left: 6px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan.hi { border: 2px solid var(--accent); padding: 21px; }
.plan .name { color: var(--muted); font-size: 15px; }
.plan .price { font-size: 32px; font-weight: 700; line-height: 1.3; }
.plan .price small { font-size: 15px; font-weight: 400; color: var(--faint); }
.plan .note { font-size: 14px; color: var(--muted); }
.plan ul { margin: 10px 0 0; padding-left: 20px; font-size: 15px; color: var(--muted); }
.fineprint { margin-top: 16px; font-size: 14px; color: var(--faint); }

/* Privacy promise band */
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* 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, .doc li { color: var(--text); }
.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); }
.toc { font-size: 15px; columns: 2 220px; margin: 0 0 8px; padding-left: 20px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
footer a { color: var(--muted); text-decoration: none; }
footer .grow { flex: 1; min-width: 200px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-block-start: 40px; }
  .phone { order: 2; }
}
