@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ===================================================
   AFORE FÁCIL — Design System 2026
   =================================================== */
:root {
  --teal-50:  #EFF8F7;
  --teal-100: #C6E9E6;
  --teal-500: #0A8C7E;
  --teal-600: #087A6D;
  --teal-700: #06685C;
  --teal-800: #04524A;
  --teal-900: #033832;

  --navy:      #0D1E2C;
  --navy-light:#152A3A;

  --amber-300: #E9C46A;
  --amber-400: #D4A843;
  --amber-500: #C49A2F;
  --amber-600: #A67C20;

  --primary:        var(--teal-700);
  --primary-dark:   var(--teal-800);
  --primary-light:  var(--teal-500);
  --accent:         var(--amber-500);
  --accent-dark:    var(--amber-600);

  --bg:        #F4F7F6;
  --surface:   #FFFFFF;
  --border:    #DDE8E6;
  --border-2:  #EEF4F2;
  --text-1:    #0F1F1E;
  --text-2:    #374847;
  --text-3:    #7A9896;
  --success:   #059669;
  --error:     #DC2626;

  --r-sm: 6px;  --r-md: 12px;  --r-lg: 18px;
  --r-xl: 24px; --r-full: 9999px;

  --s-sm:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --s-md:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --s-lg:    0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
  --s-teal:  0 6px 24px rgba(6,104,92,.30);
  --s-amber: 0 6px 24px rgba(196,154,47,.30);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.15s var(--ease);
  --t-normal: 0.25s var(--ease);
  --t-slow: 0.4s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===================================================================
   HEADER
   =================================================================== */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 32px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.5px;
  color: #fff;
  backdrop-filter: blur(10px);
  font-family: 'Inter', sans-serif;
}

.logo-name  { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.4px; line-height: 1.1; }
.logo-domain{ font-size: 11px; color: rgba(255,255,255,.5); font-weight: 500; }

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  padding: 8px 16px;
  border-radius: var(--r-full);
  backdrop-filter: blur(10px);
}

/* ===================================================================
   HERO — Full screen
   =================================================================== */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;

  background:
    radial-gradient(ellipse 55% 65% at 85% 15%, rgba(14,168,152,.22) 0%, transparent 55%),
    radial-gradient(ellipse 45% 55% at 15% 85%, rgba(245,158,11,.14) 0%, transparent 48%),
    linear-gradient(148deg, #061E1B 0%, #0A3530 35%, #0C4E46 65%, #0E6358 100%);
}

/* Grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Geometric circles */
.hero-circle-1, .hero-circle-2, .hero-circle-3 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero-circle-1 {
  width: 700px; height: 700px;
  right: -200px; top: -150px;
  border: 1px solid rgba(255,255,255,.05);
}
.hero-circle-2 {
  width: 500px; height: 500px;
  right: -80px; top: -30px;
  border: 1px solid rgba(255,255,255,.04);
}
.hero-circle-3 {
  width: 300px; height: 300px;
  right: 40px; top: 80px;
  background: radial-gradient(circle, rgba(14,168,152,.12), transparent 70%);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 32px 80px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ---- Hero Left ---- */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--amber-300);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--r-full);
  margin-bottom: 24px;
}

.hero-h1 {
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero-h1 .accent { color: var(--amber-400); }

.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,.68);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 460px;
}

/* CTA Button — el grande */
.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 40px;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  color: #1A1200;
  font-size: 18px;
  font-weight: 800;
  border: none;
  border-radius: var(--r-lg);
  cursor: pointer;
  letter-spacing: -.3px;
  box-shadow: var(--s-amber), 0 0 0 1px rgba(0,0,0,.08);
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}

.btn-hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18), transparent);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.btn-hero-cta:hover { transform: translateY(-3px); box-shadow: 0 20px 50px rgba(245,158,11,.45), 0 0 0 1px rgba(0,0,0,.08); }
.btn-hero-cta:hover::before { opacity: 1; }
.btn-hero-cta:active { transform: translateY(-1px); }

.cta-arrow {
  font-size: 20px;
  transition: transform var(--t-fast);
}
.btn-hero-cta:hover .cta-arrow { transform: translateX(4px); }

/* Trust chips */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.trust-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.trust-chip .dot { width: 6px; height: 6px; background: var(--amber-400); border-radius: 50%; flex-shrink: 0; }

/* ---- Hero Right: Stat Panel ---- */
.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 22px 20px;
  transition: background var(--t-fast);
}
.stat-card:hover { background: rgba(255,255,255,.12); }

