File size: 17,074 Bytes
0e0cc3e
 
58e400a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e0cc3e
58e400a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b425317
58e400a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bd603dd
d30af0c
 
58e400a
 
 
bd603dd
58e400a
 
 
 
 
 
d30af0c
58e400a
d30af0c
 
 
58e400a
4afeb0c
 
 
 
 
d30af0c
58e400a
d30af0c
 
 
 
 
 
 
 
 
4afeb0c
d30af0c
58e400a
d30af0c
 
 
 
58e400a
 
 
 
 
 
 
 
 
 
bd603dd
58e400a
 
 
 
 
 
 
 
bd603dd
 
58e400a
 
 
bd603dd
58e400a
 
bd603dd
 
40fe69e
 
58e400a
 
40fe69e
 
 
 
0e0cc3e
 
 
 
b425317
0e0cc3e
58e400a
 
 
 
 
 
 
 
bd603dd
 
 
 
 
 
 
 
0e0cc3e
 
 
b425317
0e0cc3e
 
 
40fe69e
 
445c3cc
40fe69e
 
0e0cc3e
 
 
 
40fe69e
 
 
 
 
 
 
 
 
 
445c3cc
bd603dd
 
 
 
 
 
445c3cc
 
58e400a
 
 
 
b425317
 
 
 
 
 
 
 
 
58e400a
 
 
 
 
 
 
 
b425317
58e400a
b425317
58e400a
 
 
 
 
d30af0c
 
 
58e400a
d30af0c
 
 
 
 
 
 
 
 
 
58e400a
 
 
 
d30af0c
 
 
 
 
 
 
 
 
 
 
 
58e400a
 
 
 
d30af0c
58e400a
 
 
 
 
 
d30af0c
 
 
58e400a
 
 
 
d30af0c
 
 
 
 
 
 
 
 
 
 
 
 
58e400a
 
 
 
 
 
d30af0c
 
 
 
58e400a
d30af0c
 
 
 
 
 
 
 
 
 
58e400a
 
 
d30af0c
 
 
 
 
 
 
 
 
 
58e400a
d30af0c
58e400a
 
 
d30af0c
 
 
 
 
 
 
58e400a
 
 
 
 
 
 
 
 
 
 
bd603dd
 
 
 
 
 
 
 
58e400a
 
bd603dd
d30af0c
 
 
 
58e400a
d30af0c
445c3cc
 
 
 
 
 
 
 
58e400a
 
bd603dd
 
 
 
 
58e400a
445c3cc
 
 
d30af0c
445c3cc
 
d30af0c
 
445c3cc
bd603dd
 
 
 
 
 
 
 
445c3cc
bd603dd
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
@import 'tailwindcss';

