/* Onlaew landing — a market-stall counter: mascot stage up top, then problem, demo, features, price board, FAQ, waitlist */
:root {
  /* white-first brand: white ground, Onlaew green, warm orange, sunny yellow for small highlights */
  --bg: #FFFFFF;
  --surface: #F5FAF7;
  --card: #FFFFFF;
  --ink: #13241B;
  --muted: #56675D;
  --line: #E2EAE4;
  --mint: #3FC383;
  --mint-ink: #0A8552;
  --mint-soft: #E6F7EE;
  --orange: #FF8A4C;
  --orange-ink: #B4501C;
  --orange-soft: #FFF0E6;
  --sun: #FFD45C;
  --sun-soft: #FFF8DF;
  --deep: #0E5A39;
  --bubble-in: #FFFFFF;
  --bubble-out: #3FC383;
  --bubble-out-ink: #062016;
  --danger: #B3261E;
  --font-display: "Prompt", "IBM Plex Sans Thai", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Thai", "Prompt", Tahoma, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.nb { white-space: nowrap; }
main > section[id] { scroll-margin-top: 64px; }
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--mint-ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 8px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .06em; color: var(--mint-ink); }
.muted { color: var(--muted); }
.src { font-size: 13px; color: var(--muted); }

/* header */
.top-bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top-bar.scrolled { border-bottom-color: var(--line); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--mint); position: relative; flex: none; }
.brand-mark::before { content: ""; position: absolute; left: 8px; top: 11px; width: 4px; height: 5px; border-radius: 50%; background: #2A2622; box-shadow: 10px 0 0 #2A2622; }
.brand-mark::after { content: ""; position: absolute; right: -6px; top: -6px; width: 9px; height: 5px; border-left: 3px solid var(--orange); border-bottom: 3px solid var(--orange); transform: rotate(-45deg); }
.brand b { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.brand span { font-size: 14px; color: var(--muted); }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

.btn { border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 600; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn-sm { padding: 8px 16px; font-size: 15px; }
.btn-primary { background: var(--mint-ink); color: #FFFFFF; }
.btn-primary:hover { background: var(--deep); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.top nav .btn-primary { color: #FFFFFF; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding-block: 40px 72px; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.status-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; background: var(--sun-soft); color: #7A5600; box-shadow: inset 0 0 0 1px var(--sun); padding: 4px 12px; border-radius: 999px; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--mint-ink); }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 32em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; list-style: none; font-size: 15px; color: var(--muted); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--mint-ink); border-bottom: 2.5px solid var(--mint-ink); transform: rotate(-45deg) translateY(-2px); }

.stage { position: relative; min-width: 0; }
.stage-canvas {
  position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 600px;
  border-radius: 28px; overflow: hidden;
  background: radial-gradient(110% 90% at 50% 25%, #FFFFFF 0%, var(--mint-soft) 70%, #D9F2E5 100%);
}
#stage { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#stage:active { cursor: grabbing; }
.stage-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.speech {
  position: absolute; left: 6%; top: 7%; max-width: 50%;
  background: var(--surface); color: var(--ink); border-radius: 18px 18px 18px 4px;
  padding: 10px 14px; font-size: 15px; line-height: 1.45; box-shadow: 0 6px 20px rgba(20, 35, 28, .10);
  transition: opacity .3s, transform .3s;
}
.speech[data-hide="1"] { opacity: 0; transform: translateY(6px); }
.stage-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.chip { border: 0; background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--mint-ink); }
.chip[aria-pressed="true"] { background: var(--mint-soft); box-shadow: inset 0 0 0 1.5px var(--mint-ink); }
.chip-hot { background: var(--orange); color: #1E120B; box-shadow: none; }
.chip-hot:hover { box-shadow: inset 0 0 0 2px var(--orange-ink); }
.hint { font-size: 14px; color: var(--muted); margin-left: auto; }

/* sections */
.band { padding-block: 80px; border-top: 1px solid var(--line); }
.band-tint { background: var(--surface); }
.sec-head { display: flex; flex-direction: column; gap: 12px; max-width: 42em; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; }
.sec-head p { color: var(--muted); }

/* problem */
.problem { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.chores { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.chores li { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: baseline; padding-block: 14px; border-bottom: 1px dashed var(--line); }
.chores li:first-child { border-top: 1px dashed var(--line); }
.chores .n { font-family: var(--font-display); font-weight: 600; color: var(--orange-ink); font-size: 18px; }
.chores .tag { font-size: 13px; font-weight: 600; color: var(--mint-ink); background: var(--mint-soft); border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.stats { display: flex; flex-direction: column; gap: 28px; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(44px, 5vw, 60px); line-height: 1.05; color: var(--orange-ink); font-variant-numeric: tabular-nums; }
.stat p { color: var(--muted); max-width: 26em; }

/* demo */
.demo { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 56px; align-items: start; }
.phone { background: var(--card); border-radius: 28px; border: 1px solid var(--line); overflow: hidden; }
.phone-top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.phone-top .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--orange-soft); display: grid; place-items: center; font-size: 13px; color: var(--orange-ink); flex: none; }
.phone-top small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 18px; height: 460px; overflow-y: auto; background: var(--mint-soft); }
.msg { max-width: 84%; padding: 9px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; animation: pop .25s ease-out; }
.msg.in { align-self: flex-start; background: var(--bubble-in); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-ink); border-bottom-right-radius: 4px; }
.msg.warn { background: var(--orange-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--orange); }
.msg .who { display: block; font-size: 12px; opacity: .75; margin-bottom: 2px; }
.slip { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; }
.slip .qr { width: 44px; height: 44px; border-radius: 6px; background:
  conic-gradient(from 90deg at 30% 30%, #14231C 0 25%, transparent 0) 0 0 / 11px 11px, #FFFFFF; border: 3px solid #14231C; }
.order { font-variant-numeric: tabular-nums; }
.order table { border-collapse: collapse; width: 100%; font-size: 14px; margin-top: 4px; }
.order td { padding: 1px 0; }
.order td:last-child { text-align: right; }
.order .sum td { border-top: 1px solid currentColor; font-weight: 600; padding-top: 4px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.demo-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.steps { display: flex; flex-direction: column; gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.steps li::before { content: counter(s); font-family: var(--font-display); font-weight: 600; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; }
.steps b { display: block; }
.steps span { color: var(--muted); }
.note { font-size: 14px; color: var(--muted); }

/* features */
.features { background: var(--card); border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.feature h3 { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.feature p { color: var(--muted); font-size: 16px; }
.feature .plan { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--mint-soft); color: var(--mint-ink); }
.ic { width: 34px; height: 34px; border-radius: 10px; background: var(--mint-soft); display: grid; place-items: center; flex: none; }
.ic svg { width: 20px; height: 20px; stroke: var(--mint-ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* compare */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.compare thead th:last-child, .compare td:last-child { background: var(--mint-soft); }
.compare td:first-child { font-weight: 600; width: 22%; }
.compare td { color: var(--muted); }
.compare td:last-child { color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }

/* price */
.price { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: 0 10px 30px rgba(19, 36, 27, .05); }
.tier { padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tier + .tier { border-left: 1px solid var(--line); }
.tier.pick { background: var(--mint-soft); }
.tier h3 { font-size: 22px; font-weight: 600; }
.tier .amt { font-family: var(--font-display); font-size: 42px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tier .amt small { font-size: 15px; font-weight: 500; color: var(--muted); }
.tier .for { color: var(--muted); font-size: 15px; }
.tier ul { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.tier li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.tier li::before { content: ""; width: 10px; height: 6px; margin-top: 8px; border-left: 2px solid var(--mint-ink); border-bottom: 2px solid var(--mint-ink); transform: rotate(-45deg); }
.tier .btn { margin-top: auto; align-self: stretch; }
.tag { align-self: flex-start; font-size: 13px; font-weight: 600; background: var(--sun); color: #3D2C00; padding: 2px 10px; border-radius: 999px; }
.price-notes { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 20px; font-size: 15px; color: var(--muted); }

/* mascot */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.profile figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.profile figure img { border-radius: 20px; border: 1px solid var(--line); background: #F6F1E6; }
.profile figcaption { font-size: 14px; color: var(--muted); }
.facts { display: grid; grid-template-columns: 8.5em 1fr; gap: 14px 20px; margin: 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--muted); min-width: 0; }

/* faq */
.faq { max-width: 820px; display: flex; flex-direction: column; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 26px; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 44em; }

/* waitlist */
.join { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; background: var(--deep); color: #FFFFFF; border-radius: 32px; padding: 48px; }
.join h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; }
.join .eyebrow { color: var(--sun); }
.join p { color: #CFEADB; }
.form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select { background: #FFFFFF; color: var(--ink); border: 1.5px solid transparent; border-radius: 12px; padding: 12px 14px; width: 100%; }
.field input:focus, .field select:focus { outline: none; border-color: var(--mint); }
.field .err { font-size: 13px; color: var(--sun); min-height: 1em; }
.form .btn { background: var(--sun); color: #3D2C00; align-self: flex-start; }
.form .btn:hover { background: #FFC529; }
.form-done { background: rgba(255, 255, 255, .12); border-radius: 16px; padding: 16px 18px; font-size: 15px; }

footer { padding-block: 40px 56px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }

@media (max-width: 900px) {
  .hero, .demo, .profile, .problem, .join { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price { grid-template-columns: minmax(0, 1fr); }
  .tier + .tier { border-left: 0; border-top: 1px solid var(--line); }
  .top nav a:not(.btn) { display: none; }
  .hint { margin-left: 0; width: 100%; }
  .stage-canvas { max-height: 460px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .band { padding-block: 56px; }
  .join { padding: 28px 20px; border-radius: 24px; }
  .chores li { grid-template-columns: 32px 1fr; }
  .chores .tag { grid-column: 2; justify-self: start; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 12px; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .msg { animation: none; } .typing i { animation: none; opacity: .8; }
}
