@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;

  /* Typography */
  --font-ui: "Noto Sans Thai", "Helvetica Neue", Arial, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --leading-tight: 1.2;
  --leading-ui: 1.35;
  --leading-body: 1.55;

  /* Quiet Command surfaces */
  --color-canvas: #f7f7f7;
  --color-surface: #ffffff;
  --color-surface-subtle: #f1f1f1;
  --color-surface-raised: #ffffff;
  --color-scrim: rgba(23, 25, 24, 0.42);
  --color-text: #171918;
  --color-text-muted: #5f6368;
  --color-text-disabled: #96999d;
  --color-text-inverse: #ffffff;
  --color-divider: #e2e2e2;
  --color-border-strong: #808388;

  /* Graphite is the brand accent and the single active signal. Cobalt survives
     only as the focus ring, so focus stays distinguishable from selection. */
  --color-accent: #171918;
  --color-accent-soft: #f1f1f1;
  --color-focus: #2f6bff;
  --color-selected-text: #171918;

  /* Semantic states */
  --color-success: #227453;
  --color-success-soft: #e4f3eb;
  --color-warning: #8a5700;
  --color-warning-soft: #fff1d6;
  --color-danger: #b42318;
  --color-danger-soft: #fee9e7;
  --color-info: #315f9f;
  --color-info-soft: #e6effa;

  /* Ink surface scale. Marketing Site only — this is not a POS or Backoffice
     dark theme, which stays outside the MVP. */
  --color-ink: #131513;
  --color-ink-raised: #1c1f1d;
  --color-ink-divider: #2e3230;
  --color-text-on-ink: #ffffff;
  --color-text-on-ink-bright: #e8eae9;
  --color-text-muted-on-ink: #a7aca9;

  /* Four-point rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;

  /* Controls and geometry. Three heights, and nothing taller. The bare scale is
     pointer density for the Backoffice and Marketing Site; the touch scale is the
     iPad POS, where a finger at the till needs Apple's 44pt floor. */
  --control-compact: 2rem;
  --control-default: 2.25rem;
  --control-critical: 2.5rem;
  --control-touch-compact: 2.75rem;
  --control-touch-default: 3rem;
  --control-touch-critical: 3.625rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;
  --border-hairline: 1px;
  --shadow-overlay: 0 18px 48px rgba(23, 25, 24, 0.16);

  /* Motion */
  --motion-fast: 140ms;
  --motion-base: 200ms;
  --motion-overlay: 240ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --checkout-rail: clamp(22rem, 34vw, 31rem);
  --web-nav: 13.5rem;
  --content-max: 90rem;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-ui);
  color: var(--color-text);
  background: var(--color-canvas);
  font-synthesis: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: var(--text-md);
  line-height: var(--leading-ui);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"],
input,
select,
textarea,
[tabindex] {
  outline: none;
}

:focus-visible {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-focus);
}

.numeric {
  font-variant-numeric: tabular-nums lining-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn.loading::before { animation: none; }
  .skeleton { animation: none; }
}
