/* ============================================================
   BASE.CSS — Microsoft Teams Facilitator Guide
   Design system: clean editorial / training-material aesthetic
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans+Arabic:wght@300;400;600&display=swap');

/* ── Tokens ───────────────────────────────────────────────── */
:root {

  /* Brand */
  --c-navy:        #0F1F3D;
  --c-navy-soft:   #1A2F52;
  --c-teal:        #00B4D8;
  --c-teal-light:  #90E0EF;
  --c-teal-dim:    #023E52;
  --c-gold:        #F4A426;
  --c-gold-light:  #FDE9C2;
  --c-white:       #FFFFFF;
  --c-off-white:   #F5F7FA;
  --c-surface:     #EEF2F7;
  --c-border:      #D0D9E8;
  --c-text:        #0F1F3D;
  --c-text-muted:  #5A6E8C;
  --c-text-light:  #8A9BB5;

  /* Steps palette */
  --step-1:   #00B4D8;   /* teal     */
  --step-2:   #4CAF82;   /* green    */
  --step-3:   #F4A426;   /* gold     */
  --step-4:   #E05C5C;   /* coral    */
  --step-5:   #8B6BE8;   /* purple   */

  /* Typography */
  --font-display: 'Sora', sans-serif;
  --font-body:    'Sora', sans-serif;
  --font-arabic:  'IBM Plex Sans Arabic', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* Scale */
  --text-xs:   0.72rem;
  --text-sm:   0.85rem;
  --text-base: 1rem;
  --text-md:   1.15rem;
  --text-lg:   1.35rem;
  --text-xl:   1.75rem;
  --text-2xl:  2.25rem;
  --text-3xl:  3rem;

  /* Spacing */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;

  /* Radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  32px;
  --r-pill:9999px;

  /* Shadow */
  --shadow-sm:  0 1px 4px rgba(15,31,61,.08);
  --shadow-md:  0 4px 16px rgba(15,31,61,.10);
  --shadow-lg:  0 12px 40px rgba(15,31,61,.14);

  /* Layout */
  --max-w:      1100px;
  --sidebar-w:  240px;
  --header-h:   64px;

  /* Transition */
  --ease:       cubic-bezier(.4,0,.2,1);
  --dur-fast:   160ms;
  --dur-base:   260ms;
  --dur-slow:   420ms;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--c-text);
  background: var(--c-off-white);
  line-height: 1.7;
  min-height: 100vh;
}
img, video { display: block; max-width: 100%; }
a { color: var(--c-teal); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--c-navy); }
ul, ol { list-style: none; }

/* ── Layout Utilities ─────────────────────────────────────── */
.container    { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-5); }
.section      { padding: var(--sp-8) 0; }
.section--sm  { padding: var(--sp-6) 0; }
.grid-2       { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
.grid-3       { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.grid-auto    { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-5); }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2        { gap: var(--sp-2); }
.gap-3        { gap: var(--sp-3); }
.gap-4        { gap: var(--sp-4); }
.gap-5        { gap: var(--sp-5); }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; color: var(--c-navy); }
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
p  { color: var(--c-text-muted); line-height: 1.75; }

.text-muted  { color: var(--c-text-muted); }
.text-light  { color: var(--c-text-light); }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }
.text-mono   { font-family: var(--font-mono); }
.arabic      { font-family: var(--font-arabic); direction: rtl; text-align: right; }
.font-600    { font-weight: 600; }
.uppercase   { text-transform: uppercase; letter-spacing: 0.08em; }

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--c-navy);
  border-bottom: 2px solid var(--c-teal);
  display: flex; align-items: center;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.header-logo {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--c-white);
  display: flex; align-items: center; gap: var(--sp-3);
}
.header-logo span { color: var(--c-teal); }
.header-nav { display: none; }
.header-nav a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255,255,255,.65);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease);
}
.header-nav a:hover,
.header-nav a.active { color: var(--c-white); background: rgba(255,255,255,.10); }

/* ── PAGE HERO ────────────────────────────────────────────── */
.page-hero {
  background: var(--c-navy);
  padding: var(--sp-8) 0 var(--sp-7);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(0,180,216,.12) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--c-white); margin-bottom: var(--sp-3); }
