/* ============================================================
   VBM Effects — Tech Grid Background + Interactive Elements
   ============================================================ */

/* ── TECH GRID BACKGROUND ── */
.tech-grid-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,.26) 0%, transparent 34%),
    radial-gradient(circle at 82% 22%, rgba(124,58,237,.22) 0%, transparent 36%),
    radial-gradient(circle at 50% 85%, rgba(34,211,238,.10) 0%, transparent 30%),
    linear-gradient(180deg, #060a14 0%, #0a1020 100%);
}
.tech-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.065) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 80%, transparent 100%);
}
.tech-grid-bg::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  left: 50%; top: 45%;
  z-index: -1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(59,130,246,.08);
  filter: blur(100px);
}
.tech-grid-bg > * { position: relative; z-index: 1; }

/* Subtle variant for auth / secondary sections */
.tech-grid-bg-subtle {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(37,99,235,.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(124,58,237,.14) 0%, transparent 36%),
    linear-gradient(180deg, #060a14 0%, #0a1020 100%);
}
.tech-grid-bg-subtle::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.045) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
}
.tech-grid-bg-subtle > * { position: relative; z-index: 1; }

/* ── INTERACTIVE BUTTON ── */
.btn,
.btn-submit,
.header-cta,
.credits-btn,
.btn-submit {
  transform: translateY(0) scale(1);
  transition:
    transform 200ms cubic-bezier(.22,1,.36,1),
    box-shadow 200ms ease,
    opacity 200ms ease,
    filter 200ms ease !important;
  will-change: transform;
}
.btn:hover,
.btn-submit:hover,
.header-cta:hover,
.credits-btn:hover {
  transform: translateY(-2px) scale(1.018) !important;
  filter: brightness(1.08) !important;
}
.btn:active,
.btn-submit:active,
.header-cta:active,
.credits-btn:active {
  transform: translateY(0) scale(0.97) !important;
  transition-duration: 80ms !important;
}
/* Override disabled state */
.btn:disabled, .btn[disabled],
.btn-submit:disabled {
  transform: none !important;
  filter: none !important;
  cursor: not-allowed;
}

.btn-primary:hover { box-shadow: 0 8px 24px rgba(108,99,255,.35) !important; }
.btn-danger:hover  { box-shadow: 0 8px 20px rgba(239,68,68,.25) !important; }

/* ── INTERACTIVE CARD ── */
.interactive-card,
.site-card,
.stat-card,
.pkg-card,
.tpl-card,
.step-card,
.meta-card,
.section-card {
  transform: translateY(0) scale(1);
  transform-origin: center;
  will-change: transform;
  transition:
    transform 220ms cubic-bezier(.22,1,.36,1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease !important;
}

/* Cards with hover lift */
.site-card:hover,
.stat-card:hover,
.pkg-card:hover {
  transform: translateY(-4px) scale(1.018) !important;
  border-color: rgba(108,99,255,.45) !important;
  box-shadow:
    0 20px 48px rgba(0,0,0,.32),
    0 0 28px rgba(108,99,255,.12) !important;
}

/* Template cards — subtle lift only (they already have selection state) */
.tpl-card:hover {
  transform: translateY(-3px) scale(1.02) !important;
}

/* Step/meta/section cards: no lift, just glow border on hover */
.step-card:hover,
.meta-card:hover,
.section-card:hover {
  border-color: rgba(108,99,255,.22) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.18) !important;
}

/* active press for clickable cards */
.site-card:active,
.pkg-card:active,
.tpl-card:active {
  transform: translateY(0) scale(0.985) !important;
  transition-duration: 80ms !important;
}

/* Focus-visible for keyboard nav */
.site-card:focus-visible,
.stat-card:focus-visible,
.pkg-card:focus-visible {
  outline: 3px solid rgba(108,99,255,.5);
  outline-offset: 3px;
}

/* ── GLOW CARD (cursor-tracking radial glow) ── */
.glow-card {
  position: relative;
  overflow: hidden;
}
.glow-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(
    300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(108,99,255,.12),
    transparent 50%
  );
  transition: opacity 200ms ease;
  z-index: 0;
}
.glow-card:hover::before { opacity: 1; }
.glow-card > * { position: relative; z-index: 1; }

/* ── SELECTABLE CARD ── */
.selectable-card {
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease !important;
}
.selectable-card.is-selected {
  border-color: #3b82f6 !important;
  background: rgba(37,99,235,.1) !important;
  box-shadow:
    0 0 0 1px rgba(59,130,246,.3),
    0 12px 32px rgba(37,99,235,.12) !important;
}

