/* Blurism — itsblurism.app
   Tokens: design/preview-editor-v3.5/DESIGN.md (ink/canvas/amber/muted, 4px scale, radii)
   + C3a brand pack navy #14213D (wordmark/icon background) so the wordmark sits on its own colour.
   Brand text face: Google Sans (OFL, self-hosted, Thai + Latin). Rubik lives only inside the outlined wordmark SVG. */

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/google-sans-thai-wght400-700.e91be212.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/google-sans-latin-ext-wght400-700.1e61fd6c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/google-sans-latin-wght400-700.df4ccb79.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;
}

:root {
  --navy: #14213D;
  --ink: #141826;
  --canvas: #F3F4F8;
  --paper: #FFFFFF;
  --amber: #FFB020;
  --muted: #5B6276;
  --on-navy: #FFFFFF;
  --on-navy-muted: #C3C9DA;
  --rule: #DADDE6;
  --font: "Google Sans", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  --gutter: 20px;
  --measure: 744px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--canvas);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* Thai: never split a protected phrase; build.py wraps phrases in .nw */
.nw { white-space: nowrap; }

/* Language switching: build emits both languages; site.js shows one. */
html[data-lang="th"] [data-l="en"],
html[data-lang="en"] [data-l="th"] { display: none !important; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--paper); color: var(--ink); padding: 12px 16px; border-radius: 12px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- top bar (shared) ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px var(--gutter);
  max-width: 1120px; margin: 0 auto;
}
.bar__home { display: inline-flex; align-items: center; min-height: 48px; }
.bar__home img { width: 112px; }
.langs { display: flex; gap: 4px; }
.langs a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; min-height: 48px; padding: 0 8px;
  font-size: 15px; font-weight: 500; text-decoration: none; border-radius: 12px;
  color: var(--on-navy-muted);
}
.langs a[aria-current="true"] { color: var(--on-navy); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.langs a:hover { color: var(--on-navy); }

/* ---------- home ---------- */
.home { background: var(--navy); color: var(--on-navy); min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.home .bar { width: 100%; justify-content: flex-end; }
.hero {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 24px var(--gutter) 48px;
}
.hero__mark { width: min(440px, 82vw); margin-bottom: 24px; }
.hero h1 {
  margin: 0 0 32px;
  font-size: clamp(26px, 6.6vw, 44px);
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0;
  max-width: 20em;
}
.hero h1 .nw { display: inline-block; }
.play { display: inline-block; border-radius: 12px; }
.play img { height: 60px; width: auto; }
.play-note { margin: 12px 0 0; font-size: 14px; color: var(--on-navy-muted); }

.foot { padding: 24px var(--gutter) 32px; }
.foot__inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 8px; }
.foot nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 8px;
  font-size: 15px; text-decoration: none;
}
.foot nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot small { font-size: 14px; }
.home .foot { color: var(--on-navy-muted); }
.home .foot nav a { color: var(--on-navy); }
@media (max-width: 767px) { .home .foot__inner { justify-content: center; text-align: center; } .home .foot nav { justify-content: center; } }

/* ---------- document pages (privacy / terms / 404) ---------- */
.doc-head { background: var(--navy); }
.doc-head .bar { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.doc .foot__inner { max-width: var(--measure); }
.doc main { padding: 40px var(--gutter) 64px; }
.doc article { max-width: var(--measure); margin: 0 auto; }
.doc h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.35; margin: 0 0 8px; font-weight: 700; }
.doc .dates { margin: 0 0 32px; color: var(--muted); font-size: 15px; }
.doc h2 { font-size: 22px; line-height: 1.45; margin: 48px 0 12px; font-weight: 700; scroll-margin-top: 16px; }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 16px; padding-left: 24px; }
.doc li { margin: 0 0 8px; }
.doc li > ul { margin: 8px 0 0; }
.doc article a { color: var(--ink); text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc .lead { font-size: 18px; }
.doc .summary { background: var(--paper); border-radius: 22px; padding: 8px 24px 12px; margin: 0 0 8px; }
.doc .summary h2 { margin-top: 16px; }
.doc .foot { border-top: 1px solid var(--rule); color: var(--muted); }
.doc .foot nav a { color: var(--ink); }
/* Placeholder still waiting for Bo — visible on purpose so it is never deployed by accident */
mark.ph { background: #FFE9B8; color: var(--ink); padding: 0 4px; border-radius: 4px; }

.notfound { text-align: center; }
.notfound .btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 16px;
  background: var(--amber); color: #171A25; font-weight: 700; text-decoration: none; margin-top: 8px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .bar__home img { width: 128px; }
  .play img { height: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print {
  .bar, .foot nav, .skip { display: none; }
  html[data-lang] [data-l] { display: block !important; }
}
