/* ============================================================
   illuno — Core tokens
   Colors, type, spacing, radii, shadows
   Extracted from Figma "UI/FINAL-UI-Mar-5" (officer mobile app)
   and the illuno wordmark. Confirmed by user: source of truth.
   ============================================================ */

/* ---- Suisse Screen — primary typeface ---- */
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-Thin.woff2") format("woff2");        font-weight: 100; font-style: normal;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-ThinItalic.woff2") format("woff2");  font-weight: 100; font-style: italic;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-Light.woff2") format("woff2");       font-weight: 300; font-style: normal;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-Regular.woff2") format("woff2");     font-weight: 400; font-style: normal;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-Medium.woff2") format("woff2");      font-weight: 500; font-style: normal;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-SemiBold.woff2") format("woff2");    font-weight: 600; font-style: normal;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-SemiBoldItalic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-Bold.woff2") format("woff2");        font-weight: 700; font-style: normal;  font-display: swap; }
@font-face { font-family: "Suisse Screen"; src: url("../fonts/SuisseScreen-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic;  font-display: swap; }

/* JetBrains Mono — code snippets, IDs, timestamps */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  /* ============ Brand — Navy ============
     Anchored in the app header (#032638) and the logo bar (#2E415C).
     Navy is the primary brand color for product and marketing.
  */
  --navy-950: #021721;
  --navy-900: #032638;   /* OFFICIAL — app header, primary surfaces */
  --navy-800: #0F2235;   /* hover / pressed navy */
  --navy-700: #1B2737;   /* secondary dark navy */
  --navy-600: #24344A;
  --navy-500: #2E415C;   /* logo bar color */
  --navy-400: #4A5F7F;
  --navy-300: #6989B5;   /* slate-blue accent (callouts, links on dark) */
  --navy-200: #9BB0CC;
  --navy-100: #C7D4E2;
  --navy-50:  #E7ECF2;

  /* ============ Action — Orange ============
     illuno's one saturated accent. Used exclusively for action
     items: CTAs that demand attention, urgent flags, interactive
     money/time highlights. Never decorative.
     Canonical: #FF6F00 — warm red-orange. Confirmed by brand.
  */
  --orange-700: #B84E00;
  --orange-600: #DF5F00;
  --orange-500: #FF6F00;  /* OFFICIAL — action orange */
  --orange-400: #FF8A33;
  --orange-300: #FFA866;
  --orange-200: #FFC699;
  --orange-100: #FFE0C2;
  --orange-50:  #FFF1E0;

  /* ============ Neutrals — Ink & Paper ============
     Extracted from app: near-black text, warm-white canvas,
     grey ramp covers labels/borders/disabled.
  */
  --ink-950: #090D12;    /* primary text (rgb(9,13,18)) */
  --ink-900: #15191F;
  --ink-800: #22262C;
  --ink-700: #333333;    /* strong body */
  --ink-600: #414040;    /* secondary body (rgb(65,64,64)) */
  --ink-500: #6B6B6B;
  --ink-400: #8C8D8D;    /* muted labels, tertiary text */
  --ink-300: #A5A3A3;    /* disabled / separators */
  --ink-200: #D0D0D0;
  --ink-100: #E0E0DF;    /* logo grey — subtle lines */
  --ink-50:  #EDEDED;

  --paper-0:   #FFFFFF;
  --paper-50:  #FEFEFF;  /* inverse text on navy (rgb(254,254,255)) */
  --paper-100: #FBFBFB;  /* card bg (rgb(251,251,251)) */
  --paper-200: #FAFAFA;  /* canvas (rgb(250,250,250)) */
  --paper-300: #F4F4F4;
  --paper-400: #ECECEC;

  /* ============ Status ============
     Muted, professional. Never neon.
  */
  --success-700: #166534;
  --success-500: #1F7A3F;
  --success-100: #DCFCE7;
  --success-50:  #EDFCF2;

  --warning-700: #92400E;
  --warning-500: #F59E0B;
  --warning-100: #FEF3C7;
  --warning-50:  #FFFBEB;

  --danger-700: #991B1B;
  --danger-500: #BC2A2A;
  --danger-100: #FEE2E2;
  --danger-50:  #FEF2F2;

  /* ============ Semantic tokens ============ */

  /* Foreground */
  --fg-primary:     var(--ink-950);
  --fg-secondary:   var(--ink-600);
  --fg-tertiary:    var(--ink-400);
  --fg-disabled:    var(--ink-300);
  --fg-inverse:     var(--paper-50);
  --fg-brand:       var(--navy-900);
  --fg-accent:      var(--orange-500);
  --fg-link:        var(--navy-900);
  --fg-success:     var(--success-500);
  --fg-warning:     var(--warning-500);
  --fg-danger:      var(--danger-500);

  /* Background */
  --bg-canvas:      var(--paper-200);
  --bg-surface:     var(--paper-100);
  --bg-raised:      var(--paper-0);
  --bg-muted:       var(--paper-300);
  --bg-inverse:     var(--navy-900);
  --bg-inverse-hover: var(--navy-800);
  --bg-brand:       var(--navy-900);
  --bg-brand-hover: var(--navy-800);
  --bg-accent:      var(--orange-500);
  --bg-accent-hover: var(--orange-600);
  --bg-accent-subtle: var(--orange-50);

  /* Borders — low-contrast, warm-neutral */
  --border-subtle:  rgba(9, 13, 18, 0.06);
  --border-default: rgba(9, 13, 18, 0.10);
  --border-strong:  rgba(9, 13, 18, 0.18);
  --border-inverse: rgba(255, 255, 255, 0.14);
  --border-focus:   var(--orange-500);

  /* ============ Elevation ============
     Extracted from the nav bar's shadow pair and the card stack.
  */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  /* Figma nav bar shadow (verbatim): */
  --shadow-lg: 0 8px 10px -6px rgba(0, 0, 0, 0.10), 0 20px 25px -5px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 24px 40px -8px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.06);
  --shadow-navy: 0 12px 24px -8px rgba(3, 38, 56, 0.25);

  /* Focus — orange halo (action color), visible on nav and paper */
  --ring-focus: 0 0 0 3px rgba(255, 111, 0, 0.30);

  /* ============ Radii ============
     Figma uses 22px pervasively for cards and the device frame.
     4/6/8 for chips, 12/16 for inputs, 22 for cards, full for pills.
  */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 22px;   /* OFFICIAL card radius — matches Figma */
  --radius-3xl: 28px;
  --radius-full: 9999px;

  /* ============ Spacing — 4pt baseline ============ */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ============ Type ============ */
  --font-sans: "Suisse Screen", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Display — marketing hero, section openers */
  --display-2xl: 72px/1.02 var(--font-sans);
  --display-xl:  60px/1.05 var(--font-sans);
  --display-lg:  48px/1.08 var(--font-sans);
  --display-md:  36px/1.1  var(--font-sans);
  --display-sm:  30px/1.15 var(--font-sans);
  --display-xs:  24px/1.2  var(--font-sans);

  /* Text — product, body */
  --text-2xl: 24px/1.3  var(--font-sans);  /* card title (1.2 is the tight one used in app) */
  --text-xl:  20px/1.45 var(--font-sans);  /* subhead / app H2 — Figma uses 20/1.75 */
  --text-lg:  18px/1.5  var(--font-sans);
  --text-md:  16px/1.5  var(--font-sans);  /* body — Figma uses 16/1.5 */
  --text-sm:  14px/1.45 var(--font-sans);
  --text-xs:  12px/1.5  var(--font-sans);  /* Figma "Fri, May 10" — 12/1.5 */

  /* Weight ramp */
  --w-reg: 400;
  --w-med: 500;   /* body — Figma default on app body */
  --w-semi: 600;
  --w-bold: 700;  /* Figma titles */
}

