/* ImStem homepage — investor landing. Scoped to .im to avoid fighting CMS CSS. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&display=swap");

html, body {
  overflow: auto !important;
  height: auto !important;
}
body.im-home {
  background: #05080f;
  color: #e8eef6;
}
body.im-home #c_navigation_117-1652406161541 {
  background: transparent !important;
  min-height: 0;
}
.im-sec, .im-cta, .im-signals { scroll-margin-top: 88px; }
#fullpage, .loading { display: none !important; }

.im {
  --void: #05080f;
  --field: #0a1220;
  --panel: #101a2b;
  --ink: #e8eef6;
  --muted: #9aadc2;
  --line: rgba(126, 200, 227, 0.22);
  --signal: #7ec8e3;
  --gold: #c4a574;
  --serif: "Newsreader", "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--void);
}
.im a { color: inherit; }
.im-skip {
  position: absolute; left: -999px; top: 0;
}
.im-skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }

.im-wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

/* HERO */
.im-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 72px;
  overflow: hidden;
}
.im-hero__media {
  position: absolute; inset: 0;
  z-index: 0;
}
.im-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: imKen 28s ease-in-out alternate infinite;
}
@keyframes imKen {
  from { transform: scale(1.08) translate3d(0,0,0); }
  to { transform: scale(1.16) translate3d(-1.5%, -1%, 0); }
}
.im-hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,8,15,0.35) 0%, rgba(5,8,15,0.55) 45%, rgba(5,8,15,0.92) 100%),
    linear-gradient(90deg, rgba(5,8,15,0.55) 0%, rgba(5,8,15,0.15) 55%, rgba(5,8,15,0.4) 100%);
}
.im-hero__inner { position: relative; z-index: 1; width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.im-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 18px;
}
.im-hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 0 0 22px;
}
.im-hero__lead {
  max-width: 42rem;
  font-size: 1.125rem;
  color: #c9d7e6;
  margin: 0 0 32px;
}
.im-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.im-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--signal);
  background: var(--signal);
  color: #061018;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.im-btn:hover { transform: translateY(-1px); background: #b7e4f3; }
.im-btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.im-btn--ghost:hover { border-color: var(--signal); color: var(--signal); background: transparent; }

/* SIGNALS — looping term ticker */
.im-signals {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #070d18;
  overflow: hidden;
}
.im-signals__track {
  display: flex;
  width: max-content;
  animation: im-ticker 36s linear infinite;
}
.im-signals:hover .im-signals__track { animation-play-state: paused; }
.im-signals ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-shrink: 0;
  align-items: center;
}
.im-signals li {
  padding: 18px 40px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d5e4f0;
  white-space: nowrap;
  position: relative;
}
.im-signals li::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(50%, -50%);
  opacity: 0.85;
}
@keyframes im-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* SECTIONS */
.im-sec { padding: 96px 0; }
.im-sec--alt { background: var(--field); }
.im-sec h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 22ch;
}
.im-sec p.im-intro { max-width: 42rem; color: var(--muted); margin: 0 0 40px; }
.im-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}

/* PLATFORM LINEAGE */
.im-lineage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
}
.im-stage {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px 16px 20px;
}
.im-stage figure {
  margin: 0 0 14px;
  aspect-ratio: 1;
  overflow: hidden;
  background: #000;
}
.im-stage img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: saturate(0.85);
  transition: transform .6s ease;
}
.im-stage:hover img { transform: scale(1.04); }
.im-stage .im-code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 6px;
}
.im-stage h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 8px;
}
.im-stage p { margin: 0; color: var(--muted); font-size: 14px; }
.im-arrow {
  display: none;
}

/* WHY — manufacturing foundation */
.im-why {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--void);
}
.im-why__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.im-why__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  filter: saturate(0.55) contrast(1.08);
}
.im-why__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,8,15,0.78) 0%, rgba(5,8,15,0.72) 40%, rgba(5,8,15,0.88) 100%),
    linear-gradient(90deg, rgba(5,8,15,0.7) 0%, rgba(5,8,15,0.42) 100%);
}
.im-why > .im-wrap {
  position: relative;
  z-index: 1;
}
.im-why h2 { max-width: none; }
.im-why .im-intro { max-width: none; margin-bottom: 36px; }
.im-points { list-style: none; margin: 0; padding: 0; }
.im-why .im-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  border-bottom: 1px solid var(--line);
}
.im-points li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 16px;
}
.im-points dt, .im-points .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
  padding-top: 3px;
}

/* IMS001 */
.im-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.im-lead__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  margin: 28px 0 32px;
}
.im-fact .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 4px;
}
.im-fact p { margin: 0; }
.im-note {
  font-size: 13px;
  color: #7f93a8;
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  margin: 0 0 8px;
}
.im-lead__panel {
  border: 1px solid var(--line);
  padding: 28px;
  background: rgba(16,26,43,0.7);
}
.im-lead__panel h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  margin: 0 0 8px;
}

