/* ========================================================
   Special Academy — Org Structure Page (extends styles.css)
   ======================================================== */

/* ===== Page Hero ===== */
.org-hero {
  padding: 150px 0 10px;
  text-align: center;
}
.org-hero .eyebrow { margin-bottom: 22px; }
.org-hero .hero-title { margin: 0 auto; }
.org-hero .hero-lead { margin: 18px auto 0; }

/* ===== Startup note banner ===== */
.note-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 760px;
  margin: 34px auto 0;
  padding: 18px 22px;
  text-align: right;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.note-banner i {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 18px;
  margin-top: 3px;
}
.note-banner p { color: var(--text-2); font-size: 14px; line-height: 1.7; }
.note-banner b { color: var(--text); }

/* ===== Phase legend ===== */
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 26px auto 0;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
}
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-core   { background: #10b981; }
.dot-growth { background: #3b82f6; }
.dot-scale  { background: #a855f7; }

/* ===== Leadership Org Chart (CSS tree) ===== */
.orgchart {
  margin: 56px 0 20px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.tree { min-width: max-content; margin-inline: auto; }
.tree ul {
  display: flex;
  justify-content: center;
  position: relative;
  padding-top: 26px;
}
.tree ul ul::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  border-left: 2px solid var(--border-2);
  height: 26px;
}
.tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  list-style: none;
  position: relative;
  padding: 26px 14px 0;
}
.tree li::before, .tree li::after {
  content: '';
  position: absolute;
  top: 0; right: 50%;
  width: 50%; height: 26px;
  border-top: 2px solid var(--border-2);
}
.tree li::after { right: auto; left: 50%; border-left: 2px solid var(--border-2); }
.tree li::before { border-right: 2px solid var(--border-2); }
.tree li:only-child { padding-top: 26px; }
.tree li:only-child::before, .tree li:only-child::after { display: none; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid var(--border-2); border-radius: 0 6px 0 0; }
.tree li:first-child::after { border-radius: 6px 0 0 0; }

.node {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: all .3s var(--ease);
}
.node:hover { transform: translateY(-3px); border-color: var(--primary); }
.node b { font-family: 'Sora','Cairo',sans-serif; font-size: 14.5px; font-weight: 700; }
.node span { font-size: 11.5px; color: var(--text-2); font-family: 'Sora', sans-serif; }
.node-ceo {
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 14px 36px -12px rgba(99,102,241,.6);
}
.node-ceo b, .node-ceo span { color: #fff; }
.node-ceo span { opacity: .85; }

/* ===== Department block ===== */
.dept { padding: 64px 0; }
.dept + .dept { border-top: 1px solid var(--border); }

.dept-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}
.dept-index {
  flex-shrink: 0;
  width: 60px; height: 60px;
  border-radius: 16px;
  background: var(--dept, var(--primary));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 12px 28px -12px var(--dept, var(--primary));
}
.dept-titles h2 {
  font-family: 'Sora', 'Cairo', sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.25;
}
.dept-titles span {
  display: block;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 2px;
  font-family: 'Sora', sans-serif;
}
.dept-desc {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.75;
  max-width: 760px;
  margin-bottom: 34px;
}

/* ===== Hierarchy flow chips ===== */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 30px;
}
.flow-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-inline-end: 6px;
}
.flow-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.flow-chip i { color: var(--dept, var(--primary)); font-size: 12px; }
.flow-arrow { color: var(--dept, var(--accent)); font-size: 12px; opacity: .65; }

/* ===== Role cards grid ===== */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.role-card {
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .4s var(--ease);
  position: relative;
  overflow: hidden;
}
.role-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: var(--c, var(--primary));
  filter: blur(55px);
  opacity: 0;
  transition: opacity .4s ease;
}
.role-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
}
.role-card:hover::before { opacity: .22; }

.role-top {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.role-icon {
  flex-shrink: 0;
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--c, var(--primary));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 19px;
  transition: all .35s ease;
}
.role-card:hover .role-icon { transform: scale(1.08) rotate(-5deg); }
.role-meta { flex: 1; min-width: 0; }
.role-name {
  font-family: 'Sora', 'Cairo', sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}
.role-en {
  display: block;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
  font-family: 'Sora', sans-serif;
  letter-spacing: -.2px;
}
.phase-badge {
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.phase-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.phase-core   { background: rgba(16,185,129,.13); color: #10b981; }
.phase-core::before { background: #10b981; }
.phase-growth { background: rgba(59,130,246,.13); color: #3b82f6; }
.phase-growth::before { background: #3b82f6; }
.phase-scale  { background: rgba(168,85,247,.13); color: #a855f7; }
.phase-scale::before { background: #a855f7; }

.task-list {
  display: grid;
  gap: 10px;
  position: relative; z-index: 1;
}
.task-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}
.task-list i {
  flex-shrink: 0;
  width: 19px; height: 19px;
  margin-top: 2px;
  border-radius: 6px;
  background: var(--grad-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 9px;
}

/* Early-stage realism note inside a card */
.role-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  position: relative; z-index: 1;
}
.role-note i { color: #f59e0b; font-size: 12px; }

/* Wide card spans both columns */
.role-card.span2 { grid-column: span 2; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .role-grid { grid-template-columns: 1fr; }
  .role-card.span2 { grid-column: auto; }
  .dept-head { gap: 14px; }
  .dept-index { width: 52px; height: 52px; font-size: 21px; }
  .org-hero { padding: 120px 0 10px; }
  .note-banner { text-align: right; }
}
