/* ==========================================================================
   JukeApps Design System — Colors & Type
   --------------------------------------------------------------------------
   Source of truth for color + type tokens across the platform marketing
   surface and generated apps. Values track the DaisyUI `slate-professional`
   default theme (set in jukeapps.components.layout/default-theme).

   Hex values are reconstructed from DaisyUI's slate-professional palette;
   tune in one place if the canonical theme shifts.
   ========================================================================== */

/* Inter — self-hosted woff2 (offline PWA: CDN @import fails without network) */
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.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;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.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;
}

/* JetBrains Mono — self-hosted woff2 */
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.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;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.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;
}

/* Plus Jakarta Sans — self-hosted woff2 */
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-ext.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;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin.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;
}

:root {
  /* -------- Brand neutrals (slate-professional base) -------- */
  --color-base-100: #ffffff;        /* cards, content surface */
  --color-base-200: #f1f5f9;        /* page background, zebra rows, hover */
  --color-base-300: #e2e8f0;        /* dividers, input borders */
  --color-base-content: #1e293b;    /* primary text on base */

  /* Semantic foreground tokens (layer on base-content alpha in-app via /70 /40) */
  --fg-1: #1e293b;                  /* primary text */
  --fg-2: #475569;                  /* secondary text (base-content/70 approx) */
  --fg-3: #94a3b8;                  /* muted / placeholder (base-content/40 approx) */
  --fg-on-primary: #ffffff;

  /* -------- Brand accents -------- */
  --color-primary: #4f46e5;          /* indigo-600 — CTAs, active nav */
  --color-primary-hover: #4338ca;
  --color-primary-content: #ffffff;
  --color-secondary: #64748b;        /* slate-500 — secondary buttons */
  --color-secondary-content: #ffffff;
  --color-accent: #0ea5e9;           /* sky-500 — focus rings, info highlights */
  --color-accent-content: #ffffff;

  /* -------- Status colors -------- */
  --color-info: #0284c7;
  --color-info-bg: #e0f2fe;
  --color-success: #16a34a;
  --color-success-bg: #dcfce7;
  --color-warning: #ca8a04;          /* yellow-600 — storage warning banner */
  --color-warning-bg: #fefce8;
  --color-warning-border: #facc15;
  --color-error: #dc2626;            /* red-600 — destructive, required-star */
  --color-error-bg: #fef2f2;
  --color-error-border: #ef4444;

  /* -------- Overlays -------- */
  --overlay-scrim: rgba(0, 0, 0, 0.40);    /* modal backdrop */
  --overlay-caption: rgba(0, 0, 0, 0.50);  /* photo caption pill */

  /* -------- Type families -------- */
  --font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* -------- Type scale (matches Tailwind classes used in Hiccup source) -------- */
  --text-xs:   0.75rem;   /* 12 — footer, table-head caption */
  --text-sm:   0.875rem;  /* 14 — labels, table body, links */
  --text-base: 1rem;      /* 16 — body default */
  --text-lg:   1.125rem;  /* 18 — hero subhead */
  --text-xl:   1.25rem;   /* 20 — card title */
  --text-2xl:  1.5rem;    /* 24 — page H1 inside app shell */
  --text-3xl:  1.875rem;  /* 30 — marketing section H2 */
  --text-4xl:  2.25rem;   /* 36 — marketing hero H1 */
  --text-5xl:  3rem;      /* 48 — oversized display (reserved for decks) */

  /* -------- Weight -------- */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* -------- Line-height -------- */
  --lh-tight:  1.2;
  --lh-snug:   1.35;
  --lh-normal: 1.5;
  --lh-loose:  1.65;

  /* -------- Radius -------- */
  --radius-sm:   0.25rem;   /* 4 — small pills */
  --radius-md:   0.5rem;    /* 8 — cards, buttons, inputs, thumbnails (workhorse) */
  --radius-lg:   0.75rem;   /* 12 — reserved */
  --radius-full: 9999px;    /* circle buttons (close, reorder) */

  /* -------- Shadow — only two levels, deliberately -------- */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.06);                           /* nav */
  --shadow:    0 1px 3px 0 rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06); /* cards */
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.10); /* modals */

  /* -------- Spacing scale (Tailwind 4px grid — subset actually used) -------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* -------- Transition -------- */
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 180ms;
}

/* ==========================================================================
   Semantic type classes — use these in HTML instead of inline styles.
   ========================================================================== */

html, body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--fg-1);
  background: var(--color-base-200);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.h1, h1.display {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  color: var(--fg-1);
}

.h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
}

.h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

.h4, .page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

.subhead {
  font-size: var(--text-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--fg-2);
}

.body {
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
}

.label {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  color: var(--fg-1);
}

.caption, .small {
  font-size: var(--text-sm);
  color: var(--fg-2);
}

.overline {
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-2);
}

.footer-text {
  font-size: var(--text-xs);
  color: var(--fg-2);
}

code, .code {
  font-family: var(--font-mono);
  font-size: 0.925em;
  background: var(--color-base-200);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  color: var(--fg-1);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-base-200);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

a, .link {
  color: var(--color-primary);
  text-decoration: none;
  transition: text-decoration var(--dur-fast) var(--ease);
}
a:hover, .link:hover { text-decoration: underline; }
