:root{
    --nomi-green:#008180;
    --nomi-orange:#d87625;
  
    --text: rgba(31,42,42,.90);
    --muted: rgba(31,42,42,.70);
  
    --radius-xl: 22px;
    --radius-pill: 999px;
  
    --border: rgba(0,129,128,.18);
    --border-focus: rgba(0,129,128,.55);
    --danger: rgba(216,118,37,.95);
  
    --shadow: 0 24px 80px rgba(0,0,0,.16);
  }
  
  *{ box-sizing: border-box; }
  body{
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  }
  
  /* ===== MODAL ===== */
  .nomi-modal{
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
  }
  .nomi-modal.is-open{ display: block; }
  
  .nomi-modal__backdrop{
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(7px);
    animation: nomiFade .2s ease both;
  }
  
  .nomi-modal__dialog{
    position: relative;
    width: min(780px, calc(100% - 26px));
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.94);
    border-radius: 26px;
    box-shadow: var(--shadow);
    padding: 22px 22px 18px;
    animation: nomiPop .28s cubic-bezier(.2,.9,.2,1) both;
  }
  
  /* título verde discreto */
  .nomi-modal__title{
    text-align: center;
    margin: 2px 0 6px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(20px, 2.2vw, 28px);
    color: rgba(0,129,128,.92);
  }
  
  .nomi-modal__subtitle{
    text-align: center;
    margin: 0 auto 14px;
    max-width: 650px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.45;
  }
  
  .nomi-form{
    background: rgba(255,255,255,.70);
    border-radius: var(--radius-xl);
    padding: 16px;
    box-shadow: 0 14px 36px rgba(0,0,0,.06);
  }
  
  .nomi-form__grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
  }
  
  .nomi-field--full{ grid-column: 1 / -1; }
  
  .nomi-label{
    display: block;
    font-weight: 600;
    font-size: 12.5px;
    color: rgba(31,42,42,.68);
    margin: 0 0 6px;
  }
  
  .nomi-control{
    position: relative;
  }
  
  .nomi-ico{
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: rgba(0,129,128,.55);
    pointer-events: none;
  }
  
  .nomi-chevron{
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: rgba(31,42,42,.45);
    pointer-events: none;
  }
  
  .nomi-input{
    width: 100%;
    height: 50px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border);
    padding: 0 16px 0 44px;
    font-size: 16px;
    color: var(--text);
    outline: none;
    background: rgba(255,255,255,.96);
    transition: border-color .16s ease, box-shadow .16s ease;
  }
  
  .nomi-input::placeholder{ color: rgba(31,42,42,.42); }
  
  .nomi-input:focus{
    border-color: var(--border-focus);
    box-shadow: 0 0 0 6px rgba(0,129,128,.10);
  }
  
  .nomi-select{
    appearance: none;
    padding-right: 48px;
  }
  
  .nomi-input.is-invalid{
    border-color: rgba(216,118,37,.55);
    box-shadow: 0 0 0 6px rgba(216,118,37,.10);
  }
  
  .nomi-error{
    display: block;
    min-height: 16px;
    margin-top: 6px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
  }
  
  .nomi-submit{
    display: block;
    width: 210px;
    height: 52px;
    margin: 14px auto 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: rgba(216,118,37,.95);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 16px 40px rgba(216,118,37,.22);
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
  }
  .nomi-submit:hover{
    transform: translateY(-2px);
    filter: saturate(1.03);
    box-shadow: 0 20px 52px rgba(216,118,37,.28);
  }
  .nomi-submit:active{ transform: translateY(0); }
  
  .nomi-legal{
    margin: 10px 0 0;
    text-align: center;
    font-size: 11.5px;
    color: rgba(31,42,42,.55);
  }
  
  @keyframes nomiFade{ from{opacity:0;} to{opacity:1;} }
  @keyframes nomiPop{
    from{ opacity:0; transform: translateY(-46%) scale(.98); }
    to{ opacity:1; transform: translateY(-50%) scale(1); }
  }
  
  @media (max-width: 720px){
    .nomi-modal__dialog{
      width: min(560px, calc(100% - 18px));
      padding: 18px 16px 14px;
    }
    .nomi-form__grid{
      grid-template-columns: 1fr;
      gap: 12px;
    }
    .nomi-submit{ width: 100%; }
  }
  
  @media (prefers-reduced-motion: reduce){
    .nomi-modal__backdrop,
    .nomi-modal__dialog{ animation: none !important; }
  }


  
  
  /* ===== SCROLL SEGURO EN MODAL ===== */
