/* ============================================================
   Lalaluxe — design tokens
   ============================================================
   The ONLY place hues, type families, elevation and motion curves are
   declared. Booking, confirmation and the studio console all read these.

   The look is a gallery: a bone wall (light) or the same room after
   hours (dark), jet ink, a fine line of pink — and colour that arrives
   only as paint. The interface stays black, bone and pink; the --paint-*
   hues are for artwork and brush marks, never for chrome.

   Where CSS variables can't reach, a value is copied, and TWIN markers
   name the copies: the emails' palette (the marker above :root) and the
   theme-color of the pages, the server-drawn shells and theme.js (the
   markers above --bg). lib/views/pages/manifest.webmanifest holds --bg
   too; it is JSON, so it carries no marker.
   ============================================================ */

/* TWIN: lib/views/emails/layout.js#C */
:root {
  color-scheme: light;

  /* ---- Wall, paper, ink ---- */
  /* TWIN: public/core/theme.js#BAR */
  /* TWIN: lib/views/pages/booking.html#theme-color */
  /* TWIN: lib/views/pages/admin.html#theme-color */
  /* TWIN: lib/views/confirmation-page.js#THEME_COLOR */
  --bg:         #F1EADC;   /* the bone wall */
  --surface:    #FAF6EE;   /* paper — cards, sheets, inputs */
  --surface-2:  #E7DFCF;   /* wells, tracks, pressed rows */
  --ink:        #100E0C;   /* jet */
  --ink-2:      #554B41;   /* secondary text */
  --ink-3:      #6F6558;   /* the quietest type: counters, hints, placeholders (4.5:1 on the wall) */
  --line:       color-mix(in srgb, var(--ink) 10%, transparent);   /* hairline rules */
  --line-2:     color-mix(in srgb, var(--ink) 18%, transparent);   /* control outlines */
  --scrim:      color-mix(in srgb, #0B0908 62%, transparent);      /* behind sheets + lightbox */

  /* ---- Night: the lightbox is a dark room in both themes ---- */
  --night:       #0B0908;
  --night-raise: #2A2420;
  --night-ink:   #F3ECDF;
  --night-gold:  #FBACBE;
  /* the day wall in both themes: the console's logo picker shows each logo on both grounds */
  --day:         #F1EADC;
  --day-ink:     #100E0C;

  /* ---- The accent (#FBACBE pink; the tokens keep their old "gold" names) — fine rules, small marks, the brand ---- */
  --gold:       #FBACBE;
  --gold-ink:   #9C3F58;   /* small accent type and icons on the wall: the pink is too light to read there, so a deep rose (5.4:1) */

  /* ---- Controls: tactile stationery on the gallery wall; selection is an inversion ---- */
  --action:          var(--ink);
  --on-action:       var(--bg);
  --select:          var(--ink);
  --on-select:       var(--bg);
  --on-select-gold:  #FBACBE;   /* an accent note on an inverted (jet) block */
  --focus:           var(--ink);
  --ctl-disabled-bg: color-mix(in srgb, var(--ink) 7%, transparent);
  --ctl-hover:       color-mix(in srgb, var(--ink) 4%, var(--surface));
  --focus-ring:      0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent);

  /* ---- Paint — artwork and brush marks only; the art stays put in both themes ---- */
  --paint-rose:      #DDA097;   /* the dusty pink behind the campaign photo */
  --paint-nude:      #E3C7AE;
  --paint-clay:      #B9532F;
  --paint-berry:     #8E1F45;
  --paint-ochre:     #FBACBE;   /* the drawn "gold" (studs, beads, the brushed X on the wall): the accent pink, so no gold is left on the site */
  --on-paint:        #F6F0E4;   /* type and rules laid over a colour field */
  --art-ink:         #170B06;   /* the drawn contour */
  --skin:            #7C4526;
  --skin-shade:      #4B2613;
  --skin-light:      #A9662F;
  --skin-glint:      #C98848;
  --skin-cool:       #5A4A78;   /* reflected light on the turned side */
  --nail-bare:       #DDB196;   /* the bare nail itself: the grown-out gap a fill closes */
  --lacquer:         #E68FA3;   /* the painted nail: pink on a nude ground */
  --lacquer-shade:   #C5667E;
  --lacquer-light:   #F8C3CE;
  --chrome:          #C4C8D3;   /* a mirror finish: the chrome add-on's nail */
  --chrome-shade:    #757C92;
  --chrome-light:    #F7F9FC;

  /* ---- Status ---- */
  --ok:        #14664F;
  --warn:      #86560A;
  --warn-bg:   #F1E1B8;
  --danger:    #A3241C;
  --danger-bg: #F1D9D3;
  --info:      var(--gold);      /* a plain notice: an accent rule on the raised wall, no new hue */
  --info-bg:   var(--surface-2);

  /* ---- Times with a fee (the owner's call, 2026-10-30): a squeeze-in amber, after hours purple, a
     holiday teal (2026-11-10) ----
     A signal, not paint: mineral accents on the booking calendar, an integrated pill tag in the corner,
     the key above the times and the top edge of the sheet that asks the client to agree. */
  --fee-squeeze:     #A66118;   /* warm ochre-amber */
  --fee-after:       #6246A8;   /* editorial plum-indigo */
  --fee-holiday:     #1B6E63;   /* mineral pine-teal */
  --fee-squeeze-tag: #EBD0A4;   /* soft mineral tint behind "+$20" */
  --fee-after-tag:   #DDD3F8;
  --fee-holiday-tag: #C3E7DE;
  --on-fee-tag:      #100E0C;   /* the tag's figure, on every tag (9:1 or better) */

  /* ---- Type ---- */
  --sans:     "Instrument Sans", ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --display:  "Playfair Display", "Iowan Old Style", Georgia, serif;
  --mono:     ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* ---- Geometry & elevation: architectural radii and whisper-quiet paper lift ---- */
  --r-ctl:        8px;
  --r-card:       12px;
  --r-sheet:      16px;
  --r-pill:       999px;
  --shadow-ctl:   0 1px 2px rgb(16 14 12 / .05), 0 4px 12px -4px rgb(16 14 12 / .06);
  --shadow-cta:   0 2px 6px -1px rgb(16 14 12 / .18), 0 8px 20px -8px rgb(16 14 12 / .22), inset 0 1px 0 rgb(255 255 255 / .12);
  --shadow-thumb: 0 1px 3px rgb(16 14 12 / .24), 0 1px 1px rgb(16 14 12 / .12);
  --shadow-sheet: 0 -1.5em 3em -1.5em rgb(0 0 0 / .4);

  /* ---- Motion: confident, never bouncy ---- */
  --ease:        cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* ============================================================
     STUDIO CONSOLE — the only tokens admin.css reads
     ------------------------------------------------------------
     No separate admin palette: every --a-* / --st-* resolves to a token
     above, so one hue change reaches both apps and both themes. admin.css
     never names a hue; re-skinning the console means re-pointing these.
     ============================================================ */
  --a-bg:         var(--bg);
  --a-surface:    var(--surface);
  --a-surface-2:  var(--surface-2);
  --a-ink:        var(--ink);
  --a-ink-2:      var(--ink-2);
  --a-ink-3:      var(--ink-3);
  --a-line:       var(--line);
  --a-line-2:     var(--line-2);
  --a-gold:       var(--gold);
  --a-gold-ink:   var(--gold-ink);
  --a-action:     var(--action);
  --a-on-action:  var(--on-action);
  --a-select:     var(--select);
  --a-on-select:  var(--on-select);
  --a-meter:      var(--action);       /* progress arcs and bars: ink by day, pink after hours */
  --a-focus:      var(--focus);
  --a-scrim:      var(--scrim);
  --a-sheet:      var(--shadow-sheet);

  /* paint: a client's tone, the live mark, the painting. Art only — never a control. */
  --a-figure:     var(--art-ink);
  --a-on-paint:   var(--on-paint);
  --a-paint-1:    var(--paint-rose);
  --a-paint-2:    var(--paint-clay);        /* the live mark */
  --a-paint-3:    var(--paint-ochre);       /* the brushed underline */
  --a-paint-4:    var(--lacquer);
  --a-paint-5:    var(--paint-berry);
  --a-ground:     var(--paint-nude);

  /* laid over client photos — these never flip with the theme */
  --a-on-photo:   var(--on-paint);
  --a-photo-chip: color-mix(in srgb, var(--art-ink) 62%, transparent);
  --a-photo-back: color-mix(in srgb, var(--art-ink) 95%, transparent);

  /* appointment status — booked is the everyday state, so it stays ink */
  --st-booked:     var(--ink);
  --st-pending:    var(--warn);
  --st-pending-bg: var(--warn-bg);
  --st-done:       var(--ok);
  --st-cancel:     var(--danger);
  --st-cancel-bg:  var(--danger-bg);
  --st-noshow:     var(--ink-2);
}

