/* ═══════════════════════════════════════════════════════════════
   BrainSAIT Design System — Shared Styles
   Version: 1.0.0
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Colors — Surface */
  --void:    #02040a;
  --deep:    #060913;
  --navy:    #0a0f1d;
  --surface: #0f1524;
  --surf2:   #141929;

  /* Colors — Accent */
  --gold:    #d4a574;
  --teal:    #0ea5e9;
  --med:     #2563eb;
  --eme:     #10b981;
  --amb:     #f59e0b;
  --rose:    #f43f5e;
  --vio:     #8b5cf6;

  /* Colors — Text */
  --text:    #f8fafc;
  --textd:   #cbd5e1;
  --textm:   #64748b;
  --texts:   #334155;

  /* Colors — Glass */
  --g1: rgba(255,255,255,0.02);
  --g2: rgba(255,255,255,0.04);
  --g3: rgba(255,255,255,0.06);
  --gb: rgba(255,255,255,0.08);
  --gbh: rgba(255,255,255,0.16);

  /* Typography */
  --fd: 'Syne', sans-serif;
  --fa: 'IBM Plex Sans Arabic', sans-serif;
  --fi: 'Inter', sans-serif;
  --fm: 'JetBrains Mono', monospace;

  /* Spacing */
  --sp: clamp(60px, 10vw, 120px);
  --r:  16px;
  --rs: 8px;
  --rx: 6px;
  --rnd: 100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--fi);
  background: var(--void);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fd);
  font-weight: 700;
  line-height: 1.2;
}

.ar {
  font-family: var(--fa);
  direction: rtl;
}

.mono {
  font-family: var(--fm);
  font-size: 0.8125rem;
}

/* ── Layout ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--sp) 0;
  position: relative;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ── Glass Cards ── */
.card {
  background: var(--g1);
  border: 1px solid var(--gb);
  border-radius: var(--r);
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: var(--gbh);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.card-accent {
  position: relative;
  overflow: hidden;
}

.card-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--med));
  border-radius: var(--r) var(--r) 0 0;
}

.card-glass {
  background: var(--g2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Tags / Chips ── */
.tag, .t-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--rnd);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--gb);
  background: var(--g2);
  color: var(--textd);
  white-space: nowrap;
}

.tag-teal  { border-color: rgba(14,165,233,0.3); color: var(--teal); }
.tag-gold  { border-color: rgba(212,165,116,0.3); color: var(--gold); }
.tag-eme   { border-color: rgba(16,185,129,0.3); color: var(--eme); }
.tag-amb   { border-color: rgba(245,158,11,0.3); color: var(--amb); }
.tag-rose  { border-color: rgba(244,63,94,0.3); color: var(--rose); }
.tag-vio   { border-color: rgba(139,92,246,0.3); color: var(--vio); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--rnd);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--gb);
  background: var(--g1);
  color: var(--textd);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  cursor: default;
}

.chip:hover {
  border-color: var(--gbh);
  transform: translateY(-2px);
  background: var(--g3);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--fi);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--med));
  color: #fff;
  box-shadow: 0 4px 20px rgba(14,165,233,0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(14,165,233,0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--eme), #059669);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16,185,129,0.2);
}

.btn-secondary:hover {
  box-shadow: 0 8px 30px rgba(16,185,129,0.35);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gb);
}

.btn-outline:hover {
  border-color: var(--gbh);
  background: var(--g2);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--g2);
  color: var(--textd);
  border: 1px solid var(--gb);
}

.btn-ghost:hover {
  background: var(--g3);
  border-color: var(--gbh);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.8125rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
  border-radius: 12px;
}

/* ── Breadcrumbs ── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 0.8125rem;
  color: var(--textm);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--textm);
  transition: color 0.2s;
}

.breadcrumbs a:hover { color: var(--teal); }

.breadcrumbs .sep {
  color: var(--texts);
  font-size: 0.625rem;
}

.breadcrumbs .current {
  color: var(--textd);
  font-weight: 500;
}

/* ── Progress Bar ── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--g3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
  background: linear-gradient(90deg, var(--teal), var(--eme));
}

/* ── Stats ── */
.stat-card {
  text-align: center;
  padding: 20px 16px;
  background: var(--g1);
  border: 1px solid var(--gb);
  border-radius: var(--r);
  transition: border-color 0.3s, transform 0.3s;
}

.stat-card:hover {
  border-color: var(--gbh);
  transform: translateY(-3px);
}

.stat-value {
  font-family: var(--fd);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--textm);
  font-weight: 500;
}

/* ── Section Separators ── */
.section-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gb), transparent);
  margin: 0;
  border: none;
}

/* ── Glow Effects ── */
.glow-teal {
  position: relative;
  overflow: hidden;
}

.glow-teal::after {
  content: '';
  position: absolute;
  bottom: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(14,165,233,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.glow-gold {
  position: relative;
  overflow: hidden;
}

.glow-gold::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 50%;
  background: radial-gradient(ellipse, rgba(212,165,116,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--g2);
  border: 1px solid var(--gb);
  color: var(--textd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--g3);
  border-color: var(--gbh);
  transform: translateY(-3px);
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: clamp(40px, 8vw, 80px) 0; }
  .btn-lg { padding: 14px 24px; font-size: 0.875rem; }
  .stat-value { font-size: 1.5rem; }
}
