/* Lune Design System — token warna, tipografi, dan gerak
   Identitas: ruang malam berdua. Warna dasar dari blueprint; satu-satunya
   ornamen adalah bulan dengan fase sungguhan (lihat js/moon.js). */

@font-face {
  font-family: "Young Serif";
  src: url("../assets/fonts/young-serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("../assets/fonts/atkinson-next-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("../assets/fonts/atkinson-next-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("../assets/fonts/atkinson-next-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("../assets/fonts/atkinson-next-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;

  /* Palet blueprint */
  --nav: #17191e;
  --sidebar: #202329;
  --chat-bg: #272b33;
  --accent: #7885f5;
  --bubble-out: #414d87;

  /* Turunan */
  --moonlight: #e9e3cf;      /* hanya untuk bulan */
  --moon-shadow: #2e323b;
  --bubble-in: #323743;
  --field: #1b1e23;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --hover: rgba(255, 255, 255, 0.045);
  --selected: rgba(120, 133, 245, 0.14);
  --text: #e6e8ee;
  --text-2: #a3a9b7;
  --text-3: #727988;
  --text-bubble-out: #f1f3ff;
  --accent-text: #a3acff;
  --ok: #6fcf97;
  --warn: #e8b464;
  --danger: #ec7a80;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --overlay: rgba(12, 13, 16, 0.66);

  /* Tipografi — skala 13 / 15 / 17 / 22 / 30 / 44 */
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font: "Atkinson Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: 2.75rem;

  /* Bentuk: bubble paling lembut, kontrol sedang, panel tegas */
  --r-bubble: 16px;
  --r-ctl: 10px;
  --nav-w: 64px;
  --sidebar-w: 292px;
  --header-h: 60px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 140ms;
  --t-med: 240ms;
}

:root[data-theme="light"] {
  color-scheme: light;
  --nav: #e6e7ec;
  --sidebar: #f3f3f6;
  --chat-bg: #fbfbfc;
  --bubble-out: #5865d6;

  --moonlight: #3c4157;
  --moon-shadow: #d9dbe3;
  --bubble-in: #eceef3;
  --field: #ffffff;
  --line: rgba(23, 25, 30, 0.08);
  --line-strong: rgba(23, 25, 30, 0.16);
  --hover: rgba(23, 25, 30, 0.045);
  --selected: rgba(120, 133, 245, 0.14);
  --text: #1c1f26;
  --text-2: #565d6d;
  --text-3: #858b99;
  --text-bubble-out: #ffffff;
  --accent-text: #4f5bd0;
  --ok: #2f8f5b;
  --warn: #a66a12;
  --danger: #c4434b;
  --shadow: 0 18px 50px rgba(23, 25, 30, 0.16);
  --overlay: rgba(23, 25, 30, 0.35);
}

:root[data-motion="reduced"] { --t-fast: 0ms; --t-med: 0ms; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) { --t-fast: 0ms; --t-med: 0ms; }
}
