/* ==========================================================================
   Phixr — Stem Financial page
   css/stem.css  (loaded after css/home.css; reuses its tokens, type,
   buttons, eyebrows, sticky header, CTA panel and footer)
   ========================================================================== */

/* ---------- Hero ---------- */
.stem-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding-bottom: 130px;
  background: radial-gradient(circle at 82% 18%, #6139FF 0, transparent 34%),
              radial-gradient(circle at 8% 100%, #3A01AC 0, transparent 40%),
              var(--purple);
}

.stem-orbit {
  position: absolute;
  right: -2%;
  bottom: 40px;
  width: min(62vw, 900px);
  height: auto;
  opacity: .9;
  pointer-events: none;
}

.stem-hero-copy {
  position: relative;
  z-index: 2;
  padding-top: 90px;
}

.stem-hero .kicker { color: #A7ABFF; }
.stem-hero .display { margin: 22px 0 28px; }
.stem-hero .display span { color: #A7ABFF; }

.stem-hero-copy p {
  max-width: 640px;
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: #eee8ff;
}


/* ---------- Shared copy ---------- */
.stem-prose p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.7;
  color: #4c4658;
}
.stem-prose p:last-child { margin-bottom: 0; }

.stem-about .h2 span,
.stem-partners .h2 span,
.stem-case .h2 span { color: #7B73FF; }


/* ---------- About ---------- */
.stem-about {
  background: #fff;
  padding: 120px 0;
}

.stem-about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 90px;
  align-items: start;
}

.stem-about .h2 { margin-bottom: 44px; }

.stem-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.stem-facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 18px 0 18px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.stem-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #FF6B6B;
}

.stem-facts b {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}

.stem-facts span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}


/* ---------- Partners ---------- */
.stem-partners {
  background: #faf9fc;
  padding: 120px 0;
}

.stem-partners .h2 { margin-bottom: 56px; }

.partner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.partner {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 30px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px;
}

.partner-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  background: #EDECFF;
}

.partner-role {
  margin: 4px 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--purple);
}

.partner h3 {
  margin: 0 0 18px;
  font-size: 28px;
  letter-spacing: -.035em;
  color: var(--ink);
}

.partner-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.partner-list li {
  position: relative;
  padding: 0 0 12px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: #4c4658;
}

.partner-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF6B6B;
}


/* ---------- Case study ---------- */
.stem-case {
  background: #fff;
  padding: 120px 0 40px;
}

.stem-case-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 80px;
  align-items: center;
}

.acclime-logo {
  display: block;
  width: 180px;
  height: auto;
  margin-bottom: 34px;
}

.stem-case .h2 { margin-bottom: 30px; }