/* ════════════════════════════════════════════════════════════════════
   NPI PIPE COUNT β€” Refined-light precision-instrument design system
   ───────────────────────────────────────────────────────────────────
   Aesthetic: Linear / Stripe / Vercel-grade light SaaS. Confident,
   precise, quietly luxurious. The COUNT NUMBER is the product hero β†’
   it gets a confident display/mono treatment (IBM Plex Mono).

   Typography:
     β€’ IBM Plex Sans Thai  β€” display + body (full Thai script support,
       bilingual Thai/EN UI). Refined-technical IBM design language.
     β€’ IBM Plex Mono       β€” numeric/technical accents: count figures,
       tabular data, dimension readouts.

   This file is the SINGLE source of truth for theme tokens. Every
   component reads var(--*). Phase 2 applies this system to screens.
   Token names are the contract β€” never rename/remove, only extend.
   ════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Type families ────────────────────────────────────────────────
     Fallback chain keeps Thai glyphs readable before webfonts load and
     on offline first-load (offline-first PWA): Leelawadee UI (Win),
     Thonburi (macOS), Garuda (Linux) all ship Thai. */
  --font-sans: 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont,
    'SF Pro Text', 'Segoe UI', system-ui, 'Leelawadee UI', 'Thonburi',
    'Garuda', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', 'Cascadia Code',
    'Roboto Mono', 'DejaVu Sans Mono', 'Leelawadee UI', monospace;

  /* ── Type scale (font sizes) ────────────────────────────────────── */
  --text-2xs: 0.625rem; /*  10px β€” micro / fine print                */
  --text-xs: 0.6875rem; /*  11px β€” eyebrows, table meta              */
  --text-sm: 0.8125rem; /*  13px β€” captions, secondary text          */
  --text-base: 0.9375rem; /* 15px β€” body                            */
  --text-md: 1rem; /*      16px β€” emphasized body, button labels      */
  --text-lg: 1.125rem; /*  18px β€” card titles                        */
  --text-xl: 1.375rem; /*  22px β€” section heads                      */
  --text-2xl: 1.75rem; /*  28px β€” page heads                         */
  --text-display: clamp(2.25rem, 11vw, 3.25rem); /* hero COUNT number (capped for small screens) */

  /* ── Line heights ───────────────────────────────────────────────── */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* ── Letter spacing ─────────────────────────────────────────────── */
  --tracking-tight: -0.02em;
  --tracking-snug: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;

  /* ── Font weights ───────────────────────────────────────────────── */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ── Type presets (one-line `font:` recipes; family baked in so the
       shorthand never resets it). Apply: `font: var(--type-h2);`
       Add letter-spacing / text-transform / font-variant-numeric
       separately where needed. ────────────────────────────────────── */
  --type-display: 700 var(--text-display) / 1 var(--font-mono);
  --type-h1: 700 var(--text-2xl) / var(--leading-tight) var(--font-sans);
  --type-h2: 600 var(--text-xl) / var(--leading-snug) var(--font-sans);
  --type-h3: 600 var(--text-lg) / var(--leading-snug) var(--font-sans);
  --type-body: 400 var(--text-base) / var(--leading-normal) var(--font-sans);
  --type-body-em: 500 var(--text-md) / var(--leading-normal) var(--font-sans);
  --type-label: 600 var(--text-xs) / var(--leading-none) var(--font-sans);
  --type-count: 700 var(--text-display) / 1 var(--font-mono);

  /* ══ Canvas / atmosphere ══════════════════════════════════════════
     Cool near-white with a faint navy tint + soft gradient mesh on the
     body (see body rule) for premium depth β€” never flat #eef0f4. */
  --bg: #f4f6fa;
  --bg-gradient:
    radial-gradient(115% 72% at 50% -8%, rgba(0, 49, 77, 0.06), transparent 58%),
    radial-gradient(82% 56% at 100% 102%, rgba(90, 147, 181, 0.055), transparent 52%),
    radial-gradient(70% 50% at 0% 100%, rgba(37, 99, 235, 0.03), transparent 50%);

  --header-bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-active: #eef3f8;
  --surface-sunken: #eef1f6; /* NEW β€” recessed/inset panels */

  /* Hairlines & borders β€” refined cooler */
  --hairline: #e6eaf1;
  --hairline-strong: #d4dbe6; /* NEW */
  --border: #d4dbe6;

  /* ── Text ───────────────────────────────────────────────────────── */
  --text: #1e293b;
  --text-dim: #5b6678;
  --text-faint: #94a3b8;
  --text-inverse: #ffffff;

  /* ── Brand β€” navy (refined-light, NOT a recolor) ────────────────── */
  --brand: #00314d;
  --brand-hover: #00263c;
  --brand-light: #e8f1f6;
  --brand-muted: #5a93b5;
  --brand-ring: rgba(0, 49, 77, 0.22);

  /* ── Semantic ───────────────────────────────────────────────────── */
  --success: #16a34a;
  --success-light: #dcfce7;
  --info: #2563eb;
  --info-light: #dbeafe;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;

  --ios-toggle: #00314d;

  /* ── Shape ──────────────────────────────────────────────────────── */
  --r-sm: 0.625rem;
  --r-md: 0.875rem;
  --r-lg: 1rem;
  --r-xl: 1.25rem;
  --r-pill: 9999px; /* NEW */

  /* ── Elevation β€” premium multi-layer shadows (soft + tight pairs) ─ */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 6px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 4px 8px rgba(15, 23, 42, 0.05), 0 14px 32px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 8px 16px rgba(15, 23, 42, 0.06), 0 26px 52px rgba(15, 23, 42, 0.14);
  --shadow-brand: 0 2px 6px rgba(0, 49, 77, 0.18), 0 10px 26px rgba(0, 49, 77, 0.30);
  --shadow-inset: inset 0 1px 2px rgba(15, 23, 42, 0.06); /* NEW β€” sunken */

  /* ── Grain / noise texture (premium tell; use sparingly) ──────────
     Tiny inline fractal-noise SVG. Apply via `.grain` utility class on
     a positioned parent β€” keeps text crisp (don't blanket the app). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");

  /* ── Motion ───────────────────────────────────────────────────────
     Refined, snappier, spring-like easings for a precise-instrument
     feel. Legacy names preserved; new ones added. */
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1); /* NEW β€” material standard */
  --ease-snap: cubic-bezier(0.2, 0.9, 0.3, 1); /* NEW β€” snappy press     */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* NEW β€” overshoot   */

  /* root surface defaults */
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-optical-sizing: auto;
}

