/* =====================================================================
   JOSIEL — design tokens. Every colour of the site lives here, for both themes; styles.css and the scripts
   only refer to these names. Loaded before styles.css.
   1. dark theme (default)   2. light theme   3. content colours (category washes, product glows)
   4. type, layout and motion
   ===================================================================== */

/* stylelint-disable no-duplicate-selectors -- the tokens are grouped by purpose, one :root block per group */

/* ---------------------------------------------------------------- 1. dark theme (default): deep green, emerald, gold */
:root {
  /* surfaces and text */
  --bg: #050806;
  --surface: #0b110d;
  --surface-2: #111a14;
  --line: rgb(255 255 255 / 8%);
  --line-2: rgb(255 255 255 / 15%);
  --line-strong: rgb(255 255 255 / 36%); /* outlines of controls and chips: 3:1 on every surface */
  --text: #eef3ee;
  --heading: #eef3ee;
  --muted: #9bab9f;
  --shadow: rgb(0 0 0 / 50%);

  /* brand */
  --accent: #19c37d;
  --accent-2: #0f7a4d;
  --green: #19c37d;
  --gold: #d9b76a;
  --accent-ink: #19c37d; /* accent used as text */
  --gold-ink: #d9b76a; /* gold used as text */
  --on-accent: #03140b; /* text on primary buttons */
  --danger: #ff9a8f;
  --mask: #000; /* opaque area of a CSS mask (not a visible colour) */

  /* glass, inputs, overlays */
  --glass: rgb(12 19 15 / 58%);
  --glass-2: rgb(8 13 10 / 84%);
  --glass-solid: rgb(12 19 15 / 82%); /* controls over moving content: no backdrop blur needed */
  --input-bg: rgb(255 255 255 / 3.5%);
  --input-border: var(--line-strong);
  --focus-glow: rgb(25 195 125 / 20%);
  --gate-backdrop: rgb(5 8 6 / 72%);
  --dialog-backdrop: rgb(2 4 3 / 84%);
  --dialog-shadow: rgb(0 0 0 / 90%);
  --shadow-lg: 0 40px 100px -40px rgb(0 0 0 / 90%);
  --notice-bg: var(--accent-2);
  --notice-ink: #fff;

  /* buttons */
  --btn-a: #19c37d;
  --btn-b: #44dd9e;
  --btn-shadow: rgb(25 195 125 / 70%);
  --btn-highlight: rgb(255 255 255 / 30%);
  --btn-glow: rgb(255 255 255 / 28%);
  --btn-shine: rgb(255 255 255 / 35%);
  --btn-ghost-ink: var(--text);
  --btn-ghost-bg: var(--glass-solid);
  --btn-ghost-border: var(--line-2);
  --btn-ghost-shadow: none;
  --btn-ghost-shine: rgb(25 195 125 / 18%);

  /* cards, chips, badges, product stage */
  --card-shadow: none;
  --gb-1: rgb(255 255 255 / 22%); /* gradient hairline of cards and panels */
  --gb-2: rgb(255 255 255 / 3%);
  --gb-3: rgb(25 195 125 / 40%);
  --gb-4: rgb(217 183 106 / 45%);
  --plate-ring: rgb(255 255 255 / 10%);
  --card-shine: rgb(255 255 255 / 20%);
  --card-glare: rgb(255 255 255 / 22%);
  --stage-a: #0d1510;
  --stage-b: #050806;
  --floor: rgb(0 0 0 / 70%);
  --plate-shadow: 0 34px 60px -26px rgb(0 0 0 / 85%);
  --chip-bg: rgb(127 127 127 / 4%);
  --chip-border: var(--line-strong);
  --count-bg: rgb(127 127 127 / 14%);
  --count-on-bg: rgb(0 0 0 / 14%);
  --badge-ink: #eef3ee;
  --badge-bg: rgb(5 8 6 / 72%);
  --badge-border: rgb(255 255 255 / 16%);
  --badge-icon: #3fdc9a;
  --badge-new-ink: #1a1405;
  --badge-new-bg: var(--gold);
  --vt-on-bg: rgb(25 195 125 / 10%);
  --vt-on-shadow: rgb(25 195 125 / 70%);
  --icon-stroke: 1.6; /* icon line width, in icon units (24 per icon) */

  /* page background, hero rings, orbit sphere */
  --ambient-1: rgb(25 195 125 / 9%);
  --ambient-2: rgb(217 183 106 / 6%);
  --aurora-1: rgb(25 195 125 / 26%);
  --aurora-2: rgb(15 122 77 / 34%);
  --aurora-3: rgb(217 183 106 / 15%);
  --aurora-4: rgb(68 221 158 / 16%);
  --aurora-5: rgb(176 160 74 / 18%);
  --hero-glow-1: rgb(25 195 125 / 36%);
  --hero-glow-2: rgb(15 122 77 / 14%);
  --ring-a: var(--accent); /* ring gradients: --ring-a → --ring-b */
  --ring-b: var(--gold);
  --ring-faint: var(--text);
  --ring-vector: none; /* the rings' lines scale with them in the dark theme */
  --ring-w-outer: 1.3;
  --ring-w-dots: 0.7;
  --ring-w-inner: 0.6;
  --trail-mid: rgb(25 195 125 / 22%);
  --trail-end: rgb(217 183 106 / 95%);
  --sphere-core: #fff;
  --sphere-mid: #c9f7e2;
  --sphere-edge: #19c37d;
  --sphere-glow-1: rgb(25 195 125 / 85%);
  --sphere-glow-2: rgb(25 195 125 / 35%);
  --sphere-glow-3: rgb(217 183 106 / 20%);
  --wordmark-shine: #fff6d8;
  --decor-hi: rgb(255 255 255 / 45%); /* lines drawn on the drifting ingredient shapes */
  --decor-lo: rgb(0 0 0 / 18%);
  --particle-a: 25 195 125; /* fireflies (canvas): green and gold, as "r g b" */
  --particle-b: 217 183 106;

  /* sections */
  --about-halo: rgb(25 195 125 / 22%);
  --marquee-tint: rgb(25 195 125 / 7%);
  --pillar-icon-bg: rgb(25 195 125 / 6%);
  --tl-node-ring: rgb(25 195 125 / 12%);
  --tl-node-glow: rgb(25 195 125 / 65%);
  --map-tint: rgb(25 195 125 / 14%);
  --map-dot-ring: rgb(25 195 125 / 25%);
  --map-dot-glow: rgb(25 195 125 / 90%);
  --glow-strength: 1;
  --grain: 0.075;
  --noise: url("../assets/images/sections/grain-light-on-dark.svg");
  --theme-color: #050806; /* browser UI colour (meta theme-color) */

  /* theme switch leaf (js/leaf-fx.js): olive green with a gold tint */
  --leaf-a: #9bbf3a;
  --leaf-b: #5f7a1c;
  --leaf-c: #d9b76a;
  --leaf-vein: rgb(255 246 216 / 55%);

  /* floating contact button: the same in both themes (unchanged design) */
  --fab-a: #19c37d;
  --fab-b: #44dd9e;
  --fab-ink: #03140b;
  --fab-ring: #19c37d;
  --fab-shadow: rgb(25 195 125 / 75%);
  --fab-link-shadow: rgb(0 0 0 / 60%);

  color-scheme: dark;
}

