@charset "UTF-8";

/* ==========================================================================
   Biznet Gio — color system (single source of truth)

   Three layers, each referencing only the layer above it:

     1. PRIMITIVES   Raw palette steps. Named by hue family + lightness
                     step. Never used directly for meaning in components
                     that must adapt to light/dark — except illustration art
                     and fixed dark surfaces (console, code, closing band).
     2. SEMANTIC     Role tokens (surface / text / border / action / status).
                     Light values on :root, dark values on
                     :root[data-theme=dark]. Components use these.
     3. COMPONENT    Scoped re-mapping only (e.g. a dark console panel that
                     stays dark in light mode) — done by re-pointing the
                     semantic tokens, never by new hex values.

   Legacy names (--paper, --surface, --ink, --muted, --line, --soft,
   --primary, --accent, --primary-soft, --primary-text, --dark, --on-dark)
   are kept as the stable semantic API; their values did not change.

   Rule: no hex / rgb / hsl literal may appear in any other stylesheet. The
   only literals left outside this file are SVG presentation attributes in
   the isometric illustrations and the <meta name="theme-color"> values.
   ========================================================================== */

:root {
  /* ---- 1. PRIMITIVES ---------------------------------------------------- */

  /* Neutrals */
  --white: #FFFFFF;
  --snow: #F9FBFD;
  --cloud-100: #F2F4F6;     /* neutral hover surface */
  --ink-900: #101211;
  --ink-700: #313332;       /* deploy-preview mock button only */
  --black: #000000;         /* dark-mode shadows only */

  /* Mint — brand tints (light surfaces, text on dark) */
  --mint-50: #E6F5EE;
  --mint-100: #B9E9D2;
  --mint-200: #91DDB9;
  --mint-300: #7DE1BB;
  --mint-400: #6ED8AD;

  /* Sage — green-tinted neutrals (borders, muted text, dark lines) */
  --sage-100: #CFDFD7;
  --sage-200: #B9DCCB;
  --sage-300: #A4BFB1;
  --sage-400: #91BDA7;
  --sage-500: #6F9C86;
  --sage-550: #6A9781;      /* form-control boundary (3.2:1 on --snow) */
  --sage-600: #477E63;
  --sage-650: #52645D;
  --sage-700: #336950;
  --sage-800: #304D3D;

  /* Brand green */
  --green-500: #29AE87;
  --green-600: #118D62;
  --green-700: #08744E;
  --green-800: #06633F;

  /* Forest — dark green surfaces */
  --forest-600: #245740;
  --forest-700: #1B3F2D;
  --forest-725: #17382B;
  --forest-750: #1A3225;
  --forest-800: #17241D;
  --forest-900: #101C15;
  --forest-950: #0B1610;

  /* Status hues */
  --amber-300: #F3D9A4;
  --amber-400: #E8B24A;
  --amber-700: #946010;     /* AA text on light surfaces (5.1:1 on --snow) */
  --red-600: #C2410C;
  --flag-red: #CE1126;      /* Indonesian flag glyph — identity, not status */

  /* Illustration-only steps (isometric art; values unchanged) */
  --ill-box-front: #0E2419;
  --ill-box-side: #12301F;

  /* Alpha steps — elevation shadows (ink), brand glows/rings, hairlines.
     One ladder each; every component picks a step instead of a new alpha. */
  --shadow-xs: #10121111;
  --shadow-sm: #10121133;
  --shadow-md: #10121166;
  --shadow-lg: #10121199;
  --shadow-black: #000000A6;
  --scrim: #101211CC;

  --accent-a08: #29AE8708;
  --accent-a16: #29AE8716;
  --accent-a26: #29AE8726;
  --accent-a33: #29AE8733;
  --accent-a44: #29AE8744;
  --accent-a66: #29AE8766;
  --primary-a20: #118D6233;
  --mint-a08: #6ED8AD12;
  --mint-a20: #6ED8AD33;
  --amber-a15: #E8B24A26;
  --sage-200-a20: #B9DCCB33;
  --sage-500-a50: #6F9C8680;
  --snow-a11: #F9FBFD1C;
  --snow-a15: #F9FBFD25;

  /* ---- 2. SEMANTIC (light) ---------------------------------------------- */

  /* Surfaces */
  --paper: var(--snow);                 /* page background */
  --surface: var(--white);              /* cards, panels, inputs */
  --soft: var(--mint-50);               /* quiet tinted surface */
  --hover-surface: #F0F7F4;            /* hover background for list items and menu rows */
  --primary-soft: var(--mint-50);       /* brand-tinted surface (selected, tags) */
  --dark: var(--ink-900);               /* inverse surface (footer, banner) */
  --surface-console: var(--forest-900); /* always-dark code/console panels */
  --surface-console-deep: var(--forest-950);

  /* Text */
  --ink: var(--ink-900);
  --muted: var(--sage-650);
  --primary-text: var(--green-700);     /* brand-coloured text, 5.6:1 on --paper */
  --text-accent: var(--primary-text);   /* small accent text (links, tags, arrows) */
  --on-dark: var(--snow);               /* text on any inverse surface */
  --on-dark-muted: var(--sage-300);
  --on-dark-accent: var(--mint-400);
  --on-action: var(--snow);

  /* Borders */
  --line: var(--sage-100);              /* dividers, card outlines */
  --line-hover: var(--sage-500);        /* hover outline on bordered cards */
  --line-control: var(--sage-550);      /* form-control boundary — WCAG 1.4.11 (3:1) */
  --line-control-hover: var(--sage-600);
  --line-on-dark: var(--sage-800);

  /* Brand + actions */
  --primary: var(--green-600);          /* brand fill, borders, icons, focus ring */
  --accent: var(--green-500);
  --primary-on-dark: var(--green-500);
  --primary-soft-on-dark: var(--forest-725);
  --action: var(--green-700);           /* filled primary button */
  --action-hover: var(--green-800);

  /* Status */
  --warning: var(--amber-400);          /* dots, strokes, borders */
  --warning-text: var(--amber-700);     /* text */
  --danger: var(--red-600);

  color-scheme: light;
}