/* ============ HTML element defaults ============ */
html, body {
  background: var(--bg-canvas);
  color: var(--fg-primary);
  font: var(--text-md);
  font-family: var(--font-sans);
  font-weight: var(--w-med);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.002em;
  margin: 0;
}

h1, .h1 {
  font: var(--display-md);
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  color: var(--fg-primary);
  text-wrap: balance;
  margin: 0;
}
h2, .h2 {
  font: var(--display-sm);
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  letter-spacing: -0.018em;
  color: var(--fg-primary);
  margin: 0;
}
h3, .h3 {
  font: var(--display-xs);
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  letter-spacing: -0.012em;
  margin: 0;
}
h4, .h4 {
  font: var(--text-xl);
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  margin: 0;
}
h5, .h5 {
  font: var(--text-lg);
  font-family: var(--font-sans);
  font-weight: var(--w-semi);
  margin: 0;
}

p   { font: var(--text-md); font-family: var(--font-sans); color: var(--fg-secondary); text-wrap: pretty; margin: 0; }
small { font: var(--text-sm); font-family: var(--font-sans); color: var(--fg-tertiary); }

a {
  color: var(--fg-link);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 140ms ease;
}
a:hover { opacity: 0.7; }

code, kbd, samp {
  font: var(--text-sm);
  font-family: var(--font-mono);
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

hr {
  border: 0;
  border-top: 1px solid var(--border-default);
  margin: var(--space-8) 0;
}

/* Eyebrow — small caps label used above section titles */
.eyebrow {
  font: var(--text-xs);
  font-family: var(--font-sans);
  font-weight: var(--w-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}

::selection { background: var(--navy-100); color: var(--navy-900); }
