/* ════════════════════════════════════════════════════════════════
   Joglekar Lab — "Spindle" theme
   Built from the lab logo: purple chromatids, green microtubules,
   pink kinetochores. Loaded after each page's own <style> block,
   so it overrides the older navy/maize look without touching it.
   ════════════════════════════════════════════════════════════════ */

:root {
  --purple:       #34296E;   /* logo chromatids — primary brand */
  --purple-dark:  #1F1846;
  --purple-tint:  #EFEDF8;
  --green:        #44B48E;   /* logo microtubules — decorative only */
  --green-text:   #2E8466;   /* green that passes 4.5:1 on white */
  --green-tint:   #E6F5EF;
  --pink:         #FF7A8B;   /* logo kinetochores — decorative only */
  --pink-text:    #C2384E;
  --pink-tint:    #FFEDEF;

  /* remap the old variables so every existing rule picks up the theme */
  --teal:       var(--purple);
  --teal-dark:  var(--purple);
  --teal-light: var(--purple-tint);
  --teal-mid:   #B9B0EA;
  --blue:       var(--purple);
  --blue-light: var(--purple-tint);
  --navy:       var(--purple);
  --amber:      var(--green-text);
  --amber-light:var(--green-tint);
  --maize:      var(--green-text);
  --text:       #1E1A33;
  --text-muted: #5C5772;
  --bg:         #F7F6FB;
  --border:     #E6E3EF;

  /* three microtubule lines, reused everywhere */
  --mt-lines: linear-gradient(var(--green), var(--green)) 0 0 / 100% 2px no-repeat,
              linear-gradient(var(--green), var(--green)) 0 6px / 100% 2px no-repeat,
              linear-gradient(var(--green), var(--green)) 0 12px / 100% 2px no-repeat;
}

h1, h2, h3, h4,
.nav-links a, .btn, .footer-brand-name,
.section-title, .page-hero h1 {
  font-family: 'Montserrat', 'Nunito Sans', sans-serif;
}
a { color: var(--purple); }

/* ── NAV: lab logo · divider · UMMS logo, microtubules underneath ── */
nav {
  height: auto;
  min-height: 84px;
  padding-top: 12px;
  padding-bottom: 26px;            /* room for the three lines */
  border-bottom: none;
  background:
    linear-gradient(var(--green), var(--green)) left calc(100% - 12px) / 100% 2px no-repeat,
    linear-gradient(var(--green), var(--green)) left calc(100% - 6px)  / 100% 2px no-repeat,
    linear-gradient(var(--green), var(--green)) left 100%              / 100% 2px no-repeat,
    #FFFFFF;
}
.nav-brands {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.nav-brands a { display: block; line-height: 0; }
.nav-lab-logo  { height: 70px; width: auto; display: block; margin: -6px 0; }
.nav-umms-logo { height: 34px; width: auto; display: block; }
.nav-divider   { width: 1px; height: 40px; background: #D9D5E6; }

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-links a:hover { background: var(--purple-tint); color: var(--purple); text-decoration: none; }
.nav-links a.active {
  background: transparent;
  color: var(--purple);
  font-weight: 600;
}
.nav-links a.active::before {         /* kinetochore marks the current page */
  content: "";
  width: 9px; height: 12px;
  border-radius: 50%;
  background: var(--pink);
}
.nav-links li:last-child a {          /* Join Us */
  background: var(--purple);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 8px 18px;
}
.nav-links li:last-child a:hover { background: var(--purple-dark); color: #FFFFFF; }

@media (max-width: 1180px) {
  .nav-links a { padding: 6px 9px; font-size: 13px; }
}
@media (max-width: 520px) {
  .nav-brands { gap: 10px; }
  .nav-lab-logo  { height: 52px; }
  .nav-umms-logo { height: 24px; }
  .nav-divider   { height: 28px; }
}

/* ── HOME HERO ── */
.spindle-hero {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  padding: 4.5rem 2rem 5rem;
}
.spindle-hero-lines {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  flex-direction: column; gap: 14px;
  pointer-events: none;
}
.spindle-hero-lines span {
  display: block;
  height: 4px;
  background: linear-gradient(90deg, rgba(68,180,142,0) 0%, var(--green) 30%);
}
.spindle-hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
}
.spindle-hero-text {
  flex: 1 1 520px;
  min-width: 0;
  background: #FFFFFF;
  padding: 2rem 2rem 2rem 0;
}
.spindle-eyebrow {
  margin: 0 0 1.1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-text);
}
.spindle-hero h1 {
  margin: 0 0 1.5rem;
  font-weight: 600;
  font-size: clamp(2.1rem, 4.6vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--purple);
}
.spindle-hero-desc {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 580px;
}
.spindle-hero-mark {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.spindle-hero-mark svg {
  width: 100%;
  max-width: 560px;
  height: auto;
}
.spindle-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.spindle-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--purple-tint);
  color: var(--purple);
}
.spindle-chip::before {
  content: ""; width: 7px; height: 10px; border-radius: 50%; background: var(--pink);
}
@keyframes mt-grow { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
@keyframes kt-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.mt { stroke-dasharray: 600; animation: mt-grow 1.6s ease-out both; }
.kt { transform-box: fill-box; transform-origin: center; animation: kt-pulse 2.4s ease-in-out 1.6s infinite; }
@media (prefers-reduced-motion: reduce) {
  .mt, .kt { animation: none; }
}
@media (max-width: 700px) {
  .spindle-hero { padding: 3rem 1rem 3.5rem; }
  .spindle-hero-text { padding: 1rem 0; }
}

/* ── BUTTONS ── */
.btn { border-radius: 999px; padding: 12px 24px; font-weight: 600; }
.btn-purple  { background: var(--purple); color: #FFFFFF; }
.btn-ghost   { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn-maize   { background: var(--pink); color: var(--purple-dark); }
.btn-white   { color: var(--purple); }

/* ── PAGE HERO (inner pages): white, purple type, microtubules below ── */
.page-hero {
  background:
    linear-gradient(var(--green), var(--green)) left calc(100% - 12px) / 100% 2px no-repeat,
    linear-gradient(var(--green), var(--green)) left calc(100% - 6px)  / 100% 2px no-repeat,
    linear-gradient(var(--green), var(--green)) left 100%              / 100% 2px no-repeat,
    #FFFFFF !important;
  color: var(--text);
  padding-bottom: 4rem;
}
.page-hero h1 { color: var(--purple); letter-spacing: -0.01em; }
.page-hero p  { color: var(--text-muted); opacity: 1; }
.breadcrumb, .breadcrumb a { color: var(--text-muted); opacity: 1; }
.breadcrumb a:hover { color: var(--purple); }
.approach-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--purple-tint);
  color: var(--purple);
  border: none;
}
.approach-chip::before {
  content: ""; width: 7px; height: 10px; border-radius: 50%; background: var(--pink);
}
.overview-stat-num { color: #FFFFFF; }
.overview-stat-label { color: rgba(255,255,255,0.8); }

/* ── SECTION TITLES: kinetochore · title · microtubules ── */
.section-label { color: var(--green-text); letter-spacing: 0.12em; }
.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--purple);
}
.section-title::before {
  content: "";
  flex: none;
  width: 13px; height: 18px;
  border-radius: 50%;
  background: var(--pink);
}
.section-title::after {
  content: "";
  flex: 1 1 60px;
  min-width: 40px;
  height: 14px;
  background: var(--mt-lines);
}