html {
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  /* Cool near-white base + subtle gradient mesh = premium depth tell */
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

#root {
  min-height: 100vh;
  min-height: 100dvh;
}

button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type='number'] {
  -moz-appearance: textfield;
}

input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.native-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.native-scroll::-webkit-scrollbar {
  display: none;
}

/* ── Grain overlay utility ──────────────────────────────────────────
   Apply `.grain` to a positioned (relative/absolute) container to lay
   a whisper of fractal noise over it. pointer-events:none keeps it
   non-interactive; z-index keeps it behind content if needed. */
.grain {
  /* Establish positioning + stacking context so the ::after texture is always
     scoped to THIS element (not a distant ancestor) and sits behind content.
     Without this, .grain on a non-positioned parent let the ::after anchor to
     a distant ancestor and blanket the screen β€” a known iOS Safari rendering
     hazard with mix-blend-mode on large layers. */
  position: relative;
  isolation: isolate;
}
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--grain);
  background-size: 160px 160px;
  background-repeat: repeat;
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
}

/* ════════════════════════════════════════════════════════════════════
   Reusable UI primitives β€” refined with premium depth
   ════════════════════════════════════════════════════════════════════ */
.ct-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), var(--shadow-sm);
}

.ct-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.ct-section-label {
  font-size: var(--text-xs);
  line-height: var(--leading-none);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-faint);
}

.ct-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  width: 100%;
  border-radius: var(--r-lg);
  /* Subtle top-lit navy gradient β†’ pressable, quietly luxurious */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 55%),
    var(--brand);
  color: var(--text-inverse);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-snug);
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 0.2s var(--ease-snap), box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out);
}
.ct-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 55%),
    var(--brand-hover);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ct-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.2s var(--ease-snap), background 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}
.ct-btn-secondary:active:not(:disabled) {
  transform: scale(0.98);
  background: var(--surface-2);
  box-shadow: var(--shadow-xs);
}

.ct-btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--text-dim);
  font-weight: var(--weight-semibold);
  transition: background 0.18s var(--ease-out), transform 0.18s var(--ease-snap),
    color 0.18s var(--ease-out);
}
.ct-btn-ghost:active {
  transform: scale(0.96);
  background: var(--surface-active);
}

.ct-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: var(--r-pill);
  padding: 0.25rem 0.75rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
}
.ct-badge--brand { background: var(--brand-light); color: var(--brand); }
.ct-badge--success { background: var(--success-light); color: var(--success); }
.ct-badge--info { background: var(--info-light); color: var(--info); }
.ct-badge--warning { background: var(--warning-light); color: var(--warning); }
.ct-badge--danger { background: var(--danger-light); color: var(--danger); }

/* ── Count display β€” the product hero ───────────────────────────────
   Ready path for the big count figure: confident display mono with
   tabular figures so digits don't jitter as the number animates. */
.ct-count {
  font: var(--type-count);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
  color: var(--brand);
}

/* ── Navigation transitions ───────────────────────────────────────── */
@keyframes nav-push {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes nav-pop {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
.nav-push { animation: nav-push 0.34s var(--ease-ios) both; }
.nav-pop  { animation: nav-pop  0.30s var(--ease-ios) both; }

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.drawer-enter { animation: drawer-in 0.36s var(--ease-ios) both; }

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.sheet-enter   { animation: sheet-up 0.40s var(--ease-ios) both; }
.overlay-enter { animation: fade-in 0.22s var(--ease-smooth) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise-enter { animation: rise 0.32s var(--ease-out) both; }

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.03); }
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 0.75; transform: scale(1.06); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes track-slide {
  0%   { transform: translateX(-200%); }
  60%  { transform: translateX(380%); }
  100% { transform: translateX(380%); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}