/* ═══════════════════════════════════════════
   7Stem — app-facing chrome that the plain tool pages do not need:
   the launch intro, the "we have an Android app" bar, and the app card.

   Loaded only by the pages that ship to vocalremover.7by.in. Everything here
   is injected by assets/pwa.js, so on any site that does not load that script
   these rules simply match nothing.

   Colours come from assets/style.css (Design System v3, light). They are
   repeated as fallbacks so the intro still renders correctly in the moment
   before the main stylesheet arrives — which is exactly when it is on screen.
   ═══════════════════════════════════════════ */

/* ───────────────────────── launch intro ───────────────────────── */

#stem-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--bg, #F7F8FB);
  /* Starts opaque and only ever fades out. Fading IN would show the page
     underneath first, which defeats the point of an intro. */
  opacity: 1;
  transition: opacity .38s ease;
}

#stem-intro.is-leaving { opacity: 0; }

#stem-intro .si-mark {
  width: 84px;
  height: 84px;
  border-radius: 23px;
  box-shadow: 0 18px 40px rgba(20, 20, 31, .13);
  animation: si-rise .5s cubic-bezier(.2, .7, .3, 1) both;
}

#stem-intro .si-name {
  margin-top: 20px;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  color: var(--text, #14141F);
  animation: si-rise .5s .06s cubic-bezier(.2, .7, .3, 1) both;
}

#stem-intro .si-tag {
  margin-top: 8px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan, #00718F);
  animation: si-rise .5s .12s cubic-bezier(.2, .7, .3, 1) both;
}

/* Present in the DOM for both states so revealing them costs no reflow. */
#stem-intro .si-blurb,
#stem-intro .si-go { display: none; }

#stem-intro.first-run .si-blurb {
  display: block;
  max-width: 310px;
  margin-top: 24px;
  text-align: center;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--mut, #55566A);
  animation: si-rise .5s .18s cubic-bezier(.2, .7, .3, 1) both;
}

#stem-intro.first-run .si-go {
  display: block;
  margin-top: 26px;
  min-width: 200px;
  padding: 14px 26px;
  border: 0;
  border-radius: 13px;
  background: var(--cyan, #00718F);
  color: #fff;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  animation: si-rise .5s .24s cubic-bezier(.2, .7, .3, 1) both;
}

#stem-intro .si-go:active { opacity: .85; }

/* Pinned rather than flowed, so it sits on the bottom edge at any height. */
#stem-intro .si-by {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--dim, #6E7080);
  animation: si-rise .5s .3s cubic-bezier(.2, .7, .3, 1) both;
}

#stem-intro .si-by b { color: var(--text, #14141F); font-weight: 700; }

@keyframes si-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ─────────────────── "we have an Android app" bar ─────────────────── */

.app-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: linear-gradient(100deg, rgba(0, 113, 143, .10), rgba(214, 0, 106, .08));
  border-bottom: 1px solid var(--bord, rgba(20, 20, 31, .11));
  font-size: 13.5px;
  color: var(--text, #14141F);
}

.app-bar-ico { width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; }
.app-bar-txt { flex: 1; min-width: 0; }
.app-bar-txt b { font-weight: 700; }
.app-bar-sub { color: var(--mut, #55566A); }

.app-bar-cta {
  flex-shrink: 0;
  padding: 7px 15px;
  border-radius: 9px;
  background: var(--cyan, #00718F);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.app-bar-x {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dim, #6E7080);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.app-bar-x:hover { background: rgba(20, 20, 31, .07); color: var(--text, #14141F); }

/* On a phone the sentence is the first thing to go; the icon and the button
   carry the message on their own. */
@media (max-width: 620px) {
  .app-bar { padding: 8px 12px; gap: 9px; font-size: 13px; }
  .app-bar-sub { display: none; }
}

/* ───────────────────────── app card ───────────────────────── */

/* The one dark object on a light page. It borrows the app icon's own palette —
   violet into blue — so the card reads as an extension of the icon rather than
   as another white panel among white panels, and it is impossible to scroll
   past without noticing. Everything is CSS: no extra image to ship or cache. */
.app-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 26px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 34px;
  border-radius: 28px;
  background: #0B1220;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 30px 60px -32px rgba(11, 18, 32, .65);
  color: #EAF0F8;
}

/* Two blurred colour pools instead of a flat gradient, so the panel still has
   depth at small sizes. -1 keeps them under the content without needing a
   z-index on every child. */
.app-card::before,
.app-card::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.app-card::before {
  width: 420px; height: 420px;
  left: -120px; top: -190px;
  background: rgba(124, 58, 237, .45);
}

.app-card::after {
  width: 380px; height: 380px;
  right: -110px; bottom: -200px;
  background: rgba(37, 99, 235, .40);
}

/* A glow ring behind the icon, tinted to match it. */
.app-card-logo {
  width: 84px;
  height: 84px;
  border-radius: 23px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .10),
              0 18px 40px -12px rgba(124, 58, 237, .85);
}

.app-card-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.6px;
  color: #FFFFFF;
}

.app-card-by {
  margin-top: 3px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9FC7FF;
}

.app-card-desc {
  margin-top: 11px;
  font-size: 14px;
  line-height: 1.6;
  color: #A8B4CC;
}

/* Three figures rather than claim pills: checkable facts, and they double as a
   reminder of how the credits work. */
.app-card-stats {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.app-card-stats > div {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(4px);
}

.app-card-stats b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.1;
  color: #FFFFFF;
}

.app-card-stats span {
  display: block;
  margin-top: 3px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: .5px;
  color: #8E9BB5;
}

.app-card-cta { text-align: center; }

/* White on dark, so the action is the brightest thing in the card. */
.app-card-cta .btn {
  background: #FFFFFF !important;
  color: #0B1220 !important;
  border: 0 !important;
  border-radius: 13px !important;
  padding: 14px 22px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .8);
}

.app-card-cta .btn:hover { transform: translateY(-1px); }

.app-card-note {
  margin-top: 9px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7C88A1;
}

@media (max-width: 760px) {
  .app-card { grid-template-columns: auto 1fr; gap: 18px; padding: 24px 22px; border-radius: 24px; }
  .app-card-cta { grid-column: 1 / -1; }
  .app-card-cta .btn { width: 100%; }
  .app-card-logo { width: 64px; height: 64px; border-radius: 18px; }
  .app-card-name { font-size: 21px; }
}

@media (max-width: 430px) {
  .app-card-stats { gap: 7px; }
  .app-card-stats > div { padding: 9px 10px; }
  .app-card-stats b { font-size: 18px; }
  .app-card-stats span { font-size: 9px; }
}

/* ─────────────── inside the installed app ─────────────── */

/* pwa.js sets .in-app on <html>. Nothing that advertises the app should be
   visible to somebody already using it. */
html.in-app .app-bar,
html.in-app .app-card-section { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  #stem-intro,
  #stem-intro * { animation: none !important; transition: none !important; }
}