/* ── CARDS & TAGS ── */
.card { border-radius: 16px; border-color: var(--border); }
.card-color-bar {
  height: 14px !important;
  background: var(--mt-lines) !important;
}
.card h3, .news-card h3 { color: var(--purple); }
.card-tag { font-family: 'Montserrat', sans-serif; letter-spacing: 0.06em; }
.tag-teal  { background: var(--purple-tint); color: var(--purple); }
.tag-blue  { background: var(--green-tint);  color: var(--green-text); }
.tag-amber { background: var(--pink-tint);   color: var(--pink-text); }
.tag-pink  { background: var(--pink-tint);   color: var(--pink-text); }

.news-card {
  border-radius: 16px;
  position: relative;
  padding-top: 1.75rem;
  overflow: hidden;
}
.news-card::before {                  /* microtubules across the top of each item */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 14px;
  background: var(--mt-lines);
}
.news-card.news-new { border-color: var(--pink); }

/* ── JOIN BANNER ── */
.join-banner { background: var(--purple); }

/* ── FOOTER: reversed mark on purple ── */
footer {
  background: var(--purple);
  border-top: none;
  color: #D6D1EC;
}
.footer-mark {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1rem;
}
.footer-mark svg { width: 130px; height: auto; flex: none; }
.footer-wordmark {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  letter-spacing: 0.12em;
  font-size: 18px;
  line-height: 1.35;
  color: #FFFFFF;
}
.footer-brand-sub { color: #D6D1EC; }
footer h4 { color: #FFFFFF; }
footer a, footer ul a { color: #D6D1EC; }
footer ul a:hover, footer a:hover { color: #FFFFFF; }
.footer-copy { border-top-color: rgba(255,255,255,0.18); color: #BDB6DE; }
.footer-copy span, .footer-copy a { color: #D6D1EC !important; }

/* ── FOCUS ── */
*:focus-visible, .nav-links a:focus-visible {
  outline: 3px solid var(--green-text);
  outline-offset: 3px;
}
footer *:focus-visible { outline-color: #FFFFFF; }
.skip-nav { background: var(--purple); color: #FFFFFF; }

/* research page: big area numbers in logo colours */
.research-number { color: var(--green-text) !important; }