.nomi-modal{
    overflow: auto;                 /* permite scroll si algo se desborda */
    -webkit-overflow-scrolling: touch;
  }
  
  .nomi-modal__dialog{
    max-height: calc(100vh - 32px); /* el modal nunca se sale de pantalla */
    overflow: auto;                 /* scroll dentro del modal */
    overscroll-behavior: contain;   /* evita "scroll chain" raro */
  }
  
  /* ===== RESPONSIVE FUERTE DESDE 425px ===== */
  @media (max-width: 425px){

    .nomi-modal {
      margin-top: 90px;
    }
    .nomi-modal__dialog{
      width: calc(100% - 16px);
      padding: 14px 14px 12px;      /* más compacto */
      border-radius: 18px;
      max-height: calc(100vh - 16px);
    }
  
    .nomi-modal__title{
      font-size: 18px;              /* más discreto */
      margin: 0 0 6px;
      line-height: 1.2;
    }
  
    .nomi-modal__subtitle{
      font-size: 12.5px;
      margin: 0 auto 10px;
    }
  
    .nomi-form{
      padding: 12px;
      border-radius: 16px;
    }
  
    .nomi-form__grid{
      grid-template-columns: 1fr;
      gap: 10px;
    }
  
    .nomi-label{
      font-size: 12px;
      margin-bottom: 5px;
    }
  
    .nomi-input{
      height: 44px;                 /* más bajito */
      font-size: 14.5px;
      padding: 0 14px 0 40px;
    }
  
    .nomi-ico{
      left: 12px;
      font-size: 18px;
    }
  
    .nomi-chevron{
      right: 12px;
      font-size: 20px;
    }
  
    .nomi-error{
      font-size: 11.5px;
      margin-top: 4px;
      min-height: 14px;
    }
  
    .nomi-submit{
      width: 100%;
      height: 46px;
      font-size: 15px;
      margin-top: 10px;
    }
  
    .nomi-legal{
      font-size: 11px;
      margin-top: 8px;
    }
  }








  /* ===== PATCH RESPONSIVE ULTRA COMPACTO (425 / 375 / 320) ===== */
/* Agrega esto al FINAL de tu CSS */

@media (max-width: 425px){
  :root{
    --modal-top-safe: 86px;   /* separación del navbar (ajusta si tu navbar es más alto) */
  }

  /* el backdrop sigue igual; el contenedor sí se acomoda */
  .nomi-modal{
    padding: var(--modal-top-safe) 10px 12px;
    margin-top: 0 !important;     /* mata tu margin-top:90px que te desacomoda */
    display: none;
    overflow: auto;
  }

  .nomi-modal.is-open{
    display: flex;                /* para centrar y controlar mejor */
    align-items: flex-start;
    justify-content: center;
  }

  .nomi-modal__dialog{
    top: 0 !important;            /* ya no usamos el top 50% */
    transform: none !important;   /* y quitamos el translateY */
    width: 100%;
    max-width: 520px;             /* se ve “modal”, no pantalla completa */
    padding: 12px 12px 10px;
    border-radius: 16px;
    max-height: calc(100vh - var(--modal-top-safe) - 18px);
    overflow: auto;
  }

  .nomi-modal__title{
    font-size: 17px;
    margin: 0 0 6px;
    line-height: 1.15;
  }

  .nomi-modal__subtitle{
    font-size: 12.3px;
    margin: 0 auto 10px;
    line-height: 1.35;
  }

  .nomi-form{
    padding: 10px;
    border-radius: 14px;
  }

  .nomi-form__grid{
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .nomi-label{
    font-size: 11.5px;
    margin: 0 0 5px;
  }

  .nomi-input{
    height: 42px;
    font-size: 14px;
    padding: 0 12px 0 38px;
    border-width: 1.75px;
  }

  .nomi-ico{
    left: 11px;
    font-size: 18px;
  }

  .nomi-chevron{
    right: 11px;
    font-size: 20px;
  }

  .nomi-error{
    font-size: 11px;
    margin-top: 3px;
    min-height: 13px;
  }

  .nomi-submit{
    width: 100%;
    height: 44px;
    font-size: 14.5px;
    margin-top: 10px;
  }

  .nomi-legal{
    font-size: 10.8px;
    margin-top: 7px;
  }
}

/* 375px: más apretado */
@media (max-width: 375px){
  :root{ --modal-top-safe: 82px; }

  .nomi-modal{ 
    padding: var(--modal-top-safe) 8px 10px; 
    margin-top: 50px;
  }

  .nomi-modal__dialog{
    padding: 11px 11px 9px;
    border-radius: 15px;
    max-height: calc(100vh - var(--modal-top-safe) - 16px);
  }

  .nomi-modal__title{ font-size: 16px; }
  .nomi-modal__subtitle{ font-size: 12px; }

  .nomi-form{ padding: 9px; border-radius: 13px; }

  .nomi-input{
    height: 40px;
    font-size: 13.6px;
    padding-left: 37px;
  }

  .nomi-submit{ height: 42px; font-size: 14px; }
}

/* 320px: modo mini */
@media (max-width: 320px){
  :root{ --modal-top-safe: 78px; }

  .nomi-modal{ padding: var(--modal-top-safe) 7px 9px; }

  .nomi-modal__dialog{
    padding: 10px 10px 8px;
    border-radius: 14px;
    max-height: calc(100vh - var(--modal-top-safe) - 14px);
  }

  .nomi-modal__title{ font-size: 15px; }
  .nomi-modal__subtitle{ font-size: 11.6px; }

  .nomi-form{ padding: 8px; border-radius: 12px; }

  .nomi-input{
    height: 38px;
    font-size: 13.2px;
    padding: 0 11px 0 36px;
  }

  .nomi-ico{ font-size: 17px; left: 10px; }
  .nomi-chevron{ font-size: 19px; right: 10px; }

  .nomi-submit{ height: 40px; font-size: 13.8px; }
  .nomi-legal{ font-size: 10.5px; }
}