.sc-tag  { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--amber-300); margin-bottom: 10px; opacity: .9; }
.sc-num  { font-size: 26px; font-weight: 900; color: #fff; letter-spacing: -1px; line-height: 1; margin-bottom: 4px; }
.sc-label{ font-size: 12px; color: rgba(255,255,255,.55); font-weight: 500; line-height: 1.4; }

.hero-steps {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 22px 24px;
}

.hs-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--amber-400);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hs-steps { display: flex; flex-direction: column; gap: 12px; }

.hs-step {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 500;
}

.hs-num {
  width: 26px; height: 26px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  color: var(--amber-300);
  flex-shrink: 0;
}

/* ===================================================================
   MODAL OVERLAY
   =================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s var(--ease);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Backdrop */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 20, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Card */
.modal-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: 0 30px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(40px) scale(0.96);
  transition: transform .5s var(--spring);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-card::-webkit-scrollbar { width: 4px; }
.modal-card::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* Header sticky: contiene el botón cerrar y nunca tapa el contenido */
.modal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  display: flex;
  justify-content: flex-end;
  padding: 14px 14px 0;
}

/* Close button */
.modal-close {
  width: 36px; height: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-2);
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.modal-close:hover { background: #FEECEC; border-color: #FECACA; color: var(--error); }

/* ===================================================================
   MODAL LOADING STATE
   =================================================================== */
.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 40px 80px;
}

.ml-ring {
  position: relative;
  width: 64px; height: 64px;
}

.ml-ring::before, .ml-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.ml-ring::before {
  border: 5px solid var(--teal-100);
}

.ml-ring::after {
  border: 5px solid transparent;
  border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}

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

.ml-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -.5px;
  font-family: 'Inter', sans-serif;
}

.ml-title { font-size: 16px; font-weight: 700; color: var(--text-1); }
.ml-sub   { font-size: 13px; color: var(--text-3); }

/* ===================================================================
   MODAL FORM CONTENT
   =================================================================== */
.modal-form-content { display: none; }

/* Mini banner de verificación */
.mini-verified {
  display: flex; align-items: center; gap: 10px;
  background: #F0FDF4; border: 1.5px solid #A7F3D0;
  border-radius: var(--r-md); padding: 10px 14px;
  margin: 12px 20px 0;
  animation: fadeSlideIn .4s ease both;
}
.mv-check {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--success); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.mv-nombre { font-size: 13px; font-weight: 700; color: var(--success); }
.mv-curp   { font-size: 11px; color: var(--text-3); font-family: monospace; letter-spacing: .5px; margin-top: 1px; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Progress inside modal */
.modal-progress {
  display: flex;
  align-items: center;
  padding: 4px 24px 0;
  gap: 0;
}

.mp-step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}

.mp-step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border-2);
  margin: 0 8px;
  min-width: 20px;
}

.mp-step.done:not(:last-child)::after { background: var(--success); }

.mp-bubble {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  color: var(--text-3);
  flex-shrink: 0;
  transition: all var(--t-normal);
}
.mp-step.active .mp-bubble { background: var(--primary); color: white; box-shadow: 0 4px 14px rgba(10,118,106,.35); }
.mp-step.done   .mp-bubble { background: var(--success); color: white; }

.mp-label { font-size: 11px; font-weight: 700; color: var(--text-3); white-space: nowrap; }
.mp-step.active .mp-label { color: var(--primary); }
.mp-step.done   .mp-label { color: var(--success); }

/* Modal sections */
.modal-section { padding: 24px 28px; border-bottom: 1px solid var(--border-2); }
.modal-section:last-child { border-bottom: none; }

.ms-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -.3px;
  margin-bottom: 4px;
}

