/* theme-chitta.css — From AI to Chitta visual identity for Forgejo
 *
 * Maps Forgejo's default "forgejo-auto" theme onto the fromaitochitta.com
 * design system (Direction D · "Slate & Persimmon"): Public Sans UI type,
 * persimmon accent (#D86A33), near-white paper, ink text. Light + dark via
 * prefers-color-scheme, mirroring the website.
 *
 * Strategy: inherit the full, version-correct variable set from the served
 * default theme, then override only the brand tokens + fonts. There are NO
 * template overrides, so nothing here can break Forgejo's own markup on
 * upgrade. If Forgejo ever renames the served default theme, the @import
 * below stops resolving and the UI goes unstyled — a loud, obvious failure,
 * fixed by re-pointing the import.
 *
 * Source of truth: from-ai-to-chitta repo, forgejo/theme/theme-chitta.css.
 * Deployed to /var/lib/forgejo/custom/public/assets/css/theme-chitta.css.
 * Activated in /etc/forgejo/app.ini ([ui] THEMES + DEFAULT_THEME = chitta).
 */

/* 1. Fonts — the same Google Fonts the website loads (Public Sans + Literata). */
@import url("https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,500;1,7..72,400&display=swap");

/* 2. Inherit Forgejo's complete default variable set (light + dark). */
@import url("theme-forgejo-auto.css");

/* 3. Brand overrides — light (default). */
:root {
  --color-body:            #FBFBFC;  /* paper / page background */
  --color-box-body:        #FFFFFF;  /* cards, panels */
  --color-header-wrapper:  #FBFBFC;  /* top navigation band */
  --color-text:            #171A1F;  /* body text */
  --color-text-light:      #545863;  /* secondary text */
  --color-primary:         #D86A33;  /* persimmon accent */
  --color-primary-hover:   #C25A26;
  --color-primary-active:  #C25A26;
  --color-accent:          #C25A26;  /* link / interactive text */
  --color-input-border:    #DCDEE3;  /* hairlines */
  /* Forgejo composes --fonts-regular from the --fonts-override hook; set the
   * hook (not the composed result) or per-element recomputation ignores it.
   * Monospace is left at Forgejo's default (already ui-monospace / SF Mono). */
  --fonts-override: "Public Sans";
}

/* 4. Brand overrides — dark. Same token set, dark values (mirrors the site). */
@media (prefers-color-scheme: dark) {
  :root {
    --color-body:           #06070A;
    --color-box-body:       #0E1014;
    --color-header-wrapper: #0E1014;
    --color-text:           #CBCFD6;
    --color-text-light:     #9DA2AC;
    --color-primary:        #D86A33;
    --color-primary-hover:  #E2884A;
    --color-primary-active: #E2884A;
    --color-accent:         #E2884A;
    --color-input-border:   #1B1E24;
  }
}
