/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * Copyright © 2026 Marcel Rymenhout and IniqDash contributors */
/* ==========================================================================
   IniqDash — design tokens: the DEFAULT IniqDash DARK THEME (first-pass visual system).
   Every component reads these; a future theme only redefines them (see components/theme/theme.js: the colour
   tokens listed there are the ones a theme may set). Direction: premium dark smart-home interface — near-black
   application, charcoal surfaces, subtle borders, warm orange as the one primary accent, functional colours
   for meaning only. Names are stable: older names stay, the --iq-* names are the semantic layer built on them.
   ========================================================================== */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Inter (SIL OFL 1.1, assets/fonts/inter/OFL.txt) — the Simplicity themes' font ("look.font": "inter"); variable weight 100–900 */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Poppins (SIL OFL 1.1, assets/fonts/poppins/OFL.txt) — a theme font choice ("look.font": "poppins") and a Studio text font */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins/poppins-latin-700-normal.woff2") format("woff2"); }
:root {
  /* application + surfaces (the hierarchy: app → navigation → surface → elevated → interactive → active) */
  --page-bg: #0b0b0d;                  /* app: near-black */
  --page-bg-darker: #070708;           /* dashboard backdrop presets (editor: dashboard settings) */
  --page-bg-lighter: #131316;
  --nav-bg: #0e0e10;                   /* navigation: a step above the app, still quiet */
  --surface-primary: #17171a;          /* widget / card: dark charcoal */
  --surface-primary-top: #1d1d21;      /* top of the primary gradient (very subtle) */
  --surface-secondary: #111113;        /* inset: sits below its parent */
  --surface-tertiary: #242428;         /* elevated internal controls: icon wells, chips */
  --surface-interactive: #2b2b30;      /* hover / pressed controls */
  --surface-active: var(--accent-soft);

  /* edges */
  --border-primary: rgba(255, 255, 255, .08);
  --border-subtle: rgba(255, 255, 255, .045);
  --edge-highlight: rgba(255, 255, 255, .06);    /* 1px light catch on the top edge */

  /* text: soft white, cool neutral grey, darker neutral grey */
  --text-primary: #f1f1f3;
  --text-secondary: #a9aab3;
  --text-muted: #878891;

  /* the one primary accent: warm orange (active controls, selected navigation, heating, identity) */
  --accent: #ff7a1a;
  --accent-hot: #ff5a14;
  --accent-on: #1a0e04;                /* text / icon on an accent fill */
  --accent-soft: rgba(255, 122, 26, .16);
  --accent-line: rgba(255, 122, 26, .38);

  /* functional colours: meaning, never decoration */
  --success: #34d17c;                  /* healthy · available · home · positive · battery / energy */
  --warning: #ffc233;                  /* attention · solar · warm light */
  --danger: #ff4d4f;                   /* alarm · critical · destructive */
  --info: #3ba7ff;                     /* selected informational states · water */
  --cool: #38c9ee;                     /* cooling · cold */
  --purple: #a88bff;                   /* selective: media · timer · secondary information */
  --solar: #ffc233;
  --neutral: #6f707a;                  /* idle · disabled · unavailable */
  --light-warm: #ffb347;               /* emitted light (glow, beam, fill) */
  --light-hot: #fff0d2;                /* the bulb itself */
  --heat-warm: #ff8a2a;                /* heating: arc start, glow */
  --heat-hot: #ff4a1c;                 /* heating: arc end */

  /* depth: restrained, no glow on every card */
  --shadow-primary: 0 1px 0 var(--edge-highlight) inset, 0 14px 30px -18px rgba(0, 0, 0, .85), 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-secondary: 0 1px 3px rgba(0, 0, 0, .5) inset, 0 0 0 1px var(--border-subtle);
  --shadow-icon: 0 2px 4px rgba(0, 0, 0, .5) inset;

  /* device widgets: shared surfaces */
  --device-surface-top: #1e1e22;              /* the card gradient's three stops (theme tokens — the same colours as always) */
  --device-surface-mid: #17171a;
  --device-surface-bottom: #131315;
  --device-surface:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .03), transparent 60%),
    linear-gradient(165deg, var(--device-surface-top) 0%, var(--device-surface-mid) 55%, var(--device-surface-bottom) 100%);
  --card-border: rgba(255, 255, 255, .04);    /* the device card's fine border (theme token — the same colour as always) */
  --device-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    inset 0 0 0 1px var(--card-border),
    0 12px 26px -16px rgba(0, 0, 0, .85);
  --control-well: #0d0d0f;                    /* recessed tracks, wells and segment backgrounds */
  --control-well-shadow: inset 0 2px 5px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .045);
  --control-raised: linear-gradient(180deg, #38383e, #26262b);   /* raised knobs / selected segments */

  /* interaction */
  --focus-ring: 2px solid var(--focus, var(--accent));      /* use as: outline: var(--focus-ring); outline-offset per control */
  --disabled-opacity: .4;                     /* a control that cannot be used right now */
  --unavailable-opacity: .45;                 /* device artwork/visual of an unavailable device */
  --hit-min: 40px;                            /* minimum effective touch/click target */

  /* motion */
  --dur-press: .12s;                          /* press feedback */
  --dur-fast: .2s;
  --dur-medium: .3s;                          /* most state transitions */
  --dur-slow: .4s;                            /* surface / glow changes */
  --ease: ease;

  /* radius: rounded throughout, never everything a pill */
  --radius-xs: 8px;                    /* chips, small controls */
  --radius-sm: 10px;
  --radius-md: 12px;                   /* buttons, inputs */
  --radius-lg: 16px;                   /* large controls, inner panels */
  --radius-xl: 22px;                   /* dialogs and large surfaces */
  --radius-container: 20px;
  --radius-subcontainer: 16px;
  --radius-widget: 14px;               /* the widget card family: 14–16 px */
  --radius-device: 16px;               /* device widgets */
  --radius-pill: 999px;

  /* spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 14px;
  --space-lg: 20px;
  --space-xl: 28px;

  /* type: Manrope (OFL, assets/fonts) with a robust system fallback */
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-title: 17px;
  --fs-title-secondary: 14.5px;
  --fs-subtitle: 12px;
  --fs-status: 11.5px;
  --fs-body: 13px;
  /* semantic roles (weight carries the hierarchy, not huge size jumps) */
  --iq-fw-display: 700;                /* display / value */
  --iq-fw-title: 700;                  /* widget title */
  --iq-fw-subtitle: 500;               /* context / location · secondary information · units */
  --iq-fw-body: 500;
  --iq-fw-control: 700;                /* control label */
  --iq-fw-status: 600;
  --iq-fw-caption: 600;
  --iq-fs-caption: 11.5px;             /* the legibility floor for any caption */
  --iq-fs-micro: 11px;                 /* the floor for any text, even at micro size */
  --iq-ls-caps: .06em;                 /* the rare uppercase caption (never body text) */

  /* sizes */
  --icon-size: 42px;
  --icon-size-secondary: 32px;

  /* semantic aliases (the names new CSS should use; they follow the values above, so a theme only has to set the base tokens) */
  --iq-bg-app: var(--page-bg);
  --iq-bg-nav: var(--nav-bg);
  --iq-surface: var(--surface-primary);
  --iq-surface-elevated: var(--surface-tertiary);
  --iq-surface-interactive: var(--surface-interactive);
  --iq-surface-active: var(--accent-soft);
  --iq-border: var(--border-primary);
  --iq-text: var(--text-primary);
  --iq-text-2: var(--text-secondary);
  --iq-text-muted: var(--text-muted);
  --iq-accent: var(--accent);
  --iq-state-ok: var(--success);
  --iq-state-warn: var(--warning);
  --iq-state-danger: var(--danger);
  --iq-state-cool: var(--cool);
  --iq-state-heat: var(--heat-warm);
  --iq-state-idle: var(--neutral);

  /* dashboard grid (components/grid) */
  --grid-row: 40px;                 /* base row unit: h = n rows → n × 40px + (n − 1) × gap */
  --grid-gap: 16px;                 /* desktop + tablet gap (columns and rows) */
  --grid-gap-compact: 12px;         /* mobile gap, and every nested grid */

  color-scheme: dark;
}