/* After hours: the wall goes to jet, type to bone, the action to pink. Paint stays put. */
:root[data-theme="dark"] {
  color-scheme: dark;

  /* TWIN: public/core/theme.js#BAR */
  --bg:         #0B0908;
  --surface:    #151210;
  --surface-2:  #1F1A16;
  --ink:        #F3ECDF;
  --ink-2:      #B7AB9A;
  --ink-3:      #8F8477;
  --on-select-gold: #9C3F58;   /* on an inverted (bone) block the pink is too light, so the deep rose */
  --line:       color-mix(in srgb, var(--ink) 12%, transparent);
  --line-2:     color-mix(in srgb, var(--ink) 22%, transparent);
  --scrim:      color-mix(in srgb, #000 74%, transparent);
  --ctl-disabled-bg: color-mix(in srgb, var(--ink) 9%, transparent);
  --ctl-hover:       color-mix(in srgb, var(--ink) 6%, var(--surface));
  --focus-ring:      0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);

  --gold:       #FBACBE;
  --gold-ink:   #FBACBE;

  --action:     var(--gold);
  --on-action:  #0B0908;
  --focus:      var(--gold);

  --ok:        #86CFAE;
  --warn:      #EDC46D;
  --warn-bg:   #2E2309;
  --danger:    #F29A8E;
  --danger-bg: #331512;

  --fee-squeeze:     #E5A956;   /* the rings, light on the night wall */
  --fee-after:       #B8A3F5;
  --fee-holiday:     #72CBB8;

  --shadow-ctl:   inset 0 1px 0 rgb(255 255 255 / .05), 0 2px 10px -2px rgb(0 0 0 / .42);
  --shadow-cta:   0 2px 10px -2px rgb(251 172 190 / .24), inset 0 1px 0 rgb(255 255 255 / .32);
  --shadow-thumb: 0 1px 4px rgb(0 0 0 / .5), 0 1px 1px rgb(0 0 0 / .35);
  --shadow-sheet: 0 -1.5em 3em -1.5em rgb(0 0 0 / .8);
}
