/* ==========================================================
   STORY: Mercury-style scroll sections
   4. Statement + horizontal service cards
   5. Goals (accordion + particle cloud + marquee)
   ========================================================== */

.dim { color: var(--silver-500); }

/* lead form error state (hero + pill) */
.hero-form.err, .pill.err { border-color: rgba(255, 139, 139, 0.7); }

/* ==========================================================
   4. STORY (statement -> service cards)
   ========================================================== */
.story { position: relative; height: 680vh; background: var(--bg-900); }
.story-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.st-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 50% 55%, rgba(34, 197, 94, 0.1), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(17, 73, 42, 0.5), transparent 70%);
}

/* ---------- Heading (grey -> white, phir upar) ---------- */
.st-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-inline: 24px;
  pointer-events: none;
  will-change: transform;
}
.st-h {
  max-width: 17ch;
  text-align: center;
  font-size: clamp(2.5rem, 6.6vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
}
.st-h .w { color: rgba(255, 255, 255, 0.16); }

/* ---------- Cards track ---------- */
.st-viewport {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--header-h) + 118px);
  bottom: 15vh;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.st-track { display: flex; gap: var(--gap, 28px); height: 100%; will-change: transform; }
.st-card {
  flex: none;
  width: var(--cw, 900px);
  height: 100%;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
  will-change: transform, opacity;
}
.st-panel {
  display: grid;
  place-items: center;
  padding: 28px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 30% 110%, rgba(34, 197, 94, 0.2), transparent 70%),
    rgba(0, 0, 0, 0.26);
}
.st-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3vw, 44px);
}
.st-tag {
  margin-bottom: 14px;
  color: var(--green-400);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.st-t {
  font-size: clamp(1.7rem, 2.9vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.st-copy > p { margin-top: 14px; color: var(--silver-500); font-size: 0.98rem; }
.st-ticks { margin: 20px 0 0; display: grid; gap: 9px; }
.st-ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9rem;
  color: var(--silver-300);
}
.st-ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234ade80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.8 2.8L12 5.5'/%3E%3C/svg%3E") center / 11px no-repeat,
    rgba(74, 222, 128, 0.12);
}
.st-link {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  color: var(--green-400);
  font-weight: 500;
  font-size: 0.95rem;
}
.st-link svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.st-link:hover svg { transform: translateX(5px); }

/* ---------- Mini UI panels ---------- */
.ui {
  width: 100%;
  max-width: 340px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 20, 14, 0.86);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.ui-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--silver-300);
}
.ui-head b { font-weight: 500; color: var(--green-400); }
.ui-note { margin-top: 14px; font-size: 0.72rem; color: var(--silver-500); }

/* Invest: bars */
.ui-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.ui-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--green-400), rgba(34, 197, 94, 0.22));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 1s var(--ease);
  transition-delay: calc(0.2s + var(--k, 0) * 70ms);
}
.st-card.on .ui-bars i { transform: scaleY(1); }

/* Insure: checklist */
.ui-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--silver-100);
}
.ui-row small { margin-left: auto; color: var(--green-400); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ui-row .ck {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, 0.45);
}
.ui-row .ck::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid var(--green-400);
  border-bottom: 2px solid var(--green-400);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.45s var(--ease);
  transition-delay: calc(0.25s + var(--k, 0) * 160ms);
}
.st-card.on .ui-row .ck::after { transform: rotate(-45deg) scale(1); }

/* Lend: steps */
.ui-steps { position: relative; display: grid; gap: 18px; padding-left: 32px; }
.ui-steps::before,
.ui-steps::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.ui-steps::after {
  background: var(--green-400);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.6s var(--ease) 0.3s;
}
.st-card.on .ui-steps::after { transform: scaleY(1); }
.ui-steps li { position: relative; font-size: 0.9rem; color: var(--silver-100); }
.ui-steps li::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-800);
  border: 2px solid var(--green-400);
  z-index: 1;
}

/* Trade: line chart */
.ui-chart { width: 100%; height: auto; }
.ui-chart .line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease) 0.2s; }
.ui-chart .area { opacity: 0; transition: opacity 1.4s ease 1.1s; }
.st-card.on .ui-chart .line { stroke-dashoffset: 0; }
.st-card.on .ui-chart .area { opacity: 1; }

/* Plan: journey */
.ui-journey { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 0 6px; }
.ui-journey .node { display: grid; justify-items: center; gap: 10px; }
.ui-journey .node i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-400);
  box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.15), 0 0 24px rgba(74, 222, 128, 0.6);
}
.ui-journey .node span { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--silver-300); }
.ui-journey .link {
  width: 44px;
  height: 2px;
  margin-bottom: 26px;
  background: linear-gradient(90deg, var(--green-400), rgba(74, 222, 128, 0.15));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease) 0.4s;
}
.st-card.on .ui-journey .link { transform: scaleX(1); }

/* ---------- Bottom bar (pill + counter) ---------- */
.st-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-inline: max(24px, calc((100% - var(--container)) / 2));
  opacity: 0;
  pointer-events: none;
}
.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 440px);
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.pill:focus-within { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16); }
.pill input {
  flex: 1;
  width: 0;
  min-width: 0;
  padding: 11px 6px 11px 18px;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
}
.pill input::placeholder { color: var(--silver-500); }
.st-nav { display: flex; align-items: center; gap: 14px; color: var(--silver-300); font-size: 0.95rem; }
.st-nav b { color: #fff; font-weight: 500; }
.st-nav button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transition: background 0.25s, border-color 0.25s;
}
.st-nav button:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); }
.st-nav svg { width: 18px; height: 18px; }

/* ==========================================================
   5. GOALS (accordion + particle cloud)
   ========================================================== */
