/* ============================================================
   YAMAS HUB — design tokens extracted from the iOS app
   Source of truth: branch `mac-catalyst`
     · Theme.swift        — brand palette (Color.ym*)
     · HomeDesign.swift   — navy canvas, glass material, press springs
     · HomeView.swift     — home-tile accent tints + icons
     · MainTabView.swift  — tab set, gold tint, dark-only color scheme
   The app runs .preferredColorScheme(.dark) app-wide ("Aegean" navy
   theme, no light mode) — so these tokens describe ONE palette, not a
   light/dark pair. Load this file BEFORE page-level styles so pages
   can still override locally.
   ============================================================ */
:root {
  /* ---- Brand palette (Theme.swift, names match the app) ---- */
  --ym-navy:      #0F3358;   /* Color.ymNavy  */
  --ym-blue:      #1B4F8C;   /* Color.ymBlue  */
  --ym-gold:      #C9A961;   /* Color.ymGold  */
  --ym-cream:     #FAF6EE;   /* Color.ymCream */
  --ym-taupe:     #6B6358;   /* Color.ymTaupe */
  --ym-tan:       #D9D2C2;   /* Color.ymTan   */
  --ym-terra:     #C45A3D;   /* Color.ymTerra */
  --ym-line:      #E7E0D2;   /* Color.ymLine  */
  --ym-ink:       #1F1F1F;   /* Color.ymInk   */

  /* ---- Dark-canvas surfaces (HomeDesign.swift) ---- */
  --ym-navy-deep: #081E33;                    /* Color.ymNavyDeep — gradient bottom */
  --ym-panel:     rgb(255 255 255 / 0.08);    /* Color.ymPanel — rows/received bubbles */
  --ym-sent:      #2E6FB7;                    /* Color.ymSent — sent-bubble blue */
  --ym-on-navy2:  rgb(255 255 255 / 0.62);    /* Color.ymOnNavy2 — secondary text */

  /* The NavyCanvas: vertical navy gradient + faint warm glow near the top
     (RadialGradient gold 16% at x .5 y .12, radius 360) */
  --ym-canvas:
    radial-gradient(360px 360px at 50% 12%, rgb(201 169 97 / 0.16), transparent 70%),
    linear-gradient(180deg, var(--ym-navy) 0%, var(--ym-navy-deep) 100%);

  /* ---- Home-tile accent tints (HomeView.swift icon-chip colors) ---- */
  --ym-acc-gold:   #C9A961;  /* Training, Tonight's huddle */
  --ym-acc-teal:   #49B3A6;  /* Documents, Projects & Tasks */
  --ym-acc-blue:   #5AA9E6;  /* Open & Close, Tracker, Location Mgmt */
  --ym-acc-green:  #5FC27E;  /* Progress, Time Clock, Financial Mgmt */
  --ym-acc-purple: #9B8CFF;  /* Personnel Mgmt, Maintenance */
  --ym-acc-amber:  #E0A24A;  /* Leads, Recipe Book, Publishing */
  --ym-acc-rust:   #C4663D;  /* Close-out */
  --ym-acc-coral:  #E07A5F;  /* Catering & Events */
  --ym-acc-aqua:   #7BD0C1;  /* Feedback & Forms, Patterns to watch */
  --ym-acc-red:    #E0584A;  /* Report a Problem */
  --ym-acc-cyan:   #4FB0C6;
  --ym-acc-copper: #CB7A45;
  --ym-acc-green2: #2F9E4F;
  --ym-acc-indigo: #6E8BFF;

  /* ---- Glass material (GlassCard / interactiveGlass) ----
     iOS recipe: ultraThinMaterial (≈ blur + saturate) over a diagonal
     tint wash (tint 45% → 14%), top-bright rim hairline (white 38% → 5%),
     drop shadow black 30% r14 y10. */
  --glass-blur:      18px;
  --glass-saturate:  1.6;
  --glass-tint:      rgb(22 54 94 / 0.50);          /* navy panel glass */
  --glass-tint-2:    rgb(10 28 50 / 0.40);
  --glass-fill:      linear-gradient(160deg, var(--glass-tint), var(--glass-tint-2));
  --glass-rim-hi:    rgb(255 255 255 / 0.38);        /* GlassCard rim top */
  --glass-rim-lo:    rgb(255 255 255 / 0.05);        /* GlassCard rim bottom */
  --glass-hairline:  rgb(255 255 255 / 0.14);
  --glass-shadow:    0 10px 28px rgb(0 0 0 / 0.30);  /* .shadow(black .30, r14, y10) */
  --glass-wash-hi:   0.45;                            /* tint wash opacities (diagonal) */
  --glass-wash-lo:   0.14;

  /* ---- Radii (cornerRadius tally across Sources) ---- */
  --r-field: 10px;   /* inputs, small chips        (10–12 most common) */
  --r-panel: 14px;   /* panels, pickers, form rows */
  --r-tile:  16px;   /* home launcher tiles (glassCard cornerRadius: 16) */
  --r-card:  20px;   /* large cards (glassCard cornerRadius: 20)  */
  --r-sheet: 22px;   /* GlassCard default / sheets */
  --r-pill:  999px;

  /* ---- Press / motion (PressableCard spring: response .3, damping .55) ---- */
  --press-scale: 0.96;
  --press-spring: 300ms cubic-bezier(0.2, 0.9, 0.3, 1.2);

  /* ---- Type scale (SwiftUI Dynamic Type @ Large; app usage order:
          subheadline > caption > caption2 > headline > title3) ---- */
  --fs-large-title: 34px;
  --fs-title:       28px;
  --fs-title2:      22px;
  --fs-title3:      20px;
  --fs-headline:    17px;   /* weight 600 */
  --fs-body:        17px;
  --fs-callout:     16px;
  --fs-subheadline: 15px;
  --fs-footnote:    13px;
  --fs-caption:     12px;
  --fs-caption2:    11px;

  /* ---- Font (San Francisco on Apple devices — matches the app) ---- */
  --ym-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
             system-ui, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
