/* ==========================================================================
   Cerdek Design Tokens  ·  v1.0
   --------------------------------------------------------------------------
   Single source of truth for colour, type, spacing, radius, elevation and
   motion. Every page loads this file first. Never hard-code a value that
   exists here — reference the token instead.
   Documented visually in /brand-guidelines.html
   ========================================================================== */

:root {
  /* ---- Brand: Kancil Orange -------------------------------------------- */
  --orange-50: #fff7f0;   /* hover tint on white                            */
  --orange-100: #ffe3cf;  /* soft fills, demo grounds, shimmer              */
  --orange-200: #f8c8a4;  /* hairlines on peach, connectors, inactive rings */
  --orange-300: #fd5f04;  /* PRIMARY — CTAs, marks, key accents             */
  --orange-400: #c9480a;  /* DEEP — pills, eyebrow labels, step numbers     */
  --orange-900: #401408;  /* INK BROWN — wordmark, dark brand surfaces      */
  --peach: #fff0e4;       /* signature card ground                          */

  /* ---- Accent colours (use sparingly, never as page ground) ------------ */
  --blue: #0067b4;        /* accent A — ribbons, strips, badges             */
  --green: #12a150;       /* accent B — ribbons, strips, badges             */
  --green-deep: #0a7d3c;  /* accent B, darker step                          */
  --yellow: #ffc83d;      /* sparks, sticky notes, highlights               */
  --yellow-soft: #fff7d3;
  --pink: #ff9ecb;        /* small doodles only                             */

  /* ---- Feedback -------------------------------------------------------- */
  --success: #22a35a;       /* correct-answer border / tick                 */
  --success-deep: #1b8046;  /* correct-answer 3D edge                       */
  --success-bg: #dffbe8;    /* correct-answer fill                          */

  /* ---- Neutrals -------------------------------------------------------- */
  --white: #ffffff;
  --gray-50: #f9f9f9;
  --gray-100: #f3f2f3;
  --gray-150: #ececec;
  --gray-200: #e3e3e3;
  --gray-300: #cdcdcd;
  --gray-400: #b4b4b4;
  --gray-500: #9b9b9b;
  --gray-600: #676767;
  --gray-700: #4e4e4e;
  --gray-850: #262626;
  --gray-900: #171717;
  --gray-950: #0d0d0d;
  --ui-edge: #f0f0f0;     /* 3D bottom edge on white demo cards             */
  --ui-ink: #333333;      /* text inside product-UI demos                   */
  --ui-ink-soft: #666666;

  /* ---- Semantic aliases (prefer these in page CSS) ---------------------- */
  --color-bg: var(--white);
  --color-text: var(--gray-900);
  --color-text-body: var(--gray-700);
  --color-text-muted: var(--gray-600);
  --color-border: var(--gray-150);
  --color-primary: var(--orange-300);
  --color-primary-deep: var(--orange-400);
  --color-ground: var(--peach);
  --color-ink: var(--orange-900);
  --color-footer: var(--gray-950);

  /* ---- Typography ------------------------------------------------------ */
  --font-sans: "Poppins", "Noto Sans SC", system-ui, -apple-system, "Segoe UI",
    Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* type scale: size / line-height (see .type-* classes in base.css) */
  --type-hero: 28px;          /* → 36px ≥640, 40px ≥1280 · 600 · 1.25 */
  --type-section: 24px;       /* → 28px ≥640           · 600 · 1.25 */
  --type-subsection: 20px;    /* → 22px ≥640, 24px ≥1280 · 600 · 1.3 */
  --type-card: 18px;          /* 500–600 · 1.5 */
  --type-body: 15px;          /* 400 · 1.5 */
  --type-small: 14px;         /* 400–500 · 1.43 */
  --type-caption: 12px;       /* 500 · 1.33 */

  /* ---- Layout ---------------------------------------------------------- */
  --page-content: 1192px;     /* content column                             */
  --page-content-wide: 1392px;/* header + footer column                     */
  --page-gutter-min: 24px;    /* → 40px ≥640                                */
  --site-header: 64px;
  --section-gap: 80px;        /* vertical rhythm between sections           */
  --section-gap-half: 40px;   /* → 50px ≥640, 60px ≥1024                    */

  /* spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* ---- Radius ---------------------------------------------------------- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-card: 20px;        /* every card, panel and media frame          */
  --radius-pill: 9999px;      /* buttons, chips, badges                     */

  /* ---- Elevation ------------------------------------------------------- */
  --shadow-menu: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-bubble: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-stack: 0 -22px 32px -32px #17171729, 0 -6px 10px -10px #17171714;

  /* ---- Motion ---------------------------------------------------------- */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);     /* UI default      */
  --ease-in-out-strong: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out-gentle: cubic-bezier(0.33, 1, 0.68, 1);     /* reveals         */
  --ease-pop: cubic-bezier(0.34, 1.45, 0.64, 1);         /* chat bubbles    */
  --ease-bounce: cubic-bezier(0.34, 1.62, 0.64, 1);
  --ease-settle: cubic-bezier(0.17, 0.02, 0.36, 1);      /* falling badges  */
  --ease-flip: cubic-bezier(0.45, 0, 0.2, 1);            /* card turns      */

  --dur-press: 0.16s;         /* hover / press feedback                     */
  --dur-menu: 0.18s;          /* menus, chevrons                            */
  --dur-pop: 0.46s;           /* bubbles & chips entering                   */
  --dur-arrive: 0.7s;         /* section reveal                             */
  --dur-badge: 0.5s;
  --stagger-card: 0.11s;
  --stagger-badge: 70ms;
  --travel-badge: 40px;
  --fall-max: 320px;

  /* ---- Sticky banner stack ---------------------------------------------- */
  --banner-park: 28px;
}

@media (min-width: 640px) {
  :root {
    --page-gutter-min: 40px;
    --section-gap-half: 50px;
  }
}
@media (min-width: 1024px) {
  :root {
    --section-gap-half: 60px;
  }
}
