/* Vela — iPhone & iPad install card (assets/install.js).
   A floating glass card in the site's theme, with a miniature Vela
   address bar that opens the current page in the app. */

.vi-card {
  position: fixed; z-index: 90;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 440px; margin: 0 auto;
  padding: 18px 18px 16px;
  border-radius: 28px;
  border: 1px solid var(--line-2);
  background: radial-gradient(120% 90% at 50% -30%, rgba(var(--accent-rgb), 0.12), transparent 62%), var(--bg-2);
  -webkit-backdrop-filter: saturate(170%) blur(26px); backdrop-filter: saturate(170%) blur(26px);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--accent-rgb), 0.06), 0 18px 50px -30px var(--glow);
  color: var(--text);
  font-family: var(--font-text);
  opacity: 0; transform: translateY(28px) scale(0.97);
  transition: opacity 0.3s var(--ease), transform 0.5s var(--spring);
  pointer-events: none;
}
.vi-card::before {
  /* the accent hairline along the top edge, like the app's Island */
  content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.85), transparent);
}
.vi-card.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.vi-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: var(--surface-2); color: var(--text-2);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.vi-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.vi-close:active { transform: scale(0.92); }

.vi-head { display: flex; align-items: center; gap: 14px; padding-right: 34px; }
.vi-icon {
  width: 52px; height: 52px; border-radius: 13px; flex: none;
  box-shadow: 0 8px 22px -8px var(--glow), 0 0 0 1px var(--line);
}
.vi-copy { min-width: 0; }
.vi-eyebrow {
  margin: 0 0 3px;
  font: 600 10.5px/1.3 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.vi-card h2 {
  margin: 0;
  font: 650 19px/1.2 var(--font-display); letter-spacing: -0.015em;
  color: var(--text);
}
.vi-card h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent-hi); }

/* The miniature address bar: tap it to open this page in Vela */
.vi-addr {
  margin-top: 14px; width: 100%; min-height: 46px;
  display: flex; align-items: center; gap: 9px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  font: 500 14px/1 var(--font-text);
  text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s, background-color 0.2s;
}
.vi-addr:active { border-color: rgba(var(--accent-rgb), 0.6); background: var(--surface); }
.vi-lock { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--good); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vi-url { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vi-url b { color: var(--text); font-weight: 600; }
.vi-go {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14); color: var(--accent);
  font-weight: 600; font-size: 13px;
}
.vi-go svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.vi-note { margin: 12px 2px 12px; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.vi-card.is-missing .vi-note { color: var(--warn); }
.vi-card.is-missing .vi-go { background: var(--surface); color: var(--text-3); }

.vi-get { min-height: 48px; font-weight: 650; }
.vi-get svg { width: 18px; height: 18px; fill: currentColor; stroke: none; margin-top: -2px; }

/* App Store buttons elsewhere on the page */
.btn .icon-apple { fill: currentColor; stroke: none; margin-top: -2px; }

@media (prefers-reduced-motion: reduce) {
  .vi-card { transform: none; transition: opacity 0.2s linear; }
}
