/* =========================================================
   REGIS - Formulario de Interés Franquicia
   Paleta: Verde REGIS #00843D / Azul REGIS #0055A4 / Gris / Blanco
   ========================================================= */

:root {
  --regis-green:        #00843D;
  --regis-green-hover:  #006B31;
  --regis-green-light:  #E6F4EC;
  --regis-green-dark:   #004D24;
  --regis-blue:         #0055A4;
  --regis-blue-hover:   #004080;
  --regis-blue-light:   #E6EEF7;
  --regis-blue-dark:    #003366;
  --white:              #ffffff;
  --gray-50:            #f8fafc;
  --gray-100:           #f1f5f9;
  --gray-200:           #e2e8f0;
  --gray-300:           #cbd5e1;
  --gray-400:           #94a3b8;
  --gray-500:           #64748b;
  --gray-600:           #475569;
  --gray-700:           #334155;
  --gray-800:           #1e293b;
  --gray-900:           #0f172a;
  --red:                #dc2626;
  --red-light:          #fef2f2;
  --radius-sm:          6px;
  --radius-md:          10px;
  --radius-lg:          16px;
  --radius-xl:          24px;
  --shadow-sm:          0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md:          0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg:          0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl:          0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-green:       0 4px 14px rgba(0,132,61,0.3);
  --shadow-green-lg:    0 10px 30px rgba(0,132,61,0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 1.5rem 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
}

.blob-1 {
  width: 600px; height: 600px;
  background: var(--regis-green);
  top: -15%; right: -15%;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob-2 {
  width: 400px; height: 400px;
  background: var(--regis-blue);
  bottom: -10%; left: -10%;
  animation: blobFloat 10s ease-in-out infinite reverse;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: start;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--regis-green-light);
  color: var(--regis-green-dark);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0,132,61,0.15);
}

.badge-dot {
  width: 8px; height: 8px;
  background: var(--regis-green);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--regis-green), var(--regis-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-item { text-align: center; }

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--regis-green);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--gray-200);
}

/* ---------- FORM WRAPPER ---------- */
.form-wrapper {
  position: sticky;
  top: 100px;
}

.lead-form {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  padding: 2rem 2.5rem 2.5rem;
}

.form-header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--gray-100);
}

.form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.form-subtitle {
  font-size: 0.9375rem;
  color: var(--regis-green);
  font-weight: 600;
}

/* ---------- PROGRESS STEPS ---------- */
.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
  padding: 0 0.5rem;
}

.progress-line {
  position: absolute;
  top: 16px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--gray-200);
  border-radius: 9999px;
  z-index: 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--regis-green), var(--regis-blue));
  border-radius: 9999px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  cursor: default;
}

.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.4s ease;
  border: 3px solid transparent;
}

.step-indicator.active .step-circle {
  background: var(--regis-green);
  color: white;
  box-shadow: 0 0 0 4px var(--regis-green-light);
}

.step-indicator.completed .step-circle {
  background: var(--regis-green);
  color: white;
}

.step-indicator.completed .step-circle::after {
  content: '✓';
  font-size: 1rem;
}

.step-indicator.completed .step-circle {
  font-size: 0;
}

.step-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-400);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.step-indicator.active .step-label {
  color: var(--regis-green);
}

.step-indicator.completed .step-label {
  color: var(--regis-green-dark);
}

/* ---------- FORM PHASES ---------- */
.form-phase {
  display: none;
  animation: fadeIn 0.4s ease;
}

.form-phase.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.phase-header {
  margin-bottom: 1.5rem;
}

.phase-tag {
  display: inline-block;
  background: var(--regis-green-light);
  color: var(--regis-green-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.phase-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.375rem;
}

.phase-desc {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ---------- FORM GROUPS ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-group .required { color: var(--red); margin-left: 0.25rem; }
.form-group .optional { color: var(--gray-400); font-weight: 400; margin-left: 0.25rem; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-400); }

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: var(--gray-300); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--regis-green);
  box-shadow: 0 0 0 3px rgba(0,132,61,0.12);
  background-color: var(--gray-50);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group textarea { resize: vertical; min-height: 100px; }

.field-error {
  display: block;
  font-size: 0.75rem;
  color: var(--red);
  margin-top: 0.375rem;
  min-height: 1rem;
}

/* ---------- RADIO CARDS (situación) ---------- */
.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.radio-card {
  position: relative;
  cursor: pointer;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all 0.25s ease;
  background: var(--white);
}

