/* ==========================================================================
   Preschool ERP — design tokens
   Base tokens are shared; each brand overrides only the --brand-* layer.
   Switch brand with <html data-brand="jimmyhenry|princewilliam|ethanpreschool">.
   Brand colours come from each school's logo sheet (CMYK/Pantone spec).
   ========================================================================== */

:root {
  /* ---- Typography ---------------------------------------------------- */
  --font-sans: "Barlow", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-num: "Barlow", "Roboto", system-ui, sans-serif;
  --fs-xs: 12px;  --fs-sm: 13px;  --fs-md: 15px;  --fs-lg: 17px;
  --fs-xl: 20px;  --fs-2xl: 26px; --fs-3xl: 34px; --fs-4xl: 44px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  --lh-tight: 1.2; --lh-normal: 1.55;

  /* ---- Spacing (4px grid) -------------------------------------------- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* ---- Shape --------------------------------------------------------- */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius-xl: 24px; --radius-pill: 999px;

  /* ---- Neutral surface (soft light-grey canvas, white raised cards) -- */
  --canvas: #eceff4;
  --canvas-grad: linear-gradient(160deg, #f4f6f9 0%, #e4e8ee 100%);
  --surface: #ffffff;
  --surface-sunken: #f3f5f8;
  --surface-sheen: linear-gradient(180deg, #ffffff 0%, #f1f3f6 100%);
  --border: #dde2ea;
  --border-strong: #c5ccd8;
  --text: #253041;
  --text-muted: #6b7587;
  --text-subtle: #98a1b0;
  --text-on-brand: #ffffff;

  /* ---- Elevation (soft, slightly lifted like the reference kits) ----- */
  --shadow-sm: 0 1px 2px rgba(31, 45, 70, .06), 0 2px 6px rgba(31, 45, 70, .06);
  --shadow-md: 0 2px 4px rgba(31, 45, 70, .05), 0 8px 20px rgba(31, 45, 70, .09);
  --shadow-lg: 0 4px 8px rgba(31, 45, 70, .06), 0 18px 40px rgba(31, 45, 70, .14);
  --shadow-inset: inset 0 1px 2px rgba(31, 45, 70, .08);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 30%, transparent);

  /* ---- Semantic (same for every brand, so status reads consistently) */
  --success: #2f9e5b; --success-soft: #e3f5ea; --success-grad: linear-gradient(135deg, #36b37e, #8bd46a);
  --warning: #c77a00; --warning-soft: #fff3dc; --warning-grad: linear-gradient(135deg, #f39c12, #f6c544);
  --danger:  #d64541; --danger-soft:  #fde8e7; --danger-grad:  linear-gradient(135deg, #e5483f, #f2804e);
  --info:    #1f7fd1; --info-soft:    #e3f0fc; --info-grad:    linear-gradient(135deg, #1f6fd1, #39c0f0);
  --subsidy: #7b4fd6; --subsidy-soft: #efe8fd; /* 政府補助 lines */

  /* ---- Motion -------------------------------------------------------- */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 160ms;

  /* ---- Default brand = Jimmy Henry ----------------------------------- */
  --brand-name: "吉米亨利幼兒園";
}

/* 吉米亨利幼兒園 — PANTONE 2718C blue, 3125C aqua, 368C green, 150C orange, Reflex Blue text */
:root,
[data-brand="jimmyhenry"] {
  --brand-primary: #4a6fd6;
  --brand-primary-deep: #0b3fae;
  --brand-primary-soft: #e8eefc;
  --brand-secondary: #3fbfb5;
  --brand-accent: #f39a4c;
  --brand-accent-deep: #d97521;
  --brand-tertiary: #78be20;
  --brand-grad: linear-gradient(135deg, #0b3fae 0%, #4a6fd6 55%, #3fbfb5 100%);
  --brand-grad-soft: linear-gradient(135deg, #e8eefc 0%, #e2f6f4 100%);
  --brand-grad-accent: linear-gradient(135deg, #e8761f 0%, #f7b45c 100%);
  --brand-grad-fresh: linear-gradient(135deg, #3fbfb5 0%, #9ad04c 100%);
}

/* 威廉王子幼兒園 — process cyan/blue shield, gold frame, orange crown, leaf green */
[data-brand="princewilliam"] {
  --brand-primary: #0a84cc;
  --brand-primary-deep: #15499a;
  --brand-primary-soft: #e2f2fc;
  --brand-secondary: #3ec1ec;
  --brand-accent: #f08519;
  --brand-accent-deep: #d16a05;
  --brand-tertiary: #4bb13f;
  --brand-gold: #fdd100;
  --brand-grad: linear-gradient(135deg, #15499a 0%, #0a84cc 55%, #3ec1ec 100%);
  --brand-grad-soft: linear-gradient(135deg, #e2f2fc 0%, #fff8d6 100%);
  --brand-grad-accent: linear-gradient(135deg, #e8700c 0%, #fdc300 100%);
  --brand-grad-fresh: linear-gradient(135deg, #4bb13f 0%, #c9dc1a 100%);
  --brand-name: "威廉王子幼兒園";
}

/* 伊頓大地幼兒園 — tree mark: leaf green, lime, sun yellow, orange (logo sheet swatches) */
[data-brand="ethanpreschool"] {
  --brand-primary: #4f9a1f;
  --brand-primary-deep: #2f6f12;
  --brand-primary-soft: #eef7e2;
  --brand-secondary: #75bd2b;
  --brand-accent: #f88e37;
  --brand-accent-deep: #de6d12;
  --brand-tertiary: #c2d600;
  --brand-sun: #f8bf1e;
  --brand-grad: linear-gradient(135deg, #2f6f12 0%, #4f9a1f 50%, #8cc63a 100%);
  --brand-grad-soft: linear-gradient(135deg, #eef7e2 0%, #fff4d6 100%);
  --brand-grad-accent: linear-gradient(135deg, #e8701a 0%, #f8bf1e 100%);
  --brand-grad-fresh: linear-gradient(135deg, #75bd2b 0%, #c2d600 100%);
  --brand-name: "伊頓大地幼兒園";
}
