/* vs-story-cta — reusable "Have a story that needs filming?" CTA band for
 * portfolio/project pages + the contact-form popup it opens.
 *
 * The band is a straight port of the editorial reading view's .vs-ctaband
 * (inject_editorial.py) so both surfaces stay visually identical: near-black
 * rounded card, Montserrat display headline, red pill button. Self-contained
 * tokens — no dependency on vs-editorial.css.
 *
 * The popup does NOT own a copy of the contact form. vs-story-cta.js MOVES the
 * page's existing .vs-contact module (inject_contact.py) into the dialog on
 * open and returns it to its host section on close, so the form logic,
 * styling and endpoint stay single-sourced in vs-contact.{css,js}.
 */

.vs-scta {
  --scta-ink: #121110;
  --scta-accent: #D20000;
  --scta-accent-2: #A50000;
  --scta-ease: cubic-bezier(.22, .61, .36, 1);
  --scta-disp: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 1240px;
  margin: 88px auto;
  padding: 0 28px;
  position: relative;
  z-index: 3;
}
.vs-scta *, .vs-scta *::before, .vs-scta *::after { box-sizing: border-box; }
.vs-scta__in {
  background: var(--scta-ink);
  border-radius: 30px;
  color: #fff;
  padding: 60px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.vs-scta__title {
  font-family: var(--scta-disp);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 0;
  padding: 0;
  max-width: 20ch;
  color: #fff;
  text-transform: none;
}
.vs-scta__sub {
  font-family: var(--scta-disp);
  color: rgba(244, 241, 236, .66);
  margin: 12px 0 0;
  padding: 0;
  font-size: 16.5px;
  line-height: 1.55;
}
.vs-scta__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  cursor: pointer;
  font-family: var(--scta-disp);
  font-weight: 600;
  font-size: 15px;
  padding: 17px 32px;
  border-radius: 999px;
  background: var(--scta-accent);
  color: #fff !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform .25s var(--scta-ease), background .25s var(--scta-ease),
              box-shadow .25s var(--scta-ease);
}
.vs-scta__btn:hover {
  background: var(--scta-accent-2);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(210, 0, 0, .55);
}
.vs-scta__btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

@media (max-width: 680px) {
  .vs-scta { margin: 64px auto; padding: 0 20px; }
  .vs-scta__in { flex-direction: column; align-items: flex-start; padding: 42px 30px; }
}

/* ── Popup ──────────────────────────────────────────────────────────────
 * Overlay blurs the page behind it; the white dialog hosts the (moved)
 * .vs-contact module. Closable via the X button, ESC, or a backdrop click. */
.vs-scta-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;               /* vs-story-cta.js flips this to flex */
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(12, 10, 9, .45);
  -webkit-backdrop-filter: blur(18px) saturate(.85);
  backdrop-filter: blur(18px) saturate(.85);
  opacity: 0;
  transition: opacity .32s cubic-bezier(.22, .61, .36, 1);
}
.vs-scta-overlay.is-open { opacity: 1; }
.vs-scta-dialog {
  position: relative;
  width: min(1140px, 100%);
  max-height: min(880px, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .55);
  transform: translateY(16px) scale(.98);
  transition: transform .32s cubic-bezier(.22, .61, .36, 1);
}
.vs-scta-overlay.is-open .vs-scta-dialog { transform: none; }
/* Brand-red circular close. The theme's global button reset also targets
 * this element, so every visual property is pinned explicitly. */
.vs-scta-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 30; /* above the moved .vs-contact, which is position:relative;z-index:2 */
  width: 44px !important;
  height: 44px !important;
  min-width: 0 !important;
  display: grid;
  place-items: center;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  cursor: pointer;
  background: #D20000 !important;
  color: #fff !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: background .2s, transform .2s;
}
.vs-scta-close:hover { background: #A50000 !important; transform: scale(1.05); }
.vs-scta-close:focus-visible { outline: 2px solid #D20000; outline-offset: 2px; }
.vs-scta-close svg { width: 18px; height: 18px; }
.vs-scta-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 60px 44px 52px;
}

/* The moved contact module: neutralize host-section assumptions and any
 * theme scroll-reveal state, and compact it for dialog duty. */
.vs-scta-scroll .vs-contact {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
.vs-scta-scroll .vs-c-head { margin-bottom: 40px; }
.vs-scta-scroll .vs-c-title { font-size: clamp(32px, 4.5vw, 44px); }
.vs-scta-scroll .vs-c-sub { font-size: clamp(16px, 2vw, 19px); }

/* Page scroll lock while the popup is open. */
html.vs-scta-lock, html.vs-scta-lock body { overflow: hidden !important; }

@media (max-width: 680px) {
  .vs-scta-overlay { padding: 12px; }
  .vs-scta-dialog { border-radius: 20px; max-height: 94vh; }
  .vs-scta-scroll { padding: 56px 18px 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .vs-scta-overlay, .vs-scta-dialog, .vs-scta__btn, .vs-scta-close { transition: none !important; }
}