.radio-card:hover {
  border-color: var(--regis-green);
  box-shadow: var(--shadow-sm);
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radio-card input[type="radio"]:checked + .radio-card-content {
  color: var(--regis-green);
}

.radio-card:has(input:checked) {
  border-color: var(--regis-green);
  background: var(--regis-green-light);
  box-shadow: 0 0 0 3px rgba(0,132,61,0.1);
}

.radio-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.625rem;
}

.radio-card-icon {
  width: 48px; height: 48px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all 0.25s ease;
}

.radio-card:has(input:checked) .radio-card-icon {
  background: var(--regis-green);
  color: white;
}

.radio-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
}

.radio-card-desc {
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ---------- RADIO PILLS ---------- */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-pill {
  position: relative;
  cursor: pointer;
}

.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radio-pill span {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  border-radius: 9999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.radio-pill:hover span {
  border-color: var(--regis-green);
  color: var(--regis-green);
}

.radio-pill input:checked + span {
  background: var(--regis-green);
  color: white;
  border-color: var(--regis-green);
  box-shadow: var(--shadow-green);
}

/* ---------- CONDITIONAL FIELDS ---------- */
.conditional-fields {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--gray-200);
  animation: slideDown 0.3s ease;
}

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

/* ---------- CHECKBOX ---------- */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.form-check input[type="checkbox"] {
  appearance: none;
  width: 1.125rem; height: 1.125rem;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 0.125rem;
  transition: all 0.2s ease;
}

.form-check input[type="checkbox"]:checked {
  background: var(--regis-green);
  border-color: var(--regis-green);
}

.form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 0.3rem; height: 0.55rem;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -55%) rotate(45deg);
}

.form-check label {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--gray-600);
  margin-bottom: 0;
  cursor: pointer;
  line-height: 1.5;
}

.form-check label a { color: var(--regis-green); text-decoration: none; font-weight: 600; }
.form-check label a:hover { text-decoration: underline; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--regis-green), var(--regis-green-dark));
  color: white;
  box-shadow: var(--shadow-green);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--regis-green-hover), var(--regis-green-dark));
  box-shadow: var(--shadow-green-lg);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn-block { width: 100%; }

.phase-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-100);
}

.phase-actions.dual {
  display: flex;
  gap: 0.75rem;
}

.phase-actions.dual .btn { flex: 1; }

.btn-loader svg {
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- SUCCESS PHASE ---------- */
.success-phase {
  text-align: center;
  padding: 2rem 0;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.success-icon {
  width: 80px; height: 80px;
  background: var(--regis-green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--regis-green);
  margin-bottom: 0.5rem;
}

.success-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
}

.success-content > p {
  font-size: 0.9375rem;
  color: var(--gray-500);
  max-width: 400px;
  line-height: 1.6;
}

.success-details {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  text-align: left;
  width: 100%;
  border: 1px solid var(--gray-200);
}

.success-details p {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.success-details ul {
  list-style: none;
  padding: 0;
}

.success-details li {
  font-size: 0.8125rem;
  color: var(--gray-600);
  padding: 0.375rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.success-details li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--regis-green);
  font-weight: 700;
}

/* ---------- FORM MESSAGE ---------- */
.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  display: none;
}

.form-message.success {
  display: block;
  background: var(--regis-green-light);
  color: var(--regis-green-dark);
  border: 1px solid var(--regis-green);
}

.form-message.error {
  display: block;
  background: var(--red-light);
  color: #991b1b;
  border: 1px solid var(--red);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 60px 1.5rem 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--gray-800);
}

.footer-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer-col a {
  display: block;
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--regis-green); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; gap: 3rem; }
  .hero-content { text-align: center; }
  .hero-subtitle { margin: 0 auto 2rem; }
  .hero-stats { justify-content: center; }
  .form-wrapper { position: static; max-width: 600px; margin: 0 auto; }
  .footer-container { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .hero { padding: 100px 1rem 40px; }
  .hero-title { font-size: 2rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-divider { width: 40px; height: 1px; }
  .lead-form { padding: 1.5rem; }
  .radio-cards { grid-template-columns: 1fr; }
  .phase-actions.dual { flex-direction: column; }
  .radio-group { justify-content: center; }
  .progress-steps { padding: 0; }
  .step-label { font-size: 0.625rem; }
  .footer-links { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { text-align: center; }
  .footer-brand p { margin: 0 auto; }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
