/* Trip Buddy tokens, v3 "warm club": cream, deep green and one apricot accent. Single source for the site, the sheet, the dashboard and the privacy page. */
/* Fonts are self-hosted subsets: Fraunces (display, plus the italic accent), DM Sans (text), Noto Serif Thai (Thai display), IBM Plex Sans Thai (Thai text), Caveat (one handwritten note, a 6 KB subset). */

@font-face { font-family: 'Fraunces'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/Fraunces-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-weight: 300; font-style: italic; font-display: swap;
  src: url('../fonts/Fraunces-300i-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-weight: 400 600; font-style: normal; font-display: swap;
  src: url('../fonts/DMSans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Serif Thai'; font-weight: 400 500; font-style: normal; font-display: swap;
  src: url('../fonts/NotoSerifThai-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/IBMPlexSansThai-400-thai.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('../fonts/IBMPlexSansThai-500-thai.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Caveat'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('../fonts/Caveat-500-note.woff2') format('woff2'); }
/* The baht sign: Fraunces has none, so U+0E3F comes from IBM Plex Sans Thai, scaled to sit with the lining figures */
@font-face { font-family: 'TB Baht'; font-weight: 400 600; font-style: normal; font-display: swap;
  src: url('../fonts/IBMPlexSansThai-500-thai.woff2') format('woff2'); unicode-range: U+0E3F; size-adjust: 90%; }
/* Size-adjusted local fallbacks so the swap does not shift the layout (close approximations) */
@font-face { font-family: 'Fraunces Fallback'; src: local('Georgia'), local('Times New Roman'); size-adjust: 96%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; }
@font-face { font-family: 'DM Sans Fallback'; src: local('Arial'), local('Helvetica Neue'); size-adjust: 101%; ascent-override: 95%; descent-override: 28%; line-gap-override: 0%; }

:root {
  /* Palette v4 (10 Nov 2026): from Nun's logo, teal #27AA8B and navy #313743. The old variable names are kept so the sheet, the dashboard and the privacy page follow. */
  --brand: #27AA8B;         /* logo teal: decoration and large shapes only (not text on white) */
  --cream: #F4F8F7;         /* page background */
  --cream-2: #E6F3EE;       /* teal tint panels */
  --paper: #FFFFFF;
  --green: #263041;         /* navy: headings */
  --green-2: #3A4558;
  --green-ink: #1B2230;
  --accent: #137A63;        /* deep teal: buttons, white text on it passes AA */
  --accent-soft: #7FDCC2;   /* teal accent on navy */
  --accent-ink: #0E6D57;    /* teal for small text on white (AA) */
  --text: #2B3140;
  --muted: #566070;
  --hair: rgba(38, 48, 65, .12);

  /* Legacy names kept so the sheet, the dashboard and the privacy page follow the new look without edits */
  --linen: var(--cream);
  --linen-deep: var(--cream-2);
  --paper-legacy: var(--paper);
  --ink: var(--green);
  --ink-soft: var(--muted);
  --olive: var(--green-2);
  --olive-deep: var(--green);
  --brass: var(--accent);
  --brass-deep: #0E6D57;
  --stone: #DCE7E3;
  --stone-deep: #B8C9C3;
  --error: #A33A22;

  --bg: var(--cream);
  --fg: var(--text);
  --fg-soft: var(--muted);
  --line: #D3DEDA;
  --action-bg: var(--accent);
  --action-fg: #fff;
  --focus-inner: var(--cream);
  --focus-outer: var(--green);

  /* Type */
  --font-display: 'TB Baht', 'DM Sans', 'DM Sans Fallback', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --font-display-th: 'TB Baht', 'IBM Plex Sans Thai', 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', 'DM Sans Fallback', 'IBM Plex Sans Thai', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --fw-display-th: 500;
  --fs-hero: clamp(2.5rem, 1.1rem + 5vw, 5.75rem);
  --fs-h2: clamp(2.1rem, 1.2rem + 3.2vw, 4rem);
  --fs-h3: clamp(1.7rem, 1.2rem + 1.6vw, 3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --lh-display-th: 1.4;
  --lh-body: 1.6;
  --fw-strong: 500;

  /* Spacing (4 px base) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem;
  --gutter: clamp(1.25rem, 0.4rem + 3.6vw, 4.5rem);
  --measure: 62ch;
  --page-max: 85rem;

  /* Shapes */
  --r-1: 12px;
  --r-2: 14px;
  --r-card: 22px;
  --r-pill: 999px;
  --r-btn: 14px;
  --r-sheet: 28px;

  /* Motion */
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.25, 1);
  --dur-press: 120ms;
  --dur-fast: 200ms;
  --dur-sheet: 320ms;
  --dur-reveal: 600ms;
}

:focus-visible {
  outline: 2px solid var(--focus-outer);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-inner);
}
/* Thai is never letter-spaced and never faux-italic */
:lang(th) { letter-spacing: 0; font-style: normal; word-break: normal; line-break: strict; }

@media (prefers-reduced-motion: reduce) {
  :root { --dur-press: 0ms; --dur-fast: 0ms; --dur-sheet: 0ms; --dur-reveal: 0ms; }
}
