/* ============================================================
   COSI Lab — homepage (editorial scientific)
   Loaded after styles.css; scoped to the home page.
   ============================================================ */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- hero ---- */
.hero-ed { padding: clamp(64px, 10vh, 130px) 0 clamp(64px, 10vh, 120px); overflow: hidden; }
.hero-grid2 { display: grid; grid-template-columns: 1fr 1.12fr; gap: clamp(20px, 3vw, 52px); align-items: center; }
.hero-title {
  font-family: var(--display); font-weight: 500; color: var(--navy);
  font-size: clamp(44px, 5.6vw, 82px); line-height: 1.06; letter-spacing: -0.018em;
  margin: 0 0 30px; max-width: 13ch;
}
.hero-title .hl-line { display: block; }
.hero-title em { font-style: italic; font-weight: 400; }
.hero-ed .lede { font-size: clamp(16.5px, 1.85vw, 20px); color: var(--slate); max-width: 52ch; line-height: 1.62; margin-bottom: 36px; }
.hero-ed .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- hero CTAs (gradient primary w/ shine sweep + sliding arrow) ---- */
.hero-ctas .btn { position: relative; overflow: hidden; gap: 9px; padding: 14px 26px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease; }
.hero-ctas .btn .ar { display: inline-block; transition: transform .25s ease; }
.hero-ctas .btn:hover { text-decoration: none; transform: translateY(-2px); }
.hero-ctas .btn:hover .ar { transform: translateX(5px); }

.btn-primary { color: #fff; background: var(--navy); border: 1px solid var(--navy); box-shadow: 0 8px 22px -14px rgba(5,32,73,0.7); }
.btn-primary:hover { background: #0A2E5C; border-color: #0A2E5C; box-shadow: 0 14px 30px -14px rgba(5,32,73,0.8); }

.btn-line { color: var(--navy); background: rgba(255,255,255,0.55); border: 1px solid var(--line-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-line:hover { background: #fff; border-color: var(--navy); }

/* ---- hero figure: real proximal femur (WebGL) ---- */
.hero-fig { position: relative; margin: 0; min-height: 680px; }
#femur-canvas {
  position: relative; z-index: 1; display: block; width: 100%; height: 680px;
  opacity: 0; transition: opacity 0.45s ease; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 85%, transparent 99%);
}
#femur-canvas.is-ready { opacity: 1; }
.fig-credit {
  position: relative; z-index: 2; text-align: center; margin: -28px auto 0;
  max-width: 32ch; font-size: 11.5px; line-height: 1.5; color: var(--slate);
  letter-spacing: 0.01em;
}

/* ---- manifesto ---- */
.manifesto p {
  font-family: var(--display); font-weight: 500; color: var(--navy);
  font-size: clamp(24px, 3vw, 38px); line-height: 1.34; letter-spacing: -0.005em;
  max-width: 30em;
}
.manifesto .m2 { margin-top: 1em; }
.manifesto em { font-style: italic; font-weight: 400; }

/* ---- scaled-up type on home sections ---- */
.home #research h2, .home #work h2 { font-size: clamp(30px, 4.2vw, 54px); }
.home .program h3 { font-size: clamp(21px, 2vw, 26px); }

/* ---- end CTA band ---- */
.home-cta h2 { font-size: clamp(30px, 4.4vw, 56px); }
.involve-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); margin-top: clamp(28px, 4vw, 44px); }
.inv { border-top: 1px solid rgba(255,255,255,.25); padding-top: 26px; }
.inv h3 { font-family: var(--display); font-weight: 500; color: #fff; font-size: 24px; margin-bottom: 10px; }
.inv p { color: rgba(255,255,255,.85); font-size: 15.5px; line-height: 1.6; max-width: 44ch; margin-bottom: 22px; }
@media (max-width: 700px) { .involve-grid { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .hero-grid2 { grid-template-columns: 1fr; gap: 8px; }
  .hero-fig { min-height: 480px; order: 2; margin: 0; }
  #femur-canvas { height: 480px; }
  .hero-title { max-width: none; }
}
@media (max-width: 560px) {
  .hero-title { font-size: clamp(40px, 12vw, 56px); }
  .hero-fig { min-height: 400px; }
  #femur-canvas { height: 400px; }
}
