/* Banyano — design tokens · palette: Isfahan Tile (کاشی اصفهان)
   Light is the default. Dark follows the OS, and can be forced with
   <html data-theme="dark"> or <html data-theme="light">.            */

/* ---------- Fonts (paths are relative to this file) ---------- */
@font-face { font-family: "Samim"; src: url("../fonts/samim/Samim.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Samim"; src: url("../fonts/samim/Samim-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Samim"; src: url("../fonts/samim/Samim-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
/* Same font, but every digit is drawn as a Persian digit (۰۱۲۳…). Use for prices and tables. */
@font-face { font-family: "Samim FD"; src: url("../fonts/samim/Samim-FD.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Samim FD"; src: url("../fonts/samim/Samim-Medium-FD.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Samim FD"; src: url("../fonts/samim/Samim-Bold-FD.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope/manrope-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope/manrope-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope/manrope-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope/manrope-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope/manrope-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  /* Raw palette — use the semantic tokens below in components */
  --bny-lapis: #1F3A6D;      /* لاجورد  brand */
  --bny-lapis-deep: #172C54;
  --bny-firuzeh: #2A8C87;    /* فیروزه  accent (fills, focus) */
  --bny-saffron: #D9A030;    /* زعفران  highlight (fills only) */
  --bny-kahgel: #F3EDE1;     /* کاهگل   page */
  --bny-plaster: #FBF8F2;    /* گچ      surface */
  --bny-cream: #EFE9DD;      /* logo and text on dark */
  --bny-night: #0F1626;      /* شب لاجوردی  dark page */

  /* Type */
  --bny-font-fa: "Samim", "Manrope", Tahoma, sans-serif;
  --bny-font-fa-numeric: "Samim FD", "Samim", Tahoma, sans-serif;
  --bny-font-en: "Manrope", "Samim", system-ui, sans-serif;

  /* Shape */
  --bny-radius-sm: 8px;
  --bny-radius-md: 12px;
  --bny-radius-lg: 20px;
  --bny-radius-pill: 999px;

  /* ---------- Light theme (default) ---------- */
  color-scheme: light;
  --bny-bg: #F3EDE1;
  --bny-surface: #FBF8F2;
  --bny-surface-2: #EDE5D6;
  --bny-line: #E2D8C6;
  --bny-line-strong: #D3C8B4;
  --bny-text: #1B1915;           /* 15:1 on bg */
  --bny-text-muted: #5E574C;     /* 6.1:1 on bg */
  --bny-logo: #1F3A6D;           /* the logo is always one colour */
  --bny-primary: #1F3A6D;        /* buttons, links, active nav */
  --bny-primary-hover: #172C54;
  --bny-on-primary: #FBF8F2;
  --bny-accent: #2A8C87;         /* non-text: focus ring, badges, chart */
  --bny-accent-text: #1F6F6A;    /* turquoise when used as text, 5.1:1 */
  --bny-highlight: #D9A030;      /* non-text only: markers, underlines */
  --bny-focus: #2A8C87;
  --bny-up: #2A7349;             /* market up, 4.9:1 */
  --bny-down: #B23A2E;           /* market down, 5.1:1 */
  --bny-up-bg: #E1EDE3;
  --bny-down-bg: #F5E2DE;
  --bny-series-1: #1F3A6D;
  --bny-series-2: #2A8C87;
  --bny-series-3: #D9A030;
  --bny-series-4: #A65A3A;
  /* url() in a custom property resolves against the stylesheet that uses it: assets/css/landing.css. */
  --bny-pattern: url("../brand/pattern/banyano-lattice-light.svg");
}

/* ---------- Dark theme ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bny-bg: #0F1626;
    --bny-surface: #172238;
    --bny-surface-2: #1D2A44;
    --bny-line: #26324D;
    --bny-line-strong: #34425F;
    --bny-text: #EFE9DD;
    --bny-text-muted: #A9B0BF;
    --bny-logo: #EFE9DD;
    --bny-primary: #8EA9DE;
    --bny-primary-hover: #A9BFE8;
    --bny-on-primary: #0F1626;
    --bny-accent: #4FB8B1;
    --bny-accent-text: #5CC2BB;
    --bny-highlight: #E2B04A;
    --bny-focus: #5CC2BB;
    --bny-up: #6CC892;
    --bny-down: #F28B7B;
    --bny-up-bg: #16302A;
    --bny-down-bg: #3A1F24;
    --bny-series-1: #8EA9DE;
    --bny-series-2: #4FB8B1;
    --bny-series-3: #E2B04A;
    --bny-series-4: #D98B66;
    --bny-pattern: url("../brand/pattern/banyano-lattice-dark.svg");
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bny-bg: #0F1626;
  --bny-surface: #172238;
  --bny-surface-2: #1D2A44;
  --bny-line: #26324D;
  --bny-line-strong: #34425F;
  --bny-text: #EFE9DD;
  --bny-text-muted: #A9B0BF;
  --bny-logo: #EFE9DD;
  --bny-primary: #8EA9DE;
  --bny-primary-hover: #A9BFE8;
  --bny-on-primary: #0F1626;
  --bny-accent: #4FB8B1;
  --bny-accent-text: #5CC2BB;
  --bny-highlight: #E2B04A;
  --bny-focus: #5CC2BB;
  --bny-up: #6CC892;
  --bny-down: #F28B7B;
  --bny-up-bg: #16302A;
  --bny-down-bg: #3A1F24;
  --bny-series-1: #8EA9DE;
  --bny-series-2: #4FB8B1;
  --bny-series-3: #E2B04A;
  --bny-series-4: #D98B66;
  --bny-pattern: url("../brand/pattern/banyano-lattice-dark.svg");
}

/* ---------- Minimal base (optional — delete if your framework has its own) ---------- */
html { background: var(--bny-bg); color: var(--bny-text); font-family: var(--bny-font-fa); }
:lang(en), .bny-en { font-family: var(--bny-font-en); }
.bny-num { font-family: var(--bny-font-fa-numeric); font-variant-numeric: tabular-nums; }
.bny-up { color: var(--bny-up); }
.bny-down { color: var(--bny-down); }
.bny-logo { color: var(--bny-logo); display: inline-block; line-height: 0; }
:focus-visible { outline: 2px solid var(--bny-focus); outline-offset: 2px; }