.page-hero p  { color: rgba(255,255,255,.65); font-size: var(--text-md); max-width: 640px; }
.hero-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-teal);
  margin-bottom: var(--sp-3);
}

/* ── SIDEBAR LAYOUT ───────────────────────────────────────── */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--sp-6);
  align-items: start;
  padding: var(--sp-7) 0;
}
.sidebar {
  position: sticky; top: calc(var(--header-h) + var(--sp-4));
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-text-light);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
}
.sidebar-nav a {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease);
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: var(--c-surface); color: var(--c-navy); }
.sidebar-nav a.active { background: var(--c-navy); color: var(--c-white); }
.sidebar-nav .step-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
  background: var(--c-surface); color: var(--c-text-light);
}
.sidebar-nav a.active .step-dot { background: rgba(255,255,255,.2); color: var(--c-white); }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card--flat  { box-shadow: none; }
.card--flat:hover { box-shadow: var(--shadow-sm); transform: none; }

/* ── STEP CARD ────────────────────────────────────────────── */
.step-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease);
}
.step-card:hover { box-shadow: var(--shadow-md); }
.step-card__header {
  padding: var(--sp-5) var(--sp-6);
  display: flex; align-items: center; gap: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}
.step-card__number {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: var(--text-lg); font-weight: 500;
  color: var(--c-white); flex-shrink: 0;
}
.step-card__title { font-size: var(--text-md); font-weight: 700; color: var(--c-navy); }
.step-card__subtitle { font-size: var(--text-sm); color: var(--c-text-muted); margin-top: 2px; }
.step-card__body { padding: var(--sp-5) var(--sp-6); }
.step-card__footer {
  padding: var(--sp-3) var(--sp-6);
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  display: flex; align-items: center; gap: var(--sp-3);
  flex-wrap: wrap;
}

/* step colors */
.step-card[data-step="1"] .step-card__number { background: var(--step-1); }
.step-card[data-step="2"] .step-card__number { background: var(--step-2); }
.step-card[data-step="3"] .step-card__number { background: var(--step-3); }
.step-card[data-step="4"] .step-card__number { background: var(--step-4); }
.step-card[data-step="5"] .step-card__number { background: var(--step-5); }
.step-card[data-step="1"] .step-card__header { border-left: 4px solid var(--step-1); }
.step-card[data-step="2"] .step-card__header { border-left: 4px solid var(--step-2); }
.step-card[data-step="3"] .step-card__header { border-left: 4px solid var(--step-3); }
.step-card[data-step="4"] .step-card__header { border-left: 4px solid var(--step-4); }
.step-card[data-step="5"] .step-card__header { border-left: 4px solid var(--step-5); }

/* ── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: var(--text-xs); font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}
.badge--teal   { background: rgba(0,180,216,.12);  color: #006F8A; }
.badge--green  { background: rgba(76,175,130,.12); color: #2A7A55; }
.badge--gold   { background: rgba(244,164,38,.14); color: #9A6610; }
.badge--coral  { background: rgba(224,92,92,.12);  color: #A03030; }
.badge--purple { background: rgba(139,107,232,.12);color: #5B3DC4; }
.badge--navy   { background: var(--c-navy); color: var(--c-white); }
.badge--muted  { background: var(--c-surface); color: var(--c-text-muted); }

/* ── ROLE TAG ─────────────────────────────────────────────── */
.role-tag {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: var(--text-xs); font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid;
}
.role-tag--manager  { background: rgba(15,31,61,.08);  border-color: var(--c-navy);  color: var(--c-navy); }
.role-tag--finance  { background: rgba(76,175,130,.10);border-color: var(--step-2);  color: #2A7A55; }
.role-tag--pr       { background: rgba(244,164,38,.12);border-color: var(--step-3);  color: #9A6610; }
.role-tag--purchase { background: rgba(139,107,232,.12);border-color: var(--step-5); color: #5B3DC4; }

/* ── TOOLS ROW ────────────────────────────────────────────── */
.tool-pill {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: var(--text-xs); font-weight: 600; font-family: var(--font-mono);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--c-navy);
  color: var(--c-teal-light);
}

/* ── TASK LIST ────────────────────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.task-list li {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--c-surface);
}
.task-list li:last-child { border-bottom: none; }
.task-check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--c-border);
  background: var(--c-white);
  margin-top: 2px;
  transition: all var(--dur-fast) var(--ease);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.task-check.done { background: var(--step-2); border-color: var(--step-2); }
.task-check.done::after { content: '✓'; color: white; font-size: 11px; font-weight: 700; }

/* ── TIMER BADGE ──────────────────────────────────────────── */
.timer-badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500;
  color: var(--c-text-light);
}
.timer-badge::before { content: '⏱'; font-size: 12px; }

/* ── ALERT / CALLOUT ──────────────────────────────────────── */
.callout {
  border-radius: var(--r-sm);
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid;
  margin: var(--sp-4) 0;
}
.callout--info    { background: rgba(0,180,216,.07);  border-color: var(--c-teal);  }
.callout--warn    { background: rgba(244,164,38,.09); border-color: var(--c-gold);  }
.callout--tip     { background: rgba(76,175,130,.08); border-color: var(--step-2);  }
.callout--danger  { background: rgba(224,92,92,.08);  border-color: var(--step-4);  }
.callout__title   { font-size: var(--text-sm); font-weight: 700; color: var(--c-navy); margin-bottom: var(--sp-1); }
.callout p        { font-size: var(--text-sm); margin: 0; }

/* ── TABLE ────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table thead tr { background: var(--c-navy); }
.data-table th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left; font-weight: 600; font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,.7);
}
.data-table td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--c-border); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--c-surface); }
.data-table__wrap { border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }

/* ── PROGRESS TRACKER ─────────────────────────────────────── */
.progress-track {
  display: flex; align-items: center; gap: 0;
  margin: var(--sp-6) 0;
}
.progress-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; position: relative;
}
.progress-step::after {
  content: ''; position: absolute;
  top: 18px; right: 50%; width: 100%; height: 2px;
  background: var(--c-border); z-index: 0;
}
.progress-step:last-child::after { display: none; }
.progress-step__dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700;
  background: var(--c-surface); color: var(--c-text-light);
  border: 2px solid var(--c-border);
  position: relative; z-index: 1;
  transition: all var(--dur-base) var(--ease);
}
.progress-step.active .progress-step__dot  { background: var(--c-navy); color: var(--c-white); border-color: var(--c-navy); }
.progress-step.done .progress-step__dot    { background: var(--step-2); color: var(--c-white); border-color: var(--step-2); }
.progress-step__label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--c-text-light); margin-top: var(--sp-2);
  text-align: center; white-space: nowrap;
}
.progress-step.active .progress-step__label { color: var(--c-navy); }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  padding: 10px 20px; border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  cursor: pointer; transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
}
.btn--primary { background: var(--c-navy); color: var(--c-white); border-color: var(--c-navy); }
.btn--primary:hover { background: var(--c-teal); border-color: var(--c-teal); color: var(--c-navy); }
.btn--outline { background: transparent; color: var(--c-navy); border-color: var(--c-border); }
.btn--outline:hover { background: var(--c-surface); border-color: var(--c-navy); color: var(--c-navy); }
.btn--teal { background: var(--c-teal); color: var(--c-navy); border-color: var(--c-teal); }
.btn--teal:hover { background: var(--c-navy); color: var(--c-teal); border-color: var(--c-navy); }
.btn--sm { padding: 6px 14px; font-size: var(--text-xs); }

/* ── DIVIDER ──────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--c-border); margin: var(--sp-6) 0; }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--c-navy);
  color: rgba(255,255,255,.5);
  text-align: center;
  font-size: var(--text-xs);
  padding: var(--sp-5) 0;
  margin-top: var(--sp-9);
}
.site-footer a { color: var(--c-teal); }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp var(--dur-slow) var(--ease) both; }
.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }
.delay-4 { animation-delay: 320ms; }
.delay-5 { animation-delay: 400ms; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--sp-4); }
  .step-card__header { padding: var(--sp-4); }
  .step-card__body   { padding: var(--sp-4); }
  .header-nav { display: none; }
}