/* ---------------------------------------------------------------- 2. light theme: warm white, near-black olive, dark gold */
:root[data-theme="light"] {
  --bg: #f7f8f1;
  --surface: #fff;
  --surface-2: #e9edda;
  --line: rgb(15 23 7 / 18%);
  --line-2: rgb(15 23 7 / 26%);
  --line-strong: rgb(15 23 7 / 50%);
  --text: #0f1707;
  --heading: #0b1205;
  --muted: #3f4a2c;
  --shadow: rgb(15 23 7 / 16%);
  --accent: #4a5c12;
  --accent-2: #2f3b0a;
  --green: #1f6b42;
  --gold: #7a5a12;
  --accent-ink: #4a5c12;
  --gold-ink: #7a5a12;
  --on-accent: #fffdf5;
  --danger: #a31f14;
  --glass: rgb(255 255 255 / 72%);
  --glass-2: rgb(247 248 241 / 94%);
  --glass-solid: rgb(255 255 255 / 90%);
  --input-bg: #fff;
  --focus-glow: rgb(74 92 18 / 22%);
  --gate-backdrop: rgb(247 248 241 / 82%);
  --dialog-backdrop: rgb(15 23 7 / 45%);
  --dialog-shadow: rgb(15 23 7 / 35%);
  --shadow-lg: 0 40px 90px -45px rgb(15 23 7 / 40%);
  --notice-bg: var(--accent-2);
  --notice-ink: #fffdf5;
  --btn-a: var(--accent-2); /* solid primary buttons */
  --btn-b: var(--accent-2);
  --btn-shadow: rgb(15 23 7 / 35%);
  --btn-highlight: rgb(255 255 255 / 16%);
  --btn-glow: rgb(255 255 255 / 20%);
  --btn-shine: rgb(255 255 255 / 28%);
  --btn-ghost-ink: var(--accent-2);
  --btn-ghost-bg: var(--surface-2);
  --btn-ghost-border: transparent;
  --btn-ghost-shadow: 0 10px 24px -12px rgb(15 23 7 / 35%), inset 0 1px 0 rgb(255 255 255 / 80%);
  --btn-ghost-shine: rgb(74 92 18 / 16%);
  --card-shadow: 0 10px 30px var(--shadow), inset 0 1px 0 rgb(255 255 255 / 85%); /* reads as a shape, no hard line */
  --gb-1: rgb(15 23 7 / 10%);
  --gb-2: rgb(15 23 7 / 4%);
  --gb-3: rgb(31 107 66 / 45%);
  --gb-4: rgb(122 90 18 / 60%);
  --plate-ring: rgb(15 23 7 / 10%);
  --card-shine: rgb(255 255 255 / 45%);
  --card-glare: rgb(255 255 255 / 40%);
  --stage-a: #eef1e2;
  --stage-b: #dde4c8;
  --floor: rgb(15 23 7 / 38%);
  --plate-shadow: 0 30px 50px -26px rgb(15 23 7 / 45%);
  --chip-bg: var(--surface-2);
  --count-bg: rgb(15 23 7 / 10%);
  --count-on-bg: rgb(0 0 0 / 18%);
  --badge-ink: #0f1707;
  --badge-bg: rgb(233 237 218 / 95%);
  --badge-border: rgb(15 23 7 / 22%);
  --badge-icon: var(--green);
  --badge-new-ink: #fffdf5;
  --badge-new-bg: #7a5a12;
  --vt-on-bg: rgb(74 92 18 / 12%);
  --vt-on-shadow: rgb(15 23 7 / 30%);
  --icon-stroke: 2.2;
  --ambient-1: rgb(31 107 66 / 9%);
  --ambient-2: rgb(122 90 18 / 8%);
  --aurora-1: rgb(31 107 66 / 14%);
  --aurora-2: rgb(74 92 18 / 14%);
  --aurora-3: rgb(122 90 18 / 12%);
  --aurora-4: rgb(31 107 66 / 10%);
  --aurora-5: rgb(110 120 40 / 12%);
  --hero-glow-1: rgb(31 107 66 / 22%);
  --hero-glow-2: rgb(122 90 18 / 10%);
  --ring-a: var(--accent-2); /* dark olive → dark gold, never light gold on white */
  --ring-b: var(--gold);
  --ring-faint: var(--accent-2);
  --ring-vector: non-scaling-stroke; /* fixed line widths in px, clearly visible at every ring size */
  --ring-w-outer: 2px;
  --ring-w-dots: 1.75px;
  --ring-w-inner: 1.75px;
  --trail-mid: rgb(31 107 66 / 30%);
  --trail-end: rgb(122 90 18 / 90%);
  --sphere-core: #fbfaf0;
  --sphere-mid: #a3b85a;
  --sphere-edge: #3d4d10;
  --sphere-glow-1: rgb(47 59 10 / 55%);
  --sphere-glow-2: rgb(31 107 66 / 25%);
  --sphere-glow-3: rgb(122 90 18 / 18%);
  --wordmark-shine: #fff6d8;
  --particle-a: 31 107 66;
  --particle-b: 122 90 18;
  --about-halo: rgb(31 107 66 / 14%);
  --marquee-tint: rgb(74 92 18 / 8%);
  --pillar-icon-bg: rgb(74 92 18 / 10%);
  --tl-node-ring: rgb(31 107 66 / 15%);
  --tl-node-glow: rgb(31 107 66 / 45%);
  --map-tint: rgb(31 107 66 / 12%);
  --map-dot-ring: rgb(31 107 66 / 28%);
  --map-dot-glow: rgb(31 107 66 / 60%);
  --glow-strength: 0.6;
  --grain: 0.05;
  --noise: url("../assets/images/sections/grain-dark-on-light.svg");
  --theme-color: #f7f8f1;
  --leaf-a: #4f7a2a;
  --leaf-b: #1f4a1c;
  --leaf-c: #7a5a12;
  --leaf-vein: rgb(255 253 245 / 60%);
  --fab-a: #0f7a4d;
  --fab-b: #0b6640;
  --fab-ink: #fff;
  --fab-ring: #0f7a4d;

  color-scheme: light;
}