.ms-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--teal-50);
  border: 1.5px solid var(--teal-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.ms-icon--success {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: var(--success);
}

.ms-desc { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }

/* ===================================================================
   CURP INPUT (inside modal)
   =================================================================== */
.curp-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.curp-label-text { font-size: 12px; font-weight: 700; color: var(--text-1); }
.curp-counter    { font-size: 12px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.curp-counter.ok  { color: var(--success); }
.curp-counter.bad { color: var(--error); }

.curp-wrap {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.curp-input-wrap { position: relative; flex: 1; }

.curp-icon {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-3);
  display: flex; align-items: center;
}

.curp-input {
  width: 100%;
  padding: 14px 14px 14px 46px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  color: var(--text-1);
  background: var(--bg);
  transition: all var(--t-fast);
}

.curp-input:focus   { border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(10,118,106,.1); }
.curp-input.valid   { border-color: var(--success); background: white; box-shadow: 0 0 0 4px rgba(5,150,105,.1); }
.curp-input.invalid { border-color: var(--error);   background: white; box-shadow: 0 0 0 4px rgba(220,38,38,.1); }

.btn-verify {
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
  box-shadow: var(--s-teal);
  flex-shrink: 0;
}

.btn-verify:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(10,118,106,.35); }
.btn-verify:disabled { background: linear-gradient(135deg, #94A3B8, #64748B); box-shadow: none; cursor: not-allowed; }

/* CURP breakdown */
.curp-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
  align-items: flex-start;
}

.cb-chunk { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cb-chars {
  font-family: 'Courier New', monospace;
  font-size: 11px; font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--teal-50);
  color: var(--primary);
  border: 1px solid var(--teal-100);
}
.cb-desc { font-size: 9.5px; color: var(--text-3); font-weight: 600; text-align: center; max-width: 62px; line-height: 1.2; }
.cb-sep  { color: var(--border); font-size: 18px; line-height: 1; padding: 0 2px; margin-top: 3px; }

.curp-example { font-size: 11.5px; color: var(--text-3); margin-top: 10px; }
.curp-example code {
  font-family: 'Courier New', monospace;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

/* ===================================================================
   WITHIN-MODAL LOADING
   =================================================================== */
.api-loading {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 18px 0 4px;
}

.api-spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--teal-100);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

.api-loading p { font-size: 13px; color: var(--text-2); font-weight: 500; }

/* ===================================================================
   ERROR BOX
   =================================================================== */
.error-box {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-left: 4px solid var(--error);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-top: 12px;
}
.error-box p { font-size: 13px; color: #991B1B; font-weight: 500; }

/* ===================================================================
   DATOS VERIFICADOS
   =================================================================== */
.datos-section { display: none; animation: fadeSlideIn .4s ease both; }

.verified-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border: 1px solid #A7F3D0;
  border-radius: var(--r-md);
  padding: 13px 18px;
  margin-bottom: 18px;
}

.vb-check {
  width: 38px; height: 38px;
  background: var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(5,150,105,.3);
}

.vb-text strong { display: block; font-size: 13px; font-weight: 800; color: #065F46; }
.vb-text span   { font-size: 12px; color: #059669; }

/* Avatar + nombre */
.persona-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-2);
  margin-bottom: 14px;
}

.persona-avatar {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-900));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
  color: white;
  flex-shrink: 0;
  letter-spacing: -1px;
  box-shadow: var(--s-teal);
}

.persona-nombre { font-size: 17px; font-weight: 800; color: var(--text-1); letter-spacing: -.3px; line-height: 1.2; }

.persona-curp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Courier New', monospace;
  font-size: 11px; font-weight: 800;
  color: var(--primary);
  background: var(--teal-50);
  padding: 3px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--teal-100);
  margin-top: 4px;
}

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.bento-cell {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

.bc-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); margin-bottom: 3px; }
.bc-value { font-size: 13px; font-weight: 700; color: var(--text-1); line-height: 1.3; }

/* ===================================================================
   RETIRO OPTIONS
   =================================================================== */
.retiro-section { display: none; animation: fadeSlideIn .4s ease both; }

