/* ============================================================
   YEWCHART DESIGN SYSTEM
   Light-mode only · HR-focused · Clean & professional
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Design Tokens --- */
:root {
  /* Brand */
  --brand-500: #C8522A;
  --brand-600: #A8431F;
  --brand-700: #88351A;
  --brand-gradient: linear-gradient(135deg, #C8522A 0%, #D4884A 100%);

  /* Neutrals — warm-tinted grays */
  --gray-25:  #FDFCFB;
  --gray-50:  #FAF9F7;
  --gray-100: #F3F2EF;
  --gray-200: #E8E6E1;
  --gray-300: #D5D3CD;
  --gray-400: #B0AEA6;
  --gray-500: #8A877F;
  --gray-600: #6B6962;
  --gray-700: #4A4843;
  --gray-800: #2F2E2A;
  --gray-900: #1A1918;

  /* Semantic */
  --success-50:  #EEFBF3;
  --success-100: #D0F4DE;
  --success-500: #2E9E5E;
  --success-600: #237A49;
  --success-700: #1A5C37;

  --warning-50:  #FFF8EB;
  --warning-100: #FEECC0;
  --warning-500: #D4880A;
  --warning-600: #A66B08;
  --warning-700: #7A4F06;

  --danger-50:  #FEF1F1;
  --danger-100: #FDDCDC;
  --danger-500: #DC4545;
  --danger-600: #B63434;
  --danger-700: #8A2626;

  --info-50:  #EFF6FF;
  --info-100: #D4E6FC;
  --info-500: #3B82F6;
  --info-600: #2563EB;
  --info-700: #1D4ED8;

  /* Surfaces */
  --surface-page:    var(--gray-50);
  --surface-primary: #FFFFFF;
  --surface-raised:  #FFFFFF;
  --surface-sunken:  var(--gray-100);
  --surface-overlay: #FFFFFF;

  /* Text */
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary:  var(--gray-500);
  --text-disabled:  var(--gray-400);
  --text-inverse:   #FFFFFF;
  --text-brand:     var(--brand-600);

  /* Borders */
  --border-default:  var(--gray-200);
  --border-subtle:   var(--gray-100);
  --border-strong:   var(--gray-300);
  --border-brand:    var(--brand-500);
  --border-focus:    var(--brand-500);

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  10px;
  --radius-xl:  14px;
  --radius-full: 9999px;

  /* Shadows — very subtle, light mode only */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 0.875rem;   /* 14px */
  --text-md:   0.9375rem;  /* 15px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.375rem;   /* 22px */
  --text-2xl:  1.75rem;    /* 28px */

  --leading-tight:  1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Spacing scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Layout */
  --sidebar-width: 232px;
  --topbar-height: 0px; /* Using inline trial banner instead */
  --content-max-width: 960px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 180ms ease;
  --transition-slow: 300ms ease;
}


/* --- Base --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-page);
}

a {
  color: var(--text-brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}


/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); font-weight: var(--weight-medium); }

.text-xs      { font-size: var(--text-xs); }
.text-sm      { font-size: var(--text-sm); }
.text-base    { font-size: var(--text-base); }
.text-md      { font-size: var(--text-md); }
.text-lg      { font-size: var(--text-lg); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-brand     { color: var(--text-brand); }

.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }


/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ============================================================
   BACKWARD COMPATIBILITY — old app.css variable names
   Maps to new design tokens so existing inline CSS just works.
   Remove these once all templates are fully migrated.
   ============================================================ */
:root {
  --bg:             var(--gray-50);
  --bg-card:        var(--surface-primary);
  --bg-accent:      #FEF0E8;
  --bg-hover:       var(--gray-100);
  --bg-input:       var(--surface-primary);
  --bg-subtle:      var(--gray-50);

  --text:           var(--text-primary);
  /* --text-secondary already matches */
  --text-muted:     var(--text-tertiary);
  /* --text-inverse already matches */

  --accent:         var(--brand-500);
  --accent-hover:   var(--brand-600);
  --accent-light:   #FAE3D8;

  --success:        var(--success-500);
  --success-bg:     var(--success-50);
  --warning:        var(--warning-500);
  --warning-bg:     var(--warning-50);
  --danger:         var(--danger-500);
  --danger-bg:      var(--danger-50);
  --info:           var(--info-500);
  --info-bg:        var(--info-50);

  --border:         var(--border-default);
  --border-light:   var(--border-subtle);

  --radius:         var(--radius-lg);

  --font-body:      var(--font-sans);
  --font-display:   var(--font-sans);
  --nav-height:     0px;
}