/* ── AUTH SHELL OVERRIDE ── */
/* Replace the light gradient on auth-shell with dark tech style */
.auth-shell {
  background:
    radial-gradient(circle at 20% 30%, rgba(37,99,235,.2) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(124,58,237,.16) 0%, transparent 38%),
    radial-gradient(circle at 50% 95%, rgba(34,211,238,.08) 0%, transparent 30%),
    linear-gradient(180deg, #060a14 0%, #0a1020 100%) !important;
  min-height: 100vh !important;
}
/* Grid overlay on auth-shell */
.auth-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 90%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 90%);
}
.auth-shell::after { display: none; }
.auth-shell > * { position: relative; z-index: 1; }

/* Auth card: keep white but add subtle glass feel */
.auth-card {
  background: rgba(255,255,255,.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── DASHBOARD BODY GRID ── */
/* Subtle grid on dashboard body */
body.dashboard-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.032) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* Public body grid enhancement */
body.public-body {
  background-image:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,.18) 0%, transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(124,58,237,.14) 0%, transparent 32%),
    radial-gradient(circle at 50% 90%, rgba(34,211,238,.08) 0%, transparent 30%),
    linear-gradient(rgba(148,163,184,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.055) 1px, transparent 1px),
    linear-gradient(180deg, #060a14 0%, #0a1020 100%) !important;
  background-size: auto, auto, auto, 46px 46px, 46px 46px, auto !important;
  background-attachment: fixed !important;
}

/* ── MOBILE — no hover ── */
@media (hover: none) {
  .btn:hover,
  .btn-submit:hover,
  .header-cta:hover,
  .credits-btn:hover,
  .site-card:hover,
  .stat-card:hover,
  .pkg-card:hover,
  .tpl-card:hover,
  .step-card:hover,
  .meta-card:hover,
  .section-card:hover {
    transform: none !important;
    box-shadow: inherit !important;
    border-color: inherit !important;
    filter: none !important;
  }
  .btn:active,
  .btn-submit:active {
    transform: scale(0.97) !important;
  }
  .site-card:active,
  .pkg-card:active {
    transform: scale(0.98) !important;
  }
  .glow-card::before { display: none; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-submit,
  .site-card,
  .stat-card,
  .pkg-card,
  .tpl-card,
  .step-card,
  .meta-card,
  .section-card,
  .interactive-card,
  .interactive-button,
  .selectable-card,
  .header-cta,
  .credits-btn {
    transition: none !important;
    transform: none !important;
    will-change: auto !important;
  }
  .glow-card::before { display: none; }
}

/* ── PREVENT OVERFLOW on hover ── */
/* Container cards must not clip the shadow */
.sites-grid,
.stat-grid,
.packages-grid,
.template-grid,
.services-grid {
  overflow: visible !important;
}

/* ═══════════════════════════════════════════════
   PROCESS FLOW MODAL
═══════════════════════════════════════════════ */
.pf-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .25s ease;
}
.pf-overlay.pf-open { opacity: 1; }

.pf-card {
  background: #09091a;
  border: 1px solid rgba(108,99,255,.32);
  border-radius: 20px;
  width: 100%; max-width: 460px;
  box-shadow: 0 32px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(108,99,255,.08), inset 0 1px 0 rgba(255,255,255,.04);
  padding: 26px 24px 22px;
  transform: scale(.93) translateY(14px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  max-height: 92vh; overflow-y: auto;
}
.pf-overlay.pf-open .pf-card { transform: scale(1) translateY(0); }

/* Header */
.pf-header { margin-bottom: 20px; }
.pf-title-wrap { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.pf-title { font-size: .97rem; font-weight: 800; color: #f1f5f9; letter-spacing: -.3px; flex: 1; line-height: 1.25; }

.pf-op-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: rgba(108,99,255,.14); border: 1.5px solid rgba(108,99,255,.3);
  transition: background .3s, border-color .3s;
}
.pf-op-icon svg { width: 15px; height: 15px; }
.pf-op-icon.pf-op-success { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.35); }
.pf-op-icon.pf-op-error   { background: rgba(239,68,68,.1);   border-color: rgba(239,68,68,.3);  }

/* Spinner inside op icon */
.pf-op-spin {
  width: 14px; height: 14px;
  border: 2px solid rgba(108,99,255,.22);
  border-top-color: #6c63ff; border-radius: 50%;
  animation: pfSpin .7s linear infinite;
}

/* Progress bar */
.pf-progress-wrap { display: flex; align-items: center; gap: 10px; }
.pf-progress-track {
  flex: 1; height: 4px;
  background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden;
}
.pf-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #6c63ff, #a5b4fc);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  animation: pfBarShimmer 2s linear infinite;
}
@keyframes pfBarShimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }
.pf-progress-pct { font-size: .72rem; color: #64748b; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }

/* Steps */
.pf-steps-list { display: flex; flex-direction: column; }
.pf-step { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; position: relative; }
/* Connecting vertical line */
.pf-step:not(:last-child)::before {
  content: ''; position: absolute;
  left: 13px; top: 32px; bottom: -7px; width: 2px;
  background: rgba(255,255,255,.06); border-radius: 2px;
  transition: background .3s;
}
.pf-step.pf-step-done:not(:last-child)::before  { background: rgba(16,185,129,.28); }
.pf-step.pf-step-error:not(:last-child)::before { background: rgba(239,68,68,.2); }

/* Step icon circle */
.pf-step-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.pf-icon-pending { background: rgba(255,255,255,.04); border: 2px solid rgba(255,255,255,.1); }
.pf-icon-active  {
  background: rgba(108,99,255,.16); border: 2px solid rgba(108,99,255,.55);
  box-shadow: 0 0 0 3px rgba(108,99,255,.1);
  animation: pfStepGlow 1.6s ease-in-out infinite alternate;
}
@keyframes pfStepGlow {
  from { box-shadow: 0 0 0 3px rgba(108,99,255,.08), 0 0 8px rgba(108,99,255,.2); }
  to   { box-shadow: 0 0 0 5px rgba(108,99,255,.14), 0 0 16px rgba(108,99,255,.35); }
}
.pf-icon-done  { background: rgba(16,185,129,.12); border: 2px solid rgba(16,185,129,.38); }
.pf-icon-error { background: rgba(239,68,68,.1);   border: 2px solid rgba(239,68,68,.38);  }

/* Spinner inside step icon */
.pf-step-spin {
  width: 12px; height: 12px;
  border: 2px solid rgba(108,99,255,.2);
  border-top-color: #818cf8; border-radius: 50%;
  animation: pfSpin .7s linear infinite;
}
@keyframes pfSpin { to { transform: rotate(360deg); } }

/* Check SVG */
.pf-chk-svg { width: 13px; height: 13px; }
.pf-chk-svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: pfChkDraw .32s ease forwards; }
@keyframes pfChkDraw { to { stroke-dashoffset: 0; } }

