/* OSS theme v4: the OSS Brand Guide v1.1 (design/brand/OSS_Brand_Guide.md) on the Falcon card structure.
   Dark is primary, per the guide: warm black page, charcoal-brown cards, copper for accents, cream for text.
   Brand hexes are #121211 #211D1A #C5845E #E6B28D #F5EFE5 #D8C9B7. Everything else here is a tint derived from them.
   Contrast (measured): cream on charcoal 14.6:1, stone text 10.3, muted 6.1, copper text 5.45, ink on copper 6.1. */
:root {
  color-scheme: dark;

  /* surfaces */
  --page: #121211;          /* ดำอุ่น warm black, the flat page behind the cards */
  --surface: #211D1A;       /* ชาร์โคลน้ำตาล charcoal brown, card shell */
  --panel: #2A2521;         /* card inner panel, one step lighter */
  --raised: #322C27;        /* hover and pressed surfaces */
  --stone: #D8C9B7;         /* ครีมอุ่น warm cream stone, the one light card and light inserts */

  /* text */
  --text: #F5EFE5;          /* ขาวนวล cream white */
  --text-2: #D8C9B7;        /* secondary text */
  --muted: #A89A88;         /* captions, descriptions; 6.1:1 on surface, 5.5:1 on panel */
  --on-copper: #121211;     /* text on copper fills */
  --on-stone: #211D1A;      /* text on the stone card */
  --copper-on-stone: #7A4528; /* copper text on stone, 4.8:1. Plain copper on stone is 1.9:1, so never use it there */

  /* copper, the accent */
  --copper: #C5845E;        /* ทองแดง headings accent, lines, fills, accent text on dark */
  --copper-light: #E6B28D;  /* ทองแดงอ่อน light, glow, borders, highlight text */
  --copper-deep: #9A5F3D;   /* gradient end, pressed state */
  --copper-soft: rgb(197 132 94 / 16%);  /* icon circles, chips, tags */
  --copper-wash: rgb(230 178 141 / 7%);  /* faint fills */
  --copper-pill: linear-gradient(100deg, #EBC2A2 0%, #D99A70 42%, #B8754F 100%);
  --copper-glow: 0 10px 26px -8px rgb(197 132 94 / 55%), inset 0 1px 0 rgb(255 240 225 / 45%);
  --copper-arc: linear-gradient(90deg, transparent, rgb(230 178 141 / 75%) 50%, transparent);

  /* lines */
  --line: rgb(230 178 141 / 16%);       /* card borders and hairline dividers */
  --line-strong: #857463;               /* form controls, 3.7:1 on surface (WCAG 1.4.11) */

  /* status, tuned for dark */
  --green: #8FCB8F;
  --warn: #E8A86A;
  --error: #F08A7E;

  /* type: the guide asks for Inter (English) and Noto or IBM Plex Sans Thai (Thai). Inter has no Thai glyphs, so Thai falls through to Plex. */
  --font-ui: "Inter", "IBM Plex Sans Thai", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  --font-title: "Inter", "IBM Plex Sans Thai", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  --weight-regular: 400; --weight-body: 450; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700;

  /* shape and depth on dark: deep soft shadows plus a faint top highlight */
  --r-card: 22px; --r-panel: 17px; --r-input: 12px; --r-pill: 999px;
  --shadow-card: 0 18px 40px -16px rgb(0 0 0 / 55%), 0 2px 6px rgb(0 0 0 / 30%), inset 0 1px 0 rgb(245 239 229 / 4%);
  --shadow-lift: 0 26px 56px -18px rgb(0 0 0 / 65%), 0 0 0 1px rgb(230 178 141 / 22%), inset 0 1px 0 rgb(245 239 229 / 6%);
  --panel-bg:
    radial-gradient(circle at 50% 78%, rgb(197 132 94 / 17%), transparent 52%),
    linear-gradient(180deg, #2A2521, #241F1C);

  /* motion */
  --ease-place: cubic-bezier(.16, 1, .3, 1);
  --ease-wipe: cubic-bezier(.24, .86, .28, 1);

  /* legacy brand-sheet names, remapped so tokens.css components (.btn, .tag, .entry) and the demo follow v4 */
  --font-display: var(--font-title);
  --font-body: var(--font-ui);
  --color-paper: var(--surface);
  --color-paper-2: var(--page);
  --color-paper-3: var(--copper);
  --color-ink: var(--text);
  --color-ink-2: var(--text-2);
  --color-muted: var(--muted);
  --color-rule: var(--line);
  --color-accent: var(--copper);
  --color-leaf: var(--on-copper);
  --color-on-dark: var(--text);
  --color-on-dark-muted: var(--muted);
  --color-focus: var(--copper-light);
  --color-focus-on-dark: var(--copper-light);
  --color-success: var(--green);
  --color-success-wash: rgb(143 203 143 / 14%);
  --color-warn: var(--warn);
  --color-warn-ink: var(--warn);
  --color-warn-wash: rgb(232 168 106 / 14%);
  --color-error: var(--error);
  --color-shadow: rgb(0 0 0 / 50%);
  --radius-card: var(--r-card);
  --radius-input: var(--r-input);
}

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
::selection { background: var(--copper); color: var(--on-copper); }
:focus-visible { outline: 2px solid var(--copper-light); outline-offset: 3px; }
