/* ==========================================================================
   KURO FANGS — BASE STYLES & RESET (ACADEMIA TYPOGRAPHY)
   - English / Numbers: Inter (300, 400, 500, 600, 700, 800)
   - Arabic: IBM Plex Sans Arabic (300, 400, 500, 600, 700)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-app);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Arabic Typography with IBM Plex Sans Arabic */
html[dir="rtl"] body, html[lang="ar"] body {
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] body, html[lang="en"] body {
  direction: ltr;
  text-align: left;
}

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

h1 { font-size: 1.85rem; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: 1.35rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-base);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-burgundy);
  box-shadow: 0 0 0 3px rgba(136, 19, 55, 0.15);
}

/* ==========================================================================
   BUTTONS (Burgundy Theme)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-burgundy {
  background: var(--brand-burgundy);
  color: #FFFFFF;
  box-shadow: var(--brand-burgundy-glow);
}

.btn-burgundy:hover {
  background: var(--brand-burgundy-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(136, 19, 55, 0.28);
}

.btn-soft-burgundy {
  background: var(--brand-burgundy-light);
  color: var(--brand-burgundy);
  border: 1px solid var(--brand-burgundy-border);
}

.btn-soft-burgundy:hover {
  background: rgba(136, 19, 55, 0.22);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  line-height: 1;
}

.badge-burgundy {
  background: var(--brand-burgundy-light);
  color: var(--brand-burgundy);
  border: 1px solid var(--brand-burgundy-border);
}

.badge-gray {
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #30363D;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-burgundy);
}