/* ---------------------------------------------------------------- 3. content colours, taken from the product photos
   --cat-<category id>: the page tint while that category is in view. --glow-<product id>: the halo behind a product. */
:root {
  --cat-soap: #1fa35b;
  --cat-shampoo: #e0a800;
  --cat-hair: #b98b5e;
  --cat-shower: #d6335f;
  --cat-face: #ff9a1a;
  --cat-skin: #d4af37;
  --cat-body: #b6a15a;
  --glow-01: #1fa35b;
  --glow-02: #8f9b2a;
  --glow-03: #ff8c1a;
  --glow-04: #f5c518;
  --glow-05: #f0a830;
  --glow-06: #ec7a3a;
  --glow-07: #4f8a3a;
  --glow-08: #e0a800;
  --glow-09: #2fbf71;
  --glow-10: #d38a1c;
  --glow-11: #8a4a1c;
  --glow-12: #b98b5e;
  --glow-13: #d9a441;
  --glow-14: #8e44ad;
  --glow-15: #b7b21f;
  --glow-16: #3fae3a;
  --glow-17: #9ccc3a;
  --glow-18: #e6a58d;
  --glow-19: #d6335f;
  --glow-20: #ff6b57;
  --glow-21: #f2c230;
  --glow-22: #d8a46a;
  --glow-23: #ff9a1a;
  --glow-24: #e3b23c;
  --glow-25: #d4af37;
  --glow-26: #e6cf8a;
  --glow-27: #a8415e;
  --glow-28: #e68a2e;
  --glow-29: #d2693a;
  --glow-30: #cfd6dc;
  --glow-31: #e0b48f;
  --glow-32: #d6336c;
  --glow-33: #f2c230;
  --glow-34: #b6a15a;
}

/* ---------------------------------------------------------------- 4. type, layout, motion */
:root {
  --f-display: "Cormorant Garamond", "Tajawal", georgia, "Times New Roman", serif;
  --f-body: "Tajawal", system-ui, -apple-system, "Segoe UI", tahoma, arial, sans-serif;

  /* one fluid type scale */
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.05rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.95rem);
  --step-3: clamp(1.85rem, 1.5rem + 1.8vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.8rem + 3.2vw, 4.4rem);
  --step-5: clamp(3rem, 2rem + 5vw, 6.5rem);

  /* layout */
  --section: clamp(5rem, 3.4rem + 7vw, 10rem);
  --gutter: clamp(1rem, 0.55rem + 2vw, 2.5rem);
  --maxw: 1320px;
  --r-m: 20px;
  --r-l: 28px;
  --header-h: 68px;

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1); /* expo-out */
  --ease-2: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-reveal: cubic-bezier(0.22, 1, 0.36, 1); /* every reveal: fade + small rise, once */
  --dur-reveal: 700ms;
  --rise: 24px;
}
