/* Legible family brand tokens.
   Import once, then set the brand on any element (usually <html>):
     <html data-brand="strigi">   legible (default) | strigi | dagall | naman
   Every brand uses the same token names (naman is an instance of strigi: same neutrals, its own green), so components work across all of them. */

@font-face {
  font-family: "Manrope";
  src: url("./fonts/Manrope-Variable.woff2") format("woff2-variations"),
       url("./fonts/Manrope-Variable.ttf") format("truetype-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Habibi";
  src: url("./fonts/Habibi-Regular.woff2") format("woff2"),
       url("./fonts/Habibi-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-sans);   /* products: Manrope everywhere. Legible overrides this with Habibi. */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  /* Times, dates, kr. amounts, record numbers: same-width digits so columns line up */
  --numeric: tabular-nums lining-nums;
  --tracking-tight: -0.025em;   /* headings and the wordmark */
  --tracking-normal: 0;
  --leading-tight: 1.1;
  --leading-normal: 1.5;
  /* Type scale. Each size has its line height (Tailwind v4 reads the --line-height pairs). */
  --text-xs: 0.75rem;   --text-xs--line-height: 1rem;        /* 12/16 captions, legal, badges. Never body. */
  --text-sm: 0.875rem;  --text-sm--line-height: 1.25rem;     /* 14/20 secondary text, table cells, helper text */
  --text-base: 1rem;    --text-base--line-height: 1.5rem;    /* 16/24 body, inputs, buttons */
  --text-lg: 1.25rem;   --text-lg--line-height: 1.75rem;     /* 20/28 card and dialog titles */
  --text-xl: 1.5rem;    --text-xl--line-height: 2rem;        /* 24/32 section titles */
  --text-2xl: 2rem;     --text-2xl--line-height: 2.5rem;     /* 32/40 page titles */
  --text-3xl: 2.5rem;   --text-3xl--line-height: 3rem;       /* 40/48 marketing */
  --text-4xl: 3.5rem;   --text-4xl--line-height: 3.75rem;    /* 56/60 marketing */
  --text-5xl: 4.5rem;   --text-5xl--line-height: 4.75rem;    /* 72/76 marketing */
  --radius-xs: 4px;     /* checkboxes, badges, focus ring on small targets */
  --radius-sm: 8px;     /* inputs, small buttons, menus */
  --radius-md: 12px;    /* buttons, alerts */
  --radius-lg: 16px;    /* cards, panels, dialogs */
  --radius-pill: 999px; /* chips, the sign-in button */
  /* Shadows only for layers that float above the page. Cards in the page flow get a border, not a shadow. */
  --shadow-none: none;
  --shadow-raised: 0 1px 2px rgb(17 24 39 / 0.06), 0 2px 6px rgb(17 24 39 / 0.08);     /* menus, popovers, sticky header once scrolled */
  --shadow-overlay: 0 4px 8px rgb(17 24 39 / 0.06), 0 16px 40px rgb(17 24 39 / 0.18);  /* dialogs, sheets, toasts */
  --border-width: 1px;
  --focus-width: 2px;
  --focus-offset: 2px;
  --duration-fast: 120ms;
  --duration-base: 200ms;
  /* v1 is light only. Stops browsers from darkening form controls in OS dark mode. */
  color-scheme: light;
  --color-error-fg: #B42318;
  --color-error-bg: #FEF3F2;
  --color-error-border: #D92D20;
  --color-error-strong: #B42318;
  --color-warning-fg: #93370D;
  --color-warning-bg: #FFFAEB;
  --color-warning-border: #DC6803;
  --color-warning-strong: #B54708;
  --color-success-fg: #05603A;
  --color-success-bg: #ECFDF3;
  --color-success-border: #079455;
  --color-success-strong: #067647;
  --color-info-fg: #1849A9;
  --color-info-bg: #EFF8FF;
  --color-info-border: #1570EF;
  --color-info-strong: #1849A9;
  /* Support session: reserved for the banner and frame while Legible staff are signed in to a customer account */
  --color-attention: #FACC15;
  --color-on-attention: #111827;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
}

/* Legible */
:root,
[data-brand="legible"] {
  --color-ink: #303638;
  --color-ground: #F7F6F2;
  --color-surface: #FFFFFF;
  --color-muted: #585E62;
  --color-line: #DCDAD3;
  --color-primary: #303638;
  --color-primary-strong: #303638;
  --color-primary-on-dark: #F7F6F2;
  --color-on-primary: #FFFFFF;
  --color-tint: #EDEBE4;
  --color-secondary: #6A3DF5;
  --color-primary-hover: #2A3031;
  --color-primary-pressed: #24292B;
  --color-link: #303638;
  --color-focus: #6A3DF5;
  --color-border-input: #878275;
  --color-hover: #EFEDE6;
  --color-pressed: #E5E2D9;
  --color-selected: #EDEBE4;
  --color-disabled-bg: #EFEDE6;
  --color-disabled-fg: #8E897D;
  /* Expressive accents: Legible marketing only, never product UI. --color-on-* is the text colour on that field. */
  --color-aurora-pink: #FF2E8B;
  --color-on-aurora-pink: #303638;
  --color-aurora-violet: #6A3DF5;
  --color-on-aurora-violet: #FFFFFF;
  --color-aurora-cyan: #22E5D4;
  --color-on-aurora-cyan: #303638;
  --color-lifebuoy: #FF5A1F;
  --color-on-lifebuoy: #303638;
  --color-night-sea: #0A2540;
  --color-on-night-sea: #FFFFFF;
  /* Altitude ramps, low (1) to high (7): terrain, maps, anything with a scale. Never mix the two in one graphic. */
  --ramp-aurora-1: #0A2540;
  --ramp-aurora-2: #1D2F6E;
  --ramp-aurora-3: #6A3DF5;
  --ramp-aurora-4: #B13BC9;
  --ramp-aurora-5: #FF2E8B;
  --ramp-aurora-6: #FF5A1F;
  --ramp-aurora-7: #FFD9C7;
  --ramp-harbour-1: #0A2540;
  --ramp-harbour-2: #0E3A5C;
  --ramp-harbour-3: #13607A;
  --ramp-harbour-4: #169A9E;
  --ramp-harbour-5: #22E5D4;
  --ramp-harbour-6: #A6F4EC;
  --ramp-harbour-7: #F7F6F2;
  /* Display face: wordmark, headlines, pull quotes only. One weight (400). */
  --font-display: "Habibi", Georgia, serif;
  --tracking-display: -0.015em;
}

/* Strigi */
[data-brand="strigi"] {
  --color-ink: #111827;
  --color-ground: #F9FAFB;
  --color-surface: #FFFFFF;
  --color-muted: #6B7280;
  --color-line: #E5E7EB;
  --color-primary: #728B63;
  --color-primary-strong: #55704A;
  --color-primary-on-dark: #9DB58C;
  --color-on-primary: #FFFFFF;
  --color-tint: #E8EEE3;
  --color-secondary: #111827;
  --color-primary-hover: #4B6341;
  --color-primary-pressed: #415538;
  --color-link: #55704A;
  --color-focus: #55704A;
  --color-border-input: #7D8591;
  --color-hover: #F1F3F5;
  --color-pressed: #E5E7EB;
  --color-selected: #E8EEE3;
  --color-disabled-bg: #F3F4F6;
  --color-disabled-fg: #878E99;
  --font-display: var(--font-sans);
}

/* Dagáll */
[data-brand="dagall"] {
  --color-ink: #1F1520;
  --color-ground: #FAF7F9;
  --color-surface: #FFFFFF;
  --color-muted: #5E5160;
  --color-line: #E9DFE6;
  --color-primary: #7A3B66;
  --color-primary-strong: #7A3B66;
  --color-primary-on-dark: #C99BBC;
  --color-on-primary: #FFFFFF;
  --color-tint: #F0E3EC;
  --color-secondary: #2C6E78;
  --color-primary-hover: #6B345A;
  --color-primary-pressed: #5D2D4E;
  --color-link: #2C6E78;
  --color-focus: #2C6E78;
  --color-border-input: #8C7E8A;
  --color-hover: #F4EEF2;
  --color-pressed: #EADFE6;
  --color-selected: #F0E3EC;
  --color-disabled-bg: #F3EEF1;
  --color-disabled-fg: #94879A;
  --font-display: var(--font-sans);
}

/* Náman */
[data-brand="naman"] {
  --color-ink: #111827;
  --color-ground: #F9FAFB;
  --color-surface: #FFFFFF;
  --color-muted: #6B7280;
  --color-line: #E5E7EB;
  --color-primary: #158C40;
  --color-primary-strong: #127A37;
  --color-primary-on-dark: #5CC27F;
  --color-on-primary: #FFFFFF;
  --color-tint: #DCF0E3;
  --color-secondary: #111827;
  --color-primary-hover: #106B30;
  --color-primary-pressed: #0E5D2A;
  --color-link: #127A37;
  --color-focus: #127A37;
  --color-border-input: #7D8591;
  --color-hover: #F1F3F5;
  --color-pressed: #E5E7EB;
  --color-selected: #DCF0E3;
  --color-disabled-bg: #F3F4F6;
  --color-disabled-fg: #878E99;
  --font-display: var(--font-sans);
}

/* Sensible defaults; delete if your app already sets these. */
body {
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-ground);
  line-height: var(--leading-normal);
}
h1, h2, h3 { letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); font-weight: var(--font-weight-bold); }
/* Legible: Habibi headlines (single weight, so no bold) */
[data-brand="legible"] h1, [data-brand="legible"] h2, :root:not([data-brand]) h1, :root:not([data-brand]) h2 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: var(--tracking-display);
}