.gl { position: relative; height: 540vh; background: var(--bg-900); }
.gl-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: calc(var(--header-h) + 3vh) max(24px, calc((100% - var(--container)) / 2)) 12vh;
}
.gl-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 60% at 78% 50%, rgba(34, 197, 94, 0.13), transparent 70%),
    radial-gradient(ellipse 60% 40% at 10% 100%, rgba(17, 73, 42, 0.4), transparent 70%);
}
.gl-h {
  margin: 12px 0 clamp(16px, 3vh, 30px);
  max-width: 16ch;
  font-size: clamp(1.9rem, 3.3vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.06;
  color: #fff;
}

.gl-item { border-bottom: 1px solid var(--line); }
.gl-item:first-child { border-top: 1px solid var(--line); }
.gl-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(7px, 1.25vh, 13px) 4px;
  text-align: left;
  color: var(--silver-500);
  transition: color 0.3s;
}
.gl-btn:hover { color: var(--silver-300); }
.gl-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.gl-ico svg { width: 18px; height: 18px; }
.gl-name {
  flex: 1;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  letter-spacing: -0.025em;
}
.gl-chev { width: 18px; height: 18px; transition: transform 0.4s var(--ease); }
.gl-item.on .gl-btn { color: #fff; }
.gl-item.on .gl-ico { color: var(--green-400); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.1); }
.gl-item.on .gl-chev { transform: rotate(180deg); }

.gl-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.gl-more > div { overflow: hidden; }
.gl-item.on .gl-more { grid-template-rows: 1fr; }
.gl-more p { padding: 0 4px 6px 48px; color: var(--silver-300); font-size: 0.95rem; }
.gl-more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px 48px;
  color: var(--green-400);
  font-weight: 500;
  font-size: 0.92rem;
}
.gl-more a svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.gl-more a:hover svg { transform: translateX(5px); }

/* Right: cloud panel */
.gl-right { display: grid; place-items: center; }
.gl-panel {
  position: relative;
  width: min(100%, 62vh, 520px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 45%, rgba(34, 197, 94, 0.16), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}
.gl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gl-bigico { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.gl-bi {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: clamp(74px, 15vh, 112px);
  height: clamp(74px, 15vh, 112px);
  border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(6, 20, 12, 0.75);
  color: var(--green-400);
  box-shadow: 0 0 60px rgba(74, 222, 128, 0.35);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.gl-bi svg { width: 46%; height: 46%; }
.gl-bi.on { opacity: 1; transform: scale(1); }

.gl-pills {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  display: grid;
}
.gl-pset {
  grid-area: 1 / 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  align-content: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.5s var(--ease);
}
.gl-pset.on { opacity: 1; transform: none; }
.gl-pset span {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(8, 20, 14, 0.8);
  font-size: 0.78rem;
  color: var(--silver-100);
}

/* Marquee */
.marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4vh;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.mq-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: mq 48s linear infinite;
  color: var(--silver-500);
  font-size: 0.98rem;
  white-space: nowrap;
}
.mq-track span { transition: color 0.3s; }
.mq-track span:hover { color: #fff; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ==========================================================
   Responsive
   ========================================================== */
@media (min-width: 992px) and (max-height: 800px) {
  .gl-h { font-size: 2rem; margin-bottom: 12px; }
  .gl-btn { padding-block: 6px; }
  .gl-more p { font-size: 0.9rem; }
}

@media (max-width: 991px) {
  .st-card { grid-template-columns: 1fr; grid-template-rows: 40% 60%; }
  .st-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
  .st-ticks { display: none; }
  .st-copy { padding: 22px 24px; }
  .ui { padding: 14px 16px; max-width: 300px; }
  .ui-bars { height: 80px; }
  .ui-row { padding: 8px 0; }
  .ui-steps { gap: 10px; }
  .ui-note { display: none; }
  .st-viewport { top: calc(var(--header-h) + 100px); bottom: 17vh; }
  .st-nav { display: none; }
  .st-bar { bottom: 3.5vh; padding-right: 86px; }   /* WhatsApp button ke liye jagah */
  .pill { width: auto; flex: 1; max-width: none; }
  .pill .btn { padding: 10px 16px; font-size: 0.9rem; }

  .gl-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 12px;
    padding: calc(var(--header-h) + 2vh) 20px 10vh;
  }
  .gl-right { order: -1; }
  .gl-panel { width: min(100%, 24vh); border-radius: 22px; }
  .gl-pills { display: none; }
  .gl-h { display: none; }
  .gl-btn { padding-block: 8px; gap: 12px; }
  .gl-ico { width: 30px; height: 30px; }
  .gl-name { font-size: 1.02rem; }
  .gl-more p { font-size: 0.88rem; padding-left: 42px; }
  .gl-more a { margin-left: 42px; margin-bottom: 8px; }
  .marquee { bottom: 3vh; }
}

@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none; }
}

/* Reduced motion: static layout */
.story.is-static, .gl.is-static { height: auto; }
.is-static .story-stage { position: relative; height: auto; padding: calc(var(--header-h) + 40px) 0 80px; }
.is-static .st-title { position: static; padding-bottom: 32px; }
.is-static .st-h { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.is-static .st-viewport { position: static; opacity: 1; pointer-events: auto; height: 560px; overflow-x: auto; scroll-snap-type: x mandatory; }
.is-static .st-track { padding-inline: 24px !important; }
.is-static .st-card { scroll-snap-align: center; }
.is-static .st-bar { position: static; opacity: 1; pointer-events: auto; margin-top: 28px; }
.is-static .st-nav { display: none; }
.is-static .gl-stage { position: relative; height: auto; min-height: 100vh; padding-bottom: 100px; }