/* ============================================================================
 * Design-system tokens (Prefetch ID) — fonts, colors, type, spacing, base.
 * Ported from the Claude Design project's _ds bundle, with the EVCNX brand
 * overrides from "EVCNX Carrent v4" applied at the end.
 * ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */
/* Outfit (Latin UI) is loaded from Google Fonts in index.html. */
@font-face {
  font-family: 'LINESeedSansTH';
  src: url('../fonts/LINESeedSansTH_W_Th.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LINESeedSansTH';
  src: url('../fonts/LINESeedSansTH_W_Rg.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LINESeedSansTH';
  src: url('../fonts/LINESeedSansTH_W_Bd.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LINESeedSansTH';
  src: url('../fonts/LINESeedSansTH_W_XBd.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LINESeedSansTH';
  src: url('../fonts/LINESeedSansTH_W_He.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --- Colors --------------------------------------------------------------- */
:root {
  --color-body-bg: #f1f1f5;
  --color-body-color: #333333;
  --color-card: #ffffff;
  --color-border: #e7e9eb;

  --color-primary: #4557a3;
  --color-primary-hover: #34417a;
  --color-secondary: #ee941c;
  --color-secondary-hover: #d9851a;
  --color-success: #30a46c;
  --color-success-hover: #2b9a66;
  --color-info: #6acfc9;
  --color-info-hover: #509b97;
  --color-warning: #ffaa40;
  --color-warning-hover: #bf8030;
  --color-danger: #e5513e;
  --color-danger-hover: #ac3d2f;

  --color-default-50: #f8fafc;
  --color-default-100: #f6f7fb;
  --color-default-200: #eef2f7;
  --color-default-300: #e7e9eb;
  --color-default-400: #9ba6b7;
  --color-default-500: #a1a9b1;
  --color-default-600: #8a969c;
  --color-default-700: #6c757d;
  --color-default-800: #343a40;
  --color-default-900: #313a46;
  --color-default-950: #0f172a;

  --color-google: #ffffff;
  --color-facebook: #1877f2;
  --color-line: #06c755;
}

/* --- Typography ----------------------------------------------------------- */
:root {
  --font-body: 'Outfit', 'LINESeedSansTH', sans-serif;
  --font-thai: 'LINESeedSansTH', 'Outfit', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;

  --text-2xs: 11px;
  --text-xs: 0.8125rem;
  --text-body: 0.875rem;
  --text-md: 15px;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;

  --leading-tight: 1.2;
  --leading-normal: 1.5;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
}

/* --- Spacing, radius, shadow ---------------------------------------------- */
:root {
  --radius: 10px;
  --radius-full: 9999px;

  --spacing-base: 0.75rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  --touch-min: 44px;

  --shadow: 0px 1px 4px 0px rgba(130, 143, 163, 0.15);
  --shadow-sm: 0 0.0625rem 0.125rem rgba(76, 76, 92, 0.15);
  --shadow-lg: 0 0.25rem 1rem rgba(76, 76, 92, 0.2);
}

/* --- EVCNX brand overrides ------------------------------------------------ */
:root {
  --color-primary: #0F6B47;
  --color-primary-hover: #0C1A15;
  --color-body-bg: #F6F4EF;

  --ev-ink: #0C1A15;
  --ev-ink-deep: #070F0C;
  --ev-ink-soft: #13261F;
  --ev-green: #0F6B47;
  --ev-gold: #C8A96A;
  --ev-gold-light: #D9C9A3;
  --ev-gold-dark: #7A5F2A;
  --ev-cream: #EFE9DC;
  --ev-paper: #F6F4EF;
  --ev-line: #06c755;
}

/* --- Base elements -------------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-body-bg);
  color: var(--color-body-color);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* iOS: never let form controls trigger Safari auto-zoom. */
input,
select,
textarea {
  font-size: 16px;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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