/*
  FARZI Studio brand theme - the owner's four colours (2026-10-22). Loaded LAST on every app page, so these
  tokens win over the earlier theme layers (index.html :root blocks, variables.css, the canvas/avatar tokens).

    Midnight Black #09090F  main background, navigation, premium surfaces
    Champagne Gold #D4AF37  primary brand accent, premium actions, selected elements
    Royal Purple   #7C3AED  AI-specific accents, active creation tools (fills, rings, borders)
    Ice White      #F5F5FA  text on dark, headings, icons

  Everything else is a tint or shade of these four. Purple TEXT uses a lighter tint of the same hue
  (#BB98F6, ~8.4:1 on Midnight) because #7C3AED itself is ~3.6:1 - too low for small text.
  Error and success states keep their own red/green and are always paired with words, never colour alone.
  Hard-coded colours elsewhere were mapped to this palette by hue with their lightness kept
  (.payg-test-sandbox/tools/brand-recolor.cjs); media, previews and customer content are never recoloured.
*/
:root {
  --fz-black: #09090F;
  --fz-gold: #D4AF37;
  --fz-purple: #7C3AED;
  --fz-ice: #F5F5FA;

  /* derived tints / shades */
  --fz-black-2: #101018;            /* raised surface */
  --fz-black-3: #16161F;            /* panel */
  --fz-black-4: #1E1E28;            /* hover / input */
  --fz-line: rgba(245, 245, 250, .09);
  --fz-line-strong: rgba(245, 245, 250, .16);
  --fz-text: #F5F5FA;
  --fz-text-2: #C9C9D2;             /* secondary text, ~12:1 */
  --fz-muted: #A1A1AB;              /* muted text, ~7.5:1 */
  --fz-faint: #8A8A92;              /* faint text, ~5.6:1 */
  --fz-gold-2: #DEC471;             /* lighter gold (hover, highlight text) */
  --fz-gold-deep: #A8892A;          /* pressed gold */
  --fz-gold-soft: rgba(212, 175, 55, .14);
  --fz-gold-line: rgba(212, 175, 55, .45);
  --fz-on-gold: #09090F;            /* text on gold (~9:1) */
  --fz-purple-text: #BB98F6;        /* purple text on dark */
  --fz-purple-soft: rgba(124, 58, 237, .16);
  --fz-purple-line: rgba(124, 58, 237, .55);
  --fz-focus: 0 0 0 2px var(--fz-black), 0 0 0 4px var(--fz-gold);

  /* the legacy token families, re-pointed */
  --bg: var(--fz-black); --bg2: var(--fz-black-2); --panel: var(--fz-black-3); --panel2: var(--fz-black-4); --panel3: #252530;
  --line: var(--fz-line); --line2: var(--fz-line-strong);
  --text: var(--fz-text); --muted: var(--fz-muted); --muted2: var(--fz-faint);
  --accent: var(--fz-gold); --accent2: var(--fz-gold-2); --gold: var(--fz-gold); --gold2: var(--fz-gold-2);
  --gold-glow: rgba(212, 175, 55, .30);
  --farzi-bg: var(--fz-black); --farzi-text: var(--fz-text); --farzi-muted: var(--fz-muted);
  --farzi-gold: var(--fz-gold); --farzi-gold-2: var(--fz-gold-2); --farzi-accent: var(--fz-gold); --farzi-accent-soft: var(--fz-gold-soft);
  --farzi-border: var(--fz-line); --farzi-border-strong: var(--fz-line-strong);
  --fcv-bg: var(--fz-black); --fcv-text: var(--fz-text); --fcv-muted: var(--fz-muted); --fcv-faint: var(--fz-faint);
  --fcv-gold: var(--fz-gold); --fcv-gold-2: var(--fz-gold-2); --fcv-gold-soft: var(--fz-gold-soft); --fcv-teal: var(--fz-purple-text);
  --av-text: var(--fz-text); --av-muted: var(--fz-muted); --av-gold: var(--fz-gold); --av-gold-2: var(--fz-gold-2);
}

html, body { background-color: var(--fz-black); color: var(--fz-text); }
::selection { background: rgba(124, 58, 237, .45); color: var(--fz-ice); }

/* Keyboard focus is always visible: a gold ring separated from the control by a Midnight gap. */
:where(a, button, input, select, textarea, summary, [role="button"], [role="tab"], [role="option"], [tabindex]):focus-visible {
  outline: 2px solid var(--fz-gold) !important;
  outline-offset: 2px !important;
}

/* ---------- FARZI Studio brand mark (the owner's logo, assets/branding) ----------
   Compact slots: the FS mark in black on an Ice White tile - exactly as the original artwork (black on white).
   The visible "FARZI Studio" text beside each mark is its accessible name (the image itself is alt=""). */
.fz-brand-tile {
  display: inline-grid !important; place-items: center !important; overflow: hidden;
  background: linear-gradient(180deg, #F5F5FA 0%, #DCDCE3 100%) !important;
  border: 0 !important; color: transparent !important;
  box-shadow: 0 0 0 1px rgba(245, 245, 250, .16), 0 6px 18px rgba(0, 0, 0, .45) !important;
}
.fz-brand-tile .fz-brand-img { width: 72%; height: 72%; object-fit: contain; display: block; }
/* Large slot: the full lockup in Ice White on the dark canvas. */
.fz-brand-lockup { background: none !important; box-shadow: none !important; border: 0 !important; width: auto !important; height: auto !important; }
.fz-brand-lockup .fz-brand-img { display: block; width: 156px; height: auto; margin: 0 auto; }
@media (max-width: 520px) { .fz-brand-lockup .fz-brand-img { width: 124px; } }

/* ---------- accents: Gold = premium / primary, Purple = AI creation state ---------- */
.fcv-kind.video, .fcv-kind.image { color: var(--fz-purple-text) !important; border-color: var(--fz-purple-line) !important; background: var(--fz-purple-soft) !important; }
.fcv-kind.owner-test { color: var(--fz-gold-2) !important; border-color: var(--fz-gold-line) !important; background: var(--fz-gold-soft) !important; }
.fcv-model-row[aria-selected="true"] { border-color: var(--fz-gold-line) !important; background: var(--fz-gold-soft) !important; }
.fcv-model-row:hover:not([aria-disabled="true"]) { border-color: var(--fz-purple-line); }
.farzi-nav-item.active { border-color: var(--fz-gold-line) !important; }
.farzi-nav-item.active::before { background: var(--fz-gold) !important; }
.fz-mlogo.is-mono { border-color: var(--fz-gold-line); color: var(--fz-gold-2); }
