/* Triple Dee site: one stylesheet for every page.
   Layout: warm light hero with a centred headline and the น้องดี family floating around it (flat chat bubbles,
   our answer to Popcont's soft 3D blobs), then calm white sections. body[data-p] swaps --accent and --tint.
   Tokens follow brand/tripledee-brand.html and brand/nongdee-sheet.html. */
/* Deliberately one light look (owner, 15 Oct): white page, depth from soft layers behind the content. */
:root {
  --navy: #14213D;
  --bg: #FFFFFF;
  --paper: #FFFFFF;
  --ink: #14213D;
  --muted: #5A6273;
  --line: #ECE7DC;
  --tint: #FFF1D6;
  --tint-2: #FFE6B8;
  --logo: #14213D;
  --widee: #2494D2;
  --postdee: #F05C22;
  --saledee: #FFC233;
  --paydee: #1F8F63;
  --accent: #14213D;
  --on-accent: #FFFFFF;
  --accent-ink: #14213D;
  --bubble-in: #FFFFFF;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 14px 34px -14px rgba(20, 33, 61, .20);
  --font-display: "Kanit", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Sarabun", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

/* Per-product accent and tint */
body[data-p="widee"] { --accent: var(--widee); --on-accent: #FFFFFF; --accent-ink: #17699A; --tint: #E4F2FB; --tint-2: #CDE7F7; }
body[data-p="postdee"] { --accent: var(--postdee); --on-accent: #FFFFFF; --accent-ink: #B9400F; --tint: #FDEBE2; --tint-2: #FAD6C5; }
body[data-p="saledee"] { --accent: var(--saledee); --on-accent: #14213D; --accent-ink: #8A6200; --tint: #FFF4D1; --tint-2: #FFE7A3; }
body[data-p="paydee"] { --accent: var(--paydee); --on-accent: #FFFFFF; --accent-ink: #17704D; --tint: #E3F3EB; --tint-2: #C8E8D7; }

/* Depth layer 1, behind the whole page: a soft wash in the product colour and a fine dot grid */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42rem 32rem at -6% -8%, var(--tint) 0%, transparent 70%),
    radial-gradient(36rem 30rem at 106% 40%, color-mix(in srgb, var(--tint-2) 60%, transparent) 0%, transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(20, 33, 61, .07) 1px, transparent 1.5px) 0 0 / 24px 24px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.75; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0; text-wrap: balance; font-weight: 500; }
h1 { font-size: clamp(2.2rem, 6.4vw, 4rem); font-weight: 500; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.12rem; }
p, ul, ol { margin: 0; }
ul, ol { padding-left: 1.25em; }
svg { display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 68ch; }
.stack { display: grid; gap: 14px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.hl { color: var(--accent-ink); }

/* Top bar: light, blurred, logo left, links centre, capsule CTA right */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; padding-block: 10px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; text-decoration: none; }
.logo svg { width: 30px; height: 30px; color: var(--logo); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.nav { display: flex; gap: 2px 6px; flex-wrap: wrap; font-size: .97rem; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--paper); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }

/* Buttons: capsule per brand book */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 10px 26px; border-radius: 999px; font-family: var(--font-display); font-weight: 500; font-size: 1.04rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn-primary { background: var(--navy); color: #FFFFFF; box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--accent) 70%, var(--navy)); }
body[data-p] .btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 0 -2px var(--navy); }
body[data-p="home"] .btn-primary { background: var(--navy); color: #FFFFFF; box-shadow: 0 6px 0 -2px var(--saledee); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 6px 18px; font-size: .95rem; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero: centred headline, mascots float around it */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; aspect-ratio: 1; border-radius: 46% 46% 46% 10%; }
.hero::before { width: min(46vw, 560px); right: -8%; top: -18%; background: linear-gradient(160deg, var(--tint-2), var(--tint)); opacity: .75; }
.hero::after { width: min(30vw, 360px); left: -7%; bottom: -22%; border: 2px solid var(--tint-2); background: color-mix(in srgb, var(--tint) 45%, transparent); border-radius: 46% 46% 10% 46%; }
.hero .wrap { position: relative; padding-block: 72px 96px; display: grid; justify-items: center; text-align: center; }
.hero-copy { position: relative; z-index: 2; display: grid; gap: 20px; justify-items: center; max-width: 760px; min-width: 0; }
.hero .lede { color: var(--muted); font-size: 1.18rem; max-width: 52ch; }
.hero .btns { justify-content: center; }
.tag { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); font-family: var(--font-display); font-size: .92rem; font-weight: 500; }
.tag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
body[data-p="home"] .tag::before { background: var(--postdee); box-shadow: 12px 0 0 var(--widee), 24px 0 0 var(--saledee); margin-right: 32px; }
.mark { position: relative; white-space: nowrap; }
.mark::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .28em; background: var(--accent); opacity: .35; border-radius: 999px; z-index: -1; }
body[data-p="home"] .mark::after { background: var(--saledee); opacity: .7; }

.cast { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.m { position: absolute; width: var(--s, 140px); height: auto; aspect-ratio: 1; max-width: 100%; filter: drop-shadow(0 14px 18px rgba(20, 33, 61, .16)); }
.m.c1 { left: 1%; top: 12%; --s: 150px; --r: -8deg; }
.m.c2 { right: 2%; top: 6%; --s: 120px; --r: 10deg; }
.m.c3 { left: 6%; bottom: -6%; --s: 170px; --r: 6deg; }
.m.c4 { right: 4%; bottom: -2%; --s: 150px; --r: -6deg; }
.m.solo { right: 3%; top: 50%; --s: 200px; --r: 6deg; translate: 0 -50%; }
.cast:has(.m.solo) .chip.k2 { top: 14%; right: 16%; }
.m { rotate: var(--r, 0deg); }
.chip { position: absolute; z-index: 1; padding: 7px 14px; border-radius: 18px 18px 18px 6px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.chip.r { border-radius: 18px 18px 6px 18px; background: var(--navy); color: #FFFFFF; }
.chip.k1 { left: 2%; top: 52%; } .chip.k2 { right: 2%; top: 44%; } .chip.k3 { right: 16%; bottom: 6%; } .chip.k4 { left: 13%; top: 6%; }
@media (prefers-reduced-motion: no-preference) {
  .m { animation: bob 5s ease-in-out infinite; }
  .m.c2 { animation-delay: -1.2s; } .m.c3 { animation-delay: -2.4s; } .m.c4 { animation-delay: -3.6s; }
  .chip { animation: bob 6s ease-in-out infinite; } .chip.k2 { animation-delay: -2s; } .chip.k3 { animation-delay: -4s; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 980px) {
  .chip { display: none; }
  .m.c1 { --s: 96px; left: -10px; top: 4%; } .m.c2 { --s: 84px; right: -8px; top: 3%; }
  .m.c3, .m.c4 { display: none; }
  .m.solo { display: none; }
  .hero .wrap { padding-block: 104px 64px; }
}
/* Family row under the hero on small screens, so every mascot still appears */
.family-row { display: none; }
@media (max-width: 980px) { .family-row { display: flex; justify-content: center; gap: 8px; margin-top: 8px; } .family-row svg { width: 64px; height: 64px; } }

/* Chat thread demo inside a phone card */
.phone { width: min(380px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 32px; padding: 14px; box-shadow: var(--shadow); justify-self: center; min-width: 0; }
.chat { display: grid; gap: 10px; background: var(--tint); border-radius: 22px; padding: 16px; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 500; font-size: .95rem; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.chat-head svg { width: 30px; height: 30px; }
.b { max-width: 86%; padding: 9px 14px; border-radius: 18px; font-size: .97rem; line-height: 1.55; margin: 0; }
.b.in { background: var(--bubble-in); color: var(--ink); border-bottom-left-radius: 6px; justify-self: start; box-shadow: 0 1px 0 rgba(20, 33, 61, .06); }
.b.out { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; justify-self: end; }
body[data-p="home"] .b.out { background: var(--navy); color: #FFFFFF; }
.b.note { justify-self: center; background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: .74rem; padding: 2px 0; }
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 820px) { .demo { grid-template-columns: minmax(0, 1fr); } }

/* Sections */
.sec { padding-block: 72px; }
.sec.alt { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 55%, transparent), transparent 85%); }
.sec-head { display: grid; gap: 10px; margin-bottom: 32px; max-width: 70ch; }
.sec-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 8px; align-content: start; min-width: 0; }

.card .k { font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; }
.card .ic { width: 56px; height: 56px; }
.steps { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.steps li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 6px; align-content: start; }

.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50% 50% 50% 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; }
body[data-p="home"] .steps li::before { background: var(--navy); color: #FFFFFF; }

/* Product family on the home page */
.family { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.prod { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 10px; align-content: start; text-decoration: none; color: inherit; min-width: 0; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.prod:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.prod .pic { width: 104px; height: 104px; margin: -6px 0 0 -8px; }
.prod .name { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; }
.prod .name i { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); display: block; }
.prod .role { color: var(--muted); }
.prod .price { font-family: var(--font-display); font-weight: 500; font-variant-numeric: tabular-nums; }
.prod .go { font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.prod::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--pc); opacity: .12; }
.status { display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); justify-self: start; }

/* Pricing */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.plan { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 26px 24px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.plan.pick { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan.pick::before { content: attr(data-badge); position: absolute; top: -13px; left: 22px; background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-weight: 500; font-size: .82rem; padding: 2px 12px; border-radius: 999px; }
.plan h3 { font-size: 1.25rem; }
.plan .price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.05; }
.plan .price small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.plan .setup { font-size: .93rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan ul { display: grid; gap: 6px; font-size: .96rem; padding-left: 0; list-style: none; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 9px; border-radius: 6px 6px 6px 2px; background: var(--accent); }
.plan .btn { margin-top: 6px; }
.fine { font-size: .88rem; color: var(--muted); margin-top: 16px; }
.tbl { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 520px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--font-display); font-weight: 500; color: var(--muted); font-size: .86rem; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 78ch; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 20px; }

.faq summary { font-family: var(--font-display); font-weight: 500; cursor: pointer; }
.faq details p { margin-top: 8px; color: var(--muted); }

/* Closing CTA */
.cta { padding-block: 24px 72px; }
.cta .box { position: relative; overflow: hidden; background: var(--navy); color: #F3F5F9; border-radius: 32px; padding: 44px clamp(20px, 5vw, 56px); display: grid; gap: 16px; }
.cta h2 { color: #FFFFFF; max-width: 22ch; }
.cta .muted { color: #B7C0D1; max-width: 56ch; }
.cta .btn-primary { background: var(--saledee); color: #14213D; box-shadow: none; }
body[data-p] .cta .btn-primary { background: var(--accent); color: var(--on-accent); }
body[data-p="home"] .cta .btn-primary { background: var(--saledee); color: #14213D; }
.cta .m { width: 150px; right: 28px; bottom: -22px; rotate: -8deg; }
@media (max-width: 720px) { .cta .m { display: none; } }
.contact { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: .92rem; color: #B7C0D1; }
.contact b { color: #FFFFFF; font-weight: 500; user-select: all; }

/* Forms (waitlist) */
.form { display: grid; gap: 12px; max-width: 480px; }
.form label { display: grid; gap: 4px; font-weight: 500; }
.form input, .form select, .form textarea { font: inherit; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); min-height: 48px; }

footer { padding-block: 28px 40px; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