/* PATHWAY */
.im-path > .im-wrap { width: min(1120px, calc(100% - 48px)); }
.im-path > .im-wrap > h2 { max-width: 26ch; }
.im-path__track {
  --path-progress: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.im-path__stage {
  position: relative;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: rgba(16, 26, 43, 0.7);
  padding: 20px 22px 24px;
}
.im-path__num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--field);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--signal);
}
.im-path__seg {
  position: absolute;
  top: 34px;
  left: 50px;
  width: calc(100% - 8px);
  height: 1px;
  background: var(--line);
  pointer-events: none;
  z-index: 0;
}
.im-path__seg i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--signal);
  box-shadow: 0 0 8px rgba(126, 200, 227, 0.4);
  transition: width .7s ease;
}
.im-path__stage:nth-child(1) .im-path__seg i {
  width: calc(100% * min(1, max(0, var(--path-progress) * 3)));
}
.im-path__stage:nth-child(2) .im-path__seg i {
  width: calc(100% * min(1, max(0, (var(--path-progress) - 0.333) * 3)));
}
.im-path__stage:nth-child(3) .im-path__seg i {
  width: calc(100% * min(1, max(0, (var(--path-progress) - 0.666) * 3)));
}
.im-path__stage.is-in .im-path__num {
  border-color: var(--signal);
  box-shadow: 0 0 0 4px rgba(126, 200, 227, 0.1);
}
.im-path__phase {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 16px 0 12px;
}
.im-path__glyph {
  display: block;
  width: 88px;
  height: 24px;
  color: var(--signal);
  margin: 0 0 14px;
}
.im-path__stage h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.28;
  margin: 0 0 10px;
  max-width: none;
}
.im-path__stage p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: none;
}
.im-path__stage:nth-child(1) { transition-delay: 0s; }
.im-path__stage:nth-child(2) { transition-delay: .1s; }
.im-path__stage:nth-child(3) { transition-delay: .2s; }
.im-path__stage:nth-child(4) { transition-delay: .3s; }

/* DEPTH */
.im-depth-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}
.im-stat {
  border-top: 1px solid var(--line);
  padding: 18px 0 8px;
}
.im-stat b {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
}
.im-stat span { color: var(--muted); font-size: 14px; }
.im-news { list-style: none; margin: 0; padding: 0; }
.im-news li {
  border-top: 1px solid var(--line);
}
.im-news a {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 18px 0;
  text-decoration: none;
}
.im-news a:hover { color: var(--signal); }
.im-news time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* CTA */
.im-cta {
  padding: 100px 0 120px;
  background:
    linear-gradient(180deg, rgba(5,8,15,0.72), rgba(5,8,15,0.9)),
    url("../assets/home/lab-process.jpg") center/cover no-repeat;
}
.im-cta h2 { max-width: 22ch; margin: 0 0 18px; }
.im-cta .im-intro { color: #d2deea; }
.im-cta .im-research {
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
}
.im-cta .im-research a { color: var(--signal); text-decoration: none; border-bottom: 1px solid transparent; }
.im-cta .im-research a:hover { border-bottom-color: var(--signal); }

/* reveal */
.im [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.im [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 1024px) {
  .im-lineage, .im-lead, .im-depth-grid, .im-path__track { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .im-path__track { grid-template-columns: 1fr; gap: 16px; }
  .im-path__seg {
    top: auto;
    bottom: -17px;
    left: 36px;
    width: 1px;
    height: 16px;
  }
  .im-path__seg i {
    width: 100%;
    height: calc(100% * min(1, max(0, var(--path-progress) * 3)));
    transition: height .7s ease;
  }
  .im-path__stage:nth-child(1) .im-path__seg i {
    height: calc(100% * min(1, max(0, var(--path-progress) * 3)));
    width: 100%;
  }
  .im-path__stage:nth-child(2) .im-path__seg i {
    height: calc(100% * min(1, max(0, (var(--path-progress) - 0.333) * 3)));
    width: 100%;
  }
  .im-path__stage:nth-child(3) .im-path__seg i {
    height: calc(100% * min(1, max(0, (var(--path-progress) - 0.666) * 3)));
    width: 100%;
  }
}
@media (max-width: 720px) {
  .im-hero { min-height: 92vh; padding: 120px 0 48px; }
  .im-sec { padding: 64px 0; }
  .im-lineage, .im-lead, .im-depth-grid, .im-lead__meta, .im-points li, .im-why .im-points {
    grid-template-columns: 1fr;
  }
  .im-points li { gap: 6px; }
  .im-actions { flex-direction: column; align-items: stretch; }
  .im-news a { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .im-hero__media img { animation: none; }
  .im-signals__track { animation: none; }
  .im [data-reveal] { opacity: 1; transform: none; }
  .im-path__track { --path-progress: 1; }
  .im-path__seg i { transition: none; }
  .im-path__stage { transition-delay: 0s; }
}