/* Step content */
.pf-step-content { flex: 1; min-width: 0; padding-top: 5px; }
.pf-step-label {
  font-size: .83rem; font-weight: 600; color: #475569;
  line-height: 1.3; transition: color .22s;
}
.pf-step.pf-step-active .pf-step-label { color: #e2e8f0; }
.pf-step.pf-step-done   .pf-step-label { color: #374151; }
.pf-step.pf-step-error  .pf-step-label { color: #fca5a5; }

.pf-step-sub {
  font-size: .73rem; color: #374151; margin-top: 2px;
  display: none; line-height: 1.4;
}
.pf-step-sub.visible { display: block; }

/* Footer */
.pf-footer { margin-top: 18px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 16px; }
.pf-result-msg {
  font-size: .85rem; color: #94a3b8; margin-bottom: 12px; line-height: 1.5;
  animation: pfFadeUp .25s ease;
}
@keyframes pfFadeUp { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.pf-result-error   { color: #fca5a5 !important; }
.pf-result-success { color: #6ee7b7 !important; }

.pf-site-result {
  background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.18);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
  animation: pfFadeUp .3s ease;
}
.pf-site-url-label { font-size: .7rem; color: #475569; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .6px; }
.pf-site-url { font-family: monospace; font-size: .82rem; color: #6ee7b7; word-break: break-all; }

.pf-credits-line { font-size: .75rem; color: #64748b; margin-bottom: 10px; }

.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-btn {
  padding: 10px 16px; border-radius: 9px; font-size: .83rem; font-weight: 700;
  cursor: pointer; border: none; font-family: inherit;
  transition: all .15s; min-height: 44px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.pf-btn-primary  { background: linear-gradient(135deg,#6c63ff,#4f46e5); color: #fff; box-shadow: 0 2px 12px rgba(108,99,255,.35); }
.pf-btn-primary:hover  { opacity: .88; color: #fff; }
.pf-btn-secondary { background: rgba(255,255,255,.07); color: #94a3b8; border: 1px solid rgba(255,255,255,.1); }
.pf-btn-secondary:hover { background: rgba(255,255,255,.12); color: #e2e8f0; }
.pf-btn-danger   { background: rgba(239,68,68,.14); color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }
.pf-btn-danger:hover   { background: rgba(239,68,68,.22); }

/* Mobile */
@media(max-width:500px) {
  .pf-card { padding: 18px 14px 16px; border-radius: 16px; }
  .pf-actions { flex-direction: column; }
  .pf-btn { width: 100%; }
}

/* Reduced motion — remove apenas animações decorativas; spinners e progresso continuam */
@media(prefers-reduced-motion: reduce) {
  .pf-overlay, .pf-card { transition: none !important; }
  .pf-overlay.pf-open .pf-card { transform: none !important; }
  .pf-chk-svg path { animation: none !important; stroke-dashoffset: 0; }
  .pf-icon-active   { animation: none !important; }
  .pf-result-msg    { animation: none !important; }
  .pf-site-result   { animation: none !important; }
}
