/**
 * Delytt Hire Design Tokens
 * Source of truth extracted from the onboarding reference UI.
 * Load this file before hire.css / marketplace-v2.css / area CSS.
 *
 * Surfaces:
 *   Core      — shared product chrome (header, forms, panels, CTAs)
 *   Marketplace (.mk) — browse / detail
 *   Customer  (.hire-*) — bookings / inbox
 *   Owner     (.ol-*) — inventory
 *   Ops       (.op-*) — control operations
 */

:root {
  color-scheme: light;

  /* ── Brand / color ─────────────────────────────────────────── */
  --dh-canvas: #f4f7fc;
  --dh-white: #ffffff;
  --dh-ink: #101f37;
  --dh-ink-soft: #11233b;
  --dh-muted: #52647d;
  --dh-muted-soft: #516274;
  --dh-line: #dce5f2;
  --dh-line-soft: #dce3e9;
  --dh-blue: #285dc1;
  --dh-blue-hover: #194ba8;
  --dh-brand: #2158bd;
  --dh-brand-hover: #194797;
  --dh-dark: #173e90;
  --dh-sky: #5b8bef;
  --dh-tint: #eaf1fe;
  --dh-hero: #112844;
  --dh-cat-selected: #142b46;

  --dh-good: #136753;
  --dh-good-bg: #e2f5ee;
  --dh-warn: #87500d;
  --dh-warn-bg: #fff2dc;
  --dh-bad: #9c2c31;
  --dh-bad-bg: #fff0f1;

  /* Legacy aliases used across hire.css / portals */
  --canvas: var(--dh-canvas);
  --white: var(--dh-white);
  --ink: var(--dh-ink);
  --muted: var(--dh-muted);
  --line: var(--dh-line);
  --blue: var(--dh-blue);
  --dark: var(--dh-dark);
  --sky: var(--dh-sky);
  --tint: var(--dh-tint);
  --good: var(--dh-good);
  --goodbg: var(--dh-good-bg);
  --warn: var(--dh-warn);
  --warnbg: var(--dh-warn-bg);
  --bad: var(--dh-bad);
  --badbg: var(--dh-bad-bg);

  /* Marketplace aliases */
  --mk-ink: var(--dh-ink-soft);
  --mk-muted: var(--dh-muted-soft);
  --mk-border: var(--dh-line-soft);
  --mk-brand: var(--dh-brand);
  --mk-surface: var(--dh-white);
  --mk-r: 18px;

  /* ── Typography ────────────────────────────────────────────── */
  --dh-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --dh-font-size-base: 16px;
  --dh-line-height-base: 1.5;
  --dh-tracking-tight: -0.035em;
  --dh-tracking-display: -0.05em;

  /* Type scale (rem @ 16px root) */
  --dh-text-xs: 0.75rem;      /* 12px — captions, mobile cats */
  --dh-text-2xs: 0.78rem;     /* ~12.5px — pills, tags */
  --dh-text-sm: 0.83rem;      /* ~13.3px — small / meta */
  --dh-text-sm-plus: 0.86rem; /* ~13.8px — field labels, locale */
  --dh-text-md: 0.91rem;      /* ~14.6px — nav, category chips */
  --dh-text-body: 0.93rem;    /* ~14.9px — buttons, nav items */
  --dh-text-base: 1rem;       /* 16px — body / inputs */
  --dh-text-lg: 1.14rem;      /* ~18.2px — h3 default / price strong */
  --dh-text-card: 1.28rem;    /* ~20.5px — listing card titles */
  --dh-text-xl: 1.35rem;      /* ~21.6px — detail section h2 */
  --dh-text-2xl: clamp(1.5rem, 2.5vw, 2rem);           /* section h2 */
  --dh-text-3xl: clamp(1.95rem, 4vw, 3.05rem);         /* page h1 */
  --dh-text-4xl: clamp(2.15rem, 4.8vw, 3.55rem);       /* core h1 */
  --dh-text-hero: clamp(2.2rem, 4vw, 4rem);            /* marketplace hero */
  --dh-text-detail: clamp(2rem, 4vw, 3.25rem);         /* listing detail h1 */

  /* Font weights used in the reference (variable Inter) */
  --dh-weight-regular: 400;
  --dh-weight-book: 450;
  --dh-weight-medium: 550;
  --dh-weight-semi: 590;
  --dh-weight-semi-plus: 610;
  --dh-weight-semibold: 650;
  --dh-weight-bold: 670;
  --dh-weight-extrabold: 680;
  --dh-weight-black: 760;

  font-family: var(--dh-font);

  /* ── Spacing (section / layout) ────────────────────────────── */
  --dh-space-1: 4px;
  --dh-space-2: 7px;
  --dh-space-3: 8px;
  --dh-space-4: 10px;
  --dh-space-5: 12px;
  --dh-space-6: 14px;
  --dh-space-7: 16px;
  --dh-space-8: 18px;
  --dh-space-9: 22px;
  --dh-space-10: 24px;
  --dh-space-11: 30px;
  --dh-space-12: 34px;
  --dh-space-13: 36px;

  --dh-shell-max: 1264px;
  --dh-market-max: 1440px;
  --dh-portal-max: 1376px;
  --dh-form-max: 560px;
  --dh-wizard-max: 1090px;

  --dh-shell-pad-x: 34px;
  --dh-shell-pad-y: 36px;
  --dh-market-pad: 22px clamp(20px, 4.3vw, 66px) 40px;
  --dh-header-min: 78px;
  --dh-header-pad: 12px clamp(20px, 4.3vw, 66px);

  /* ── Radii ─────────────────────────────────────────────────── */
  --dh-radius-xs: 7px;
  --dh-radius-sm: 10px;
  --dh-radius-md: 11px;
  --dh-radius-input: 11px;
  --dh-radius-btn: 12px;
  --dh-radius-chip: 22px;
  --dh-radius-pill: 24px;
  --dh-radius-search: 17px;
  --dh-radius-card: 18px;
  --dh-radius-panel: 22px;
  --dh-radius-hero: 24px;
  --dh-radius-landing: 30px;
  --dh-radius-full: 999px;
  --radius: var(--dh-radius-panel);

  /* ── Elevation ─────────────────────────────────────────────── */
  --dh-shadow: 0 12px 34px #1735600c;
  --dh-shadow-search: 0 4px 15px #233b5810;
  --dh-shadow-card: 0 2px 7px #15203308;
  --dh-shadow-card-hover: 0 6px 20px #182e4512;
  --dh-shadow-btn: 0 4px 10px #2657b529;
  --dh-shadow-reserve: 0 8px 28px #182e4510;
  --shadow: var(--dh-shadow);

  /* ── Controls ──────────────────────────────────────────────── */
  --dh-control-h: 46px;
  --dh-control-h-sm: 43px;
  --dh-control-h-xs: 39px;
  --dh-input-h: 47px;
  --dh-touch-min: 44px;
  --dh-focus-ring: 3px solid #5e92fc;
  --dh-focus-offset: 3px;
  --dh-focus-mk: 3px solid #3377d5;

  /* ── Breakpoints (documented; use in @media) ───────────────── */
  /* mobile-sm: 360 / 365 / 370 / 375 */
  /* mobile: 640 / 690 */
  /* tablet: 770 / 780 / 800 / 900 / 920 / 940 */
  /* desktop: 1000 / 1030 / 1050 */
  /* wide: 1440 / 1550 */
}

/* Marketplace surface defaults when .mk is present.
   Keep --blue as core CTA blue (#285dc1) so header .primary matches the reference. */
body:has(.mk) {
  --ink: var(--dh-ink-soft);
  --muted: var(--dh-muted-soft);
  --line: var(--dh-line-soft);
}
