/* Artllum design tokens.
   Direction (unslop, after heydamir/unslop CC BY 4.0, Damir Sokolovsky @heydamir):
   Product   — one video portfolio, reordered per client with JD Shuffle, shared as a tailored link
   Character — bold, creative, self-explaining
   World     — a working editor's studio: cut lists, thumbnails, the red record light
   Moments   — the shuffled reel and real video thumbnails
   Signature — the blue record dot (logo mark, live/selected marker); features always shown by name + icon + one line
   Type: Bricolage Grotesque (headings) + Figtree (interface). A real mono only for links/codes.
   Color: warm neutral ramp, warm ink, one ink-blue brand color for every key action. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=Figtree:wght@400;500;600;700&display=swap');

/* Fallback faces sized like the web fonts. Until Bricolage/Figtree arrive, text is drawn in a
   system font scaled to the same width, so lines break in the same places and nothing jumps
   when the web font swaps in (this was the page's layout shift on phones).
   Measured at the sizes used on the site: Bricolage ≈ 99% of Arial's width, Figtree ≈ 101.5%. */
@font-face { font-family: 'Bricolage Fallback'; src: local('Arial'), local('Liberation Sans'), local('Helvetica'), local('Roboto'); size-adjust: 99%; }
@font-face { font-family: 'Figtree Fallback';   src: local('Arial'), local('Liberation Sans'), local('Helvetica'), local('Roboto'); size-adjust: 101.5%; }

:root {
  --font:    'Figtree', 'Figtree Fallback', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Bricolage Grotesque', 'Bricolage Fallback', 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  /* --mono was used for small labels and figures; it now resolves to the interface face
     with tabular figures, so those labels read as normal text. --code is a real monospace. */
  --mono:    'Figtree', 'Figtree Fallback', 'Helvetica Neue', Arial, sans-serif;
  --code:    ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* warm neutral ramp (light) */
  --paper:   #fffdfa;
  --sunk:    #f7f4ee;
  --sunk-2:  #efe9df;
  --line:    #e7e1d6;
  --line-2:  #d3cbbd;
  --ink:     #1f1b16;
  --ink-2:   #5e554a;
  --ink-3:   #7b7266;
  --ink-inv: #ffffff;

  /* brand: one color for every key action (ink blue; white text on it: 7.5:1) */
  --brand:       #2f4fa8;
  --brand-hover: #263f88;
  --brand-ink:   #2a4596;   /* brand used as text on light surfaces */
  --brand-soft:  #e7ecf8;

  --signal:      #c2410c;   /* errors and destructive actions only */
  --signal-soft: #fdeee6;
  --ok:          #16a34a;
  --ok-soft:     #e6f4ea;
  --warn:        #8a5a00;
  --warn-soft:   #fbf0d8;

  --r-0: 6px;   /* tags, thumbnails */
  --r-1: 10px;  /* buttons, inputs, rows */
  --r-2: 16px;  /* cards, panels, modals */

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 80px;

  --t-xs: 12px; --t-sm: 13px; --t-md: 15px; --t-lg: 17px;
  --t-xl: 22px; --t-2xl: 36px; --t-3xl: 68px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--brand);
  --modal-shadow: 0 8px 24px rgba(31,27,22,.10);
  --card-shadow: 0 1px 2px rgba(31,27,22,.05);

  /* Legacy aliases so older page CSS keeps resolving */
  --white: var(--paper); --bg: var(--sunk); --border: var(--line);
  --muted: var(--ink-2); --light: var(--ink-3); --red: var(--signal);
  --indigo: var(--brand); --green: var(--ok); --radius: var(--r-2); --shadow: none;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--ink);
  background: var(--sunk);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
code, kbd, pre, samp, .code { font-family: var(--code); }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* Primary action = brand, on every page */
.btn-dark, .btn-indigo, .btn-primary, .manage-add-btn, .fab-add, .fab-jd, .d-watch {
  background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important;
}
.btn-dark:hover, .btn-indigo:hover, .btn-primary:hover, .manage-add-btn:hover, .fab-add:hover, .fab-jd:hover, .d-watch:hover {
  background: var(--brand-hover) !important; border-color: var(--brand-hover) !important;
}
.btn { font-weight: 600; }
a[href="/logout.php"].btn-dark, a[href="/logout.php"].btn-dark:hover {
  background: transparent !important; color: var(--ink-2) !important; border: 1px solid var(--line-2) !important;
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-1);
  text-decoration: none; font-size: 13px; font-weight: 500;
}

/* Feature badge: how every key feature introduces itself (icon + name) */
.feat {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--ink);
}
.feat .feat-ico {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 13px;
}
.feat-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* Brand logo image (brand_logo() in /brand.php — the one place to change the logo) inside the topbar links:
   the old "dot + text" brand is turned off wherever the image is used */
.brand-logo { display: block; height: 28px; width: auto; max-width: none; }
.brand-logo-sm { height: 22px; }
.logo:has(.brand-logo), .am-logo:has(.brand-logo), .art-brand:has(.brand-logo) { font-size: 0; line-height: 0; gap: 0; padding: 0; background: none; }
.logo:has(.brand-logo)::before, .am-logo:has(.brand-logo)::before, .art-brand:has(.brand-logo)::before { content: none !important; display: none !important; }
@media (max-width: 400px) { .brand-logo { height: 24px; } .brand-logo-sm { height: 20px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