.inst-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.inst-opt {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 18px;
  cursor: pointer;
  transition: all var(--t-normal);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  text-align: center;
  align-items: center;
}
.inst-opt:hover { border-color: var(--primary); box-shadow: var(--s-sm); transform: translateY(-2px); }
.inst-opt.selected {
  border-color: var(--primary);
  background: var(--teal-50);
  box-shadow: 0 0 0 4px rgba(10,118,106,.1);
  transform: translateY(-2px);
}
.inst-opt .ro-check { position: absolute; top: 10px; right: 10px; }
.inst-opt.selected .ro-check { display: flex; }
.inst-opt .ro-icon  { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.inst-opt .ro-title { font-size: 16px; font-weight: 800; color: var(--text-1); }
.inst-opt .ro-desc  { font-size: 12px; color: var(--text-2); line-height: 1.5; text-align: center; }

.retiro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.retiro-opt {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 16px;
  cursor: pointer;
  transition: all var(--t-normal);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.retiro-opt:hover { border-color: var(--primary); box-shadow: var(--s-sm); transform: translateY(-2px); }

.retiro-opt.selected {
  border-color: var(--primary);
  background: var(--teal-50);
  box-shadow: 0 0 0 4px rgba(10,118,106,.1);
  transform: translateY(-2px);
}

.ro-check {
  position: absolute;
  top: 12px; right: 12px;
  width: 22px; height: 22px;
  background: var(--primary);
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  color: white; font-size: 11px; font-weight: 800;
  box-shadow: 0 2px 8px rgba(10,118,106,.4);
}
.retiro-opt.selected .ro-check { display: flex; }

.ro-icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}

/* Institución icons */
.ro-icon--afore     { background: linear-gradient(135deg, var(--teal-50), var(--teal-100)); color: var(--teal-700); }
.ro-icon--infonavit { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: #1E40AF; }

/* Retiro icons */
.ro-icon--desempleo { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: #1E40AF; }
.ro-icon--total     { background: linear-gradient(135deg, var(--teal-50), var(--teal-100)); color: var(--teal-700); }
.ro-icon--parcial   { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); color: #9A3412; }
.ro-icon--vejez     { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #065F46; }

.opt-voluntarias .ro-icon { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #065F46; }
.opt-desempleo   .ro-icon { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: #1E40AF; }
.opt-matrimonio  .ro-icon { background: linear-gradient(135deg, #FDF2F8, #FCE7F3); color: #9D174D; }
.opt-parcial     .ro-icon { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); color: #9A3412; }

.ro-title { font-size: 13px; font-weight: 800; color: var(--text-1); line-height: 1.3; }
.ro-desc  { font-size: 11.5px; color: var(--text-2); line-height: 1.4; }

.ro-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px; font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-full);
  margin-top: auto;
  align-self: flex-start;
}
.ro-badge--desempleo { background: #EFF6FF; color: #1E40AF; }
.ro-badge--total     { background: var(--teal-50); color: var(--teal-700); }
.ro-badge--parcial   { background: #FFF7ED; color: #9A3412; }
.ro-badge--vejez     { background: #ECFDF5; color: #065F46; }

.opt-voluntarias .ro-badge { background: #ECFDF5; color: #065F46; }
.opt-desempleo   .ro-badge { background: #EFF6FF; color: #1E40AF; }
.opt-matrimonio  .ro-badge { background: #FDF2F8; color: #9D174D; }
.opt-parcial     .ro-badge { background: #FFF7ED; color: #9A3412; }

/* ===================================================================
   BTN CONTINUAR
   =================================================================== */
.modal-footer {
  padding: 20px 28px 28px;
  display: none;
}

.btn-continuar {
  width: 100%;
  padding: 17px 24px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: white;
  border: none;
  border-radius: var(--r-lg);
  font-size: 16px; font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  transition: all var(--t-fast);
  box-shadow: var(--s-amber);
  letter-spacing: -.2px;
}
.btn-continuar:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(245,158,11,.42); }

/* ===================================================================
   FEATURES
   =================================================================== */
.features-section {
  background: var(--surface);
  border-top: 1px solid var(--border-2);
  padding: 80px 32px;
}

.features-inner { max-width: 1160px; margin: 0 auto; }

.section-eyebrow {
  text-align: center;
  font-size: 11px; font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-h2 {
  text-align: center;
  font-size: 34px; font-weight: 900;
  color: var(--text-1);
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.section-lead {
  text-align: center;
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 52px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feat-card {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 28px 22px;
  text-align: center;
  transition: all var(--t-normal);
}

.feat-card:hover { border-color: var(--teal-100); box-shadow: var(--s-md); transform: translateY(-4px); }

.feat-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--teal-50), var(--teal-100));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  border: 1.5px solid var(--teal-100);
}

.feat-title { font-size: 15px; font-weight: 800; color: var(--text-1); margin-bottom: 8px; }
.feat-desc  { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer { background: var(--teal-900); padding: 52px 32px 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 28px;
}

.footer-logo-name   { color: white; }
.footer-logo-domain { color: rgba(255,255,255,.35); }

.footer-brand p { font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.65; margin-top: 14px; }

.footer-col-title {
  font-size: 11px; font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,.58); text-decoration: none; transition: color var(--t-fast); }
.footer-col ul li a:hover { color: var(--amber-400); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom p { font-size: 12px; color: rgba(255,255,255,.3); }

.footer-badges { display: flex; gap: 10px; }
.f-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  padding: 5px 11px;
  border-radius: var(--r-full);
}

/* ===================================================================
   DRAG HANDLE — bottom sheet indicator (mobile only)
   =================================================================== */
.modal-drag-handle {
  display: none;
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
/* ── Tablet ───────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-panel { max-width: 480px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Header */
  .site-header { padding: 0 16px; }
  .header-inner { height: 60px; }
  .logo-name  { font-size: 17px; }
  .logo-domain{ display: none; }
  .logo-mark  { width: 38px; height: 38px; font-size: 12px; }
  .header-phone { font-size: 12px; padding: 8px 12px; gap: 6px; min-height: 44px; }

  /* Hero */
  .hero-inner { padding: 90px 18px 56px; }
  .hero-h1 { font-size: 30px; letter-spacing: -1.2px; line-height: 1.2; }
  .hero-eyebrow { font-size: 10px; padding: 7px 14px; }
  .hero-sub { font-size: 14px; }
  .hero-panel { display: none; }
  .hero-left { max-width: 100%; }
  .btn-hero-cta { width: 100%; font-size: 16px; padding: 18px 24px; justify-content: center; min-height: 56px; }

  /* Modal — bottom sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-card {
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    max-height: 90dvh;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Entrada desde abajo en lugar del scale de escritorio */
    transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .modal-overlay.open .modal-card {
    transform: translateY(0);
    transition: transform .4s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .modal-loading {
    padding: 32px 24px 40px;
  }
  .modal-drag-handle { display: block; }
  .modal-header {
    padding: 4px 18px 12px;
    border-radius: 24px 24px 0 0;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
  }
  .modal-close { min-width: 44px; min-height: 44px; }
  .modal-section { padding: 16px 18px; }
  .modal-footer  { padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .ml-title { font-size: 15px; }
  .ml-sub   { font-size: 11px; }

  /* CURP input — 16px evita zoom automático en iOS */
  .curp-wrap  { flex-direction: column; gap: 10px; }
  .curp-input { font-size: 16px; letter-spacing: 1.5px; }
  .btn-verify { width: 100%; justify-content: center; padding: 14px; min-height: 48px; }

  /* CURP breakdown — scroll horizontal si desborda */
  .curp-breakdown { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }

  /* Institución grid → 1 columna en móvil */
  .inst-grid { grid-template-columns: 1fr; gap: 10px; }
  .inst-opt  { flex-direction: row; text-align: left; padding: 16px; gap: 14px; align-items: center; }
  .inst-opt .ro-icon  { flex-shrink: 0; }
  .inst-opt .ro-title { font-size: 15px; }
  .inst-opt .ro-desc  { font-size: 12px; }

  /* Retiro grid */
  .retiro-grid { grid-template-columns: 1fr; gap: 10px; }
  .retiro-opt  { flex-direction: row; align-items: center; padding: 14px 16px; gap: 12px; }
  .retiro-opt .ro-icon { flex-shrink: 0; }
  .ro-badge { margin-top: 0; }

  /* Mini-verified banner */
  .mini-verified { flex-wrap: wrap; gap: 6px; margin: 8px 18px 0; }
  .mv-nombre { font-size: 13px; }
  .mv-curp   { font-size: 10px; }

  /* Progress pills */
  .mp-label { display: none; }
  .modal-progress { padding: 8px 18px 0; gap: 4px; }
  .mp-bubble { width: 26px; height: 26px; font-size: 10px; }

  /* Bento datos */
  .bento-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bc-label { font-size: 9px; }
  .bc-value { font-size: 12px; }

  /* Botón continuar */
  .btn-continuar { font-size: 15px; padding: 16px 20px; min-height: 52px; }

  /* Secciones features / footer */
  .features-section { padding: 56px 20px; }
  .section-h2    { font-size: 26px; letter-spacing: -.5px; }
  .section-lead  { font-size: 14px; margin-bottom: 32px; }
  .features-grid { grid-template-columns: 1fr; gap: 12px; }
  .feat-card     { padding: 20px 18px; display: flex; gap: 14px; text-align: left; align-items: flex-start; }
  .feat-icon     { margin: 0; flex-shrink: 0; }
  .feat-title    { margin-bottom: 4px; }
  .footer-top    { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer   { padding: 40px 20px 24px; }
}

/* ── Very small (iPhone SE, 375px) ───────────────────── */
@media (max-width: 390px) {
  .hero-h1    { font-size: 26px; }
  .hero-sub   { font-size: 13px; }
  .modal-card { border-radius: 20px 20px 0 0; }
  /* Ocultar texto del teléfono, solo icono */
  .header-phone span.ph-text { display: none; }
  /* En bento de 2 col, en pantallas muy pequeñas → 1 col */
  .bento-grid { grid-template-columns: 1fr; }
}