.stat-card {
  position: relative;
  overflow: hidden;
  color: #fff;
  border-radius: 28px;
  padding: 44px 42px;
  background: radial-gradient(circle at 85% 12%, #6139FF 0, transparent 45%),
              linear-gradient(160deg, #540DEE 0%, #3A01AC 100%);
  box-shadow: 0 30px 80px rgba(46, 0, 140, .25);
}

.stat-card .dotfield {
  opacity: .22;
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 10%, transparent 60%);
          mask-image: radial-gradient(circle at 100% 100%, #000 10%, transparent 60%);
}

.stat-card > *:not(.dotfield) { position: relative; z-index: 1; }

.stat-kicker {
  margin: 0 0 28px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: #A7ABFF;
}

.stat-journey {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.stat-node { display: flex; align-items: baseline; gap: 12px; }

.sn-num {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
}

.sn-lbl {
  font-size: 13px;
  line-height: 1.35;
  color: #DCDAFF;
}

.stat-line {
  flex: 1;
  min-width: 50px;
  height: 24px;
  fill: none;
  stroke: #FF6B6B;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-big {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.sb-num {
  display: block;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
}

.sb-lbl {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  color: #DCDAFF;
}

.stat-exit { padding-top: 28px; }

.se-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: #FF6B6B;
}

.se-val {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.025em;
}

.se-date {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: #DCDAFF;
}


/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .stem-about-grid,
  .stem-case-grid,
  .partner-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  .stem-hero { padding-bottom: 150px; }
  .stem-hero-copy { padding-top: 50px; }
  .stem-orbit { width: 130vw; right: -40vw; bottom: 10px; }
  .stem-about, .stem-partners { padding: 80px 0; }
  .stem-case { padding: 80px 0 20px; }
}

@media (max-width: 600px) {
  .partner { grid-template-columns: 1fr; padding: 26px; gap: 20px; }
  .partner-photo { width: 110px; height: 110px; }
  .stem-facts li { flex-direction: column; gap: 4px; }
  .stat-card { padding: 34px 26px; }
  .sn-num { font-size: 48px; }
  .sb-num { font-size: 44px; }
}

/* title scale matches the homepage (78px / 46px) */
.display, h1.display { font-size: clamp(46px, 5.4vw, 78px) !important; }
@media (max-width: 600px) { .display, h1.display { font-size: 46px !important; } }

/* ---------- Hero art (v2): soft discs, dot field, lilac + coral orbits, animated in ---------- */
.stem-hero { min-height: 600px; background: radial-gradient(circle at 20% 110%, #3A01AC 0, transparent 45%), linear-gradient(120deg, #4700CD 0%, #540DEE 55%, #4A0AE0 100%); }
.stem-hero .dotfield, .stem-orbit { display: none; }
.sf-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.sf-orbits { position: absolute; inset: 0; width: 100%; height: 100%; }
.sf-disc circle { fill: rgba(109, 91, 255, .55); }
.sf-dots { opacity: .5; }
.sf-orbits .o-lilac, .sf-orbits .o-ring, .sf-orbits .o-dash, .sf-orbits .o-coral { fill: none; vector-effect: non-scaling-stroke; }
.sf-orbits .o-lilac { stroke: rgba(167, 171, 255, .75); stroke-width: 1.4; }
.sf-orbits .o-ring { stroke: rgba(255, 107, 107, .8); stroke-width: 1.2; }
.sf-orbits .o-dash { stroke: rgba(215, 210, 255, .8); stroke-width: 1.8; stroke-dasharray: 2 8; stroke-linecap: round; }
.sf-orbits .o-coral { stroke: #FF6B6B; stroke-width: 2.4; stroke-linecap: round; }
.sf-orbits .o-dot circle { fill: #FF6B6B; }
.sf-orbits .o-dot .halo { fill: rgba(255, 107, 107, .3); }
.stem-hero-copy { padding-top: 120px; }

/* motion: discs drift in and float, lines draw, dot pops then glides */
.sf-disc { transform-box: fill-box; transform-origin: center; }
.motion .sf-disc { opacity: 0; transform: scale(.88) translateY(40px); transition: opacity 1.8s ease, transform 2.4s cubic-bezier(.22,1,.36,1); }
.motion .sf-dots { opacity: 0; transition: opacity 2.4s ease .4s; }
.motion .sf-art.on .sf-disc { opacity: 1; transform: none; }
.motion .sf-art.on .sf-dots { opacity: .5; }
.motion .sf-art.on .sf-disc.d1 { transition-delay: .1s; }
.motion .sf-art.on .sf-disc.d2 { transition-delay: .35s; }
.motion .sf-art.on .sf-disc.d1 circle { animation: sf-float 14s ease-in-out 2.6s infinite alternate; }
.motion .sf-art.on .sf-disc.d2 circle { animation: sf-float 17s ease-in-out 2.6s infinite alternate-reverse; }
@keyframes sf-float { to { transform: translate(-26px, 24px); } }
.motion .sf-orbits .o-dot { opacity: 0; transition: opacity .5s ease; }
.motion .sf-orbits .o-dot.on { opacity: 1; }
.motion .sf-orbits:not(.is-on) .o-lilac, .motion .sf-orbits:not(.is-on) .o-ring, .motion .sf-orbits:not(.is-on) .o-coral { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .motion .sf-art.on .sf-disc circle { animation: none; } }

@media (max-width: 900px) {
  .stem-hero { min-height: 0; }
  .sf-art { opacity: .55; }
}