/* ---- 2b. SEMANTIC (dark) ------------------------------------------------ */
:root[data-theme=dark] {
  --paper: var(--ink-900);
  --surface: var(--forest-800);
  --soft: var(--forest-750);
  --hover-surface: var(--ink-900);
  --primary-soft: var(--forest-725);
  --dark: var(--forest-950);

  --ink: var(--snow);
  --muted: var(--sage-300);
  --primary-text: var(--mint-400);
  --text-accent: var(--accent);
  --on-action: var(--snow);

  --line: var(--sage-800);
  --line-control: var(--sage-600);
  --line-control-hover: var(--sage-500);

  --primary: var(--green-500);
  --accent: var(--green-500);

  --warning-text: var(--amber-400);

  color-scheme: dark;
}

/* ---- 3. COMPONENT SCOPES ------------------------------------------------
   Panels that stay dark in both themes (code/console/AI panel/Black-Friday
   card). They re-point the semantic tokens so every child — which only knows
   --ink / --muted / --line / --primary-text — reads correctly without
   per-component colour overrides. */
.hp-console,
.hp-code,
.neo-ai-panel {
  --ink: var(--on-dark);
  --muted: var(--on-dark-muted);
  --line: var(--line-on-dark);
  --line-control: var(--sage-600);
  --line-control-hover: var(--sage-500);
  --primary: var(--primary-on-dark);
  --primary-text: var(--on-dark-accent);
  --text-accent: var(--primary-on-dark);
}
.pv-bf {
  --ink: var(--on-dark);
  --muted: var(--on-dark-muted);
  --line: var(--line-on-dark);
  --primary-text: var(--on-dark-accent);
  --text-accent: var(--on-dark-accent);
}
